---
# System prepended metadata

title: SlotMachine Sequence Diagram

---

# SlotMachine Sequence Diagram

```plantuml

@startuml
skinparam componentStyle uml2
skinparam monochrome true
skinparam dpi 300
skinparam arrowThickness 2
skinparam packageTitleAlignment left
skinparam defaultFontSize 12
skinparam rectangleBorderThickness 1

collections "Airspace User" as AUs
participant Controller
participant "Heuristic Optimizer" as Optimizer
participant "Privacy Engine" as PrivacyEngine
collections "MPC Nodes" as MPCNodes
participant "Network Management" as NetworkManager

== Setup ==
Controller -> NetworkManager: request flight list
NetworkManager -> Controller: return flight list
Controller->AUs : ask for participation
note left of Controller
<<plain-text>> flight list
end note
AUs -> Controller: communicate preferences
note right of AUs
<<encrypted>> weights
<<encrypted>> other confidential information
<<plain-text>> non-confidential information
end note

note left of Controller
Verify inputs
end note

== Optimization ==
note right of Controller
<<encrypted>> weights
<<encrypted>> other confidential information
<<plain-text>> optimization run configuration (flight list, etc.)
<<plain-text>> other non-confidential information
end note 
Controller -> Optimizer

activate Optimizer
    Optimizer -> PrivacyEngine: initialize optimization
    activate PrivacyEngine
    loop
        Optimizer -> PrivacyEngine: request fitness value for flight list
        PrivacyEngine -> MPCNodes
        activate MPCNodes
        MPCNodes -> PrivacyEngine
        deactivate MPCNodes
        PrivacyEngine -> Optimizer: return fitness value
        deactivate PrivacyEngine
    end
deactivate Optimizer
Optimizer -> Controller
note right of Controller
<<plain-text>> sorted list of optimized flight lists
end note

== Confirmation and Notification ==

Controller -> Airport: communicate sorted list of optimized flight lists

Airport --> Controller: veto for individual flight lists



Controller -> AUs: communicate sorted list of optimized flight lists

AUs -> Controller: proof of sufficient credits

AUs --> Controller: veto for individual flight lists

note right of Controller
Reduced and sorted list of acceptable flight lists
end note

Controller -> NetworkManager : communicate acceptable flight lists
NetworkManager -> Controller: notify of accepted flight list

Controller -> AUs : notify of accepted flight list
Controller -> Airport : notify of accepted flight list

note left of Controller
Update credits
end note

@enduml