## derivative

Declare equations used in derivative calculations

## Syntax

derivative

<derivative section statements>

end

## Description

The DERIVATIVE section contains any statements which are used to calculate derivative values for model state variables. This includes both the equations for the derivatives themselves, as well and any equations which compute inputs to these equations. This section additionally includes any statements which must be computed at every point in simulated time, but may not be directly used in a derivative calculation (e.g., certain if/else statements). Note that equations in this section are sorted. Sets of equations which contain algebraic loops (unsortable statements) will result in a translation error. Note also that all INTEG statements must be placed in the DERIVATIVE section..

## Example

derivative

xd = -k*x. ! derivative of x

constant xic = 1.0 ! initial condition for x

x = integ(xd, xic)

end