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

There is possible NPE when setting up acceptor type as SIMULATED_ANNEALING with no starting temperature

XMLWordPrintable

    • NEW
    • NEW

      it's fine to set acceptor type from code like this:

       
      localSearchPhaseConfig.setAcceptorConfig(new AcceptorConfig());
              localSearchPhaseConfig.getAcceptorConfig().setAcceptorTypeList(
                      Collections.singletonList(AcceptorType.SIMULATED_ANNEALING));
      

      throws exception:

      Exception in thread "main" java.lang.NullPointerException
      	at org.optaplanner.core.api.score.AbstractScore.parseLevelStrings(AbstractScore.java:48)
      	at org.optaplanner.core.api.score.buildin.hardsoft.HardSoftScore.parseScore(HardSoftScore.java:36)
      	at org.optaplanner.core.impl.score.buildin.hardsoft.HardSoftScoreDefinition.parseScore(HardSoftScoreDefinition.java:46)
      	at org.optaplanner.core.impl.score.buildin.hardsoft.HardSoftScoreDefinition.parseScore(HardSoftScoreDefinition.java:25)
      	at org.optaplanner.core.config.localsearch.decider.acceptor.AcceptorConfig.buildAcceptor(AcceptorConfig.java:374)
      	at org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig.buildDecider(LocalSearchPhaseConfig.java:112)
      	at org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig.buildPhase(LocalSearchPhaseConfig.java:93)
      	at org.optaplanner.core.config.localsearch.LocalSearchPhaseConfig.buildPhase(LocalSearchPhaseConfig.java:46)
      	at org.optaplanner.core.config.solver.SolverConfig.buildSolver(SolverConfig.java:205)
      	at org.jboss.qa.brms.performance.Dummy.main(Dummy.java:71)
      

              Unassigned Unassigned
              jvahala Jiří Vahala (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: