* @param policy optimization policy, among ResolutionPolicy.MINIMIZE and ResolutionPolicy.MAXIMIZE
* @param objectives the variables to optimize. BEWARE they should all respect the SAME optimization policy
*/
public void findParetoFront(ResolutionPolicy policy, IntVar... objectives) {
if (policy == ResolutionPolicy.SATISFACTION) {
throw new SolverException("Solver.findParetoFront(...) cannot be called with ResolutionPolicy.SATISFACTION.");
}
if (objectives == null || objectives.length == 0) {
throw new SolverException("No objective variable has been defined");
}
if (objectives.length == 1) {
throw new SolverException("Only one objective variable has been defined. Pareto is relevant with >1 objective");
}
// BEWARE the usual optimization manager is only defined for mono-objective optimization
// so we use a satisfaction manager by default (it does nothing)
if (getObjectiveManager().isOptimization()) {
set(new ObjectiveManager<IntVar, Integer>(null, ResolutionPolicy.SATISFACTION, false));