EMI_IsAcceptedStep (EMI Function)
- Updated2023-03-14
- 1 minute(s) read
EMI_IsAcceptedStep (EMI Function)
Owning Class: Simulation Information
Requires: Control Design and Simulation Module
Prototype
char EMI_IsAcceptedStep(emiRef model);
Description
Checks whether the current time step is an accepted step. A variable step-size ordinary differential equation (ODE) solver can reject a time step if the current step size is greater than the minimum step size. Fixed step-size ODE solvers cannot reject time steps.
Inputs
| Name | Description |
|---|---|
| model | Specifies a reference to the external model. Use this reference as an input to other EMI functions. Do not modify model directly. |
Return Value
Returns a non-zero value if the ODE solver can accept the current time step. Otherwise, this function returns 0.
Details
You can use an accepted time step as the time to initialize or reset values for parameters or states.
Examples
char isAcceptedStep = EMI_IsAcceptedStep(model);