Skip to content

Commit

Permalink
Merge pull request #1870 from LBNL-UCB-STI/rajnikantsh/#1868-state-um…
Browse files Browse the repository at this point in the history
…l-design

add FSM UML
  • Loading branch information
colinsheppard authored Aug 14, 2019
2 parents af06c1c + f95cb94 commit c2efcf0
Show file tree
Hide file tree
Showing 16 changed files with 464 additions and 0 deletions.
Binary file added docs/_static/uml/ChoosesMode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/uml/ChoosesParking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/uml/DrivesVehicle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/uml/HouseholdCAVDriverAgentFSM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/uml/PersonAgent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/uml/RideHailAgentFSM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/uml/TransistDriverFSM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/uml/UnifiedStateFSM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions docs/uml/ChoosesModeFSM.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@startuml

scale 1000 width
skinparam stateBorderColor #black
skinparam stateFontStyle bold
skinparam arrowColor #black

' BeamAgent: States '
state ChoosingMode #eb1921

state FinishingModeChoice #eb1921

'Transition State'

FinishingModeChoice -[#blue,dotted]-> WaitingForDeparture : IntermediateTransition
ChoosingMode --> ChoosingMode : MobilityStatusResponse
ChoosingMode --> ChoosingMode : RoutingResponse
ChoosingMode --> ChoosingMode : RideHailResponse
ChoosingMode --> ChoosingMode : ParkingInquiryResponse
ChoosingMode --> ChoosingMode : CavTripLegsResponse
ChoosingMode --> FinishingModeChoice


@enduml
20 changes: 20 additions & 0 deletions docs/uml/ChoosesParkingFSM.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@startuml

scale 1000 width
skinparam stateBorderColor #black
skinparam stateFontStyle bold
skinparam arrowColor #black

' BeamAgent: States '
state ReleasingParkingSpot #eb1921

state ChoosingParkingSpot #eb1921

'Transition State'
ReleasingParkingSpot --> ReleasingParkingSpot: StartLegTrigger
ReleasingParkingSpot -[#blue,dotted]-> WaitingToDrive: IntermediateTransition
ChoosingParkingSpot --> ChoosingParkingSpot : ParkingInquiryResponse
ChoosingParkingSpot --> WaitingToDrive : RoutingResponse


@enduml
38 changes: 38 additions & 0 deletions docs/uml/DrivesVehicle.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@startuml

scale 1000 width
scale 700 height
skinparam stateBorderColor #black
skinparam stateFontStyle bold
skinparam arrowColor #black

' BeamAgent: States '
state Driving #eb1921

state DrivingInterrupted #eb1921

state WaitingToDrive #eb1921

state WaitingToDriveInterrupted #eb1921


'BeamAgent Transitions'
Driving ---> ReadyToChooseParking : (EndLegTrigger,LiterallyDrivingData)
Driving ---> WaitingToDrive : (EndLegTrigger,LiterallyDrivingData)
Driving ---> PassengerScheduleEmpty :(EndLegTrigger,LiterallyDrivingData)
Driving ---> Driving : EndLegTrigger,StopDrivingIfNoPassengerOnBoard
Driving ---> DrivingInterrupted : Interrupt,StopDrivingIfNoPassengerOnBoard

DrivingInterrupted ---> PassengerScheduleEmptyInterrupted : (StopDriving,LiterallyDrivingData)
DrivingInterrupted ---> Driving : Resume
DrivingInterrupted ---> DrivingInterrupted : EndLegTrigger,Interrupt

WaitingToDrive ---> Driving : StartLegTrigger
WaitingToDrive ---> WaitingToDrive : Interrupt,NotifyVehicleResourceIdleReply,StopDrivingIfNoPassengerOnBoard
WaitingToDrive ---> DrivingInterrupted : StopDrivingIfNoPassengerOnBoard


WaitingToDriveInterrupted ---> Driving : Resume
WaitingToDriveInterrupted ---> WaitingToDriveInterrupted : TriggerWithId

@enduml
25 changes: 25 additions & 0 deletions docs/uml/HouseholdFSM.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@startuml

scale 1000 width
skinparam stateBorderColor #black
skinparam stateFontStyle bold
skinparam arrowColor #black

' BeamAgent: States '
state Uninitialized #gray

state Idle #eb1921

state PassengerScheduleEmpty #eb1921

'Transition State'

[*] --> Uninitialized
Uninitialized --> Idle: InitializeTrigger
Idle --> WaitingToDrive: ModifyPassengerSchedule
PassengerScheduleEmpty --> PassengerScheduleEmpty: PassengerScheduleEmptyMessage
PassengerScheduleEmpty --> Idle: Success
PassengerScheduleEmpty --> [*]: KillTrigger


@enduml
76 changes: 76 additions & 0 deletions docs/uml/PersonAgent.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
@startuml

scale 1000 width
scale 800 height
skinparam stateBorderColor #black
skinparam stateFontStyle bold
skinparam arrowColor #black

' BeamAgent: States '
state Uninitialized #grey

state Initialized #grey

state PerformingActivity #eb1921

state WaitingForDeparture #eb1921

state WaitingForReservationConfirmation #eb1921

state Waiting #eb1921

state Moving #eb1921

state PassengerScheduleEmpty #eb1921

state ReadyToChooseParking #eb1921

state TryingToBoardVehicle #eb1921

state ProcessingNextLegOrStartActivity #eb1921

'BeamAgent Transitions'
[*] --> Uninitialized
Uninitialized --> Initialized :InitializeTrigger

Initialized --> PerformingActivity : ActivityStartTrigger


PerformingActivity --> ChoosingMode : ActivityEndTrigger
PerformingActivity --> [*] : ActivityEndTrigger

WaitingForDeparture --> ProcessingNextLegOrStartActivity : PersonDepartureTrigger

WaitingForReservationConfirmation --> Waiting : ReservationResponse
WaitingForReservationConfirmation --> ChoosingMode : ReservationResponse(error)
WaitingForReservationConfirmation --> WaitingForReservationConfirmation : DelayedRideHailResponse
WaitingForReservationConfirmation --> ChoosingMode : RideHailResponseTrigger(error)
WaitingForReservationConfirmation --> Waiting : RideHailResponse
WaitingForReservationConfirmation --> ChoosingMode : RideHailResponse(error)

Waiting --> Moving : BoardVehicleTrigger

Moving --> ProcessingNextLegOrStartActivity : AlightVehicleTrigger

PassengerScheduleEmpty --> ProcessingNextLegOrStartActivity: PassengerScheduleEmptyMessage

ReadyToChooseParking -[#blue,dotted]-> ChoosingParkingSpot: IntermediateTransition

TryingToBoardVehicle --> ProcessingNextLegOrStartActivity : Boarded
TryingToBoardVehicle --> ChoosingMode : NotAvailable


ProcessingNextLegOrStartActivity --> ReleasingParkingSpot : ProcessingNextLegOrStartActivity
ProcessingNextLegOrStartActivity --> WaitingToDrive : ProcessingNextLegOrStartActivity
ProcessingNextLegOrStartActivity -[#blue,dotted]-> ChoosingMode : IntermediateTransition
ProcessingNextLegOrStartActivity -[#blue,dotted]-> WaitingForReservationConfirmation : IntermediateTransition
ProcessingNextLegOrStartActivity -[#blue,dotted]-> Waiting : IntermediateTransition
ProcessingNextLegOrStartActivity -[#blue,dotted]-> PerformingActivity : IntermediateTransition
'[*] is stop event'
ProcessingNextLegOrStartActivity -[#blue,dotted]-> [*] : IntermediateTransition





@enduml
46 changes: 46 additions & 0 deletions docs/uml/RideHailAgentFSM.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
@startuml

scale 1000 width
scale 700 height
skinparam stateBorderColor #black
skinparam stateFontStyle bold
skinparam arrowColor #black

' BeamAgent: States '
state Uninitialized #grey

state Idle #eb1921

state Offline #eb1921

state IdleInterrupted #eb1921

state PassengerScheduleEmpty #eb1921

state PassengerScheduleEmptyInterrupted #eb1921


'BeamAgent Transitions'
[*] --> Uninitialized
Uninitialized --> Idle : InitializeTrigger
Uninitialized --> Offline : InitializeTrigger

Offline --> Idle: StartShiftTrigger
Offline --> Offline : Interrupt,NotifyVehicleResourceIdleReply,StartRefuelTrigger,EndRefuelTrigger

Idle --> Offline: EndShiftTrigger
Idle --> Idle: NotifyVehicleResourceIdleReply,EndRefuelTrigger,StartRefuelTrigger
Idle --> IdleInterrupted: Interrupt

IdleInterrupted --> Idle : Resume
IdleInterrupted --> IdleInterrupted : Interrupt,NotifyVehicleResourceIdleReply
IdleInterrupted --> WaitingToDriveInterrupted : ModifyPassengerSchedule

PassengerScheduleEmpty --> Idle : PassengerScheduleEmptyMessage
PassengerScheduleEmpty --> PassengerScheduleEmpty: Interrupt

PassengerScheduleEmptyInterrupted --> IdleInterrupted : PassengerScheduleEmptyMessage
PassengerScheduleEmptyInterrupted --> PassengerScheduleEmptyInterrupted : ModifyPassengerSchedule,Resume,Interrupt


@enduml
20 changes: 20 additions & 0 deletions docs/uml/TransistDriverFSM.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@startuml

scale 1000 width
skinparam stateBorderColor #black
skinparam stateFontStyle bold
skinparam arrowColor #black

state Uninitialized #gray

state PassengerScheduleEmpty #eb1921


[*] --> Uninitialized
Uninitialized --> WaitingToDrive : InitializeTrigger

PassengerScheduleEmpty --> PassengerScheduleEmpty : PassengerScheduleEmptyMessage
PassengerScheduleEmpty --> [*] : KillTrigger


@enduml
Loading

0 comments on commit c2efcf0

Please sign in to comment.