Class ConstraintTurniContigui


@Entity public class ConstraintTurniContigui extends ConstraintAssegnazioneTurnoTurno
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 Details

  • Method Details

    • verifyConstraint

      public void verifyConstraint(ContextConstraint context) throws ViolatedConstraintException
      This method checks if TipologieTurniContigue constraint is respected while inserting a new concrete shift into a schedule.
      Specified by:
      verifyConstraint in class Constraint
      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