|
|
# Overview
|
|
|
|
|
|
To complement the other [Use Case](DCR Choreographies/EDP Use Case), we present a scenario where the Orchestrator (the entity that manages the Community) can request information on how much energy the producers will generate in the next period, calculate the total available energy, and update the Community Orchestrator's records accordingly.
|
|
|
|
|
|
```ruby
|
|
|
# roles
|
|
|
P(Number)
|
|
|
O(Number)
|
|
|
Z
|
|
|
;
|
|
|
# security lattice / information flow
|
|
|
Z flows Z
|
|
|
P flows P
|
|
|
O flows O
|
|
|
;
|
|
|
|
|
|
# computation events
|
|
|
(oInfo:Info) (Z;Z) ['Manager'] [O(0)]
|
|
|
# interaction and input events
|
|
|
|
|
|
(rpf:requestProductionForecast) (Z;Z) [? ] [O(0) -> P(0), P(1), P(2)]
|
|
|
(acc:accountingCommunity) (Z;Z) [?: {kw:Number}] [O(0)]
|
|
|
|
|
|
(gpf_1: generateProductionForecast) (Z;Z) [?: {kw:Number}] [P(1) -> O(0)]
|
|
|
(gpf_2: generateProductionForecast) (Z;Z) [?: {kw:Number}] [P(2) -> O(0)]
|
|
|
(gpf_3: generateProductionForecast) (Z;Z) [?: {kw:Number}] [P(3) -> O(0)]
|
|
|
|
|
|
;
|
|
|
|
|
|
rpf *--> gpf_1
|
|
|
rpf *--> gpf_2
|
|
|
rpf *--> gpf_3
|
|
|
rpf *--> acc
|
|
|
|
|
|
gpf_1 *--> acc
|
|
|
gpf_2 *--> acc
|
|
|
gpf_3 *--> acc
|
|
|
gpf1 --><> acc
|
|
|
gpf2 --><> acc
|
|
|
gpf3 --><> acc
|
|
|
``` |
|
|
\ No newline at end of file |