AbsoluteEvent

class AbsoluteEvent<T>(val host: ReactionHost<T>, val occurrence: Time) : AbstractReaction<T>

A single-use reaction checked at one absolute occurrence.

Conditions do not alter scheduling and are observed only at occurrence. If they are all valid, they are prepared and the actions execute. The event then unregisters itself from host whether the conditions were valid or not. An action failure remains fail-fast and prevents successful completion of the event procedure.

Parameters

host

model entity hosting the event

occurrence

absolute occurrence time

Type Parameters

T

concentration type

Constructors

Link copied to clipboard
constructor(host: ReactionHost<T>, occurrence: Time)

Properties

Link copied to clipboard
open override var actions: List<Action<T>>

The Actions executed by this reaction.

Link copied to clipboard
open override val canExecute: Observable<Boolean>

Observes whether the reaction procedure can be selected and executed by the engine. This observable emits updates when that state changes. Reactions whose procedure includes checking occurrence-time conditions may remain executable even when those conditions will suppress their model effects.

Link copied to clipboard
open override var conditions: List<Condition<T>>

The Conditions interpreted by this reaction's scheduling and execution policy.

Link copied to clipboard
open override val host: ReactionHost<T>
Link copied to clipboard

The absolute Time of the next occurrence.

Link copied to clipboard

Functions

Link copied to clipboard
operator override fun compareTo(other: Reaction<T>): Int
Link copied to clipboard
open override fun dispose()

Disposes and releases the resources held by this object.

Link copied to clipboard
open override fun execute()

Prepares valid conditions, applies the model mutation, and advances surviving distributed reactions.

Link copied to clipboard
override fun initializationComplete(atTime: Time, environment: Environment<T, *>)

Initializes reactive inputs after the model has been fully assembled.

Link copied to clipboard
infix fun Reaction<*>.shouldEqual(other: Reaction<*>)
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
override fun updateSchedulingAfterInvalidation(currentTime: Time)

Refreshes this reaction's scheduling after one or more observed model inputs changed.