|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.cpsolver.studentsct.weights.PriorityStudentWeights
public class PriorityStudentWeights
New weighting model. It tries to obey the following principles:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface net.sf.cpsolver.studentsct.weights.StudentWeights |
|---|
StudentWeights.Implementation |
| Field Summary | |
|---|---|
protected double |
iAlternativeRequestFactor
|
protected double |
iBalancingFactor
|
protected double |
iDistanceConflict
|
protected double |
iFirstAlternativeFactor
|
protected boolean |
iLeftoverSpread
|
protected double |
iPriorityFactor
|
protected double |
iProjectedStudentWeight
|
protected double |
iSecondAlternativeFactor
|
protected double |
iTimeOverlapFactor
|
protected double |
iTimeOverlapMaxLimit
|
| Constructor Summary | |
|---|---|
PriorityStudentWeights(DataProperties config)
|
|
| Method Summary | |
|---|---|
double |
getBound(Request request)
Return lower bound for the given request |
double |
getCachedWeight(Request request)
|
double |
getDistanceConflictWeight(DistanceConflict.Conflict c)
Return weight of a distance conflict |
double |
getTimeOverlapConflictWeight(Enrollment e,
TimeOverlapsCounter.Conflict c)
Return weight of a time overlapping conflict |
double |
getWeight(Enrollment enrollment)
Return base weight of the given enrollment |
double |
getWeight(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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
public PriorityStudentWeights(DataProperties config)
| Method Detail |
|---|
public double getWeight(Request request)
public double getCachedWeight(Request request)
public double getBound(Request request)
StudentWeights
getBound in interface StudentWeightsrequest - given request
protected double round(double value)
public double getWeight(Enrollment enrollment)
StudentWeights
getWeight in interface StudentWeightsenrollment - given enrollment
public double getDistanceConflictWeight(DistanceConflict.Conflict c)
StudentWeights
getDistanceConflictWeight in interface StudentWeights
public double getTimeOverlapConflictWeight(Enrollment e,
TimeOverlapsCounter.Conflict c)
StudentWeights
getTimeOverlapConflictWeight in interface StudentWeights
public double getWeight(Enrollment enrollment,
Set<DistanceConflict.Conflict> distanceConflicts,
Set<TimeOverlapsCounter.Conflict> timeOverlappingConflicts)
StudentWeights
getWeight in interface StudentWeightsenrollment - given enrollmentdistanceConflicts - distance conflictstimeOverlappingConflicts - time overlapping conflicts
public boolean isBetterThanBestSolution(Solution<Request,Enrollment> currentSolution)
SolutionComparatorSolution.saveBest() and
Solution.restoreBest()).
isBetterThanBestSolution in interface SolutionComparator<Request,Enrollment>currentSolution - given solution
public boolean isFreeTimeAllowOverlaps()
StudentWeights
isFreeTimeAllowOverlaps in interface StudentWeightspublic static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||