Define a time-based or state-crossing event


schedule <discrete section name> AT <time expression>

schedule <discrete section name> XZ <state expression>

schedule <discrete section name> XP <state expression>

schedule <discrete section name> XN <state expression>


The SCHEDULE statement is used to prescribe the conditions under which the statements/equations in a DISCRETE section are to be evaluated.

Evaluation of code in a discrete section based on a specific time is accomplished via the SCHEDULE AT statement.  The schedule statement requires the name of the target discrete section and the value of time at which the section should be invoked.  The time argument may be an arbitrary mathematical expression.  This type of schedule statement may not be used in derivative sections.

SCHEDULE AT statements may be included in any section except the DERIVATIVE section.

Handling of events on state crossings is done with the SCHEDULE XZ/XP/XN statement.  This statement also accepts a section name and floating point expression as arguments.  This type of SCHEDULE statement may only be used in the DERIVATIVE section.


schedule spike at 2.75

schedule bounce XN x