The OPTION and PROPERTY Statements

Options

Options are directives to AIMMS or to the solvers to execute a task in a particular manner. Options have a name and can assume a value that is either numeric or string-valued. You can modify the value of an option from within the graphical interface. The assigned value is stored along with the project. All global options are set to their stored values at the beginning of each session. During execution you can change option settings using the OPTION statement.

Syntax

option-statement:

image/svg+xmlOPTION option := expression , ;

You can find a complete list of global options for AIMMS and its solvers in the help system.

Option values

The right-hand side of an OPTION statement must be a scalar expression of the proper type. If the option expects a string value, AIMMS will accept both string- or element-valued expressions. An example follows.

option  Bound_Tolerance  := 1.0e-6,
        Iteration_Limit  := UserSettings('IterationLimit');

Solver options

Some solver options are available for more than one solver. If you modify such a solver option per se, AIMMS will modify the option for all solver that support it. If you want to restrict the change to only a single solver, you can prefix the option name by the name of the solver followed by a dot ., as illustrated in the example below.

option  'Cplex 20.1'.lp_method := 'dual simplex';

This statement will set the option lp_method of the solver that is known to the system as 'Cplex 20.1' equal to 'dual simplex'. The solver name can be either a quoted solver name, or an element parameter into the predefined set AllSolvers.

Identifier properties

Identifier properties can be turned on or off. All properties default to off, unless they are turned on-either in the declaration of the identifier or in a PROPERTY statement. During the execution of your model you can dynamically change the default values of properties through the PROPERTY execution statements.

Syntax

property-statement:

image/svg+xmlPROPERTY identifier . property := on off , ;

Resetting properties

The properties of all identifier types can be found in the identifier declaration sections. Not all property settings can be changed, e.g. you cannot dynamically change the Input or Output property of arguments of functions and procedures. In such cases, AIMMS will produce a runtime error. An example of the PROPERTY statement follows.

if ( Card(Cities) > 100 ) then
   property IntermediateTransport.NoSave := on;
endif;

Once the set of Cities contains more than 100 elements, the identifier IntermediateTransport is no longer saved as part of a case file.

Multiple identifiers

When the PROPERTY statement is applied to an index into a subset of the predefined set AllIdentifiers, AIMMS will change the corresponding property for all identifiers in that subset.

Example

The following example illustrates how the PROPERTY statement can be used to obtain additional sensitivity data for a set SensitivityVariables of (symbolic) variables that has been previously determined.

for ( var in SensitivityVariables ) do
    property var.CoefficientRanges := on;
endfor;

Here, you request AIMMS to determine the smallest and largest values for the objective coefficient of each variable in SensitivityVariables during the execution of a SOLVE statement such that the optimal basis remains constant (see also Variable Properties).