public class PriorityStudentWeights extends Object implements StudentWeights
StudentWeights.Implementation
Modifier and Type | Field and Description |
---|---|
protected double |
iAlternativeRequestFactor |
protected double |
iBalancingFactor |
protected double |
iDistanceConflict |
protected double |
iFirstAlternativeFactor |
protected double |
iGroupBestRatio |
protected double |
iGroupFactor |
protected double |
iGroupFillRatio |
protected boolean |
iLeftoverSpread |
protected boolean |
iMPP |
protected double |
iPerturbationFactor |
protected double |
iPriorityFactor |
protected double |
iProjectedStudentWeight |
protected double |
iSameChoiceWeight |
protected double |
iSameTimeWeight |
protected double |
iSecondAlternativeFactor |
protected double |
iTimeOverlapFactor |
protected double |
iTimeOverlapMaxLimit |
Constructor and Description |
---|
PriorityStudentWeights(DataProperties config) |
Modifier and Type | Method and Description |
---|---|
double |
getBound(Request request)
Return lower bound for the given request
|
double |
getCachedWeight(Request request) |
protected double |
getDifference(Enrollment enrollment)
Return how much the given enrollment is different from the initial enrollment
|
double |
getDistanceConflictWeight(Assignment<Request,Enrollment> assignment,
DistanceConflict.Conflict c)
Return weight of a distance conflict
|
double |
getTimeOverlapConflictWeight(Assignment<Request,Enrollment> assignment,
Enrollment e,
TimeOverlapsCounter.Conflict c)
Return weight of a time overlapping conflict
|
double |
getWeight(Assignment<Request,Enrollment> assignment,
Enrollment enrollment)
Return base weight of the given enrollment
|
double |
getWeight(Assignment<Request,Enrollment> assignment,
Enrollment enrollment,
Set<DistanceConflict.Conflict> distanceConflicts,
Set<TimeOverlapsCounter.Conflict> timeOverlappingConflicts)
Return weight of the given enrollment
|
double |
getWeight(Request request) |
boolean |
isBetterThanBestSolution(Solution<Request,Enrollment> currentSolution)
Compares two solutions.
|
boolean |
isFreeTimeAllowOverlaps()
Return true if free time requests allow overlaps
|
static void |
main(String[] args)
Test case -- run to see the weights for a few courses
|
protected double |
round(double value) |
protected double iPriorityFactor
protected double iFirstAlternativeFactor
protected double iSecondAlternativeFactor
protected double iDistanceConflict
protected double iTimeOverlapFactor
protected double iTimeOverlapMaxLimit
protected boolean iLeftoverSpread
protected double iBalancingFactor
protected double iAlternativeRequestFactor
protected double iProjectedStudentWeight
protected boolean iMPP
protected double iPerturbationFactor
protected double iSameChoiceWeight
protected double iSameTimeWeight
protected double iGroupFactor
protected double iGroupBestRatio
protected double iGroupFillRatio
public PriorityStudentWeights(DataProperties config)
public double getCachedWeight(Request request)
protected double getDifference(Enrollment enrollment)
enrollment
- given enrollmentpublic double getBound(Request request)
StudentWeights
getBound
in interface StudentWeights
request
- given requestprotected double round(double value)
public double getWeight(Assignment<Request,Enrollment> assignment, Enrollment enrollment)
StudentWeights
getWeight
in interface StudentWeights
assignment
- current assignmentenrollment
- given enrollmentpublic double getDistanceConflictWeight(Assignment<Request,Enrollment> assignment, DistanceConflict.Conflict c)
StudentWeights
getDistanceConflictWeight
in interface StudentWeights
assignment
- current assignmentc
- distance conflictpublic double getTimeOverlapConflictWeight(Assignment<Request,Enrollment> assignment, Enrollment e, TimeOverlapsCounter.Conflict c)
StudentWeights
getTimeOverlapConflictWeight
in interface StudentWeights
assignment
- current assignmente
- enrollment in questionc
- time overlapping conflictpublic double getWeight(Assignment<Request,Enrollment> assignment, Enrollment enrollment, Set<DistanceConflict.Conflict> distanceConflicts, Set<TimeOverlapsCounter.Conflict> timeOverlappingConflicts)
StudentWeights
getWeight
in interface StudentWeights
assignment
- current assignmentenrollment
- given enrollmentdistanceConflicts
- distance conflictstimeOverlappingConflicts
- time overlapping conflictspublic boolean isBetterThanBestSolution(Solution<Request,Enrollment> currentSolution)
SolutionComparator
Solution.saveBest()
and
Solution.restoreBest()
).isBetterThanBestSolution
in interface SolutionComparator<Request,Enrollment>
currentSolution
- given solutionpublic boolean isFreeTimeAllowOverlaps()
StudentWeights
isFreeTimeAllowOverlaps
in interface StudentWeights
Copyright © 2016 UniTime LLC. All Rights Reserved.