@Test(groups = "10s", timeOut = 60000) public void testAll() throws SetUpException { Model sol; for (int j = 0; j < OPTIMAL_RULER.length; j++) { sol = modeler(OPTIMAL_RULER[j][0]); sol.setObjective(false, sol.getVars()[OPTIMAL_RULER[j][0] - 1]); int nb = 0; while (sol.getSolver().solve()) { nb++; } long sols = sol.getSolver().getSolutionCount(); assertEquals(nb, sols); long nodes = sol.getSolver().getNodeCount(); sol = modeler(OPTIMAL_RULER[j][0]); sol.setObjective(false, sol.getVars()[OPTIMAL_RULER[j][0] - 1]); while (sol.getSolver().solve()) ; assertEquals(sol.getSolver().getSolutionCount(), sols); assertEquals(sol.getSolver().getNodeCount(), nodes); } }
@Override public void solve() { model.setObjective(false, (IntVar) model.getVars()[m - 1]); while (model.getSolver().solve()) { out.println("New solution found : " + model.getVars()[m - 1]); } }
GolombRuler extends AbstractProblem { @Override public void solve() { model.setObjective(false, (IntVar) model.getVars()[m - 1]); while (model.getSolver().solve()) { out.println("New solution found : " + model.getVars()[m - 1]); } } }
GolombRuler extends AbstractProblem { @Override public void solve() { model.setObjective(false, (IntVar) model.getVars()[m - 1]); while (model.getSolver().solve()) { out.println("New solution found : " + model.getVars()[m - 1]); } }  }
GolombRuler extends AbstractProblem { @Override public void solve() { model.setObjective(false, (IntVar) model.getVars()[m - 1]); while (model.getSolver().solve()) { out.println("New solution found : " + model.getVars()[m - 1]); } }  @Override void buildModel(); @Override void configureSearch(); @Override void solve(); static void main(String[] args); }
GolombRuler extends AbstractProblem { @Override public void solve() { model.setObjective(false, (IntVar) model.getVars()[m - 1]); while (model.getSolver().solve()) { out.println("New solution found : " + model.getVars()[m - 1]); } }  @Override void buildModel(); @Override void configureSearch(); @Override void solve(); static void main(String[] args);  }