[jboss-svn-commits] JBL Code SVN: r17787 - labs/jbossrules/trunk/documentation/manual/en/Chapter-Solver.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sun Jan 13 07:56:03 EST 2008


Author: ge0ffrey
Date: 2008-01-13 07:56:03 -0500 (Sun, 13 Jan 2008)
New Revision: 17787

Modified:
   labs/jbossrules/trunk/documentation/manual/en/Chapter-Solver/Section-Score_calculation.xml
   labs/jbossrules/trunk/documentation/manual/en/Chapter-Solver/Section-Solver_introduction.xml
Log:
UnweightedScoreOccurrence and use stable version of drools

Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Solver/Section-Score_calculation.xml
===================================================================
--- labs/jbossrules/trunk/documentation/manual/en/Chapter-Solver/Section-Score_calculation.xml	2008-01-13 12:54:16 UTC (rev 17786)
+++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Solver/Section-Score_calculation.xml	2008-01-13 12:56:03 UTC (rev 17787)
@@ -22,7 +22,7 @@
         $q1 : Queen($id : id, $y : y);
         $q2 : Queen(id > $id, y == $y);
     then
-        insertLogical(new ConstraintOccurrence("multipleQueensHorizontal", $q1, $q2));
+        insertLogical(new UnweightedConstraintOccurrence("multipleQueensHorizontal", $q1, $q2));
 end</programlisting>
     </example>
 
@@ -150,7 +150,7 @@
         $q1 : Queen($id : id, $y : y);
         $q2 : Queen(id &gt; $id, y == $y);
     then
-        insertLogical(new ConstraintOccurrence("multipleQueensHorizontal", $q1, $q2));
+        insertLogical(new UnweightedConstraintOccurrence("multipleQueensHorizontal", $q1, $q2));
 end
 
 // multipleQueensVertical is obsolete because it is always 0
@@ -160,7 +160,7 @@
         $q1 : Queen($id : id, $ascendingD : ascendingD);
         $q2 : Queen(id &gt; $id, ascendingD == $ascendingD);
     then
-        insertLogical(new ConstraintOccurrence("multipleQueensAscendingDiagonal", $q1, $q2));
+        insertLogical(new UnweightedConstraintOccurrence("multipleQueensAscendingDiagonal", $q1, $q2));
 end
 
 rule "multipleQueensDescendingDiagonal"
@@ -168,17 +168,17 @@
         $q1 : Queen($id : id, $descendingD : descendingD);
         $q2 : Queen(id &gt; $id, descendingD == $descendingD);
     then
-        insertLogical(new ConstraintOccurrence("multipleQueensDescendingDiagonal", $q1, $q2));
+        insertLogical(new UnweightedConstraintOccurrence("multipleQueensDescendingDiagonal", $q1, $q2));
 end
 
-rule "constraintsBroken"
+rule "hardConstraintsBroken"
     when
-        $constraintCount : Number() from accumulate(
-            $constraintOccurrence : ConstraintOccurrence(),
-            count($constraintOccurrence)
+        $occurrenceCount : Number() from accumulate(
+            $unweightedConstraintOccurrence : UnweightedConstraintOccurrence(),
+            count($unweightedConstraintOccurrence)
         );
     then
-        scoreCalculator.setScore(- $constraintCount.intValue());
+        scoreCalculator.setScore(- $occurrenceCount.intValue());
 end</programlisting>
 
     <para>Optionally, you can also weigh your constraints differently, by

Modified: labs/jbossrules/trunk/documentation/manual/en/Chapter-Solver/Section-Solver_introduction.xml
===================================================================
--- labs/jbossrules/trunk/documentation/manual/en/Chapter-Solver/Section-Solver_introduction.xml	2008-01-13 12:54:16 UTC (rev 17786)
+++ labs/jbossrules/trunk/documentation/manual/en/Chapter-Solver/Section-Solver_introduction.xml	2008-01-13 12:56:03 UTC (rev 17787)
@@ -138,25 +138,24 @@
 $ mvn exec:exec -Dexec.mainClass="org.drools.solver.examples.nqueens.app.NQueensApp"
 ...</programlisting>
 
-    <para>You will use drools-solver with the latest, unstable revision of
-    drools. If you would rather use a stable version of drools, edit
-    <literal>/drools-solver/drools-solver-examples/pom.xml</literal> and
-    overwrite the drools jar versions, before runing the example:</para>
+    <para>You will use drools-solver with the latest, unstable snapshot of the
+    drools rule engine. If you would rather use a stable version of the drools
+    rule engine, edit <literal>/drools-solver/pom.xml</literal> and overwrite
+    the drools jar versions, before building and running the examples:</para>
 
-    <programlisting>    &lt;dependencies&gt;
-        &lt;dependency&gt;
-            &lt;groupId&gt;org.drools&lt;/groupId&gt;
-            &lt;artifactId&gt;drools-core&lt;/artifactId&gt;
-            &lt;version&gt;4.0.2&lt;/version&gt;
-        &lt;/dependency&gt;
-        &lt;dependency&gt;
-            &lt;groupId&gt;org.drools&lt;/groupId&gt;
-            &lt;artifactId&gt;drools-compiler&lt;/artifactId&gt;
-            &lt;version&gt;4.0.2&lt;/version&gt;
-        &lt;/dependency&gt;
-
-        ...
-
-     &lt;/dependencies&gt;</programlisting>
+    <programlisting>    &lt;dependencyManagement&gt;
+        &lt;dependencies&gt;
+            &lt;dependency&gt;
+                &lt;groupId&gt;org.drools&lt;/groupId&gt;
+                &lt;artifactId&gt;drools-core&lt;/artifactId&gt;
+                &lt;version&gt;4.0.3&lt;/version&gt;
+            &lt;/dependency&gt;
+            &lt;dependency&gt;
+                &lt;groupId&gt;org.drools&lt;/groupId&gt;
+                &lt;artifactId&gt;drools-compiler&lt;/artifactId&gt;
+                &lt;version&gt;4.0.3&lt;/version&gt;
+            &lt;/dependency&gt;
+        &lt;/dependencies&gt;
+    &lt;/dependencyManagement&gt;</programlisting>
   </section>
 </section>
\ No newline at end of file




More information about the jboss-svn-commits mailing list