public ParetoSolutionsRecorder(final ResolutionPolicy policy, final IntVar[] objectives){
super(objectives[0].getSolver());
this.objectives = objectives;
this.n = objectives.length;
this.policy = policy;
solver.plugMonitor(new IMonitorClose() {
@Override
public void beforeClose() {
Solution last = getLastSolution();
if(last!=null){
try{