compute_schedule_act.txt 1.37 KB
@startuml

legend right
  Short
  legend
endlegend

title **Scheduler.compute_schedule()**

skinparam activity {
  'StartColor red
  'BarColor SaddleBrown 
  'EndColor Silver
  'BackgroundColor Peru
  BackgroundColor<<MODULE>> Orange
  'BorderColor Peru
  'FontName Impact
}

(*)	--> "//# Order schedule sequences according to efficiency criteria (priority, set time, ...)//" <<MODULE>>

	--> "//# Create a unique big empty available interval that takes all the night duration [plan_start,plan_end]// \n
        intervals = Interval(schedule.plan_start, schedule.plan_end)"

	--> "//# Remove invalid sequences from schedule, and mark them INVALID// \n
	A sequence is invalid if:
	 - sequence.jd1 < 0 
	 - OR sequence.jd2 < 0 
	 - OR sequence.duration <= 0 
	 - OR sequence.jd2 - sequence.jd1 < sequence.duration \n\n
	**remove_invalid_sequences()**\l" <<MODULE>>

	--> "//# **TODO:** Determine priorities according to SP, user, ...// 
	**determine_priorities()**\l" as B1 <<MODULE>>
        
	--> "//# Remove non eligible sequences from schedule//
	**remove_non_eligible_sequences()**\l" <<MODULE>>

	--> "//# Sort sequences according to highest priority and soonest JD2// 
	**sort_by_jd2_and_priorities()**\l" <<MODULE>>
 
	--> "//# Try to place sorted sequences in schedule one by one in available intervals (shift placed sequences if necessary)// 
	**place_sequences()**\l" <<MODULE>>

	--> (*)

@enduml