Jump to: navigation, search
This article is incomplete or needs expanding. Please help out by adding your comments.

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, {?}.

Most of the 'standard' atom types that you will need are declared in models/atoms.a4l.

For more detail, see the user's manual.

See also Units of measurement.