public class StudentSectioningModel extends Model<Request,Enrollment>
Modifier and Type | Field and Description |
---|---|
protected double |
iProjectedStudentWeight |
protected static DecimalFormat |
sDecimalFormat |
iAssignedVariables, iPerturbVariables, iUnassignedVariables, sDoubleFormat, sPercentageFormat, sTimeFormat
Constructor and Description |
---|
StudentSectioningModel(DataProperties properties)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(DistanceConflict.Conflict c) |
void |
add(TimeOverlapsCounter.Conflict c) |
void |
addLinkedSections(Collection<Section> sections)
Link sections using
LinkedSections |
void |
addLinkedSections(Section... sections)
Link sections using
LinkedSections |
void |
addOffering(Offering offering)
Add an offering into the model
|
void |
addStudent(Student student)
Add a student into the model
|
void |
addVariable(Request request)
Adds a variable to the model
|
void |
afterAssigned(long iteration,
Enrollment enrollment)
Called after an enrollment was assigned to a request.
|
void |
afterUnassigned(long iteration,
Enrollment enrollment)
Called before an enrollment was unassigned from a request.
|
double |
avg(double w1,
double w2)
Quadratic average of two weights.
|
double |
avgNrRequests()
Average number of requests per student (see
Student.getRequests()
) |
double |
avgUnassignPriority()
Average priority of unassigned requests (see
Request.getPriority() ) |
void |
clearOnlineSectioningInfos()
Empty online student sectioning infos for all sections (see
Section.getSpaceExpected() and Section.getSpaceHeld() ). |
void |
computeOnlineSectioningInfos()
Compute online student sectioning infos for all sections (see
Section.getSpaceExpected() and Section.getSpaceHeld() ). |
Set<Student> |
getCompleteStudents()
Students with complete schedules (see
Student.isComplete() ) |
DistanceConflict |
getDistanceConflict()
Return distance conflict extension
|
Map<String,String> |
getExtendedInfo()
Model extended info.
|
Map<String,String> |
getInfo()
Model info
|
List<LinkedSections> |
getLinkedSections()
List of linked sections
|
int |
getMaxDomainSize()
Maximal domain size (i.e., number of enrollments of a course request), -1 if there is no limit.
|
int |
getNrAssignedLastLikeRequests(boolean precise)
Number of requests from projected (
Student.isDummy() equals true)
students that are assigned. |
int |
getNrAssignedRealRequests(boolean precise)
Number of requests from real (
Student.isDummy() equals false)
students that are assigned. |
int |
getNrCompleteLastLikeStudents(boolean precise)
Number of last like (
Student.isDummy() equals true) students with
a complete schedule (Student.isComplete() equals true). |
int |
getNrCompleteRealStudents(boolean precise)
Number of real (
Student.isDummy() equals false) students with a
complete schedule (Student.isComplete() equals true). |
int |
getNrLastLikeRequests(boolean precise)
Number of requests from projected (
Student.isDummy() equals true)
students. |
int |
getNrLastLikeStudents(boolean precise)
Number of last like (
Student.isDummy() equals true) students. |
int |
getNrRealRequests(boolean precise)
Number of requests from real (
Student.isDummy() equals false)
students. |
int |
getNrRealStudents(boolean precise)
Number of real (
Student.isDummy() equals false) students. |
List<Offering> |
getOfferings()
List of offerings
|
DataProperties |
getProperties()
Configuration
|
boolean |
getReservationCanAssignOverTheLimit()
Return true if reservation that has
Reservation.canAssignOverLimit() can assign enrollments over the limit |
List<Student> |
getStudents()
Students
|
StudentWeights |
getStudentWeights()
Return student weighting model
|
TimeOverlapsCounter |
getTimeOverlaps()
Return time overlaps extension
|
double |
getTotalRequestWeight()
Sum of weights of all requests (see
Request.getWeight() ). |
double |
getTotalValue()
Overall solution value
|
double |
getTotalValue(boolean precise)
Overall solution value
|
double |
getUnassignedRequestWeight()
Sum of weights of all requests that are not assigned (see
Request.getWeight() ). |
int |
nrComplete()
Number of students with complete schedule
|
void |
remove(DistanceConflict.Conflict c) |
void |
remove(TimeOverlapsCounter.Conflict c) |
void |
removeStudent(Student student)
Remove a student from the model
|
void |
removeVariable(Request request)
Removes a variable from the model
|
void |
requestWeightsChanged()
Recompute cached request weights
|
void |
restoreBest() |
void |
setDistanceConflict(DistanceConflict dc)
Set distance conflict extension
|
void |
setMaxDomainSize(int maxDomainSize)
Maximal domain size (i.e., number of enrollments of a course request), -1 if there is no limit.
|
void |
setStudentWeights(StudentWeights weights)
Set student weighting model
|
void |
setTimeOverlaps(TimeOverlapsCounter toc)
Set time overlaps extension
|
String |
toString() |
addConstraint, addCriterion, addGlobalConstraint, addModelListener, assignedVariables, beforeAssigned, beforeUnassigned, bestUnassignedVariables, clearBest, conflictConstraints, conflictValues, constraints, countConstraints, countGlobalConstraints, countVariables, getBestPerturbations, getBestUnassignedVariables, getCriteria, getCriterion, getInfo, getInfoProviders, getModelListeners, getPerc, getPercRev, getTotalValue, globalConstraints, inConflict, init, invalidateVariablesWithInitialValueCache, modelListenerOfType, nrAssignedVariables, nrUnassignedVariables, perturbVariables, perturbVariables, removeConstraint, removeCriterion, removeCriterion, removeGlobalConstraint, removeModelListener, restoreBest, saveBest, unassignedHardConstraints, unassignedVariables, variables, variablesWithInitialValue, weaken
protected static DecimalFormat sDecimalFormat
protected double iProjectedStudentWeight
public StudentSectioningModel(DataProperties properties)
properties
- configurationpublic boolean getReservationCanAssignOverTheLimit()
Reservation.canAssignOverLimit()
can assign enrollments over the limitpublic StudentWeights getStudentWeights()
public void setStudentWeights(StudentWeights weights)
public List<Student> getStudents()
public Set<Student> getCompleteStudents()
Student.isComplete()
)public void addStudent(Student student)
public void addVariable(Request request)
Model
addVariable
in class Model<Request,Enrollment>
public void requestWeightsChanged()
public void removeStudent(Student student)
public void removeVariable(Request request)
Model
removeVariable
in class Model<Request,Enrollment>
public List<Offering> getOfferings()
public void addOffering(Offering offering)
public void addLinkedSections(Section... sections)
LinkedSections
public void addLinkedSections(Collection<Section> sections)
LinkedSections
public List<LinkedSections> getLinkedSections()
public int nrComplete()
public Map<String,String> getInfo()
getInfo
in class Model<Request,Enrollment>
public double getTotalValue(boolean precise)
public double getTotalValue()
getTotalValue
in class Model<Request,Enrollment>
public void afterAssigned(long iteration, Enrollment enrollment)
afterAssigned
in class Model<Request,Enrollment>
public void afterUnassigned(long iteration, Enrollment enrollment)
afterUnassigned
in class Model<Request,Enrollment>
public DataProperties getProperties()
public void clearOnlineSectioningInfos()
Section.getSpaceExpected()
and Section.getSpaceHeld()
).public void computeOnlineSectioningInfos()
Section.getSpaceExpected()
and Section.getSpaceHeld()
).public double getUnassignedRequestWeight()
Request.getWeight()
).public double getTotalRequestWeight()
Request.getWeight()
).public void setDistanceConflict(DistanceConflict dc)
public DistanceConflict getDistanceConflict()
public void setTimeOverlaps(TimeOverlapsCounter toc)
public TimeOverlapsCounter getTimeOverlaps()
public double avgUnassignPriority()
Request.getPriority()
)public double avgNrRequests()
Student.getRequests()
)public int getNrLastLikeStudents(boolean precise)
Student.isDummy()
equals true) students.public int getNrRealStudents(boolean precise)
Student.isDummy()
equals false) students.public int getNrCompleteLastLikeStudents(boolean precise)
Student.isDummy()
equals true) students with
a complete schedule (Student.isComplete()
equals true).public int getNrCompleteRealStudents(boolean precise)
Student.isDummy()
equals false) students with a
complete schedule (Student.isComplete()
equals true).public int getNrLastLikeRequests(boolean precise)
Student.isDummy()
equals true)
students.public int getNrRealRequests(boolean precise)
Student.isDummy()
equals false)
students.public int getNrAssignedLastLikeRequests(boolean precise)
Student.isDummy()
equals true)
students that are assigned.public int getNrAssignedRealRequests(boolean precise)
Student.isDummy()
equals false)
students that are assigned.public Map<String,String> getExtendedInfo()
Model.getInfo()
.getExtendedInfo
in class Model<Request,Enrollment>
public void restoreBest()
restoreBest
in class Model<Request,Enrollment>
public double avg(double w1, double w2)
public void add(DistanceConflict.Conflict c)
public void remove(DistanceConflict.Conflict c)
public void add(TimeOverlapsCounter.Conflict c)
public void remove(TimeOverlapsCounter.Conflict c)
public int getMaxDomainSize()
public void setMaxDomainSize(int maxDomainSize)