Package org.chocosolver.solver.objective
Class ParetoOptimizer
- java.lang.Object
-
- org.chocosolver.solver.objective.ParetoOptimizer
-
- All Implemented Interfaces:
IMonitorSolution
,ISearchMonitor
public class ParetoOptimizer extends Object implements IMonitorSolution
Class to store the pareto front (multi-objective optimization). Worse solutions are dynamically removed from the solution set.- Author:
- Jean-Guillaume Fages
-
-
Constructor Summary
Constructors Constructor Description ParetoOptimizer(boolean maximize, IntVar[] objectives)
Create an object to compute the Pareto front of a multi-objective problem.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Solution>
getParetoFront()
void
onSolution()
-
-
-
Constructor Detail
-
ParetoOptimizer
public ParetoOptimizer(boolean maximize, IntVar[] objectives)
Create an object to compute the Pareto front of a multi-objective problem. Maintain the set of dominating solutions and posts constraints dynamically to prevent search from computing dominated ones. This object must be used as follows: model.getSolver().plugMonitor(paretoRecorder); while(model.getSolver().solve()); ListparetoFront = paretoRecorder.getParetoFront(); The Solutions store decision variables (those declared in the search strategy) BEWARE: requires the objectives to be declared in the search strategy - Parameters:
maximize
- whether to maximize or minimize the objectivesobjectives
- objective variables (must all be optimized in the same direction)
-
-
Method Detail
-
onSolution
public void onSolution()
- Specified by:
onSolution
in interfaceIMonitorSolution
-
-