def
Actus.Execution.runSchedule
{State : Type}
(stf : Protocol.EventType → Protocol.Time → State → State)
(pof : Protocol.EventType → Protocol.Time → State → Protocol.Payoff)
(s₀ : State)
(sched : Protocol.Schedule)
:
Fold a functional STF/POF over an event schedule.
For each scheduled event (t, e) the payoff is computed from the current
(pre-event) state, then the state is advanced by the STF.
Equations
- Actus.Execution.runSchedule stf pof s₀ sched = Actus.Execution.runSchedule.go stf pof s₀ sched
Instances For
def
Actus.Execution.runSchedule.go
{State : Type}
(stf : Protocol.EventType → Protocol.Time → State → State)
(pof : Protocol.EventType → Protocol.Time → State → Protocol.Payoff)
(s : State)
:
Equations
Instances For
def
Actus.Execution.finalState
{State : Type}
(stf : Protocol.EventType → Protocol.Time → State → State)
(s₀ : State)
(sched : Protocol.Schedule)
:
State
Final state after running the whole schedule from s₀.
Equations
- Actus.Execution.finalState stf s₀ sched = List.foldl (fun (s : State) (te : Actus.Protocol.Event) => stf te.snd te.fst s) s₀ sched