Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-2659

Examples: cannot do problem changes when solver is not solving

XMLWordPrintable

    • 2022 Week 05-07 (from Jan 31)
    • NEW
    • NEW

      Steps to reproduce:

      1. Run Cloud Balancing example.
      2. Open any data set.
      3. Add a process (click the cogwheel button).
      13:34:37.115 [EventQueue-0] INFO  Opened: data/cloudbalancing/unsolved/2computers-6processes.xml
      13:34:39.661 [EventQueue-0] INFO  Scheduling addition of process (CloudProcess-null).
      Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: The notificationQueues might not be empty (false) so any shadow variables might be stale so score calculation is unreliable.
      Maybe a ScoreDirector.before*() method was called without calling ScoreDirector.triggerVariableListeners(), before calling ScoreDirector.calculateScore().
      	at org.optaplanner.core.impl.domain.variable.listener.support.VariableListenerSupport.assertNotificationQueuesAreEmpty(VariableListenerSupport.java:270)
      	at org.optaplanner.core.impl.score.director.stream.DroolsConstraintStreamScoreDirector.calculateScore(DroolsConstraintStreamScoreDirector.java:85)
      	at org.optaplanner.examples.common.business.SolutionBusiness.doProblemChange(SolutionBusiness.java:363)
      	at org.optaplanner.examples.common.swingui.SolutionPanel.doProblemChange(SolutionPanel.java:208)
      	at org.optaplanner.examples.common.swingui.SolutionPanel.doProblemChange(SolutionPanel.java:204)
      	at org.optaplanner.examples.cloudbalancing.swingui.CloudBalancingPanel.addProcess(CloudBalancingPanel.java:240)
      	at org.optaplanner.examples.cloudbalancing.swingui.CloudBalancingPanel.lambda$createHeaderPanel$1(CloudBalancingPanel.java:145)
      	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
      	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
      	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
      	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
      	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
      	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
      	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6626)
      	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3389)
      	at java.desktop/java.awt.Component.processEvent(Component.java:6391)
      	at java.desktop/java.awt.Container.processEvent(Container.java:2266)
      	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
      	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
      	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
      	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
      	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
      	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
      	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
      	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
      	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
      	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
      	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
      	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
      	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
      	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
      	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
      	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
      	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
      	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
      	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
      	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
      	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
      	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
      	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
      	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
      	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
      

              jlocker Jiří Locker (Inactive)
              jlocker Jiří Locker (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: