[jboss-svn-commits] JBL Code SVN: r34100 - in labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US: Chapter-Local_search and 3 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Jul 21 10:29:43 EDT 2010
Author: ge0ffrey
Date: 2010-07-21 10:29:43 -0400 (Wed, 21 Jul 2010)
New Revision: 34100
Modified:
labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Benchmarking_and_tweaking/Chapter-Benchmarking_and_tweaking.xml
labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Local_search/Chapter-Local_search.xml
labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Planner_configuration/Chapter-Planner_configuration.xml
labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Planner_introduction/Chapter-Planner_introduction.xml
labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Score_calculation/Chapter-Score_calculation.xml
Log:
JBRULES-2587 Code highlighting role="XML"
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Benchmarking_and_tweaking/Chapter-Benchmarking_and_tweaking.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Benchmarking_and_tweaking/Chapter-Benchmarking_and_tweaking.xml 2010-07-21 14:27:07 UTC (rev 34099)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Benchmarking_and_tweaking/Chapter-Benchmarking_and_tweaking.xml 2010-07-21 14:29:43 UTC (rev 34100)
@@ -31,7 +31,7 @@
<para>A basic benchmarker configuration file looks something like this:</para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting role="XML"><?xml version="1.0" encoding="UTF-8"?>
<solverBenchmarkSuite>
<benchmarkDirectory>local/data/nqueens</benchmarkDirectory>
@@ -120,7 +120,7 @@
<para>To configure graph and CSV output of the best score over time, just add a
<literal>solverStatisticType</literal> line:</para>
- <programlisting><solverBenchmarkSuite>
+ <programlisting role="XML"><solverBenchmarkSuite>
<benchmarkDirectory>local/data/nqueens/solved</benchmarkDirectory>
<solverStatisticType>BEST_SOLUTION_CHANGED</solverStatisticType>
...
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Local_search/Chapter-Local_search.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Local_search/Chapter-Local_search.xml 2010-07-21 14:27:07 UTC (rev 34099)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Local_search/Chapter-Local_search.xml 2010-07-21 14:29:43 UTC (rev 34100)
@@ -442,14 +442,14 @@
<para>A selector is currently based on a <literal>MoveFactory</literal>.</para>
- <programlisting> <selector>
+ <programlisting role="XML"> <selector>
<moveFactoryClass>org.drools.planner.examples.nqueens.solver.NQueensMoveFactory</moveFactoryClass>
</selector></programlisting>
<para>You're not obligated to generate the same set of moves at each step. It's generally a good idea to use
several selectors, mixing fine grained moves and course grained moves:</para>
- <programlisting> <selector>
+ <programlisting role="XML"> <selector>
<selector>
<moveFactoryClass>org.drools.planner.examples.nurserostering.solver.move.factory.EmployeeChangeMoveFactory</moveFactoryClass>
</selector>
@@ -485,7 +485,7 @@
recommend this type of tabu because it tends to give the best results and requires little or no
tweaking.</para>
- <programlisting> <acceptor>
+ <programlisting role="XML"> <acceptor>
<completeSolutionTabuSize>1000</completeSolutionTabuSize>
</acceptor></programlisting>
</listitem>
@@ -494,7 +494,7 @@
<para><emphasis>Move tabu</emphasis> makes recent steps tabu. It does not accept a move equal to one of
those steps.</para>
- <programlisting> <acceptor>
+ <programlisting role="XML"> <acceptor>
<completeMoveTabuSize>7</completeMoveTabuSize>
</acceptor></programlisting>
</listitem>
@@ -502,7 +502,7 @@
<listitem>
<para><emphasis>Undo move tabu </emphasis>makes the undo move of recent steps tabu.</para>
- <programlisting> <acceptor>
+ <programlisting role="XML"> <acceptor>
<completeUndoMoveTabuSize>7</completeUndoMoveTabuSize>
</acceptor></programlisting>
</listitem>
@@ -511,7 +511,7 @@
<para><emphasis>Property tabu</emphasis> makes a property of recent steps tabu. For example, it can make the
queen tabu, so that a recently moved queen can't be moved.</para>
- <programlisting> <acceptor>
+ <programlisting role="XML"> <acceptor>
<completePropertyTabuSize>5</completePropertyTabuSize>
</acceptor></programlisting>
@@ -547,7 +547,7 @@
<para>You can even combine tabu types:</para>
- <programlisting> <acceptor>
+ <programlisting role="XML"> <acceptor>
<completeSolutionTabuSize>1000</completeSolutionTabuSize>
<completeMoveTabuSize>7</completeMoveTabuSize>
</acceptor></programlisting>
@@ -574,7 +574,7 @@
<para>Start with a <literal>simulatedAnnealingStartingTemperature</literal> set to the maximum score delta a
single move can cause. Use the <literal>Benchmarker</literal> to tweak the value.</para>
- <programlisting> <acceptor>
+ <programlisting role="XML"> <acceptor>
<simulatedAnnealingStartingTemperature>10.0</simulatedAnnealingStartingTemperature>
</acceptor>
<forager>
@@ -588,7 +588,7 @@
<para>You can even combine it with a tabu acceptor at the same time. Use a lower tabu size than in a pure tabu
search configuration.</para>
- <programlisting> <acceptor>
+ <programlisting role="XML"> <acceptor>
<simulatedAnnealingStartingTemperature>10.0</simulatedAnnealingStartingTemperature>
<completePropertyTabuSize>5</completePropertyTabuSize>
</acceptor>
@@ -623,7 +623,7 @@
have be evaluated during each step. By default it is positive infinity, so all accepted moves are evaluated
at every step.</para>
- <programlisting> <forager>
+ <programlisting role="XML"> <forager>
<minimalAcceptedSelection>1000</minimalAcceptedSelection>
</forager></programlisting>
</listitem>
@@ -645,7 +645,7 @@
<para><literal>NEVER</literal>: A move is never picked early: all accepted moves are evaluated that the
selection allows. This is the default.</para>
- <programlisting> <forager>
+ <programlisting role="XML"> <forager>
<pickEarlyType>NEVER</pickEarlyType>
</forager></programlisting>
</listitem>
@@ -654,7 +654,7 @@
<para><literal>FIRST_BEST_SCORE_IMPROVING</literal>: Pick the first accepted move that improves the best
score. If none improve the best score, it behaves exactly like the pickEarlyType NEVER.</para>
- <programlisting> <forager>
+ <programlisting role="XML"> <forager>
<pickEarlyType>FIRST_BEST_SCORE_IMPROVING</pickEarlyType>
</forager></programlisting>
</listitem>
@@ -664,7 +664,7 @@
last step score. If none improve the last step score, it behaves exactly like the pickEarlyType
NEVER.</para>
- <programlisting> <forager>
+ <programlisting role="XML"> <forager>
<pickEarlyType>FIRST_LAST_STEP_SCORE_IMPROVING</pickEarlyType>
</forager></programlisting>
</listitem>
@@ -715,13 +715,13 @@
<para>Terminates when an amount of time has been reached:</para>
- <programlisting> <termination>
+ <programlisting role="XML"> <termination>
<maximumMinutesSpend>2</maximumMinutesSpend>
</termination></programlisting>
<para>or</para>
- <programlisting> <termination>
+ <programlisting role="XML"> <termination>
<maximumHoursSpend>1</maximumHoursSpend>
</termination></programlisting>
@@ -739,7 +739,7 @@
<para>Terminates when an amount of steps has been reached:</para>
- <programlisting> <termination>
+ <programlisting role="XML"> <termination>
<maximumStepCount>100</maximumStepCount>
</termination></programlisting>
</section>
@@ -750,14 +750,14 @@
<para>Terminates when a certain score has been reached. You can use this Termination if you know the perfect
score, for example for 4 queens:</para>
- <programlisting> <termination>
+ <programlisting role="XML"> <termination>
<scoreAttained>0</scoreAttained>
</termination></programlisting>
<para>You can also use this Termination to terminate once it reaches a feasible solution. For a solver problem
with hard and soft constraints, it could look like this:</para>
- <programlisting> <termination>
+ <programlisting role="XML"> <termination>
<scoreAttained>0hard/-5000soft</scoreAttained>
</termination></programlisting>
</section>
@@ -767,7 +767,7 @@
<para>Terminates when the best score hasn't improved in a number of steps:</para>
- <programlisting> <termination>
+ <programlisting role="XML"> <termination>
<maximumUnimprovedStepCount>100</maximumUnimprovedStepCount>
</termination></programlisting>
@@ -782,7 +782,7 @@
<para>Terminations can be combined, for example: terminate after 100 steps or if a score of 0 has been
reached:</para>
- <programlisting> <termination>
+ <programlisting role="XML"> <termination>
<terminationCompositionStyle>OR</terminationCompositionStyle>
<maximumStepCount>100</maximumStepCount>
<scoreAttained>0</scoreAttained>
@@ -791,7 +791,7 @@
<para>Alternatively you can use AND, for example: terminate after reaching a feasible score of at least -100 and
no improvements in 5 steps:</para>
- <programlisting> <termination>
+ <programlisting role="XML"> <termination>
<terminationCompositionStyle>AND</terminationCompositionStyle>
<maximumUnimprovedStepCount>5</maximumUnimprovedStepCount>
<scoreAttained>-100</scoreAttained>
@@ -834,7 +834,7 @@
(see <literal>AllMovesOfOneExamSelector</literal>), extend the <literal>SelectorConfig</literal> class (see
<literal>AllMovesOfOneExamSelectorConfig</literal>) and configure it in the configuration XML:</para>
- <programlisting> <selector class="org.drools.planner.examples.examination.solver.selector.AllMovesOfOneExamSelectorConfig"/></programlisting>
+ <programlisting role="XML"> <selector class="org.drools.planner.examples.examination.solver.selector.AllMovesOfOneExamSelectorConfig"/></programlisting>
<para>If you build a better implementation that's not domain specific, consider adding it as a patch in our issue
tracker and we'll take it along in future refactors and optimize it.</para>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Planner_configuration/Chapter-Planner_configuration.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Planner_configuration/Chapter-Planner_configuration.xml 2010-07-21 14:27:07 UTC (rev 34099)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Planner_configuration/Chapter-Planner_configuration.xml 2010-07-21 14:29:43 UTC (rev 34100)
@@ -250,7 +250,7 @@
<para>A basic solver configuration file looks something like this:</para>
- <programlisting><?xml version="1.0" encoding="UTF-8"?>
+ <programlisting role="XML"><?xml version="1.0" encoding="UTF-8"?>
<localSearchSolver>
<scoreDrl>/org/drools/planner/examples/nqueens/solver/nQueensScoreRules.drl</scoreDrl>
<scoreDefinition>
@@ -290,7 +290,7 @@
<para>You can set the environment mode in the solver configuration XML file:</para>
- <programlisting><localSearchSolver>
+ <programlisting role="XML"><localSearchSolver>
<environmentMode>DEBUG</environmentMode>
...
</localSearchSolver></programlisting>
@@ -541,7 +541,7 @@
<para>Here's an example on how you add the <literal>StartingSolutionInitializer</literal> to the
configuration:</para>
- <programlisting><localSearchSolver>
+ <programlisting role="XML"><localSearchSolver>
...
<startingSolutionInitializerClass>org.drools.planner.examples.examination.solver.solution.initializer.ExaminationStartingSolutionInitializer</startingSolutionInitializerClass>
...
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Planner_introduction/Chapter-Planner_introduction.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Planner_introduction/Chapter-Planner_introduction.xml 2010-07-21 14:27:07 UTC (rev 34099)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Planner_introduction/Chapter-Planner_introduction.xml 2010-07-21 14:29:43 UTC (rev 34100)
@@ -138,7 +138,7 @@
maven repository</link>. If you use maven 2 or 3, just add a dependency to <literal>drools-planner-core</literal>
in your project's <filename>pom.xml</filename>:</para>
- <programlisting> <dependency>
+ <programlisting role="XML"> <dependency>
<groupId>org.drools.planner</groupId>
<artifactId>drools-planner-core</artifactId>
<version>5.x</version>
@@ -147,7 +147,7 @@
<para>You might also need to add the jboss repository in your repository manager (nexus, archiva, ...) or your
<filename>~/settings.xml</filename>:</para>
- <programlisting> <repositories>
+ <programlisting role="XML"> <repositories>
<repository>
<id>repository.jboss.org</id>
<url>http://repository.jboss.org/maven2</url>
Modified: labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Score_calculation/Chapter-Score_calculation.xml
===================================================================
--- labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Score_calculation/Chapter-Score_calculation.xml 2010-07-21 14:27:07 UTC (rev 34099)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Score_calculation/Chapter-Score_calculation.xml 2010-07-21 14:29:43 UTC (rev 34100)
@@ -44,7 +44,7 @@
<para>You need to add your score rules drl files in the solver configuration, for example:</para>
- <programlisting> <scoreDrl>/org/drools/planner/examples/nqueens/solver/nQueensScoreRules.drl</scoreDrl></programlisting>
+ <programlisting role="XML"> <scoreDrl>/org/drools/planner/examples/nqueens/solver/nQueensScoreRules.drl</scoreDrl></programlisting>
<para>You can add multiple <literal><scoreDrl></literal> entries if needed.</para>
@@ -96,7 +96,7 @@
<para>A <literal>ScoreDefinition</literal> instance is configured in the solver configuration:</para>
- <programlisting> <scoreDefinition>
+ <programlisting role="XML"> <scoreDefinition>
<scoreDefinitionType>SIMPLE</scoreDefinitionType>
</scoreDefinition></programlisting>
More information about the jboss-svn-commits
mailing list