next up previous index
Next: FDPLEX: A Hybrid Finite Up: EPLEX: The ECLiPSe/CPLEX Interface Previous: Error Handling   Index

Subsections


Solver Specific Information

The external solvers currently supported by the eplex library are:

Note that the set of supported solver versions may vary between different releases of ECLiPSe; please refer to the release notes.

To load a specific solver explicitly, use:

:- lib(eplex_cplex).
:- lib(eplex_xpress).
The first line explicitly requests the CPLEX solver, the second line explicitly requests the XPRESS-MP solver. Note that these solvers must be available for your machine for the above to work.

Versions and Licences

Depending on which solver you have, which version of it, and which hardware and operating system, you need to use the matching version of this interface. Because an ECLiPSe installation can be shared between several computers on a network, we have provided you with the possibility to tell the system which licence you have on which machine. To configure your local installation, simply add one line for each computer with the appropriate licence to the file <eclipsedir>/lib/eplex_lic_info.ecl, where <eclipsedir> is the directory or folder where your ECLiPSe installation resides. The file contains lines of the form

licence(Hostname, Solver, Version, LicStr, LicNum).
For example, if you have CPLEX version 6.5 on machine workhorse, and XPRESS-MP version 11 on machine mule you would add the lines
licence(workhorse, cplex, '65', '', 0).
licence(mule, xpress, '11', '', 0).
The hostname must match the result of get_flag(hostname,H), converted to an atom (on some machines, this is just a name, on others it is the complete internet domain name). The meaning of LicStr and LicNum depends on the optimizer: For CPLEX, LicStr is a string containing the environment settings for runtime licences, e.g. "CPLEXLICENSE=/usr/local/cplexlic.ptr", and LicNum is the serial number for runtime licences. For XPRESS-MP, LicStr is a string specifying the directory where .pwd and .msg files are located (overrides value of XPRESS environment variable), and LicNum is unused. If a machine has more than one licence and lib(eplex) is called, the first one listed in eplex_lic_info.ecl will be used.

Access to Global Solver Parameters

The external Simplex solver has a number of global (i.e. not specific to a particular problem) parameters that affect the way it works. These can be queried and modified using the following predicates.

lp_get(optimizer, -Value)

Returns the name of the external optimizer, currently 'cplex' or 'xpress'.


lp_get(+ParamName, -Value)

Retrieve the value of a global parameter for the external solver. The Value is either a float or an integer number, depending on the parameter. Refer to the solver documentation for details. The names of the parameters are derived from the names of the parameters in the external solver. For CPLEX, take the parameter name from the CPLEX manual (or cplex.h), remove the CPX_PARAM_ prefix and convert the rest to lower case, e.g.
CPX_PARAM_NODELIM becomes nodelim.
For XPRESS-MP, take the parameter name from the manual (or xpresso.h), remove the N_ prefix (if present) and convert the rest to lower case, e.g.
MAXNOD or N_MAXNOD becomes maxnod.
The following parameter names are additional aliases that work for either solver:
feasibility_tol, integrality, objdifference, iteration_limit, mip_display, mip_interval, presolve, crash, refactor, node_limit


lp_set(+ParamName, +Value)

Set a global parameter for the external solver. The parameters are as in lp_get/2.


int_tolerance(-Value)

The same as lp_get(integrality, Value): The solver's idea of an integer value, i.e. numbers within this tolerance from an integer are considered integers.


next up previous index
Next: FDPLEX: A Hybrid Finite Up: EPLEX: The ECLiPSe/CPLEX Interface Previous: Error Handling   Index
Warwick Harvey
2002-05-15