Class ConstraintTurniContigui
java.lang.Object
org.cswteams.ms3.entity.constraint.Constraint
org.cswteams.ms3.entity.constraint.ConstraintAssegnazioneTurnoTurno
org.cswteams.ms3.entity.constraint.ConstraintTurniContigui
This class implements the idea for which shift tipologies (i.e. time slots) may impose some constraints on the
presence of other shifts which are contiguous to it.
For instance, a nocturne shift brings to a period in which the involved doctor should not be allocated in any other shift.
-
Constructor Summary
ConstructorsConstructorDescriptionConstraintTurniContigui(int horizon, ChronoUnit hours, TimeSlot notturno, HashSet<TimeSlot> hashSet) -
Method Summary
Modifier and TypeMethodDescriptionvoidverifyConstraint(ContextConstraint context) This method checks if TipologieTurniContigue constraint is respected while inserting a new concrete shift into a schedule.Methods inherited from class org.cswteams.ms3.entity.constraint.ConstraintAssegnazioneTurnoTurno
getAssegnazioneTurnoPrecedenteIdx, verificaContiguità AssegnazioneTurni, verificaContiguità AssegnazioneTurni
-
Constructor Details
-
ConstraintTurniContigui
public ConstraintTurniContigui(int horizon, ChronoUnit hours, TimeSlot notturno, HashSet<TimeSlot> hashSet)
-
-
Method Details
-
verifyConstraint
This method checks if TipologieTurniContigue constraint is respected while inserting a new concrete shift into a schedule.- Specified by:
verifyConstraintin classConstraint- Parameters:
context- Object comprehending the new concrete shift to be assigned and the information about doctor's state in the corresponding schedule- Throws:
ViolatedConstraintException- Exception thrown if the constraint is violated
-