|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.cpsolver.ifs.model.Model net.sf.cpsolver.exam.model.ExamModel
public class ExamModel
Examination timetabling model. Exams Exam
are modeled as
variables, rooms ExamRoom
and students ExamStudent
as constraints. Assignment of an exam to time (modeled as non-overlapping
periods ExamPeriod
) and space (set of rooms) is modeled
using values ExamPlacement
. In order to be able to model individual period and
room preferences, period and room assignments are wrapped with
ExamPeriodPlacement
and ExamRoomPlacement
classes respectively.
Moreover, additional distribution constraint ExamDistributionConstraint
can be defined
in the model.
The objective function consists of the following criteria:
ExamPlacement.getPeriodPenalty()
of all assigned exams,
weighted by Exams.PeriodWeight).
ExamPlacement.getRoomSizePenalty()
of all assigned exams,
weighted by Exams.RoomSizeWeight).
ExamPlacement.getRoomSplitPenalty()
of all assigned exams, weighted by Exams.RoomSplitWeight).
ExamPlacement.getRoomPenalty()
of all assigned exams,
weighted by Exams.RoomWeight).
ExamDistributionConstraint.getWeight()
of all
soft distribution constraints that are not satisfied, i.e., ExamDistributionConstraint.isSatisfied()
= false;
weighted by Exams.DistributionWeight).
Field Summary |
---|
Fields inherited from class net.sf.cpsolver.ifs.model.Model |
---|
iAssignedVariables, iPerturbVariables, iUnassignedVariables, sDoubleFormat, sPercentageFormat, sTimeFormat |
Constructor Summary | |
---|---|
ExamModel(DataProperties properties)
Constructor |
Method Summary | |
---|---|
protected void |
addDistributionPenalty(int inc)
To be called by soft ExamDistributionConstraint when satisfaction changes. |
ExamPeriod |
addPeriod(Long id,
String day,
String time,
int length,
int penalty)
Add a period |
void |
afterAssigned(long iteration,
Value value)
Called after a value is assigned to its variable, optimization criteria are updated |
void |
beforeUnassigned(long iteration,
Value value)
Called before a value is unassigned from its variable, optimization criteria are updated |
double |
getBackToBackConflictWeight()
Back-to-back student conflict weight (can be set by problem property Exams.BackToBackConflictWeight, or in the input xml file, property backToBackConflictWeight) |
int |
getBackToBackDistance()
Back-to-back distance (used in ExamPlacement.getNrDistanceBackToBackConflicts() ,
can be set by problem property Exams.BackToBackDistance, or in the input xml file,
property backToBackDistance) |
double |
getDirectConflictWeight()
Direct student conflict weight (can be set by problem property Exams.DirectConflictWeight, or in the input xml file, property directConflictWeight) |
double |
getDistanceBackToBackConflictWeight()
Distance back-to-back student conflict weight (can be set by problem property Exams.DistanceBackToBackConflictWeight, or in the input xml file, property distanceBackToBackConflictWeight) |
Vector |
getDistributionConstraints()
Distribution constraints |
int |
getDistributionPenalty(boolean precise)
Return total distribution penalty, i.e., the sum of ExamDistributionConstraint.getWeight() of all
violated soft distribution constraints. |
double |
getDistributionWeight()
A weight of violated distribution soft constraints (see ExamDistributionConstraint ,
can be set by problem property Exams.RoomDistributionWeight, or in the input xml file,
property roomDistributionWeight) |
int |
getExamRotationPenalty(boolean precise)
Return total exam rotation penalty, i.e., the sum of ExamPlacement.getRotationPenalty() of all
assigned placements. |
double |
getExamRotationWeight()
A weight for exam rotation penalty (used in ExamPlacement.getRotationPenalty()
can be set by problem property Exams.RotationWeight, or in the input xml file,
property examRotationWeight) |
Hashtable |
getExtendedInfo()
Extended info table |
Hashtable |
getInfo()
Info table |
double |
getInstructorBackToBackConflictWeight()
Back-to-back instructor conflict weight (can be set by problem property Exams.InstructorBackToBackConflictWeight, or in the input xml file, property instructorBackToBackConflictWeight) |
double |
getInstructorDirectConflictWeight()
Direct instructor conflict weight (can be set by problem property Exams.InstructorDirectConflictWeight, or in the input xml file, property instructorDirectConflictWeight) |
double |
getInstructorDistanceBackToBackConflictWeight()
Distance back-to-back instructor conflict weight (can be set by problem property Exams.InstructorDistanceBackToBackConflictWeight, or in the input xml file, property instructorDistanceBackToBackConflictWeight) |
double |
getInstructorMoreThanTwoADayWeight()
More than two exams a day instructor conflict weight (can be set by problem property Exams.InstructorMoreThanTwoADayWeight, or in the input xml file, property instructorMoreThanTwoADayWeight) |
Vector |
getInstructors()
Problem instructors |
int |
getLargePenalty(boolean precise)
Return total front load penalty, i.e., the sum of ExamPlacement.getLargePenalty() of all
assigned placements. |
double |
getLargePeriod()
Period index (number of periods multiplied by this number) for front load criteria for large exams Can by set by problem property Exams.LargePeriod, or in the input xml file, property largePeriod) |
int |
getLargeSize()
An exam is considered large, if its size is greater or equal to this large size. |
double |
getLargeWeight()
Weight of front load criteria, i.e., a weight for assigning a large exam after large period Can by set by problem property Exams.LargeWeight, or in the input xml file, property largeWeight) |
int |
getMaxRooms()
Default maximum number of rooms (can be set by problem property Exams.MaxRooms, or in the input xml file, property maxRooms) |
double |
getMoreThanTwoADayWeight()
More than two exams a day student conflict weight (can be set by problem property Exams.MoreThanTwoADayWeight, or in the input xml file, property moreThanTwoADayWeight) |
int |
getNrBackToBackConflicts(boolean precise)
Return number of back-to-back student conflicts, i.e., the total number of cases where a student is enrolled into two exams that are scheduled at consecutive periods. |
int |
getNrDays()
Number of days |
int |
getNrDirectConflicts(boolean precise)
Return number of direct student conflicts, i.e., the total number of cases where a student is enrolled into two exams that are scheduled at the same period. |
int |
getNrDistanceBackToBackConflicts(boolean precise)
Return number of distance back-to-back student conflicts, i.e., the total number of back-to-back student conflicts where the two exam take place in rooms that are too far a part (i.e., ExamPlacement.getDistance(ExamPlacement) is
greater than getBackToBackDistance() ). |
int |
getNrInstructorBackToBackConflicts(boolean precise)
Return number of back-to-back instructor conflicts, i.e., the total number of cases where an instructor is enrolled into two exams that are scheduled at consecutive periods. |
int |
getNrInstructorDirectConflicts(boolean precise)
Return number of direct instructor conflicts, i.e., the total number of cases where an instructor is enrolled into two exams that are scheduled at the same period. |
int |
getNrInstructorDistanceBackToBackConflicts(boolean precise)
Return number of distance back-to-back instructor conflicts, i.e., the total number of back-to-back instructor conflicts where the two exam take place in rooms that are too far a part (i.e., ExamPlacement.getDistance(ExamPlacement) is
greater than getBackToBackDistance() ). |
int |
getNrInstructorMoreThanTwoADayConflicts(boolean precise)
Return number of more than two exams a day instructor conflicts, i.e., the total number of cases where an instructor is enrolled into three exams that are scheduled at the same day (i.e., ExamPeriod.getDay() is the same). |
int |
getNrMoreThanTwoADayConflicts(boolean precise)
Return number of more than two exams a day student conflicts, i.e., the total number of cases where a student is enrolled into three exams that are scheduled at the same day (i.e., ExamPeriod.getDay() is the same). |
int |
getNrPeriods()
Number of periods |
double |
getNrRoomSplits(boolean precise)
Count exam placements with a room split. |
ExamPeriod |
getPeriod(Long id)
Period of given unique id |
int |
getPeriodIndexPenalty(boolean precise)
Return total period index of all assigned placements. |
double |
getPeriodIndexWeight()
A weight for period index, can be set by problem property Exams.PeriodIndexWeight, or in the input xml file, property periodWeight) |
int |
getPeriodPenalty(boolean precise)
Return total period penalty, i.e., the sum of ExamPlacement.getPeriodPenalty() of all
assigned placements. |
Vector |
getPeriods()
List of periods, use addPeriod(Long, String, String, int, int) to add a period |
int |
getPeriodSizePenalty(boolean precise)
Return total period size penalty, i.e., the sum of ExamPlacement.getPeriodPenalty() multiplied by
Exam.getSize() of all assigned placements. |
double |
getPeriodSizeWeight()
A weight for period penalty (used in ExamPlacement.getPeriodPenalty()
multiplied by examination size Exam.getSize() ,
can be set by problem property Exams.PeriodSizeWeight, or in the input xml file,
property periodWeight) |
double |
getPeriodWeight()
A weight for period penalty (used in ExamPlacement.getPeriodPenalty() ,
can be set by problem property Exams.PeriodWeight, or in the input xml file,
property periodWeight) |
int |
getPerturbationPenalty(boolean precise)
Return total perturbation penalty, i.e., the sum of ExamPlacement.getPerturbationPenalty() of all
assigned placements. |
double |
getPerturbationWeight()
A weight of perturbations (see ExamPlacement.getPerturbationPenalty() ), i.e.,
a penalty for an assignment of an exam to a place different from the initial one. |
DataProperties |
getProperties()
Problem properties |
int |
getRoomPenalty(boolean precise)
Return total room (weight) penalty, i.e., the sum of ExamPlacement.getRoomPenalty() of all
assigned placements. |
int |
getRoomPerturbationPenalty(boolean precise)
Return total room perturbation penalty, i.e., the sum of ExamPlacement.getRoomPerturbationPenalty() of all
assigned placements. |
double |
getRoomPerturbationWeight()
A weight of room perturbations (see ExamPlacement.getRoomPerturbationPenalty() ), i.e.,
a penalty for an assignment of an exam to a room different from the initial one. |
Vector |
getRooms()
Problem rooms |
int |
getRoomSizePenalty(boolean precise)
Return total room size penalty, i.e., the sum of ExamPlacement.getRoomSizePenalty() of all
assigned placements. |
double |
getRoomSizeWeight()
A weight for room size penalty (used in ExamPlacement.getRoomSizePenalty() ,
can be set by problem property Exams.RoomSizeWeight, or in the input xml file,
property roomSizeWeight) |
double |
getRoomSplitDistancePenalty(boolean precise)
Return total room split distance penalty, i.e., the sum of ExamPlacement.getRoomSplitDistancePenalty() of all
assigned placements. |
double |
getRoomSplitDistanceWeight()
A weight for distance between two or more rooms into which an exam is split. |
int |
getRoomSplitPenalty(boolean precise)
Return total room split penalty, i.e., the sum of ExamPlacement.getRoomSplitPenalty() of all
assigned placements. |
double |
getRoomSplitWeight()
A weight for room split penalty (used in ExamPlacement.getRoomSplitPenalty() ,
can be set by problem property Exams.RoomSplitWeight, or in the input xml file,
property roomSplitWeight) |
double |
getRoomWeight()
A weight for room penalty weight (used in ExamPlacement.getRoomPenalty() ,
can be set by problem property Exams.RoomPreferenceWeight, or in the input xml file,
property roomPreferenceWeight) |
Vector |
getStudents()
Problem students |
double[] |
getTotalMultiValue()
Return weighted individual objective criteria. |
double |
getTotalValue()
Objective function. |
void |
init()
Initialization of the model |
boolean |
isDayBreakBackToBack()
True when back-to-back student conflict is to be encountered when a student is enrolled into an exam that is on the last period of one day and another exam that is on the first period of the consecutive day. |
boolean |
isMPP()
|
boolean |
load(org.dom4j.Document document)
Load model (including its solution) from XML. |
boolean |
load(org.dom4j.Document document,
Callback saveBest)
Load model (including its solution) from XML. |
org.dom4j.Document |
save()
Save model (including its solution) into XML. |
void |
setBackToBackConflictWeight(double backToBackConflictWeight)
Back-to-back student conflict weight (can be set by problem property Exams.BackToBackConflictWeight, or in the input xml file, property backToBackConflictWeight) |
void |
setBackToBackDistance(int backToBackDistance)
Back-to-back distance (used in ExamPlacement.getNrDistanceBackToBackConflicts() ,
can be set by problem property Exams.BackToBackDistance, or in the input xml file,
property backToBackDistance) |
void |
setDayBreakBackToBack(boolean dayBreakBackToBack)
True when back-to-back student conflict is to be encountered when a student is enrolled into an exam that is on the last period of one day and another exam that is on the first period of the consecutive day. |
void |
setDirectConflictWeight(double directConflictWeight)
Direct student conflict weight (can be set by problem property Exams.DirectConflictWeight, or in the input xml file, property directConflictWeight) |
void |
setDistanceBackToBackConflictWeight(double distanceBackToBackConflictWeight)
Distance back-to-back student conflict weight (can be set by problem property Exams.DistanceBackToBackConflictWeight, or in the input xml file, property distanceBackToBackConflictWeight) |
void |
setDistributionWeight(double distributionWeight)
A weight of violated distribution soft constraints (see ExamDistributionConstraint ,
can be set by problem property Exams.RoomDistributionWeight, or in the input xml file,
property roomDistributionWeight) |
void |
setExamRotationWeight(double examRotationWeight)
A weight for period penalty (used in ExamPlacement.getRotationPenalty() ,
can be set by problem property Exams.RotationWeight, or in the input xml file,
property examRotationWeight) |
void |
setInstructorBackToBackConflictWeight(double backToBackConflictWeight)
Back-to-back instructor conflict weight (can be set by problem property Exams.InstructorBackToBackConflictWeight, or in the input xml file, property instructorBackToBackConflictWeight) |
void |
setInstructorDirectConflictWeight(double directConflictWeight)
Direct instructor conflict weight (can be set by problem property Exams.InstructorDirectConflictWeight, or in the input xml file, property instructorDirectConflictWeight) |
void |
setInstructorDistanceBackToBackConflictWeight(double distanceBackToBackConflictWeight)
Distance back-to-back instructor conflict weight (can be set by problem property Exams.InstructorDistanceBackToBackConflictWeight, or in the input xml file, property instructorDistanceBackToBackConflictWeight) |
void |
setInstructorMoreThanTwoADayWeight(double moreThanTwoADayWeight)
More than two exams a day instructor conflict weight (can be set by problem property Exams.InstructorMoreThanTwoADayWeight, or in the input xml file, property instructorMoreThanTwoADayWeight) |
void |
setLargePeriod(double largePeriod)
Period index (number of periods multiplied by this number) for front load criteria for large exams Can by set by problem property Exams.LargePeriod, or in the input xml file, property largePeriod) |
void |
setLargeSize(int largeSize)
An exam is considered large, if its size is greater or equal to this large size. |
void |
setLargeWeight(double largeWeight)
Weight of front load criteria, i.e., a weight for assigning a large exam after large period Can by set by problem property Exams.LargeWeight, or in the input xml file, property largeWeight) |
void |
setMaxRooms(int maxRooms)
Default maximum number of rooms (can be set by problem property Exams.MaxRooms, or in the input xml file, property maxRooms) |
void |
setMoreThanTwoADayWeight(double moreThanTwoADayWeight)
More than two exams a day student conflict weight (can be set by problem property Exams.MoreThanTwoADayWeight, or in the input xml file, property moreThanTwoADayWeight) |
void |
setPeriodIndexWeight(double periodIndexWeight)
A weight for period index, can be set by problem property Exams.PeriodIndexWeight, or in the input xml file, property periodWeight) |
void |
setPeriodSizeWeight(double periodSizeWeight)
A weight for period penalty (used in ExamPlacement.getPeriodPenalty()
multiplied by examination size Exam.getSize() ,
can be set by problem property Exams.PeriodSizeWeight, or in the input xml file,
property periodWeight) |
void |
setPeriodWeight(double periodWeight)
A weight for period penalty (used in ExamPlacement.getPeriodPenalty() ,
can be set by problem property Exams.PeriodWeight, or in the input xml file,
property periodWeight) |
void |
setPerturbationWeight(double perturbationWeight)
A weight of perturbations (see ExamPlacement.getPerturbationPenalty() ), i.e.,
a penalty for an assignment of an exam to a place different from the initial one. |
void |
setRoomPerturbationWeight(double perturbationWeight)
A weight of room perturbations (see ExamPlacement.getRoomPerturbationPenalty() ), i.e.,
a penalty for an assignment of an exam to a room different from the initial one. |
void |
setRoomSizeWeight(double roomSizeWeight)
A weight for room size penalty (used in ExamPlacement.getRoomSizePenalty() ,
can be set by problem property Exams.RoomSizeWeight, or in the input xml file,
property roomSizeWeight) |
void |
setRoomSplitDistanceWeight(double roomSplitDistanceWeight)
A weight for distance between two or more rooms into which an exam is split. |
void |
setRoomSplitWeight(double roomSplitWeight)
A weight for room split penalty (used in ExamPlacement.getRoomSplitPenalty() ,
can be set by problem property Exams.RoomSplitWeight, or in the input xml file,
property roomSplitWeight) |
void |
setRoomWeight(double roomWeight)
A weight for room penalty weight (used in ExamPlacement.getRoomPenalty() ,
can be set by problem property Exams.RoomWeight, or in the input xml file,
property roomWeight) |
String |
toString()
String representation -- returns a list of values of objective criteria |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExamModel(DataProperties properties)
properties
- problem propertiesMethod Detail |
---|
public void init()
public int getMaxRooms()
public void setMaxRooms(int maxRooms)
public ExamPeriod addPeriod(Long id, String day, String time, int length, int penalty)
id
- period unique identifierday
- day (e.g., 07/12/10)time
- (e.g., 8:00am-10:00am)length
- length of period in minutespenalty
- period penaltypublic int getNrDays()
public int getNrPeriods()
public Vector getPeriods()
addPeriod(Long, String, String, int, int)
to add a period
ExamPeriod
public ExamPeriod getPeriod(Long id)
public double getDirectConflictWeight()
public void setDirectConflictWeight(double directConflictWeight)
public double getBackToBackConflictWeight()
public void setBackToBackConflictWeight(double backToBackConflictWeight)
public double getDistanceBackToBackConflictWeight()
public void setDistanceBackToBackConflictWeight(double distanceBackToBackConflictWeight)
public double getMoreThanTwoADayWeight()
public void setMoreThanTwoADayWeight(double moreThanTwoADayWeight)
public double getInstructorDirectConflictWeight()
public void setInstructorDirectConflictWeight(double directConflictWeight)
public double getInstructorBackToBackConflictWeight()
public void setInstructorBackToBackConflictWeight(double backToBackConflictWeight)
public double getInstructorDistanceBackToBackConflictWeight()
public void setInstructorDistanceBackToBackConflictWeight(double distanceBackToBackConflictWeight)
public double getInstructorMoreThanTwoADayWeight()
public void setInstructorMoreThanTwoADayWeight(double moreThanTwoADayWeight)
public boolean isDayBreakBackToBack()
public void setDayBreakBackToBack(boolean dayBreakBackToBack)
public double getPeriodWeight()
ExamPlacement.getPeriodPenalty()
,
can be set by problem property Exams.PeriodWeight, or in the input xml file,
property periodWeight)
public void setPeriodWeight(double periodWeight)
ExamPlacement.getPeriodPenalty()
,
can be set by problem property Exams.PeriodWeight, or in the input xml file,
property periodWeight)
public double getPeriodSizeWeight()
ExamPlacement.getPeriodPenalty()
multiplied by examination size Exam.getSize()
,
can be set by problem property Exams.PeriodSizeWeight, or in the input xml file,
property periodWeight)
public void setPeriodSizeWeight(double periodSizeWeight)
ExamPlacement.getPeriodPenalty()
multiplied by examination size Exam.getSize()
,
can be set by problem property Exams.PeriodSizeWeight, or in the input xml file,
property periodWeight)
public double getPeriodIndexWeight()
public void setPeriodIndexWeight(double periodIndexWeight)
public double getExamRotationWeight()
ExamPlacement.getRotationPenalty()
can be set by problem property Exams.RotationWeight, or in the input xml file,
property examRotationWeight)
public void setExamRotationWeight(double examRotationWeight)
ExamPlacement.getRotationPenalty()
,
can be set by problem property Exams.RotationWeight, or in the input xml file,
property examRotationWeight)
public double getRoomSizeWeight()
ExamPlacement.getRoomSizePenalty()
,
can be set by problem property Exams.RoomSizeWeight, or in the input xml file,
property roomSizeWeight)
public void setRoomSizeWeight(double roomSizeWeight)
ExamPlacement.getRoomSizePenalty()
,
can be set by problem property Exams.RoomSizeWeight, or in the input xml file,
property roomSizeWeight)
public double getRoomWeight()
ExamPlacement.getRoomPenalty()
,
can be set by problem property Exams.RoomPreferenceWeight, or in the input xml file,
property roomPreferenceWeight)
public void setRoomWeight(double roomWeight)
ExamPlacement.getRoomPenalty()
,
can be set by problem property Exams.RoomWeight, or in the input xml file,
property roomWeight)
public double getRoomSplitWeight()
ExamPlacement.getRoomSplitPenalty()
,
can be set by problem property Exams.RoomSplitWeight, or in the input xml file,
property roomSplitWeight)
public void setRoomSplitWeight(double roomSplitWeight)
ExamPlacement.getRoomSplitPenalty()
,
can be set by problem property Exams.RoomSplitWeight, or in the input xml file,
property roomSplitWeight)
public int getBackToBackDistance()
ExamPlacement.getNrDistanceBackToBackConflicts()
,
can be set by problem property Exams.BackToBackDistance, or in the input xml file,
property backToBackDistance)
public void setBackToBackDistance(int backToBackDistance)
ExamPlacement.getNrDistanceBackToBackConflicts()
,
can be set by problem property Exams.BackToBackDistance, or in the input xml file,
property backToBackDistance)
public double getDistributionWeight()
ExamDistributionConstraint
,
can be set by problem property Exams.RoomDistributionWeight, or in the input xml file,
property roomDistributionWeight)
public void setDistributionWeight(double distributionWeight)
ExamDistributionConstraint
,
can be set by problem property Exams.RoomDistributionWeight, or in the input xml file,
property roomDistributionWeight)
public double getPerturbationWeight()
ExamPlacement.getPerturbationPenalty()
), i.e.,
a penalty for an assignment of an exam to a place different from the initial one.
Can by set by problem property Exams.PerturbationWeight, or in the input xml file, property perturbationWeight)
public void setPerturbationWeight(double perturbationWeight)
ExamPlacement.getPerturbationPenalty()
), i.e.,
a penalty for an assignment of an exam to a place different from the initial one.
Can by set by problem property Exams.PerturbationWeight, or in the input xml file, property perturbationWeight)
public double getRoomPerturbationWeight()
ExamPlacement.getRoomPerturbationPenalty()
), i.e.,
a penalty for an assignment of an exam to a room different from the initial one.
Can by set by problem property Exams.RoomPerturbationWeight, or in the input xml file, property perturbationWeight)
public void setRoomPerturbationWeight(double perturbationWeight)
ExamPlacement.getRoomPerturbationPenalty()
), i.e.,
a penalty for an assignment of an exam to a room different from the initial one.
Can by set by problem property Exams.RoomPerturbationWeight, or in the input xml file, property perturbationWeight)
public double getRoomSplitDistanceWeight()
public void setRoomSplitDistanceWeight(double roomSplitDistanceWeight)
public int getLargeSize()
public void setLargeSize(int largeSize)
public double getLargePeriod()
public void setLargePeriod(double largePeriod)
public double getLargeWeight()
public void setLargeWeight(double largeWeight)
public void beforeUnassigned(long iteration, Value value)
beforeUnassigned
in class Model
public void afterAssigned(long iteration, Value value)
afterAssigned
in class Model
public double getTotalValue()
ExamPlacement.getPeriodPenalty()
of all assigned exams,
weighted by Exams.PeriodWeight).
ExamPlacement.getRoomSizePenalty()
of all assigned exams,
weighted by Exams.RoomSizeWeight).
ExamPlacement.getRoomSplitPenalty()
of all assigned exams, weighted by Exams.RoomSplitWeight).
ExamPlacement.getRoomSplitDistancePenalty()
,
of all assigned exams, weighted by getRoomSplitDistanceWeight()
ExamPlacement.getRoomPenalty()
of all assigned exams, weighted by Exams.RoomWeight).
ExamDistributionConstraint.getWeight()
of all soft violated distribution constraints, weighted by Exams.DistributionWeight).
ExamPlacement.getPerturbationPenalty()
of all assigned exams,
weighted by Exams.PerturbationWeight).
ExamPlacement.getLargePenalty()
of all assigned exams, weighted by Exam.LargeWeight
getTotalValue
in class Model
public double[] getTotalMultiValue()
ExamPlacement.getPeriodPenalty()
of all assigned exams,
weighted by Exams.PeriodWeight).
ExamPlacement.getRoomSizePenalty()
of all assigned exams,
weighted by Exams.RoomSizeWeight).
ExamPlacement.getRoomSplitPenalty()
of all assigned exams, weighted by Exams.RoomSplitWeight).
ExamPlacement.getRoomSplitDistancePenalty()
,
of all assigned exams, weighted by getRoomSplitDistanceWeight()
ExamPlacement.getRoomPenalty()
of all assigned exams, weighted by Exams.RoomWeight).
ExamDistributionConstraint.getWeight()
of all soft violated distribution constraints, weighted by Exams.DistributionWeight).
ExamPlacement.getPerturbationPenalty()
of all assigned exams,
weighted by Exams.PerturbationWeight).
ExamPlacement.getLargePenalty()
of all assigned exams, weighted by Exam.LargeWeight
public String toString()
toString
in class Model
public int getNrDirectConflicts(boolean precise)
precise
- if false, the cached value is used
public int getNrBackToBackConflicts(boolean precise)
isDayBreakBackToBack()
is false,
the last period of one day and the first period of the following day are not considered as consecutive periods.
precise
- if false, the cached value is used
public int getNrDistanceBackToBackConflicts(boolean precise)
ExamPlacement.getDistance(ExamPlacement)
is
greater than getBackToBackDistance()
).
precise
- if false, the cached value is used
public int getNrMoreThanTwoADayConflicts(boolean precise)
ExamPeriod.getDay()
is the same).
precise
- if false, the cached value is used
public int getNrInstructorDirectConflicts(boolean precise)
precise
- if false, the cached value is used
public int getNrInstructorBackToBackConflicts(boolean precise)
isDayBreakBackToBack()
is false,
the last period of one day and the first period of the following day are not considered as consecutive periods.
precise
- if false, the cached value is used
public int getNrInstructorDistanceBackToBackConflicts(boolean precise)
ExamPlacement.getDistance(ExamPlacement)
is
greater than getBackToBackDistance()
).
precise
- if false, the cached value is used
public int getNrInstructorMoreThanTwoADayConflicts(boolean precise)
ExamPeriod.getDay()
is the same).
precise
- if false, the cached value is used
public int getRoomSizePenalty(boolean precise)
ExamPlacement.getRoomSizePenalty()
of all
assigned placements.
precise
- if false, the cached value is used
public int getRoomSplitPenalty(boolean precise)
ExamPlacement.getRoomSplitPenalty()
of all
assigned placements.
precise
- if false, the cached value is used
public int getPeriodPenalty(boolean precise)
ExamPlacement.getPeriodPenalty()
of all
assigned placements.
precise
- if false, the cached value is used
public int getPeriodIndexPenalty(boolean precise)
precise
- if false, the cached value is used
public int getPeriodSizePenalty(boolean precise)
ExamPlacement.getPeriodPenalty()
multiplied by
Exam.getSize()
of all assigned placements.
precise
- if false, the cached value is used
public int getExamRotationPenalty(boolean precise)
ExamPlacement.getRotationPenalty()
of all
assigned placements.
precise
- if false, the cached value is used
public int getRoomPenalty(boolean precise)
ExamPlacement.getRoomPenalty()
of all
assigned placements.
precise
- if false, the cached value is used
public int getDistributionPenalty(boolean precise)
ExamDistributionConstraint.getWeight()
of all
violated soft distribution constraints.
precise
- if false, the cached value is used
public double getRoomSplitDistancePenalty(boolean precise)
ExamPlacement.getRoomSplitDistancePenalty()
of all
assigned placements.
precise
- if false, the cached value is used
public double getNrRoomSplits(boolean precise)
precise
- if false, the cached value is used
protected void addDistributionPenalty(int inc)
ExamDistributionConstraint
when satisfaction changes.
public int getPerturbationPenalty(boolean precise)
ExamPlacement.getPerturbationPenalty()
of all
assigned placements.
precise
- if false, the cached value is used
public int getRoomPerturbationPenalty(boolean precise)
ExamPlacement.getRoomPerturbationPenalty()
of all
assigned placements.
precise
- if false, the cached value is used
public int getLargePenalty(boolean precise)
ExamPlacement.getLargePenalty()
of all
assigned placements.
precise
- if false, the cached value is used
public Hashtable getInfo()
getInfo
in class Model
public Hashtable getExtendedInfo()
getExtendedInfo
in class Model
public DataProperties getProperties()
public Vector getRooms()
ExamRoom
public Vector getStudents()
ExamStudent
public Vector getInstructors()
ExamInstructor
public Vector getDistributionConstraints()
ExamDistributionConstraint
public org.dom4j.Document save()
public boolean load(org.dom4j.Document document)
public boolean load(org.dom4j.Document document, Callback saveBest)
public boolean isMPP()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |