Search in sources :

Example 6 with Solution

use of org.chocosolver.solver.Solution in project scheduler by btrplace.

the class DefaultReconfigurationProblem method makeResultingPlan.

private ReconfigurationPlan makeResultingPlan() {
    // Check for the solution
    ESat status = solver.isFeasible();
    if (status == ESat.FALSE) {
        // It is certain the CSP has no solution
        return null;
    }
    Solution s = null;
    if (!solutions.isEmpty()) {
        s = solutions.get(solutions.size() - 1);
    }
    return buildReconfigurationPlan(s, model.copy());
}
Also used : ESat(org.chocosolver.util.ESat) IMonitorSolution(org.chocosolver.solver.search.loop.monitors.IMonitorSolution) Solution(org.chocosolver.solver.Solution)

Aggregations

Solution (org.chocosolver.solver.Solution)6 IMonitorSolution (org.chocosolver.solver.search.loop.monitors.IMonitorSolution)4 Model (org.btrplace.model.Model)3 Node (org.btrplace.model.Node)3 VM (org.btrplace.model.VM)3 ReconfigurationPlan (org.btrplace.plan.ReconfigurationPlan)3 Parameters (org.btrplace.scheduler.choco.Parameters)3 ReconfigurationProblem (org.btrplace.scheduler.choco.ReconfigurationProblem)3 ArrayList (java.util.ArrayList)2 HashSet (java.util.HashSet)2 List (java.util.List)2 Set (java.util.Set)2 Instance (org.btrplace.model.Instance)2 Mapping (org.btrplace.model.Mapping)2 SatConstraint (org.btrplace.model.constraint.SatConstraint)2 Action (org.btrplace.plan.event.Action)2 MigrateVM (org.btrplace.plan.event.MigrateVM)2 SchedulerException (org.btrplace.scheduler.SchedulerException)2 SchedulerModelingException (org.btrplace.scheduler.SchedulerModelingException)2 DefaultReconfigurationProblemBuilder (org.btrplace.scheduler.choco.DefaultReconfigurationProblemBuilder)2