Class ControllerScocciatura

java.lang.Object
org.cswteams.ms3.control.scocciatura.ControllerScocciatura

public class ControllerScocciatura extends Object
This class manages all the aspects concerning the uffa prioriy levels.
  • Field Details

  • Constructor Details

    • ControllerScocciatura

      public ControllerScocciatura(List<Scocciatura> scocciature)
  • Method Details

    • updatePriorityDoctors

      public void updatePriorityDoctors(List<DoctorUffaPriority> allDoctorUffaPriority, ConcreteShift concreteShift, PriorityQueueEnum pq)
      This method calculates the variation of priority level for a doctor assigned to a specific concrete shift. Then, it updates the temporary values of priority level.
      Parameters:
      allDoctorUffaPriority - State of the doctors with the priority levels for the three queues
      concreteShift - Concrete shift which causes the variation of the temporary value of one priority level
      pq - Priority queue on which the temporary value of the priority level has to be updated
    • orderByPriority

      public void orderByPriority(List<DoctorUffaPriority> allDoctorUffaPriority, PriorityQueueEnum pq)
      This method orders the doctors list (the DoctorUffaPriority list) on the base of the temporary value of the priority level of one queue.
      Parameters:
      allDoctorUffaPriority - State of the doctors with the priority levels for the three queues
      pq - Priority queue on which the temporary value of the priority level has to be updated
    • calcolaUffaComplessivoUtenteAssegnazione

      public int calcolaUffaComplessivoUtenteAssegnazione(ContestoScocciatura contestoScocciatura)
      This method calculates the variation of the priority level for a doctor who has to be assigned to a specific concrete shift considering all the annoyances.
      Parameters:
      contestoScocciatura - Instance comprehending the useful information to calculate the right variation of uffa priority level
      Returns:
      Total uffa priority variation due to the assignment to the concrete shift included in constestoScocciatura
    • normalizeUffaPriority

      public void normalizeUffaPriority(List<DoctorUffaPriority> allDoctorUffaPriority)
      This method normalizes the priority level foreach doctor and foreach queue in a way such that the minimum priority level for a particular queue turns 0 and other doctors' priority levels are subtracted by the same quantity.
      Parameters:
      allDoctorUffaPriority - DoctorUffaPriority instances with the priority levels to be normalized