public class InstructorFairness.InstructorFairnessContext extends AbstractCriterion.ValueContext
Modifier and Type | Class and Description |
---|---|
class |
InstructorFairness.InstructorFairnessContext.Instructor
Class representing instructor
|
iTotal
Constructor and Description |
---|
InstructorFairnessContext(Assignment<Lecture,Placement> assignment) |
Modifier and Type | Method and Description |
---|---|
boolean |
addInstructorValue(Long insID,
double value)
adding value to instructor in stringInstMap
|
boolean |
allInstructorsAssigned(Assignment<Lecture,Placement> assignment)
Return if complete solution (all variables assigned) was found
in this context
|
protected void |
assigned(Assignment<Lecture,Placement> assignment,
Placement value)
Update value when assigned
|
void |
countInstrMeanFairValue()
compute and return mean fair value of instructors in iId2Instructor
|
void |
countInstructorAssignedFair(Assignment<Lecture,Placement> assignment,
Placement value)
Method actualize values of instructors whose lecture was just
assigned
|
boolean |
countInstructorFair(Assignment<Lecture,Placement> assignment)
This method set fairness values to all instructors
|
void |
countInstructorUnassignedFair(Assignment<Lecture,Placement> assignment,
Placement value)
Method actualize values of instructors whose lecture will be
unassigned
|
boolean |
decreaseInstructorValue(Long insID,
double value)
adding value to instructor in stringInstMap
|
double |
fairnessDouble(Assignment<Lecture,Placement> assignment,
Placement placement)
Metod count and return time (and room) preferences in placement
|
double |
getDiffAllInstrValueSquared()
fairness value with squared P and avg.P
|
double |
getDiffInstrValue(List<InstructorConstraint> instructorsList,
double placementValue)
Method estimates value of placement for instructors in entry list
|
double |
getInstrMeanFairValue() |
Collection<InstructorFairness.InstructorFairnessContext.Instructor> |
getInstructorsWithAssig() |
int |
getNumOfIstructors() |
double |
getObjectiveValue()
Fairness value based on pdev (pdev sec. part) of all instructors
|
double |
getObjectiveValue(Collection<InstructorConstraint> instructors)
Fairness value based on pdev (pdev sec. part) of instructors
|
boolean |
isFirstIterDone() |
void |
refreshInstructors()
refresh of all instructors in iId2Instructor
|
void |
setFirstIterDone()
set first iteration done to true
|
String[] |
testFairness(Assignment<Lecture,Placement> assignment)
Method for whole evaluation of fairness criteria
|
protected void |
unassigned(Assignment<Lecture,Placement> assignment,
Placement value)
Update value when unassigned
|
public InstructorFairnessContext(Assignment<Lecture,Placement> assignment)
assignment
- current assignmentprotected void assigned(Assignment<Lecture,Placement> assignment, Placement value)
AbstractCriterion.ValueContext
assigned
in class AbstractCriterion.ValueContext
assignment
- current assignmentvalue
- recently assigned valueprotected void unassigned(Assignment<Lecture,Placement> assignment, Placement value)
AbstractCriterion.ValueContext
unassigned
in class AbstractCriterion.ValueContext
assignment
- current assignmentvalue
- recently unassigned valuepublic boolean countInstructorFair(Assignment<Lecture,Placement> assignment)
assignment
- public void countInstructorAssignedFair(Assignment<Lecture,Placement> assignment, Placement value)
assignment
- value
- placement of lecturepublic void countInstructorUnassignedFair(Assignment<Lecture,Placement> assignment, Placement value)
assignment
- value
- placement of lecturepublic double getInstrMeanFairValue()
public boolean isFirstIterDone()
public void setFirstIterDone()
public int getNumOfIstructors()
public Collection<InstructorFairness.InstructorFairnessContext.Instructor> getInstructorsWithAssig()
public boolean allInstructorsAssigned(Assignment<Lecture,Placement> assignment)
assignment
- public boolean addInstructorValue(Long insID, double value)
insID
- instructor IDvalue
- that should be addedpublic boolean decreaseInstructorValue(Long insID, double value)
insID
- instructor IDvalue
- value that should be subtractedpublic void countInstrMeanFairValue()
public double getDiffInstrValue(List<InstructorConstraint> instructorsList, double placementValue)
instructorsList
- placementValue
- public double getObjectiveValue()
public double getObjectiveValue(Collection<InstructorConstraint> instructors)
instructors
- public double getDiffAllInstrValueSquared()
public void refreshInstructors()
public double fairnessDouble(Assignment<Lecture,Placement> assignment, Placement placement)
assignment
- placement
- public String[] testFairness(Assignment<Lecture,Placement> assignment)
assignment
-