- Improved handling of optimization process:
- The solver’s method “findOptimalSolution” now has an optional third parameter:
public Solution findOptimalSolution(Objective objective, Var objectiveVar, OptimizationStrategy optStrategy);
where “optStrategy” can be one of 3 standard constants:- OptimizationStrategy.NATIVE – defined by a concrete implementation
- OptimizationStrategy.BASIC – provided by a common JSR-331 implementation using a solution operator
- OptimizationStrategy.DICHOTOMIZE – provided by a common JSR-331 implementation
- The solver’s method “findOptimalSolution” now has an optional third parameter:
- The optimization process may be controlled by two different time limits set by the following methods of the interface Solver:
- setTimeLimit(millis) – a number of milliseconds for a search of one solution
- setTimeLimitGlobal(millis) – a number of milliseconds for the entire search of an optimal solution
- The TCK now contains an additional 4 packages:
- org.jcp.jsr331.test – mandatory JUnit tests that check compliance of different CP solvers to the standard
- org.jcp.jsr331.samples – various constraint satisfaction and optimization problems that demonstrate the use of JSR-331
- org.jcp.jsr331.linear.samples – various linear optimization problems that may be executed with any CP or LP solvers
- org.jcp.jsr331.hakan – a collection of test problems contributed by Hakan Kjellerstrand