|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.cpsolver.ifs.model.Value<Exam,ExamPlacement>
net.sf.cpsolver.exam.model.ExamPlacement
public class ExamPlacement
Representation of an exam placement (problem value), i.e., assignment of an
exam to period and room(s). Each placement has defined a period and a set of
rooms. The exam as well as the rooms have to be available during the given
period (see Exam.getPeriodPlacements() and
Exam.getRoomPlacements()). The total size of rooms have to be equal
or greater than the number of students enrolled in the exam
Exam.getSize(), using either ExamRoom.getSize() or
ExamRoom.getAltSize(), depending on Exam.hasAltSeating().
Also, the number of rooms has to be smaller or equal to
Exam.getMaxRooms(). If Exam.getMaxRooms() is zero, the exam
is only to be assigned to period (the set of rooms is empty).
| Field Summary |
|---|
| Fields inherited from class net.sf.cpsolver.ifs.model.Value |
|---|
iValue |
| Constructor Summary | |
|---|---|
ExamPlacement(Exam exam,
ExamPeriodPlacement periodPlacement,
Set<ExamRoomPlacement> roomPlacements)
Constructor |
|
| Method Summary | |
|---|---|
boolean |
contains(ExamRoom room)
True if given room is between getRoomPlacements() |
boolean |
equals(Object o)
Compare two assignments for equality |
double |
getDistanceInMeters(ExamPlacement other)
Distance between two placements, i.e., maximal distance between a room of this placement and a room of the given placement. |
String |
getName()
Assignment name (period / room(s)) |
ExamPeriod |
getPeriod()
Assigned period |
ExamPeriodPlacement |
getPeriodPlacement()
Assigned period placement |
double |
getRoomCost()
Overall cost of using this set or rooms. |
String |
getRoomName(String delim)
Room names separated with the given delimiter |
Set<ExamRoomPlacement> |
getRoomPlacements()
Assigned rooms (it is empty when Exam.getMaxRooms() is zero) |
double |
getTimeCost()
Overall cost of using this period. |
int |
hashCode()
Hash code |
double |
toDouble()
Overall cost of using this placement. |
String |
toString()
String representation -- returns a list of assignment costs |
| Methods inherited from class net.sf.cpsolver.ifs.model.Value |
|---|
assigned, compareTo, conflicts, countAssignments, getDescription, getExtra, getId, isConsistent, lastAssignmentIteration, lastUnassignmentIteration, setExtra, setVariable, unassigned, valueEquals, variable |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ExamPlacement(Exam exam,
ExamPeriodPlacement periodPlacement,
Set<ExamRoomPlacement> roomPlacements)
exam - an examperiodPlacement - period placementroomPlacements - a set of room placements ExamRoomPlacement| Method Detail |
|---|
public ExamPeriod getPeriod()
public ExamPeriodPlacement getPeriodPlacement()
public Set<ExamRoomPlacement> getRoomPlacements()
Exam.getMaxRooms() is zero)
ExamRoomPlacementpublic double getDistanceInMeters(ExamPlacement other)
ExamRoom.getDistanceInMeters(ExamRoom) is used to get a distance between
two rooms.
public double toDouble()
toDouble in class Value<Exam,ExamPlacement>public double getTimeCost()
public double getRoomCost()
public String getRoomName(String delim)
public String getName()
getName in class Value<Exam,ExamPlacement>public String toString()
toString in class Value<Exam,ExamPlacement>public boolean equals(Object o)
equals in class Value<Exam,ExamPlacement>public int hashCode()
hashCode in class Value<Exam,ExamPlacement>public boolean contains(ExamRoom room)
getRoomPlacements()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||