Skip to content

Commit

Permalink
Student Scheduling: Request Bound
Browse files Browse the repository at this point in the history
- added ability to switched off the request bound adjustments implemented by commit 5d0b726
  - by setting StudentWeights.ImprovedBound to false (defaults to true)
  • Loading branch information
tomas-muller committed Nov 15, 2020
1 parent f555fa7 commit c8d9df9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public class PriorityStudentWeights implements StudentWeights {
protected boolean iMaximizeAssignment = false;
protected boolean iPreciseComparison = false;
protected double[] iQalityWeights;
protected boolean iImprovedBound = true;

public PriorityStudentWeights(DataProperties config) {
iPriorityFactor = config.getPropertyDouble("StudentWeights.Priority", iPriorityFactor);
Expand Down Expand Up @@ -125,6 +126,7 @@ public PriorityStudentWeights(DataProperties config) {
for (StudentQuality.Type type: StudentQuality.Type.values()) {
iQalityWeights[type.ordinal()] = config.getPropertyDouble(type.getWeightName(), type.getWeightDefault());
}
iImprovedBound = config.getPropertyBoolean("StudentWeights.ImprovedBound", iImprovedBound);
}

public double getWeight(Request request) {
Expand Down Expand Up @@ -257,6 +259,7 @@ public double getBound(Request request) {
}

protected double computeBound(double base, Request request) {
if (!iImprovedBound) return base;
if (iAdditiveWeights) {
double weight = 0.0;
if (request instanceof CourseRequest) {
Expand Down

0 comments on commit c8d9df9

Please sign in to comment.