public class Course.CourseContext extends Object implements AssignmentConstraintContext<Request,Enrollment>
| Constructor and Description |
|---|
CourseContext(Assignment<Request,Enrollment> assignment) |
CourseContext(Course.CourseContext parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
assigned(Assignment<Request,Enrollment> assignment,
Enrollment enrollment)
Called when
ConstraintWithContext.assigned(Assignment, long, Value) is called to update
the content of the context. |
Set<Enrollment> |
getEnrollments()
Set of assigned enrollments
|
double |
getEnrollmentWeight(Assignment<Request,Enrollment> assignment,
Request excludeRequest)
Enrollment weight -- weight of all requests that are enrolled into this course,
excluding the given one.
|
double |
getMaxEnrollmentWeight()
Maximal weight of a single enrollment in the course
|
double |
getMinEnrollmentWeight()
Minimal weight of a single enrollment in the course
|
void |
unassigned(Assignment<Request,Enrollment> assignment,
Enrollment enrollment)
Called when
ConstraintWithContext.unassigned(Assignment, long, Value) is called to update
the content of the context. |
public CourseContext(Assignment<Request,Enrollment> assignment)
public CourseContext(Course.CourseContext parent)
public void assigned(Assignment<Request,Enrollment> assignment, Enrollment enrollment)
AssignmentConstraintContextConstraintWithContext.assigned(Assignment, long, Value) is called to update
the content of the context.assigned in interface AssignmentConstraintContext<Request,Enrollment>assignment - current assignment (with which this context is associated)enrollment - assigned valuepublic void unassigned(Assignment<Request,Enrollment> assignment, Enrollment enrollment)
AssignmentConstraintContextConstraintWithContext.unassigned(Assignment, long, Value) is called to update
the content of the context.unassigned in interface AssignmentConstraintContext<Request,Enrollment>assignment - current assignment (with which this context is associated)enrollment - unassigned valuepublic double getEnrollmentWeight(Assignment<Request,Enrollment> assignment, Request excludeRequest)
Request.getWeight().assignment - current assignmentexcludeRequest - request to excludepublic Set<Enrollment> getEnrollments()
public double getMaxEnrollmentWeight()
public double getMinEnrollmentWeight()