# Equation Management¶

By default, each Instant owns a computer. A computer is used to compute variables thanks to python user-defined functions. See Equation Manager for technical details.

If you want to use the computing system in an Antares python script, you may choose the modeling of the computer.

base.set_computer_model('internal')


internal is a very basic modeling that is provided by Antares.

If you do not want to use any available modeling, then you can set your own temporary formula.

base.set_formula('A = B * C')


Then, you can compute the variable you just have defined. By default, the variable is stored in the computer. Then, if you asked to compute the variable again, it will give you back the stored value.

base.compute('A')


You may want to reset the value of the variable.

base.set_formula('A = B * D')
base.compute('A', reset=True)


You could also not have stored the value of the variable at the first computation.

base.set_formula('A = B * C')
base.compute('A', store=False)


All the previous methods are also available for Zone and Instant objects.

## Modeling¶

A modeling is basically a set of equations. The equations may be given a priori in python files as with the modeling internal or given in a script with the function antares.Base.set_formula().

The equations may use the following operators:

'**', '/', '*', '+', '-', ',', '>', '<',
'abs(', 'angle(', 'arccos(', 'arcsin(', 'unwrap(',
'arctan2(', 'arctan(', 'conj(', 'cosh(',
'cos(', 'exp(', 'imag(', 'log(', 'log10(', 'max(', 'min(', 'mean(',
'maximum(', 'minimum(', 'ones(', 'real(', 'sign(',
'sinh(', 'sin(', 'tanh(', 'tan(', 'zeros(',
'(', ')']