ReentrantDecisionException

class ReentrantDecisionException(val elementName: String, val reason: String) : IllegalStateException(source)

S§C.11.1 — thrown when decide is entered while a decision is already in progress.

The failure this prevents is silent rather than loud, which is why it is refused rather than tolerated. A nested decision runs the whole seven-step algorithm, applies an action to the model, and installs its own pending transition; control then returns to the outer call, which overwrites that pending with its own. The nested decision is applied and never recorded, the epoch count advances twice for one recorded row, and the epoch indices in the trajectory stop corresponding to the decisions that occurred. Nothing throws and nothing is visibly wrong.

The usual cause is named in the message rather than left to be discovered: a lever's declared write function is arbitrary modeler code, and applying an action runs it, so a write that reaches back into decide closes the loop. The repair is requestDecision, which only schedules — see S§C.11.4 Example 3.

Constructors

Link copied to clipboard
constructor(elementName: String, reason: String)

Properties

Link copied to clipboard
Link copied to clipboard