Equation
From ASCEND
Equations are equality relations that define a relationship between variables in the MODEL. In ASCEND, equations are declared with a simple '=' sign:
MODEL quadratic; x,y IS_A variable; (* here is the equation in this model: *) y = (x - 2)^2; METHODS METHOD on_load; (* initialise the model to solve 4 = (x-2)² *) x.lower_bound := 1; FIX y; y := 4; END on_load; END quadratic;
In ASCEND, there is no requirement that you following the 'assignment' style common in other programming languages. For example, there is nothing wrong with any of the following:
x^2 + y^2 + z^2 = 1; sin(x) / x = z; y + x = w + v;
As well as the form of the equation being free, there is also no requirement that your equation only have a single solution; ASCEND will numerically seek any valid solution within the bounds of the variables involved.
Other types of relations can also be declared in ASCEND, but only equalities can be solved using NLA solvers such as QRSlv.
Boolean relations can be declared using the '==' operator.
Note that value assignments in the METHODS part of a MODEL use a different sign: ':='. Where possible, you should use a variable assignment instead of an equation, because equations result in an extra row in the system of equations.

