Liking cljdoc? Tell your friends :D

automaton-simulation-de.scheduler.event

An event is an individual happening, taking place at a given moment. Each event is indivisible and instantaneous. The event execution is defined by its event type.

Discreteness is a property of an event stating that the changes in the state could be counted (i.e. changes are discrete in the mathematical definition).

Each event defines following outputs:

  • a simulation state update regarding the event that happened.

  • a list of events that should be inserted in the future events.

  • some events that are postponed.

  • some events that are cancelled.

  • See the entity

An event type: The event type is used to define what event execution will happen.

Event structure is a map with at least two keys:

  • type a the event type as found in evt-type-priority.
  • date as a date.
An event is an individual happening, taking place at a given moment. Each event is indivisible and instantaneous. The event execution is defined by its event type.

Discreteness is a property of an event stating that the changes in the state could be counted (i.e. changes are discrete in the mathematical definition).

Each event defines following outputs:
  * a simulation state update regarding the event that happened.
  * a list of events that should be inserted in the future events.
  * some events that are postponed.
  * some events that are cancelled.

  * [See the entity](docs/archi/event_entity.png)

  An event type: The event type is used to define what event execution will happen.

  Event structure is a map with at least two keys:
  * `type` a the event type as found in `evt-type-priority`.
  * `date` as a date.
raw docstring

make-eventclj/s

(make-event type date)

Event builder

Params:

  • type
  • date
Event builder

Params:
* `type`
* `date`
raw docstring

make-eventsclj/s

(make-events & evt-defs)

Event builder

Params:

  • evt-defs collection of pair type and date.
Event builder

Params:
* `evt-defs` collection of pair type and date.
raw docstring

postpone-eventsclj/s

(postpone-events events event-filter-fn date)

For all events in events for which (event-filter-fn event) is true, its date is postponed to date

Params:

  • events list of event to scan.
  • event-filter-fn function apply to each event (event-filter-fn event).
  • date date to postpone to.
For all events in `events` for which `(event-filter-fn event)` is true, its date is postponed to `date`

Params:
* `events` list of event to scan.
* `event-filter-fn` function apply to each event (event-filter-fn event).
* `date` date to postpone to.
raw docstring

schemaclj/s

(schema)

An event is a tuple which first value is a keyword for the event type, the second is a date

An event is a tuple which first value is a keyword for the event type, the second is a date
raw docstring

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

× close