Variables
A variable is an unknown in a problem or a model. It is characterized by its Quantity possibly restricted to a sub-area of possible values. A variable must be defined in the Variables field of a Problem or a Model. As an unknown, its value is not defined. It is important to point out that the variables carry the sub-defined character of DEPS models.
Syntax
Variables are defined according to the following syntax:
<Variable> ::=
   <VariablePrefix> <name> : <quantity> <VariableOption>  ;
   |
   <VariablePrefix> <name> : <quantity> in [ <vmin> , <vmax> ] <VariableOption>;
   |
   <VariablePrefix> <name> : <quantity> in { <v1>, <v2> , …, <vn> }  <VariableOption> ;
   |
   <VariablePrefix> <name> : <quantity> in [ <cexprmin> , <cexprmax> ]  <VariableOption> ;
with
<VariablePrefix> ::=
        |
        expr
        |
        obj
<VariableOption> ::=
        |
        redefine
A variable can be qualified as an expr or as an obj. The domain of a Variable of a Model can be redefine in an extended Model as soon as the new domain is included in the previous one.
Note
The domain of a Variable can be parametrized by any constant expression depending on any constants previously defined in the Model.
Examples
Model VarExample()
Constants
a : Real = 3.5 ;
Variables
V1 : Real;
V2 : Real in [0, 1e4];
V3 : Real in {-1.75, 3.5, 6.5};
V4 : Real in {a+1.5, a+2.5, a+3.5};
V5 : Real in [abs(a)*2, abs(a)*3];
Elements
Properties
End
Model ExtendedVarExample() extends VarExample[]
Constants
Variables
V1 : Real in [-100, 100] redefine;
Elements
Properties
End