public class FractionallyUnbalancedWhenNoExpectations extends FractionallyOverExpected
FractionallyOverExpected
is used. If there are no
expectations, sections that would have more students than given by the
balance are marked as over-expected. The target fill ratio is proportional to
the section size, a section is considered unbalanced, when the target fill is
exceeded by more than OverExpected.Disbalance percentage (defaults to 0.1).
Unlimited sections are also balanced, when General.BalanceUnlimited parameter
is set to true (defaults to false).PercentageOverExpected.Rounding
OverExpectedCriterion.HasContext
Constructor and Description |
---|
FractionallyUnbalancedWhenNoExpectations() |
FractionallyUnbalancedWhenNoExpectations(DataProperties config) |
FractionallyUnbalancedWhenNoExpectations(Double percentage) |
FractionallyUnbalancedWhenNoExpectations(Double percentage,
Double maximum) |
FractionallyUnbalancedWhenNoExpectations(Double percentage,
Double maximum,
Double disbalance) |
Modifier and Type | Method and Description |
---|---|
Double |
getDisbalance()
Return allowed disbalance, defaults to 0.1 (parameter OverExpected.Disbalance)
|
double |
getMaximum(Section section,
double defaultValue)
Get maximum
|
double |
getOverExpected(Assignment<Request,Enrollment> assignment,
Section section,
Request request)
Expectation penalty, to be minimized
|
boolean |
isBalanceUnlimited()
Is balancing of unlimited sections enabled (parameter General.BalanceUnlimited)
|
String |
toString() |
getMaximum, getMaximum
getEnrollment, getEnrollment, getExpected, getLimit, getLimit, getPercentage, hasExpectations, round, setPercentage
public FractionallyUnbalancedWhenNoExpectations(DataProperties config)
public FractionallyUnbalancedWhenNoExpectations(Double percentage, Double maximum, Double disbalance)
public FractionallyUnbalancedWhenNoExpectations(Double percentage, Double maximum)
public FractionallyUnbalancedWhenNoExpectations(Double percentage)
public FractionallyUnbalancedWhenNoExpectations()
public Double getDisbalance()
public boolean isBalanceUnlimited()
public double getMaximum(Section section, double defaultValue)
section
- given sectiondefaultValue
- default value (if not set)public double getOverExpected(Assignment<Request,Enrollment> assignment, Section section, Request request)
OverExpectedCriterion
getOverExpected
in interface OverExpectedCriterion
getOverExpected
in class FractionallyOverExpected
assignment
- current assignmentsection
- section in questionrequest
- student course requestpublic String toString()
toString
in class FractionallyOverExpected