Event ordering is a part of the event registry meant to sort the future events.
It is especially important to manage simultaneous events. These events does not exists in the real life, but the.
Date ordering is sorting events by date
It could be done with compare-field on the date field of the event (typically :sim-de-event/date)
A simultaneous event ordering apply user defined decision on which event should be executed first
It could leverage compare-types and compare-field or what user defined functions
Two or more events are simultaneous if they happen at the same date in the scheduler.
Event ordering is a part of the event registry meant to sort the future events. It is especially important to manage simultaneous events. These events does not exists in the real life, but the. * [See entity](docs/archi/ordering_entity.png) ## Date ordering Date ordering is sorting events by date It could be done with `compare-field` on the date field of the event (typically `:sim-de-event/date`) ## Simultaneous event ordering A simultaneous event ordering apply user defined decision on which event should be executed first It could leverage `compare-types` and `compare-field` or what user defined functions ## Simultaneous events Two or more events are simultaneous if they happen at the same date in the scheduler.
(compare-field field)Returns a function to compare e1 and e2 based on values of field field
nil values are accepted
Params:
e1 is an evente2 is an eventReturns a function to compare `e1` and `e2` based on values of field `field` nil values are accepted Params: * `e1` is an event * `e2` is an event
(compare-types evt-type-priorities)Compares two events with their types, based on their ordering in evt-type-priorities
Params:
evt-type-priorities list of event priorities, ordered with higher priority first in the liste1 first evente2 second event
both events as defined in automaton-simulation-de.eventReturns true if e1 is before e2
Compares two events with their types, based on their ordering in `evt-type-priorities` Params: * `evt-type-priorities` list of event priorities, ordered with higher priority first in the list * `e1` first event * `e2` second event both events as defined in `automaton-simulation-de.event` Returns true if `e1` is before `e2`
(sorter event-orderings)Returns a function with two events as parameters and returning the comparison of them, according to event-orderings
Params:
events-orderingsReturns a function with two events as parameters and returning the comparison of them, according to event-orderings Params: * `events-orderings`
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |