Score curruption exception in drools-planner-5.4.0.CR1
by Nurlan
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-pl...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 10 months
Formula error in Business Rule(Guided editor)
by Manasi
Hi,
Currently I am facing following issue while inserting a formula in Business
Rule(Guided Editor):
1) I have written following formula to be executed in Business Rule(Guided
Editor):
WHEN
1.
The following exists:
There is a RuleObject [$r] with:
installations < 100
THEN
1.
Insert RuleObject:
calulatedValue = $r.installations*3
But it gives error 'Unable to analyse expression' when i try to Verify the
rule.
I want my end result will be a calculated value instead of Literal value.
Please let me know the correct syntax to use formula in this type of rule.
Thnaks.
--
View this message in context: http://drools.46999.n3.nabble.com/Formula-error-in-Business-Rule-Guided-e...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 10 months
Using "collect" repeatedly over sub-groups of a fact
by Mike Goldner
I have a single rule that includes a "collect" pattern to pass a collection
to the RHS. However, what I now need to do fire this rule for multiple
collections based on groupings defined by attributes on the fact.
Here is an example:
Fact(a = 1, b = 1, c = 1)
Fact(a = 1, b = 1, c = 2)
Fact(a = 2, b = 1, c = 3)
Fact(a = 2, b = 2, c = 4)
Fact(a = 2, b = 2, c = 5)
I would like to create sub-groups based on the attributes 'a' and 'b'. My
rule should fire three times for the facts listed above, providing the
corresponding collection of Fact.
The only solution that I can think of is to build a HashSet and add each
Fact to the HashSet using the attributes as keys. I suppose it would have
to be a nested set since I can't define a multi-valued key class within a
rule. I could then handle this HashSet in a RHS block. However, I realize
that I'm completely subverting the whole rule language
Any suggestions?
Thanks,
Mike
13 years, 10 months
5.4.0.Final Eclipse plug-in exception
by Sean Su
The generated dslr from "new drools source" can't be opened inside Eclipse
3.7 due to the following exception. It works fine in the previous version:
java.lang.ArrayIndexOutOfBoundsException: 1
at
org.eclipse.swt.custom.StyledTextRenderer.calculateClientArea(StyledTextRenderer.java:230)
at org.eclipse.swt.custom.StyledText.handleResize(StyledText.java:6148)
at
org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5641)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
at org.eclipse.swt.widgets.Control.WM_SIZE(Control.java:5173)
at org.eclipse.swt.widgets.Scrollable.WM_SIZE(Scrollable.java:291)
at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1662)
at org.eclipse.swt.widgets.Canvas.WM_SIZE(Canvas.java:454)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4603)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2526)
at
org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80)
at
org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5408)
at org.eclipse.swt.widgets.Canvas.WM_WINDOWPOSCHANGED(Canvas.java:460)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4616)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method)
at org.eclipse.swt.widgets.Widget.SetWindowPos(Widget.java:1457)
at org.eclipse.swt.widgets.Control.forceResize(Control.java:1121)
at
org.eclipse.swt.widgets.ScrollBar.getThumbTrackBounds(ScrollBar.java:464)
at
org.eclipse.jface.text.source.SourceViewer$RulerLayout.computeScrollArrowHeights(SourceViewer.java:224)
at
org.eclipse.jface.text.source.SourceViewer$RulerLayout.getVerticalScrollArrowHeights(SourceViewer.java:204)
at
org.eclipse.jface.text.source.SourceViewer$RulerLayout.layout(SourceViewer.java:159)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1263)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1249)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:664)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:622)
at
org.eclipse.jface.text.source.CompositeRuler.layoutTextViewer(CompositeRuler.java:611)
at
org.eclipse.jface.text.source.CompositeRuler.addDecorator(CompositeRuler.java:565)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.addVerticalRulerColumn(ProjectionViewer.java:1289)
at
org.eclipse.jface.text.source.projection.ProjectionSupport.doEnableProjection(ProjectionSupport.java:310)
at
org.eclipse.jface.text.source.projection.ProjectionSupport$ProjectionListener.projectionEnabled(ProjectionSupport.java:143)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:489)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:537)
at
org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1441)
at
org.drools.eclipse.editors.AbstractRuleEditor.createPartControl(AbstractRuleEditor.java:84)
at
org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:241)
at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:325)
at
org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:211)
at org.eclipse.ui.forms.editor.FormEditor.addPage(FormEditor.java:308)
at
org.drools.eclipse.dsl.editor.DSLRuleEditor2.addPages(DSLRuleEditor2.java:64)
at
org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:138)
at
org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348)
at
org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
at
org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
at
org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at
org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1198)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:493)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:479)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
at
org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
at
org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
at
org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
at
org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:808)
at
org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:707)
at
org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:666)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2942)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
at
org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
at
org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
at
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:355)
at
org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:164)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
at
org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
at
org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
at
org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at
org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
at
org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
at
org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
at
org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
at
org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
--
"But beware of the Dark Side. Anger, fear, aggression - the Dark Side of
the Force are they." -Yoda
13 years, 10 months
The drools.packagebuilder.conf directory
by Carolina Pellecchia
Hi all
I am novice on GUVNOR/DROOLS, but I defined some Drools Evaluator
functions and to make the function available to the rules engine I inserted
drools.packagebuilder.conf into user home directory. Is there different
directory to do this?
Thank you in advance,
Carolina Pellecchia
13 years, 10 months
Error with Helloworld Drools projet
by paco
Hello everybody,
I want to create my first drools projet with eclipse and I've got this
following error.
org.drools.RuntimeDroolsException: Unable to load dialect
'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java'
.............................
......................
Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not in
the classpath
............................
.................
... 7 more
Please cant somebody tell me what's wrong with my program.
I've used an eclipse Eclipse Java EE IDE for Web Developers; and drools
4.0.7
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Error-with-Helloworld-Drools-projet-tp3...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 10 months