use of org.btrplace.scheduler.choco.constraint.ChocoConstraint in project scheduler by btrplace.
the class InstanceSolverRunner method build.
/**
* Build a sat constraint
*
* @param cstr the model-side constraint
* @return the solver-side constraint
* @throws SchedulerException if the process failed
*/
private ChocoConstraint build(Constraint cstr) throws SchedulerException {
ChocoMapper mapper = params.getMapper();
ChocoConstraint cc = mapper.get(cstr);
if (cc == null) {
throw new SchedulerModelingException(origin, "No implementation mapped to '" + cstr.getClass().getSimpleName() + "'");
}
return cc;
}
Aggregations