public class PercentageOverExpected extends Object implements OverExpectedCriterion
| Modifier and Type | Class and Description |
|---|---|
static class |
PercentageOverExpected.Rounding
Expectations rounding
|
| Constructor and Description |
|---|
PercentageOverExpected() |
PercentageOverExpected(DataProperties config) |
PercentageOverExpected(Double percentage) |
| Modifier and Type | Method and Description |
|---|---|
protected double |
getEnrollment(Assignment<Request,Enrollment> assignment,
Config config,
Request request)
Config enrollment (using
OnlineConfig.getEnrollment() if applicable}, Config.getEnrollmentWeight(Assignment, Request) otherwise) |
protected double |
getEnrollment(Assignment<Request,Enrollment> assignment,
Section section,
Request request)
Section enrollment (using
OnlineSection.getEnrollment() if applicable}, Section.getEnrollmentWeight(Assignment, Request) otherwise) |
Integer |
getExpected(int sectionLimit,
double expectedSpace)
Expected space, for printing purposes
|
protected int |
getLimit(Section section)
Section limit (using
OnlineSection.getEnrollment() if applicable}, Section.getLimit() otherwise) |
protected int |
getLimit(Subpart subpart)
Subpart limit (using
OnlineConfig.getEnrollment() if applicable}, Subpart.getLimit() otherwise) |
double |
getOverExpected(Assignment<Request,Enrollment> assignment,
Section section,
Request request)
Expectation penalty, to be minimized
|
double |
getPercentage()
Over-expected percentage, defaults to 1.0
|
protected boolean |
hasExpectations(Subpart subpart)
Check if there are expectations on any of the sections of the given subpart
|
protected double |
round(double value)
Round the given value using the rounding from OverExpected.Rounding parameter
|
void |
setPercentage(Double percentage)
Over-expected percentage, defaults to 1.0
|
String |
toString() |
public PercentageOverExpected(DataProperties config)
public PercentageOverExpected(Double percentage)
public PercentageOverExpected()
public double getPercentage()
public void setPercentage(Double percentage)
percentage - expectations adjustmentprotected double round(double value)
value - given valueprotected boolean hasExpectations(Subpart subpart)
subpart - given subpartSection.getSpaceExpected()protected double getEnrollment(Assignment<Request,Enrollment> assignment, Config config, Request request)
OnlineConfig.getEnrollment() if applicable}, Config.getEnrollmentWeight(Assignment, Request) otherwise)assignment - current assignmentconfig - given configurationrequest - given requestprotected double getEnrollment(Assignment<Request,Enrollment> assignment, Section section, Request request)
OnlineSection.getEnrollment() if applicable}, Section.getEnrollmentWeight(Assignment, Request) otherwise)assignment - current assignmentsection - given sectionrequest - given requestprotected int getLimit(Section section)
OnlineSection.getEnrollment() if applicable}, Section.getLimit() otherwise)section - given sectionprotected int getLimit(Subpart subpart)
OnlineConfig.getEnrollment() if applicable}, Subpart.getLimit() otherwise)subpart - given subpartpublic double getOverExpected(Assignment<Request,Enrollment> assignment, Section section, Request request)
OverExpectedCriteriongetOverExpected in interface OverExpectedCriterionassignment - current assignmentsection - section in questionrequest - student course requestpublic Integer getExpected(int sectionLimit, double expectedSpace)
OverExpectedCriteriongetExpected in interface OverExpectedCriterionsectionLimit - section limit, see Section.getLimit()expectedSpace - expectation, see Section.getSpaceExpected()Copyright © 2017 UniTime LLC. All Rights Reserved.