use of org.btrplace.scheduler.choco.view.Cumulatives in project scheduler by btrplace.
the class DefaultReconfigurationProblem method addContinuousResourceCapacities.
private void addContinuousResourceCapacities() {
TIntArrayList cUse = new TIntArrayList();
List<IntVar> iUse = new ArrayList<>();
for (int j = 0; j < getVMs().size(); j++) {
VMTransition a = vmActions.get(j);
if (a.getDSlice() != null) {
iUse.add(csp.intVar(1));
}
if (a.getCSlice() != null) {
cUse.add(1);
}
}
ChocoView v = getView(Cumulatives.VIEW_ID);
if (v == null) {
throw SchedulerModelingException.missingView(model, Cumulatives.VIEW_ID);
}
((Cumulatives) v).addDim(getNbRunningVMs(), cUse.toArray(), iUse.toArray(new IntVar[iUse.size()]));
}
Aggregations