void RoutingSolver::solve() {
IloDispatcher dispatcher(_solver);
IloEnv env = _solver.getEnv();
IloDimension1 weight = IloDimension1::Find(env, "Weight");
// Subgoal
IloGoal instantiateCost = IloDichotomize(env,
dispatcher.getCostVar(),
IloFalse);
IloGoal restoreSolution = IloRestoreSolution(env, _solution);
IloGoal goal = GenerateFirstSolution(env, weight) && instantiateCost;
// Solving
if (findFirstSolution(goal)) {
improve(instantiateCost);
_solver.solve(restoreSolution);
}
}
|