@startuml 'skinparam backgroundColor #AAFFFF skinparam activity { 'StartColor red 'BarColor SaddleBrown 'EndColor Silver 'BackgroundColor Peru BackgroundColor<> Orange 'BorderColor Peru 'FontName Impact } title **Scheduler.make_schedule()** (//Make Schedule//) (*) --> "//Schedule Creation// \n//see specification document 'Module PLANNING'//" <> --> 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" <> 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" <> --> Save schedule --> (*) @enduml