pub fn future_event<M>(
    event_time: f64,
    comp: M,
    including_current: bool
) -> FutureEvent<M> where
    M: Event
Expand description

Branch a new nested computation and return its result at the desired time of the future within the current Event by leaving the current computation intact.

A new derivative branch with branch_level increased by 1 is created at the current modeling time. Then the result of the specified computation for derivative branch is returned to the current computation.

The state of the current computation including its event queue and mutable references RefComp remain intact. In some sense we copy the state of the model to derivative branch and then proceed with the derived simulation. Only this copying operation is relatively cheap.