[rules-users] Semi-locked planning entities
Is there any example in drools-planner with semi-locked planning entities? or how to implement? I dont understand :) -- View this message in context: http://drools.46999.n3.nabble.com/Semi-locked-planning-entities-tp3743318p3743318.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] uninitialized planning value [error]
Is it possible setting planning entity with uninitialized planning value into solution? if it is possible, then how? :) plz, help me :) When I execute my code with not null planning variables everything work fine, but when i execute without setting planning variables I have [Exception in thread "main" java.lang.NullPointerException] 2012-02-14 17:32:08,119 [main] INFO Solver started: time spend (0), score (null), new best score (null), random seed (0). Exception in thread "main" java.lang.NullPointerException at org.drools.planner.core.score.definition.HardAndSoftScoreDefinition.calculateTimeGradient(HardAndSoftScoreDefinition.java:73) at org.drools.planner.core.score.definition.HardAndSoftScoreDefinition.calculateTimeGradient(HardAndSoftScoreDefinition.java:25) at org.drools.planner.core.termination.ScoreAttainedTermination.calculateSolverTimeGradient(ScoreAttainedTermination.java:52) at org.drools.planner.core.termination.OrCompositeTermination.calculateSolverTimeGradient(OrCompositeTermination.java:70) at org.drools.planner.core.termination.OrCompositeTermination.calculateSolverTimeGradient(OrCompositeTermination.java:70) at org.drools.planner.core.termination.PhaseToSolverTerminationBridge.calculatePhaseTimeGradient(PhaseToSolverTerminationBridge.java:49) at org.drools.planner.core.localsearch.DefaultLocalSearchSolverPhase.solve(DefaultLocalSearchSolverPhase.java:55) at org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:166) at org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:138) at kz.bee.drools.planner.dating.DatingMain.start(DatingMain.java:58) at kz.bee.drools.planner.dating.DatingMain.main(DatingMain.java:38) -- View this message in context: http://drools.46999.n3.nabble.com/uninitialized-planning-value-error-tp3743831p3743831.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] [planner] Semi-locked planning entities
Thank you very much!!! can you help me with this problem plz : http://drools.46999.n3.nabble.com/uninitialized-planning-value-error-td3743831.html http://drools.46999.n3.nabble.com/uninitialized-planning-value-error-td3743831.html -- View this message in context: http://drools.46999.n3.nabble.com/Semi-locked-planning-entities-tp3743318p3745938.html Sent from the Drools: User forum mailing list archive at Nabble.com.___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] [planner] uninitialized planning value [error]
after this I get another NPE: I tried find my mistake :( Exception in thread "main" java.lang.NullPointerException at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:380) at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:958) at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:931) at kz.bee.drools.planner.dating.solver.move.WomanChangeMove.doMove(WomanChangeMove.java:67) at org.drools.planner.core.localsearch.decider.DefaultDecider.doMove(DefaultDecider.java:141) at org.drools.planner.core.localsearch.decider.DefaultDecider.decideNextStep(DefaultDecider.java:116) at org.drools.planner.core.localsearch.DefaultLocalSearchSolverPhase.solve(DefaultLocalSearchSolverPhase.java:57) at org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:166) at org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:138) at kz.bee.drools.planner.dating.DatingMain.start(DatingMain.java:59) at kz.bee.drools.planner.dating.DatingMain.main(DatingMain.java:39) -- View this message in context: http://drools.46999.n3.nabble.com/uninitialized-planning-value-error-tp3743831p3746381.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Paralization
Hi, Guys! I want to know is it possible in drools-planner paralization? I mean solving 1 planning problem concurrently in 2 or more jvms -- View this message in context: http://drools.46999.n3.nabble.com/Paralization-tp3821286p3821286.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Auto generating Schedule(curriculum) in drools-planner
Hi, guys! Approximately how many *time* takes generation of school-schedule in drools-planner if i have: 40 rooms and 42 periods(*period* contains /day of week/ and /time/(or lesson order)) *Planning entity:* Lesson(id,course,room,period) and facts... this important for me... -- View this message in context: http://drools.46999.n3.nabble.com/Auto-generating-Schedule-curriculum-in-drools-planner-tp3827828p3827828.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Auto generating Schedule(curriculum) in drools-planner
Actually I've seen your examples :) But I think my problem is a little bit different from your curriculum... because in our country education system is different from us education system :) so I have task, in next 2 month I have to solve school-schedule generation system in our country and know I've implemented simple prototype w/o any interface(view) in terminal mode and tested with real school's data, but it takes too many time for generation can you help me with performance? how can I increase performance? I will post my code in github.com :) -- View this message in context: http://drools.46999.n3.nabble.com/Auto-generating-Schedule-curriculum-in-drools-planner-tp3827828p3828597.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Auto generating Schedule(curriculum) in drools-planner
ok, thank you for reply :) -- View this message in context: http://drools.46999.n3.nabble.com/Auto-generating-Schedule-curriculum-in-drools-planner-tp3827828p3828663.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Knowing which constraints are broken for final best solution in drools-planner
Hi, Geoffrey! I'm using drools-planner-5.4.0.CR1 and I wanna get list of broken constraints for final best solution and also looked of examples of 5.4.0.CR1 I've implemented like in example but it returns empty list source on stackoverflow: http://stackoverflow.com/questions/10222382/getting-list-of-broken-constraints-for-final-best-solution-in-drools-planner source prototype -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Knowing-which-constraints-are-broken-for-final-best-solution-in-drools-planner-tp3843876p3922139.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] drools-planner in seam 2.2.2 final shows errors
20:05:51,468 ERROR [STDERR] com.thoughtworks.xstream.converters.ConversionException: Cannot load java class kz.bee.kudos.sms.schedule.solution.Schedule : kz.bee.kudos.sms.schedule.solution.Schedule Debugging information message : Cannot load java class kz.bee.kudos.sms.schedule.solution.Schedule cause-exception : java.lang.ClassNotFoundException cause-message : kz.bee.kudos.sms.schedule.solution.Schedule class : java.lang.Class required-type : java.lang.Class converter-type : com.thoughtworks.xstream.converters.SingleValueConverterWrapper wrapped-converter : com.thoughtworks.xstream.converters.extended.JavaClassConverter line number : 4 class[1]: org.drools.planner.config.solver.SolverConfig converter-type[1] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter version : null --- 20:05:51,482 ERROR [STDERR] at com.thoughtworks.xstream.converters.extended.JavaClassConverter.fromString(JavaClassConverter.java:46) 20:05:51,482 ERROR [STDERR] at com.thoughtworks.xstream.converters.SingleValueConverterWrapper.fromString(SingleValueConverterWrapper.java:41) 20:05:51,482 ERROR [STDERR] at com.thoughtworks.xstream.converters.SingleValueConverterWrapper.unmarshal(SingleValueConverterWrapper.java:49) 20:05:51,482 ERROR [STDERR] at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) 20:05:51,482 ERROR [STDERR] at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65) 20:05:51,482 ERROR [STDERR] at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) 20:05:51,482 ERROR [STDERR] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:351) 20:05:51,482 ERROR [STDERR] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:302) 20:05:51,507 ERROR [STDERR] at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:230) 20:05:51,507 ERROR [STDERR] at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72) 20:05:51,507 ERROR [STDERR] at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65) 20:05:51,507 ERROR [STDERR] at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66) 20:05:51,507 ERROR [STDERR] at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50) 20:05:51,507 ERROR [STDERR] at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134) 20:05:51,507 ERROR [STDERR] at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) 20:05:51,507 ERROR [STDERR] at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1035) 20:05:51,507 ERROR [STDERR] at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1019) 20:05:51,508 ERROR [STDERR] at com.thoughtworks.xstream.XStream.fromXML(XStream.java:895) 20:05:51,508 ERROR [STDERR] at org.drools.planner.config.XmlSolverFactory.configure(XmlSolverFactory.java:95) 20:05:51,508 ERROR [STDERR] at org.drools.planner.config.XmlSolverFactory.configure(XmlSolverFactory.java:85) 20:05:51,508 ERROR [STDERR] at org.drools.planner.config.XmlSolverFactory.configure(XmlSolverFactory.java:78) 20:05:51,508 ERROR [STDERR] at org.drools.planner.config.XmlSolverFactory.(XmlSolverFactory.java:62) 20:05:51,508 ERROR [STDERR] at kz.bee.kudos.sms.schedule.ScheduleGenerator.init(ScheduleGenerator.java:69) 20:05:51,508 ERROR [STDERR] at kz.bee.kudos.sms.schedule.ScheduleGenerator.generate(ScheduleGenerator.java:323) 20:05:51,508 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 20:05:51,508 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 20:05:51,508 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 20:05:51,508 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597) 20:05:51,509 ERROR [STDERR] at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) 20:05:51,509 ERROR [STDERR] at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) 20:05:51,509 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) 20:05:51,509 ERROR [STDERR] at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) 20:05:51,509 ERROR [STDERR] at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) 20:05:51,509 ERROR [STDERR] at org.jboss.seam.cor
Re: [rules-users] drools-planner in seam 2.2.2 final shows errors
class "kz.bee.kudos.sms.schedule.solution.Schedule" is exists in war archive and i'm using drools-planner 5.4.0.CR1 in pom.xml: org.drools drools-compiler 5.4.0.CR1 org.drools drools-core 5.4.0.CR1 org.drools.planner drools-planner-core 5.4.0.CR1 ch.qos.logback logback-classic 1.0.0 com.thoughtworks.xstream xstream 1.4.1 i dont know why, it show same error -- View this message in context: http://drools.46999.n3.nabble.com/drools-planner-in-seam-2-2-2-final-shows-errors-tp3950831p3950914.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] drools-planner in seam 2.2.2 final shows errors
as you said it was classloading/classpath thank you! -- View this message in context: http://drools.46999.n3.nabble.com/drools-planner-in-seam-2-2-2-final-shows-errors-tp3950831p3950949.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] getting list of broken constraints for some solution(NOT BEST SOLUTION) in drools-planner
Hi guys! I'm using drools-planner-*5.4.0.CR1*... Let's say I have some solution(NOT FINAL BEST SOLUTION) which done by human manually and I want get list of broken contraints for that solution, I've tried this.scoreDirector.setWorkingSolution(someSolution); this.scoreDirector.calculateScore(); it returns *null* since it isn't connected with Solver then I've tried using Solver with 0: this.scoreDirector.setWorkingSolution(someSolution); this.solver.setPlanningProblem(this.scoreDirector.getWorkingSolution()); this.solver.solve(); this.scoreDirector.setWorkingSolution(this.solver.getBestSolution()); this.scoreDirector.calculateScore(); then it shows *java.lang.UnsupportedOperationException* because there is no best solution in Solver java.lang.UnsupportedOperationException: StepCountTermination can only be used for phase termination. at org.drools.planner.core.termination.StepCountTermination.isSolverTerminated(StepCountTermination.java:40) at org.drools.planner.core.termination.OrCompositeTermination.isSolverTerminated(OrCompositeTermination.java:42) at org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:181) at org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:151) how can implement this task? or I have to implement setBestSolution in Solver, i think this is bad idea... -- View this message in context: http://drools.46999.n3.nabble.com/getting-list-of-broken-constraints-for-some-solution-NOT-BEST-SOLUTION-in-drools-planner-tp3964160.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Score curruption exception in drools-planner-5.4.0.CR1
Hi guys! I have some exception and I don't know why? My rule *someRuleId* has weight *1* 2012-05-12 03:47:08,224 [main] DEBUG Step index (570), time spend (115566), score (0hard/0soft), initialized planning entity (SomePlanningEntity [id=21, …]). 2012-05-12 03:47:08,465 [main] DEBUG Step index (571), time spend (115807), score (0hard/0soft), initialized planning entity (SomePlanningEntity [id=20, …]). java.lang.IllegalStateException: Score corruption: the workingScore (-4hard/0soft) is not the uncorruptedScore (0hard/0soft): The workingMemory has 4 ConstraintOccurrence(s) in excess: someRuleId/NEGATIVE_HARD:[SomePlanningEntity [id=2482309, …], SomePlanningEntity [id=54, …]]=1 someRuleId/NEGATIVE_HARD:[SomePlanningEntity [id=2482309, …], SomePlanningEntity [id=57, …]]=1 someRuleId/NEGATIVE_HARD:[SomePlanningEntity [id=57, …], SomePlanningEntity [id=2482309, …]]=1 someRuleId/NEGATIVE_HARD:[SomePlanningEntity [id=54, …], SomePlanningEntity [id=2482309, …]]=1 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:101) at org.drools.planner.core.constructionheuristic.greedyFit.decider.DefaultGreedyDecider.doMove(DefaultGreedyDecider.java:111) at org.drools.planner.core.constructionheuristic.greedyFit.decider.DefaultGreedyDecider.decideNextStep(DefaultGreedyDecider.java:78) at org.drools.planner.core.constructionheuristic.greedyFit.DefaultGreedyFitSolverPhase.solve(DefaultGreedyFitSolverPhase.java:63) at org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:183) at org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:151) … … -- View this message in context: http://drools.46999.n3.nabble.com/Score-curruption-exception-in-drools-planner-5-4-0-CR1-tp3981199.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Score curruption exception in drools-planner-5.4.0.CR1
*someRuleId* = "wxGroupChildClassInSamePeriodWithDiffLessons" *somePlanningEntity* = Lesson */rule/* "wxGroupChildClassInSamePeriodWithDiffLessons" */when/* School( type in ("School", "College") ) $lesson1 : Lesson($id : id, $period : period, $wxGroupName : course.clazz.wxGroupName, $clazz : course.clazz, $courseName : course.name ) $lesson2 : Lesson(id != $id, period == $period, course.clazz.wxGroupName == $wxGroupName, course.clazz == $clazz, course.name != $courseName ) */then/* /*insertLogical*/(new IntConstraintOccurrence("wxGroupChildClassInSamePeriodWithDiffLessons", ConstraintType.NEGATIVE_HARD, 1, $lesson1, $lesson2)); */end/* -- View this message in context: http://drools.46999.n3.nabble.com/Score-curruption-exception-in-drools-planner-5-4-0-CR1-tp3981199p3982557.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Drools has some exception when running jboss-as7/jboss-eap6 in clustered mode
Hi, guys! I'm using drools-5.4.0.Final in web project; When I start jboss-eap-6.0.1 in clustered mode it shows this exception in logs: Any suggestions or hints to fix this error/exception? 17:25:58,132 ERROR [org.infinispan.transaction.TransactionCoordinator] (http-/127.0.0.1:8080-4) ISPN97: Error while processing a prepare in a single-phase transaction: org.infinispan.CacheException: java.lang.NoClassDefFoundError: com/google/protobuf/Message at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:171) at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:183) at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:240) at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:227) at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:222) at org.infinispan.remoting.rpc.RpcManagerImpl.broadcastRpcCommand(RpcManagerImpl.java:201) at org.infinispan.interceptors.ReplicationInterceptor.broadcastPrepare(ReplicationInterceptor.java:136) at org.infinispan.interceptors.ReplicationInterceptor.visitPrepareCommand(ReplicationInterceptor.java:128) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130) at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130) at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.EntryWrappingInterceptor.visitPrepareCommand(EntryWrappingInterceptor.java:93) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.invokeNextAndCommitIf1Pc(AbstractTxLockingInterceptor.java:120) at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitPrepareCommand(OptimisticLockingInterceptor.java:131) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:58) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:106) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.StateTransferLockInterceptor.handleWithRetries(StateTransferLockInterceptor.java:213) at org.infinispan.interceptors.StateTransferLockInterceptor.visitPrepareCommand(StateTransferLockInterceptor.java:85) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130) at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:132) at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:91) at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)
Re: [rules-users] Drools has some exception when running jboss-as7/jboss-eap6 in clustered mode
I know about classpath, but it works in *non-clustered* mode, ok I added *com.google.protobuf:protobuf-java:2.3.0* to my classpath, then appeared another exception: 18:35:31,039 ERROR [org.infinispan.transaction.TransactionCoordinator] ISPN97: Error while processing a prepare in a single-phase transaction: org.infinispan.CacheException: java.lang.NoClassDefFoundError: org/drools/marshalling/impl/ProtobufMessages$RuleData at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:171) at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:183) at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:240) at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:227) at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:222) at org.infinispan.remoting.rpc.RpcManagerImpl.broadcastRpcCommand(RpcManagerImpl.java:201) at org.infinispan.interceptors.ReplicationInterceptor.broadcastPrepare(ReplicationInterceptor.java:136) at org.infinispan.interceptors.ReplicationInterceptor.visitPrepareCommand(ReplicationInterceptor.java:128) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130) at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130) at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.EntryWrappingInterceptor.visitPrepareCommand(EntryWrappingInterceptor.java:93) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.invokeNextAndCommitIf1Pc(AbstractTxLockingInterceptor.java:120) at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitPrepareCommand(OptimisticLockingInterceptor.java:131) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:58) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:106) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.StateTransferLockInterceptor.handleWithRetries(StateTransferLockInterceptor.java:213) at org.infinispan.interceptors.StateTransferLockInterceptor.visitPrepareCommand(StateTransferLockInterceptor.java:85) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130) at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:132) at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:91) at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126) at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133) at org.infinispan.i
Re: [rules-users] Drools has some exception when running jboss-as7/jboss-eap6 in clustered mode
but in my classpath drools-core setted: *'org.drools:drools-compiler:5.4.0.Final'* *'org.drools:drools-core:5.4.0.Final'* *'org.drools.planner:drools-planner-core:5.4.0.Final'* -- View this message in context: http://drools.46999.n3.nabble.com/Drools-has-some-exception-when-running-jboss-as7-jboss-eap6-in-clustered-mode-tp4021399p4021407.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] getting list of broken constraints for some solution(NOT BEST SOLUTION) in drools-planner
Thank you! On 5 May 2012 15:35, Geoffrey De Smet wrote: > ** > > > Op 05-05-12 08:50, Nurlan schreef: > > Hi guys! > I'm using drools-planner-*5.4.0.CR1*... > > Let's say I have some solution(NOT FINAL BEST SOLUTION) which done by human > manually and I want get list of broken contraints for that solution, I've > tried > > this.scoreDirector.setWorkingSolution(someSolution); > this.scoreDirector.calculateScore(); > > Something like that should work. For the exact correct usage, see the new > section for the 5.4.0.Final manual: > > https://hudson.jboss.org/hudson/view/Drools%20jBPM/job/drools-planner/lastSuccessfulBuild/artifact/drools-planner-docs/target/docbook/publish/en-US/html_single/index.html#d0e3786 > It should never return null. I do in the examples all the time. > > There is a point though, that the code above still requires the creation > of a Solver (but it doesn't you to actually run it): > > ScoreDirectorFactory scoreDirectorFactory = > solverFactory.buildSolver().getScoreDirectorFactory();ScoreDirector > guiScoreDirector = > scoreDirectorFactory.buildScoreDirector();guiScoreDirector.setWorkingSolution(solution);Score > score = guiScoreDirector.calculateScore(); > > Feel free to make a jira if you agree that it shouldn't be needed to do a > ".buildSolver()" in that code. > > > it returns *null* since it isn't connected with Solver > > then I've tried using Solver with > 0: > this.scoreDirector.setWorkingSolution(someSolution); > this.solver.setPlanningProblem(this.scoreDirector.getWorkingSolution()); > > this.solver.solve(); > > this.scoreDirector.setWorkingSolution(this.solver.getBestSolution()); > this.scoreDirector.calculateScore(); > > then it shows *java.lang.UnsupportedOperationException* because there is no > best solution in Solver > > java.lang.UnsupportedOperationException: StepCountTermination can only be > used for phase termination. > at > org.drools.planner.core.termination.StepCountTermination.isSolverTerminated(StepCountTermination.java:40) > at > org.drools.planner.core.termination.OrCompositeTermination.isSolverTerminated(OrCompositeTermination.java:42) > at > org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:181) > at > org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:151) > > > how can implement this task? or I have to implement setBestSolution in > Solver, i think this is bad idea... > > bad idea indeed > > -- > View this message in context: > http://drools.46999.n3.nabble.com/getting-list-of-broken-constraints-for-some-solution-NOT-BEST-SOLUTION-in-drools-planner-tp3964160.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > ___ > rules-users mailing > listrules-users@lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users > > > -- > With kind regards, > Geoffrey De Smet > > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > -- Regards, Nurlan Rakhimzhanov ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Score curruption exception in drools-planner-5.4.0.CR1
On 15 May 2012 00:30, Christopher Dolan wrote: > I may be way off track, but I saw score corruption like yours in two cases: > > 1) broken .equals()/.hashCode() method. > I had a couple of model classes that accidentally looked at mutable data > in their .equals() and .hashCode() methods. When these were applied as the > cause of the constraint, the revert action then failed to find the > constraint because the removed instance wasn't .equals() to the inserted > instance. I solved this by reverting to Object.equals() and > Object.hashCode(). > I don't think that problem with .equals() or .hashCode() methods, because I'm using apache EqualsBuilder and apache HashCodeBuilder, this is 1st, and 2nd my each planning entity has al least unique id. > 2) broken variable assignment in aggregate predicates ( > https://issues.jboss.org/browse/JBRULES-3482) > This is fixed in 5.4.0.Final. > If your rules use collect() or accumulate() with a complicated first > argument to either, then Drools becomes confused about which variable to > assign the value to. In most cases, this results in a ClassCastException. > But in some cases where the facts happened to be the same class, you ended > up with the wrong fact assigned as the cause of the constraint. yes, I'm using accumulate(), but not in this rule(wxGroupChildClassesInSamePeriodWithDiffLessons) and I've switched to 5.4.Final version, same problem > -Original Message- > From: rules-users-boun...@lists.jboss.org [mailto: > rules-users-boun...@lists.jboss.org] On Behalf Of Nurlan > Sent: Friday, May 11, 2012 5:06 PM > To: rules-users@lists.jboss.org > Subject: [rules-users] Score curruption exception in > drools-planner-5.4.0.CR1 > > Hi guys! > I have some exception and I don't know why? > My rule *someRuleId* has weight *1* > 2012-05-12 03:47:08,224 [main] DEBUG Step index (570), time spend > (115566), score (0hard/0soft), initialized planning entity > (SomePlanningEntity [id=21, …]). > 2012-05-12 03:47:08,465 [main] DEBUG Step index (571), time spend > (115807), score (0hard/0soft), initialized planning entity > (SomePlanningEntity [id=20, …]). > java.lang.IllegalStateException: Score corruption: the workingScore > (-4hard/0soft) is not the uncorruptedScore (0hard/0soft): > The workingMemory has 4 ConstraintOccurrence(s) in excess: >someRuleId/NEGATIVE_HARD:[SomePlanningEntity [id=2482309, …], > SomePlanningEntity [id=54, …]]=1 >someRuleId/NEGATIVE_HARD:[SomePlanningEntity [id=2482309, …], > SomePlanningEntity [id=57, …]]=1 >someRuleId/NEGATIVE_HARD:[SomePlanningEntity [id=57, …], > SomePlanningEntity [id=2482309, …]]=1 >someRuleId/NEGATIVE_HARD:[SomePlanningEntity [id=54, …], > SomePlanningEntity [id=2482309, …]]=1 > 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:101) >at > > org.drools.planner.core.constructionheuristic.greedyFit.decider.DefaultGreedyDecider.doMove(DefaultGreedyDecider.java:111) >at > > org.drools.planner.core.constructionheuristic.greedyFit.decider.DefaultGreedyDecider.decideNextStep(DefaultGreedyDecider.java:78) >at > > org.drools.planner.core.constructionheuristic.greedyFit.DefaultGreedyFitSolverPhase.solve(DefaultGreedyFitSolverPhase.java:63) >at > > org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:183) >at > org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:151) >… >… > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Score-curruption-exception-in-drools-planner-5-4-0-CR1-tp3981199.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Regards, Nurlan Rakhimzhanov ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users