|
|
GetDP uses several kinds of numeric variables:
|
|
|
* Parser variables: these variables are created when the input `.pro` files are parsed, once at the beginning of a calculation. Such variables cannot be changed at run-time, during a calculation, i.e. during pre-processing (`Constraint` evaluations), processing (`Resolution` operations) or post-processing (`PostOperation` operations). Such variables are the most common in GetDP `.pro` files. They involve the least overhead at run-time, as their value is computed once, when the `.pro` file is read.
|
|
|
* Run-time variables: these are created at run-time during pre-processing, processing or post-processing, through the run-time evaluation of expressions (like functions). Such variables can be used to handle dynamic cases that can not be predicted at parse time. Run-time variables begin with a dollar sign `$`. Their value can be set or retrieved in any expression, e.g. when a function is called, or in the `Evaluate`, `While`, `Test`, etc., operation in `Resolution`. Some run-time variables are read-only and are only modified by built-in GetDP algorithms or functions, like `$Time` or `$TimeStep`.
|
|
|
* ONELAB parameters: these parameters are exchanged with the ONELAB server, and can thus be exchanged with other ONELAB clients. ONELAB parameters can be created or accessed both at parse time (using the parser commands `DefineNumber`, `DefineConstant`, `GetNumber` and `SetNumber`) or at run-time (using the functions `GetNumberRunTime` and `SetNumberRunTime`). ONELAB parameters potentially involve the most overhead, as they can be exchanged through e.g. TCP-IP sockets over a network. |
|
|
GetDP uses three kinds of numeric variables: parser variables, run-time variables and ONELAB parameters.
|
|
|
|
|
|
## Parser variables
|
|
|
|
|
|
Parser variables are created when the input `.pro` files are parsed, once at the beginning of a calculation. Such variables cannot be changed at run-time, during a calculation, i.e. during pre-processing (`Constraint` evaluations), processing (`Resolution` operations) or post-processing (`PostOperation` operations). Such variables are the most common in GetDP `.pro` files. They involve the least overhead at run-time, as their value is computed once, when the `.pro` file is read.
|
|
|
|
|
|
## Run-time variables
|
|
|
|
|
|
Run-time variables are created at run-time during pre-processing, processing or post-processing, through the run-time evaluation of expressions (like functions). Such variables can be used to handle dynamic cases that can not be predicted at parse time. Run-time variables begin with a dollar sign `$`. Their value can be set or retrieved in any expression, e.g. when a function is called, or in the `Evaluate`, `While`, `Test`, etc., operation in `Resolution`. Some run-time variables are read-only and are only modified by built-in GetDP algorithms or functions, like `$Time` or `$TimeStep`.
|
|
|
|
|
|
## ONELAB parameters
|
|
|
|
|
|
ONELAB parameters are exchanged with the ONELAB server, and can thus be exchanged with other ONELAB clients. ONELAB parameters can be created or accessed both at parse time (using the parser commands `DefineNumber`, `DefineConstant`, `GetNumber` and `SetNumber`) or at run-time (using the functions `GetNumberRunTime` and `SetNumberRunTime`). ONELAB parameters potentially involve the most overhead, as they can be exchanged through e.g. TCP-IP sockets over a network. |