ATOM: Difference between revisions
Restored page from Google Cache, uploaded by John Pye |
No edit summary |
||
| Line 1: | Line 1: | ||
<div>''This article is incomplete or needs expanding. Please help out by adding your comments.''</div> | <div>''This article is incomplete or needs expanding. Please help out by adding your comments.''</div> | ||
The '''ATOM''' statement is used to declare new variable types in ASCEND. These can be symbol, boolean, integer, or real-valued. The capabilities of ASCEND in solving models with these types of atoms depends on what solver is used. The ATOM statement is used to refine the definition of base variable types. You can add additional parameters such as upper and lower bounds, and scaling parameters, as well as defining the [[ | The '''ATOM''' statement is used to declare new variable types in ASCEND. These can be symbol, boolean, integer, or real-valued. The capabilities of ASCEND in solving models with these types of atoms depends on what solver is used. The ATOM statement is used to refine the definition of base variable types. You can add additional parameters such as upper and lower bounds, and scaling parameters, as well as defining the [[dimensions]] for the variable. | ||
Revision as of 03:13, 19 May 2010
The ATOM statement is used to declare new variable types in ASCEND. These can be symbol, boolean, integer, or real-valued. The capabilities of ASCEND in solving models with these types of atoms depends on what solver is used. The ATOM statement is used to refine the definition of base variable types. You can add additional parameters such as upper and lower bounds, and scaling parameters, as well as defining the dimensions for the variable.
Atom types may declare attribute fields with types real, integer, boolean, symbol, and set. These attributes are not independent objects and therefore cannot be refined, merged, or put in a refinement clique (ARE ALIKE).
The syntax for declaring a new atom type is
ATOM atom_type_name REFINES variable_type «DIMENSION dimension_expression» «DEFAULT value»; (* note the semicolon *) «initial attribute assignments;» END atom_type_name;
An example is the declaration of the solver_var:
ATOM solver_var REFINES real DEFAULT 0.5 {?}; lower_bound IS_A real; upper_bound IS_A real; nominal IS_A real; fixed IS_A boolean; fixed := FALSE; lower_bound := -1e20 {?}; upper_bound := 1e20 {?}; nominal := 0.5 {?}; END solver_var;
Note in the above the wildcard dimension, {?}.
For more detail, see the .
See also Units of measurement.