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

java.lang.NegativeArraySizeException is thrown when PARABOLIC_DISTRIBUTION without a specified maximum size is used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.11.0.Final
    • 7.0.0.Final
    • optaplanner-core
    • None
    • 2018 Week 33-35
    • Hide

      Configure nearbySelection with

        <nearbySelection>
          <nearbySelectionDistributionType>PARABOLIC_DISTRIBUTION</nearbySelectionDistributionType>
        </nearbySelection>
      

      (as documented in https://docs.optaplanner.org/7.0.0.Final/optaplanner-docs/html_single/index.html#nearbySelection)

      Running the solver will fail with:

      java.lang.NegativeArraySizeException: null
              at org.optaplanner.core.impl.heuristic.selector.common.nearby.NearbyDistanceMatrix.addAllDestinations(NearbyDistanceMatrix.java:35) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final]
              at org.optaplanner.core.impl.heuristic.selector.entity.nearby.NearEntityNearbyEntitySelector.phaseStarted(NearEntityNearbyEntitySelector.java:96) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final]
              at org.optaplanner.core.impl.phase.event.PhaseLifecycleSupport.firePhaseStarted(PhaseLifecycleSupport.java:37) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final]
              at org.optaplanner.core.impl.heuristic.selector.AbstractSelector.phaseStarted(AbstractSelector.java:49) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final]
              at org.optaplanner.core.impl.phase.event.PhaseLifecycleSupport.firePhaseStarted(PhaseLifecycleSupport.java:37) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final]
              at org.optaplanner.core.impl.heuristic.selector.AbstractSelector.phaseStarted(AbstractSelector.java:49) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final]
              at org.optaplanner.core.impl.localsearch.decider.LocalSearchDecider.phaseStarted(LocalSearchDecider.java:95) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final]
              at org.optaplanner.core.impl.localsearch.DefaultLocalSearchPhase.phaseStarted(DefaultLocalSearchPhase.java:115) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final]
              at org.optaplanner.core.impl.localsearch.DefaultLocalSearchPhase.solve(DefaultLocalSearchPhase.java:64) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final]
              at org.optaplanner.core.impl.solver.AbstractSolver.runPhases(AbstractSolver.java:87) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final]
              at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:163) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final]
              at vehiclerouting.solver.execution.ExecuteMulticore.compute(ExecuteMulticore.java:63) [vrp-solver-6.2.0.jar:6.2.0]
              at vehiclerouting.solver.execution.ExecuteMulticore.compute(ExecuteMulticore.java:25) [vrp-solver-6.2.0.jar:6.2.0]
              at java.util.concurrent.RecursiveTask.exec(RecursiveTask.java:94) [na:1.8.0_131]
              at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [na:1.8.0_131]
              at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [na:1.8.0_131]
              at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [na:1.8.0_131]
              at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [na:1.8.0_131]
      
      Show
      Configure nearbySelection with <nearbySelection> <nearbySelectionDistributionType> PARABOLIC_DISTRIBUTION </nearbySelectionDistributionType> </nearbySelection> (as documented in https://docs.optaplanner.org/7.0.0.Final/optaplanner-docs/html_single/index.html#nearbySelection ) Running the solver will fail with: java.lang.NegativeArraySizeException: null at org.optaplanner.core.impl.heuristic.selector.common.nearby.NearbyDistanceMatrix.addAllDestinations(NearbyDistanceMatrix.java:35) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final] at org.optaplanner.core.impl.heuristic.selector.entity.nearby.NearEntityNearbyEntitySelector.phaseStarted(NearEntityNearbyEntitySelector.java:96) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final] at org.optaplanner.core.impl.phase.event.PhaseLifecycleSupport.firePhaseStarted(PhaseLifecycleSupport.java:37) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final] at org.optaplanner.core.impl.heuristic.selector.AbstractSelector.phaseStarted(AbstractSelector.java:49) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final] at org.optaplanner.core.impl.phase.event.PhaseLifecycleSupport.firePhaseStarted(PhaseLifecycleSupport.java:37) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final] at org.optaplanner.core.impl.heuristic.selector.AbstractSelector.phaseStarted(AbstractSelector.java:49) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final] at org.optaplanner.core.impl.localsearch.decider.LocalSearchDecider.phaseStarted(LocalSearchDecider.java:95) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final] at org.optaplanner.core.impl.localsearch.DefaultLocalSearchPhase.phaseStarted(DefaultLocalSearchPhase.java:115) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final] at org.optaplanner.core.impl.localsearch.DefaultLocalSearchPhase.solve(DefaultLocalSearchPhase.java:64) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final] at org.optaplanner.core.impl.solver.AbstractSolver.runPhases(AbstractSolver.java:87) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final] at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:163) ~[optaplanner-core-7.0.0.Final.jar:7.0.0.Final] at vehiclerouting.solver.execution.ExecuteMulticore.compute(ExecuteMulticore.java:63) [vrp-solver-6.2.0.jar:6.2.0] at vehiclerouting.solver.execution.ExecuteMulticore.compute(ExecuteMulticore.java:25) [vrp-solver-6.2.0.jar:6.2.0] at java.util.concurrent.RecursiveTask.exec(RecursiveTask.java:94) [na:1.8.0_131] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [na:1.8.0_131] at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [na:1.8.0_131] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [na:1.8.0_131] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) [na:1.8.0_131]
    • NEW
    • NEW

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

              Created:
              Updated:
              Resolved: