C- Assignment Context
public interface HasAssignmentContext<V extends Variable<V,T>,T extends Value<V,T>,C extends AssignmentContext>
AssignmentContextavailable to the class.
HasAssignmentContextinterface and the data will be wrapped by this class. The
HasAssignmentContextwill only contain a reference to this assignment context, created by calling
Model.createReference(HasAssignmentContext)during its initialization. The assignment context can be than accessed by calling
AssignmentContextHolderinterface. For constraints, criteria, extensions, and neighborhood selections an existing class implementing the context can be used, see
ConstraintWithContext, only the method
createAssignmentContext(Assignment)needs to be implemented and the assignment context can be accessed within the constraint using the method
|Modifier and Type||Method and Description|
Create a new assignment context for the given assignment.
Returns an assignment context reference
Returns an assignment context associated with this object.
Store an assignment context reference that was given for the class by the
C createAssignmentContext(Assignment<V,T> assignment)
assignment- an assignment for which there needs to be an assignment context
void setAssignmentContextReference(AssignmentContextReference<V,T,C> reference)
reference- reference provided by the model by calling
C getContext(Assignment<V,T> assignment)
assignment- given assignment