Event example using OnRestart event
The PLI uses the
StepIndexBuffer
property to store the Step Index when the phase is HELD. The Step Index is then restored (by the TerminateState
method) when the phase transitions from RESTARTING to RUNNING. Typically, the StepIndexBuffer
would be checked to determine where the phase was HELD. The RESTART logic would then determine if it’s safe for the phase to RESTART at that step, or if it should RESTART at an earlier step. The
OnRUN
event logic should account for all possible restart conditions. An example of the conventions that should be used to program the events follows: 
Provide Feedback