Class ControllerScocciatura
java.lang.Object
org.cswteams.ms3.control.scocciatura.ControllerScocciatura
This class manages all the aspects concerning the uffa prioriy levels.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcalcolaUffaComplessivoUtenteAssegnazione(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.voidnormalizeUffaPriority(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.voidorderByPriority(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.voidupdatePriorityDoctors(List<DoctorUffaPriority> allDoctorUffaPriority, ConcreteShift concreteShift, PriorityQueueEnum pq) This method calculates the variation of priority level for a doctor assigned to a specific concrete shift.
-
Field Details
-
scocciature
-
-
Constructor Details
-
ControllerScocciatura
-
-
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 queuesconcreteShift- Concrete shift which causes the variation of the temporary value of one priority levelpq- Priority queue on which the temporary value of the priority level has to be updated
-
orderByPriority
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 queuespq- Priority queue on which the temporary value of the priority level has to be updated
-
calcolaUffaComplessivoUtenteAssegnazione
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
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
-