FortMP Directives for AMPL
This document supplies information on the options for using the
'AfortMP' solver in AMPL. The general syntax of a solver option
option afortmp_options "<option list>";
Where <option list> comprises one or more options separated by blank
space. Quotes may be omitted if only one option is mentioned with no
interior blank spaces. Character '\' (backslash) may be used within
the option list as line terminator in order to continue options on
the following line.
The general form of an individual option is:
where <keyword> is the coded name of an option and <value> is the
value to be assigned. The '=' sign may have blank spaces around it.
The nature of an option <value> is dependant on the option - at
present all option values are numeric and one of the following kinds:
- Real, decimal or floating point
- Switch, zero meaning OFF or one meaning ON
We expect that string values may feature in future enhancements.
A description of each option is given below.
1) General Algorithm Switches
Controls whether Interior Point Method (IPM) is to be used rather than
SSX as the main solver. Default is 0 (OFF).
If the model contains discrete variable types then normally the MIP
(branch & bound) algorithm is invoked to find the integer optimum.
This can be stopped in trial-running with option 'MIP=0', and then any
optimum found will refer to the continuous relaxation. Default is 1
Controls whether to execute SCALE before calling the main solve
algorithm (SSX or IPM). Default is 1 (ON).
Controls whether to execute PRESOLVE before calling the main solve
algorithm (SSX or IPM). If PRESOLVE is used then POSTSOLVE is called
to correct the optimum basis. Default is 0 (OFF).
Controls whether to execute MIP preprocessor in a problem with mixed
integer variables. Default is 0 (OFF).
Controls whether cut-processing will be used in the Mixed Integer
algorithm. Default is 0 (OFF).
2) Maximum Limits
Supplies the iteration limit for SSX algorithms. Default is 50000.
Supplies the iteration limit for the IPM algorithm. Default is 80.
Supplies the integer solution limit for the MIP algorithm. Default is
Supplies the node execution limit for the MIP algorithm. Default is
Supplies the execution time limit (seconds) for the MIP algorithm.
Default is 50000.0.
Supplies the iteration limit for the QP-SSX algorithm. Default is
3) General Tolerances
This sets the DJ tolerance for SSX algorithms. Default is 1.0e-5.
This sets the zero tolerance for SSX and other algorithms. Default
This sets the RHS tolerance for the SSX algorithm. Default is 1.0e-5.
This sets the criterion for adjudging whether the solution value of
some Mixed Integer variable-type may be considered feasible. Default
4) Options for Mixed Integer
This supplies a fraction to control the accuracy of an integer optimum
result. The fraction, mutiplied into the gap between best integer
objective and the continuous relaxation objective, is taken as 'cutoff
tolerance' - that is subtracted from the best integer objective (or
added in the case of MAXIMIZE) in order to form the bound restricting
further search of the tree. Default is 0.0.
Controls the preferred branch for next node selection in MIP. If the
switch is ON then node selection follows the UP direction with a
corresponding change to fraction criteria in selecting a variable for
branching. Otherwise the UP and DOWN directions are considered equally.
The contol is particularly useful when the UP branch forces several
other discrete choices to the DOWN value - e.g. in binary models with
SOS-type constraints. Default is 0 (OFF).
Controls whether to create an 'agenda list' output file holding the
best integer solution. Output is written to a file named '<stub>.agl'
whenever an improved integer solution is obtained. The file may be
used in a subsequent solver execution by using control
'miplistinput=1'. Default is 0 (OFF).
Controls whether a previous agenda list file '<stub>.agl', created
with control 'miplistoutput=1', is to be read in as a starting integer
solution. If the model differs from the previous one only in relaxing
certain bounds or RHS limits then this restart may provide an advanced
integer solution reducing the search time. The variable numbering of
the two executions must be identical. Default is 0 (OFF).
This option sets the node logging interval in terms of node-count
(applies if the log level is 2 or more). Default is 1.
5) Options for Quadratic Programming
This sets the DJ tolerance for the QP-SSX algorithm. Default is
This sets the RHS tolerance for the QP-SSX algorithm. Default is
Supplies a maximum to the RHS tolerance for the QP-SSX algorithm.
Normally a solution is to be found within the tolerance given by
'qpsrhstol', but if this proves impossible this control specifies a
relaxation. Relaxed solutions are indicated by separate codes that
can be displayed in 'solver_result_num'. Default is 1.0e-4.
This control sets the amount of extra memory (bytes) to be added for
QP models. Default is 10000000, normally enough for any small-to-
medium sized model.
Controls whether a symmetric scaling is to be used in QP-SSX. Default
is 0 (OFF).
6) Options for Output and Display
In the AMPL/FortMP solver all display and message output is associated
with a message level. Level 0 comprises error-messages, level 1
comprises stage completion messages and higher levels may show
progressively more information.
Logged output is written to a file '<stub>.log' - each new execution
for models with the same stub appending to the end of an existing
'<stub>.log' file if it exists already. However if an execution
terminates normally (exitcode zero) then the log-file is deleted
unless user explicitly chooses to retain it with option 'keeplog=1' -
see below. If execution terminates with an error then the log-file
Options are as follows:
This control supplies a maximum level-number from 0 to 4 for the output
log during FortMP solver execution (excludes the AMPL/FortMP interface).
The default is 4 recording all mesages from the solver - however the
solver has further options controlling individual levels for each
algorithm, and these levels all default to 1. Options to adjust
individual levels are available via the other SPECS commands - see next
This control supplies a maximum level-number from 0 to 4 for the
console display during FortMP solver execution (excludes the
AMPL/FortMP interface). The default is zero - suitable for small
models - and for larger models level 1 should be used to allow
progress to be monitored.
This control supplies a maximum level-number from 0 to 3 for the
console display during AMPL/FortMP iterface execution. This is for
debugging purposes, and displayed messages are all copied to the log.
If the option is used at all, it should appear first in the option
list (otherwise some messages may be lost). The default is 0 (error
If this switch is ON the logfile is retained whatever the exitcode.
Default is 0 (OFF).
Setting this switch causes the logfile to be rewound (deleting
previous output) before starting each solver run. Note that rewinding
also deletes the options listed for the current execution and may not
be desirable for this reason. Default is 0 (OFF).
7) Other SPECS commands
A large number of additional controls can be applied to the solver by
using the SPECS command file. This is a file 'fortmp.spc' located in
the current working directory. It is written according to the
descriptions given in the FortMP manual and other documentation - eg
'Commands.doc'. The following options are available to control its use.
If this switch is set to 1 (ON) then the FortMP solver reads an
additional source of options in the file 'fortmp.spc'. These will
override any equivalents entered in the AMPL script. In WIN32 systems
there is a dialogue available for building this file - see control
'buildspecs' described next. Default is 0 (OFF).
In the WIN32 system only, setting this switch to 1 (ON) invokes a
dialogue to build the SPECS command file. Users wishing to employ
this dialog should contact Optirisk systems. Default is 0 (OFF).