Overview | Group | Tree | Graph | Index | Concepts |
This function returns a goal which assigns a resource as the selected one
in alternatives
. The goal uses the selector
possibleSel
to choose the resource. If no instance of
IloSelector<IlcResource,IlcAltResConstraint>
is given, the goal
uses a default selector which tries the resources in the same order as
IlcPossibleAltResIterator
.
See IloSelector
in the IBM ILOG Solver Reference Manual for more information.
Implementation
This function could be defined like this:
IlcGoal IlcAssign(IlcAltResConstraint constraint, IloSelector<IlcResource> possibleSel){ if (!constraint.isResourceSelected()) { IlcResource resource; if (possibleSel.select(resource, constraint)) return IlcAnd(IlcTryAssign(resource, constraint), IlcAssign(constraint, possibleSel)); } return 0; }
See Also:
IlcAltResConstraint, IlcResource, IlcTryAssign