[jboss-svn-commits] JBL Code SVN: r31480 - labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Local_search.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sun Feb 7 12:28:21 EST 2010
Author: ge0ffrey
Date: 2010-02-07 12:28:21 -0500 (Sun, 07 Feb 2010)
New Revision: 31480
Modified:
labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Local_search/Chapter-Local_search.xml
Log:
better property tabu docs
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-02-07 17:10:58 UTC (rev 31479)
+++ labs/jbossrules/trunk/drools-docs/drools-docs-planner/src/main/docbook/en-US/Chapter-Local_search/Chapter-Local_search.xml 2010-02-07 17:28:21 UTC (rev 31480)
@@ -290,7 +290,7 @@
}</programlisting>
- <para>But we'll be making move generation part of the drl's soon.</para>
+ <para>But we might be making move generation part of the DRL's in the future.</para>
</section>
<section>
@@ -517,7 +517,7 @@
those steps.</para>
<programlisting> <acceptor>
- <completeMoveTabuSize>1000</completeMoveTabuSize>
+ <completeMoveTabuSize>7</completeMoveTabuSize>
</acceptor></programlisting>
</listitem>
@@ -525,7 +525,7 @@
<para><emphasis>Undo move tabu </emphasis>makes the undo move of recent steps tabu.</para>
<programlisting> <acceptor>
- <completeUndoMoveTabuSize>1000</completeUndoMoveTabuSize>
+ <completeUndoMoveTabuSize>7</completeUndoMoveTabuSize>
</acceptor></programlisting>
</listitem>
@@ -534,7 +534,7 @@
queen tabu, so that a recently moved queen can't be moved.</para>
<programlisting> <acceptor>
- <completePropertyTabuSize>1000</completePropertyTabuSize>
+ <completePropertyTabuSize>5</completePropertyTabuSize>
</acceptor></programlisting>
<para>To use property tabu, your moves must implement the <literal>TabuPropertyEnabled</literal> interface,
@@ -552,6 +552,18 @@
}
}</programlisting>
+
+ <para>You can also make multiple properties tabu (with OR or AND semantics):</para>
+
+ <programlisting> public List<? extends Object> getTabuPropertyList() {
+ // tabu with other moves that contain the same leftExam OR the same rightExam
+ return Arrays.asList(leftExam, rightExam);
+ }</programlisting>
+
+ <programlisting> public List<? extends Object> getTabuPropertyList() {
+ // tabu with other moves that contain the same exam AND the same toPeriod (but not necessary the same toRoom)
+ return Collections.singletonList(Arrays.asList(exam, toPeriod));
+ }</programlisting>
</listitem>
</itemizedlist>
@@ -559,12 +571,13 @@
<programlisting> <acceptor>
<completeSolutionTabuSize>1000</completeSolutionTabuSize>
- <completeUndoMoveTabuSize>10</completeUndoMoveTabuSize>
+ <completeMoveTabuSize>7</completeMoveTabuSize>
</acceptor></programlisting>
<para>If you pick a too small tabu size, your solver can still get stuck in a local optimum. On the other hand,
with the exception of solution tabu, if you pick a too large tabu size, your solver can get stuck by bouncing of
- the walls. Use the benchmarker to fine tweak your configuration.</para>
+ the walls. Use the benchmarker to fine tweak your configuration. Experiments teach us that it is generally best
+ to use a prime number for the move tabu, undo move tabu or property tabu size.</para>
<para>A tabu search acceptor should be combined with a <emphasis>maximum score of all</emphasis> or
<emphasis>first best score improving</emphasis> forager.</para>
@@ -693,7 +706,7 @@
this Termination. So if you give the solver 2 minutes to solve something, but the initializer takes 1 minute, the
local search solver will only have a minute left.</para>
- <para>Note that if you use this Termination, you will most likely sacrifice reproducability. The best solution
+ <para>Note that if you use this Termination, you will most likely sacrifice reproducibility. The best solution
will depend on available CPU time, not only because it influences the amount of steps taken, but also because time
gradient based algorithms (such as simulated annealing) will probably act differently on each run.</para>
</section>
@@ -719,7 +732,7 @@
</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 contraints, it could look like this:</para>
+ with hard and soft constraints, it could look like this:</para>
<programlisting> <termination>
<scoreAttained>0hard/-5000soft</scoreAttained>
More information about the jboss-svn-commits
mailing list