Liking cljdoc? Tell your friends :D

automaton-simulation-de.impl.middlewares

Ordered list of middlewares

Ordered list of middlewares

* [See entity](docs/archi/middlewares_entity.png)
raw docstring

automaton-simulation-de.impl.model

A simulation model gathers information required to run the simulation.

A simulation model gathers information required to run the simulation.
raw docstring

automaton-simulation-de.impl.scheduler

Scheduler The scheduler is creating the next scheduler snapshot, until the stopping criteria are met. It is executing scheduler middleware with each scheduler snapshot.

For each scheduler snapshot created, the scheduleris sorting the future events based on the event ordering defined in the event-registry. The first event of that order is executed (see event execution). The resulting new values of state, past events, future events are used to create the new scheduler snapshot.

An event has three parameters (event-execution current-event state new-future-events):

  • current-event which is the current event to execute
  • state which is the state value before the event execution
  • new-future-events which is the list of future events without the current event

The returned value is a event-return, which future events have no needs to be sorted, they will be by the scheduler.

This event-return contains the stop reason, that could be:

  • ::no-future-events when no future events exists

  • ::causality-broken when the date of the event is in the past

  • ::execution-not-found when the type is unknown

  • ::failed-event-execution when the execution of the event if raising an exception

  • ::nil-handler when the handler is not given

  • ::max-iteration-number the maximum iteartion number is reached

  • See entity

  • See aggregate

  • See state diagram

    Causality

    Causality is a property of the simulation model stating that a future event cannot change what has been done in the past already, so all changes in the state should not contradict any past event. For instance, anticipating an event would lead to causality violation.

Scheduler
The scheduler is creating the next scheduler snapshot, until the stopping criteria are met. It is executing scheduler middleware with each scheduler snapshot.

For each scheduler snapshot created, the scheduleris sorting the future events based on the event ordering defined in the event-registry. The first event of that order is executed (see event execution). The resulting new values of state, past events, future events are used to create the new scheduler snapshot.

An event has three parameters `(event-execution current-event state new-future-events)`:
* `current-event` which is the current event to execute
* `state` which is the state value before the event execution
* `new-future-events` which is the list of future events without the current event

The returned value is a `event-return`, which future events have no needs to be sorted, they will be by the scheduler.

This `event-return` contains the stop reason, that could be:
* `::no-future-events` when no future events exists
* `::causality-broken` when the date of the event is in the past
* `::execution-not-found` when the type is unknown
* `::failed-event-execution` when the execution of the event if raising an exception
* `::nil-handler` when the handler is not given
* `::max-iteration-number` the maximum iteartion number is reached


* [See entity](docs/archi/scheduler_entity.png)
* [See aggregate](docs/archi/scheduler_aggregate.png)
* [See state diagram](docs/archi/scheduler_state.png)

  ### Causality
  Causality is a property of the simulation model stating that a future event cannot change what has been done in the past already, so all changes in the state should not contradict any past event. For instance, anticipating an event would lead to causality violation.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close