make_schedule_act.txt 1000 Bytes
@startuml

'skinparam backgroundColor #AAFFFF

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




title **Scheduler.make_schedule()** (//Make Schedule//)

(*) --> "//Schedule Creation// \n//see specification document 'Module PLANNING'//" <<MODULE>>

	--> if "First Schedule" then
		--> [True] "schedule.plan_night_start = schedule.plan_start"
		--> "sequences = {all OBSERVABLE sequences}" as A2
	else
		--> [False] "//Copy needed data from previous schedule : EXECUTED sequences, plan_night_start, plan_end// 
		copy_from_previous_schedule()\l" <<MODULE>>
	endif
	--> A2
    --> "//Add to each sequence its schedule id:// 
    sequences = [(sequence, shs) for sequence in sequences]"
    
	--> "//Order schedule sequences according to efficiency criteria (priority, set time, ...)// 
	compute_schedule()\l" <<MODULE>>

    --> Save schedule
    
	--> (*)

@enduml