EnvironmentTestReaction

class EnvironmentTestReaction<T>(val environment: Environment<T, *>, val timeDistribution: TimeDistribution<T>) : TimeDistributedReaction<T>

Constructors

Link copied to clipboard
constructor(environment: Environment<T, *>, timeDistribution: TimeDistribution<T>)

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
Link copied to clipboard

The current meanDelay, for consumers requiring it to be finite and positive, such as those converting speeds into per-occurrence movements.

Link copied to clipboard
open override val host: Environment<T, *>

The model entity hosting this reaction, fixed for the lifetime of the reaction. A host only registers reactions whose host is the host itself.

Link copied to clipboard
open override val meanDelay: Double

The expected delay between two occurrences of this reaction in the current model state.

Link copied to clipboard
open override val nextOccurrence: Observable<Time>

The absolute Time of the next occurrence.

Link copied to clipboard
open override val timeDistribution: TimeDistribution<T>

The delay distribution governing this reaction's putative occurrences.

Functions

Link copied to clipboard
open 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()

Executes this reaction.

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

Activates reactive inputs after the environment is fully initialized and establishes the first occurrence.

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

Advances distribution-backed scheduling after successful execution at currentTime.

Link copied to clipboard
open override fun updateSchedulingAfterInvalidation(currentTime: Time)

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