|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.cpsolver.studentsct.weights.OriginalStudentWeights
public class OriginalStudentWeights
Original weighting that was used before this student weightings model was introduced
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface net.sf.cpsolver.studentsct.weights.StudentWeights |
|---|
StudentWeights.Implementation |
| Constructor Summary | |
|---|---|
OriginalStudentWeights(DataProperties config)
|
|
| Method Summary | |
|---|---|
double |
getBound(Request request)
Return lower bound for the given request |
double |
getDistanceConflictWeight(DistanceConflict.Conflict c)
Return weight of a distance conflict |
double |
getTimeOverlapConflictWeight(Enrollment enrollment,
TimeOverlapsCounter.Conflict timeOverlap)
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 |
double |
normalizePenalty(double penalty)
Normalized enrollment penalty -- to be used in Enrollment.toDouble() |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OriginalStudentWeights(DataProperties config)
| Method Detail |
|---|
public double normalizePenalty(double penalty)
Enrollment.toDouble()
public double getWeight(Request request)
public double getBound(Request request)
StudentWeights
getBound in interface StudentWeightsrequest - given request
public double getWeight(Enrollment enrollment)
StudentWeights
getWeight in interface StudentWeightsenrollment - given enrollment
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 double getDistanceConflictWeight(DistanceConflict.Conflict c)
StudentWeights
getDistanceConflictWeight in interface StudentWeights
public double getTimeOverlapConflictWeight(Enrollment enrollment,
TimeOverlapsCounter.Conflict timeOverlap)
StudentWeights
getTimeOverlapConflictWeight in interface StudentWeightspublic boolean isBetterThanBestSolution(Solution<Request,Enrollment> currentSolution)
SolutionComparatorSolution.saveBest() and
Solution.restoreBest()).
isBetterThanBestSolution in interface SolutionComparator<Request,Enrollment>currentSolution - given solution
public static void main(String[] args)
public boolean isFreeTimeAllowOverlaps()
StudentWeights
isFreeTimeAllowOverlaps in interface StudentWeights
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||