The VAR directive allows the user to define variables, initialize them with numerical values and to induce many calculations with different variable values, in order, for example, to scan the parameter space or to vary the complex geometry. Additional features are offered through the options OPT and STA and will be discussed below.
<vnam> [=] <VARA> [<VARE> [<VARS>]]
is expected. The new variable <vnam> will be initialized with the value <VARA>. If you also give an end value <VARE> and a step width <VARS>, a loop will be generated, i. e, several calculations with different values ot the variable will be performed. If you define loops for more than one variable, they will be nested in the sequence of their definition.
If AOMX reads a line consisting of a single *, it switches to the definition of bound variables. Subsequent lines are expected in the form
<vnam> = <a1> [<OP1> <a2> [<OPi> <ai>
which directs AOMX to combine the operands <ai> with the
operators <OPi>. Allowable operators are +, -, *, / and
**, during evaluation of arithmetic expressions, the program obeys
common priority rules.
Limitations. The number of free variables must be in the range 0 to 10, altogether MVAR variables may be defined. A line may contain at most MAOP arithmetic operators, and a variable name must not be longer than 10 characters.
Example:
VAR
B = 500 700 50
Dq = 2000 2200 100
*
C = 4 * B
esig = 10 * Dq / 3
B runs from 500 to 700 in steps of 50, Dq from 20000 to 22000 in steps of 1000, it holds C=4B and esig=10Dq/3.
The syntax for the definition of free and bound variables is the same as with VAR except that loops cannot be generated.
<vnam> [=] <VARS> [<VARA> [<VARE>]]
The optimization of the variable <vnam> will start with the value <VARS>. During the optimzation process, <vnam> may neither fall short of the minimum value <VARA> nor pass over the maximum value <VARE>. If <vnam> leaves the allowable range during optimization, a penalty function will be invoked that artificially deteriorates the least squares function.
Example:
VAR OPT
esig = 5000
epi/esig = 0.20 0.18 0.22
*
epi = epi/esig * esig
esig and epi shall be optimized, starting with 5000 resp. 1000 , but under the boundary condition that the ratio epi/esig may not deviate more than 10% from the starting value. To achieve this under free variation of esig, not epi itself is varied, but the ratio epi/esig - retricted, however, to the interval [0.18,0.22] which corresponds to the requirement of a maximal deviation of 10% from the starting value.
Example:
VAR OPT STA
esig = 5000
epi = 1000
B = 400
*
C = 5 * B
esig and epi shall be optimized with the same starting values as in the preceding example, but this time without restriction of the epi/esigma ratio; as a third fittable variable, B is added. C, on the contrary, is not optimized but bound to B. After settlement of the optimization, an error propagation calculation for esig und epi shall be performed.
Even if the options OPT and/or STA are applied, bound variables can be defined after insertion of a * line as the example for VAR OPT demonstrates.