// communication
final ISearchLoop searchLoop = solver.getSearchLoop();
searchLoop.plugSearchMonitor(new IMonitorSolution() {
@Override
public void onSolution() {
ObjectiveManager om = searchLoop.getObjectiveManager();
int val = om.getPolicy() == ResolutionPolicy.SATISFACTION ? 1 : om.getBestSolutionValue().intValue();
master.newSol(val, om.getPolicy());
}
});
model.solve();
if (!solver.hasReachedLimit()) {