## Equations

Equations are the basic mathematical elements of models in the CSL language. An equation is denoted by a single variable on the left side of and equals sign, and a mathematical expression of arbitrary complexity on the right hand side. For example, the following equation:

\[x = c \cdot sin(\frac {t}{2} + p)\]

is represented by this CSL code:

```
! A very simple equation in the CSL language
x = c*sin(t/2 + p)
```

The right side of the equation is composed of basic arithmetic operations, CSL operators, mathematical functions intrinsic to the CSL language, user-defined functions, and references to other variables or constants defined in the model. For most equations, which are evaluated at every point in simulated time, the order in which the equations are written is not important. That is, if an equation uses the variable "x" on the right side of the equal sign, then the equation that computes "x" may actually follow the first equation in order of equations in the model code. This is major distinction between the CSL language and other general-purpose programming languages. This sorting, however, is limited to equations contained in the DERIVATIVE section. In other sections, strict ordering of equations must be observed. For most models representing systems of differential equations, that majority of equations are contained in the derivative section.