@@ -70,11 +70,12 @@ public static <Solution_> SolverConfig buildSolverConfig(Class<Solution_> soluti
7070 new TerminationConfig ().withStepCountLimit (TERMINATION_STEP_COUNT_LIMIT )));
7171 }
7272
73- public static <Solution_ > Solution_ solve (SolverConfig solverConfig , Solution_ problem ) {
73+ public static synchronized <Solution_ > Solution_ solve (SolverConfig solverConfig , Solution_ problem ) {
7474 return solve (solverConfig , problem , true );
7575 }
7676
77- public static <Solution_ > Solution_ solve (SolverConfig solverConfig , Solution_ problem , boolean bestSolutionEventExists ) {
77+ public static synchronized <Solution_ > Solution_ solve (SolverConfig solverConfig , Solution_ problem ,
78+ boolean bestSolutionEventExists ) {
7879 SolverFactory <Solution_ > solverFactory = SolverFactory .create (solverConfig );
7980 var solver = solverFactory .buildSolver ();
8081 var eventBestSolutionRef = new AtomicReference <Solution_ >();
@@ -100,10 +101,10 @@ public static TestdataSolution generateTestdataSolution(String code, int entityA
100101 var solution = new TestdataSolution (code );
101102 solution .setValueList (IntStream .range (1 , entityAndValueCount + 1 )
102103 .mapToObj (i -> new TestdataValue ("v" + i ))
103- .collect ( Collectors . toList () ));
104+ .toList ());
104105 solution .setEntityList (IntStream .range (1 , entityAndValueCount + 1 )
105106 .mapToObj (i -> new TestdataEntity ("e" + i ))
106- .collect ( Collectors . toList () ));
107+ .toList ());
107108 return solution ;
108109 }
109110
0 commit comments