Class Packing
java.lang.Object
org.btrplace.scheduler.choco.view.Packing
- All Implemented Interfaces:
Injectable
,MisplacedVMsEstimator
,ChocoView
- Direct Known Subclasses:
VectorPacking
public abstract class Packing extends Object implements ChocoView
An abstract constraint to create vector packing constraints.
For performance reason, it is possible to consider multiple dimensions in a single constraint
- Author:
- Fabien Hermenier
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Packing()
-
Method Summary
Modifier and Type Method Description abstract void
addDim(String name, List<org.chocosolver.solver.variables.IntVar> l, int[] s, org.chocosolver.solver.variables.IntVar[] b)
Add a new dimension.String
getIdentifier()
Get the view unique identifier.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.btrplace.scheduler.choco.view.ChocoView
beforeSolve, cloneVM, getDependencies, getMisPlacedVMs, insertActions
-
Field Details
-
VIEW_ID
The view identifier.- See Also:
- Constant Field Values
-
-
Constructor Details
-
Packing
public Packing()
-
-
Method Details
-
getIdentifier
Description copied from interface:ChocoView
Get the view unique identifier.- Specified by:
getIdentifier
in interfaceChocoView
- Returns:
- a non-empty String
-
addDim
public abstract void addDim(String name, List<org.chocosolver.solver.variables.IntVar> l, int[] s, org.chocosolver.solver.variables.IntVar[] b)Add a new dimension.- Parameters:
name
- the dimension labell
- the capacity of each node. The variables *must be* ordered according toDefaultReconfigurationProblem.getNode(org.btrplace.model.Node)
.s
- The VM consumptionb
- the placement variable for each VM. Same order than fors
-