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

"Local Search phase started with an uninitialized solution" error must mention at least 1 variable name and entity instance that is uninitialized

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 6.3.0.Beta1
    • None
    • None
    • None

      Now we just get this:

      java.lang.IllegalStateException: Local Search phase started with an uninitialized Solution. First initialize the Solution. For example, run a Construction Heuristic phase first.
      	at org.optaplanner.core.impl.localsearch.DefaultLocalSearchPhase.phaseStarted(DefaultLocalSearchPhase.java:119)
      	at org.optaplanner.core.impl.localsearch.DefaultLocalSearchPhase.solve(DefaultLocalSearchPhase.java:60)
      	at org.optaplanner.core.impl.solver.DefaultSolver.runPhases(DefaultSolver.java:213)
      	at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:176)
      

      If there are multiple genuine variables (including if some shadow variables are incorrectly annotated as such), it's confusing to figure out what's uninitialized. If there are many entities instances, it's also a pain to track down which is the wrong entity. By stating both var name and entity instance of at least 1 occurrence, there's a smoking gun.

              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              gdesmet@redhat.com Geoffrey De Smet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: