[rules-users] Fw: Fw: constraints lacking and in excess

Michiel Vermandel mvermand at yahoo.com
Wed Mar 6 01:44:18 EST 2013


Anyone having an idea?


Thanks

Michiel
 
-----------------
http://www.codessentials.com - Your essential software, for
 free!
Follow us at http://twitter.com/#!/Codessentials

----- Forwarded Message -----
From: Michiel Vermandel <mvermand at yahoo.com>
To: Rules lists.jboss.org <rules-users at lists.jboss.org> 
Sent: Thursday, February 28, 2013 8:54 PM
Subject: [rules-users] constraints lacking and in excess
 

Hi,

I have written a custom move implementation.
At first I got the exception:

java.lang.IllegalStateException: The moveClass (class my.planner.solver.MoveGroupToPeriod)'s move (PROJECT Period GroupChange:{T= Inspect 55871.I#0 [4->4] Bart DE BIE IV XI} => (P5)  [i1]) probably has a corrupted undoMove (my.planner.solver.util.TaskChangeListMove at 35e8df37). Or maybe there are corrupted score rules.
...


I found out that I did not undo all changes that I made in the move.
After fixing this, I now often get Score corruption as below.
I checked and all changes are preceded with director.beforeVariableChanged(...) and followed by director.afterVariableChanged(...);

What could cause this corruption?


java.lang.IllegalStateException: Score corruption: the workingScore (-286hard/-30601soft) is not the uncorruptedScore (-286hard/-30401soft):
  The workingMemory has 3 ConstraintOccurrence(s) in excess:
    preferedRegion/NEGATIVE_SOFT:[{T= Inspect 115519.I#0 [8->8] Dirk JANSSENS IV V}, Johan LAMOTE, 99, V]=99
    taskSpreading/NEGATIVE_HARD:[(P7) , 77]=100
    preferedRegion/NEGATIVE_SOFT:[{T= Inspect 115519.I#1 [8->8] Erik VERHOEVEN TL V}, Dirk JANSSENS, 99, V]=99
  The workingMemory has 6 ConstraintOccurrence(s) lacking:
    preferedRegion/NEGATIVE_SOFT:[{T= Inspect 115519.I#0 [8->8] Dirk JANSSENS IV V}, Dirk JANSSENS, 99, V]=99
    taskSpreading/NEGATIVE_HARD:[(P7) , 75]=36
    preferedRegion/NEGATIVE_SOFT:[{T= Inspect 115519.I#1
 [8->8]
 Erik VERHOEVEN TL V}, Erik VERHOEVEN, 99, V]=99
    preferedRegion/NEGATIVE_SOFT:[{T= Inspect 4747.I#0 [10->10] Johan LAMOTE IV V}, Johan LAMOTE, 99, V]=99
    taskSpreading/NEGATIVE_HARD:[(P8) , 74]=16
    preferedRegion/NEGATIVE_SOFT:[{T= Inspect 4747.I#1 [10->10] Dirk JANSSENS TL V}, Dirk JANSSENS, 99, V]=99
  Check the score rules who created those ConstraintOccurrences. Verify that each ConstraintOccurrence's causes and weight is correct.
    at org.drools.planner.core.score.director.AbstractScoreDirector.assertWorkingScore(AbstractScoreDirector.java:249)
    at org.drools.planner.core.solver.scope.DefaultSolverScope.assertWorkingScore(DefaultSolverScope.java:96)
    at org.drools.planner.core.phase.AbstractSolverPhaseScope.assertWorkingScore(AbstractSolverPhaseScope.java:124)
    at
 org.drools.planner.core.localsearch.DefaultLocalSearchSolverPhase.solve(DefaultLocalSearchSolverPhase.java:86)
    at org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:190)
    at org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:155)
    at my.planner.app.InspectionSchedule.solve(InspectionSchedule.java:275)
    at my.planner.testcore.AbstractPlanningTestClass.solve(AbstractPlanningTestClass.java:444)
    at my.planner.testcore.AbstractPlanningTestClass.solve(AbstractPlanningTestClass.java:469)
    at my.planner.RealBaoTest.datasetBAO20122013(RealBaoTest.java:226)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
    at
 org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
   
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Thanks,

Michiel


 
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us
 at http://twitter.com/#!/Codessentials
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130305/031f4329/attachment-0001.html 


More information about the rules-users mailing list