Class DefaultCumulatives

java.lang.Object
org.btrplace.scheduler.choco.view.AbstractCumulatives
org.btrplace.scheduler.choco.view.DefaultCumulatives
All Implemented Interfaces:
Injectable, MisplacedVMsEstimator, ChocoView, Cumulatives

public class DefaultCumulatives
extends AbstractCumulatives
implements Cumulatives
Builder to create a unique slices scheduler that aggregates different resources.
Author:
Fabien Hermenier
  • Constructor Details

  • Method Details

    • inject

      public boolean inject​(Parameters ps, ReconfigurationProblem rp) throws SchedulerException
      Description copied from interface: Injectable
      Inject the constraint into the problem.
      Specified by:
      inject in interface Injectable
      Overrides:
      inject in class AbstractCumulatives
      Parameters:
      ps - the scheduler parameters
      rp - the problem
      Returns:
      true if the injection succeeded, false if the problem is sure to not have a solution
      Throws:
      SchedulerException - if an error occurred while injecting.
    • addDim

      public void addDim​(List<org.chocosolver.solver.variables.IntVar> c, int[] cUse, org.chocosolver.solver.variables.IntVar[] dUse)
      Add a dimension.
      Specified by:
      addDim in interface Cumulatives
      Parameters:
      c - the resource capacity of each of the nodes
      cUse - the resource usage of each of the cSlices
      dUse - the resource usage of each of the dSlices
    • beforeSolve

      public boolean beforeSolve​(ReconfigurationProblem rp)
      Build the constraint.
      Specified by:
      beforeSolve in interface ChocoView
      Parameters:
      rp - the problem we solve
      Returns:
      the resulting constraint