Struct PendingEvent

Struct Documentation

struct PendingEvent

PendingEvent struct.

Represents an event that has triggered and is waiting to be executed.

Public Members

Event const &event

The event to be handled.

int idx

The index of event in the model

std::optional<SimulationState> state_at_trigger

The simulation state at which the discontinuity in which event triggered was reached. Only set if event.uses_values_from_trigger_time() is true. The Heaviside variables in mod were already updated for this discontinuity.

std::optional<AmiVector> xdot_at_trigger

The time derivative of the state at state_at_trigger, if state_at_trigger is set and sensitivities are computed.

std::size_t trigger_disc_idx = {0}

Index of the discontinuity that was reached at state_at_trigger. Only meaningful if state_at_trigger is set.