next up previous index
Next: REPAIR: Constraint-Based Repair Up: EPLEX: The ECLiPSe/LP/MIP Interface Previous: Solver Behaviour Differences   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

All the solvers supported by the library comes in various versions. In addition, for XPRESS-MP, we distinguish versions included with ECLiPSe: the `OEM' versions, from versions obtained independently by the user.

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 both the OEM and non-OEM XPRESS-MP version 13.26 on machine mule, and your internet domain is +icparc.ic.ac.uk, you would add the lines
licence('workhorse.icparc.ic.ac.uk', cplex, '65', '', 0).
licence('mule.icparc.ic.ac.uk', xpress, '1326icp', default, 0). % OEM
licence('mule.icparc.ic.ac.uk', xpress, '1326', '', 0). % non-OEM
The hostname must match the result of get_flag(hostname,H), converted to an atom (this is normally the complete internet domain name, rather than just the machine). Version is formed from the concatenation of the major and minor version numbers. In the case of OEM XPRESS-MP, this is followed by the postfix icp. 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, if the OEM version is used, LicStr should be the atom default, as the licencing is handled internally by eplex. For other versions of the library, LicStr is a string specifying the directory where .pwd licence file is located (overrides value of XPRESS environment variable). LicNum is unused in both cases. 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 External Solver's Control Parameters

The external solver has a number of control parameters that affect the way it works. These can be queried and modified using the lp_get/2, eplex_get/2, lp_get/3, and lp_set/2, eplex_set/2, lp_set/3 predicates respectively:


lp_get(+Handle, optimizer_param(+ParamName), -Value)

Retrieve the value of a control parameter for the external solver for the problem represented by Handle. These paramters are solver specific; see lp_get/3 for more details..


EplexInstance:eplex_get(optimizer_param(+ParamName), -Value)

Like lp_get/3, but get a control parameter for the external solver associated with the specified eplex instance.


lp_get(optimizer_param(+ParamName), -Value)

Retrieve the global value of a control parameter for the external solver. The paramters and the exact meaning of `global' is solver specific: if the solver does not have global parameters, this gets the global default value, rather than the globally applicable value. The parameters are as in lp_get/3.


lp_set(+Handle, optimizer_param(+ParamName), +Value)

Set a control parameter for the external solver for the problem represented by Handle. If the external solver does not have problem specific parameters, this will raise an unimplemented functionality exception. The parameters are as in lp_get/3.


EplexInstance:eplex_set(optimizer_param(+ParamName), +Value)

Like lp_set/3, but set a control parameter for the external solver associated with the specified eplex instance.


lp_set(optimizer_param(+ParamName), +Value)

Set a control parameter for the external solver for the problem globally. If the external solver does not have global parameters, this will set the global default for the parameter. The parameters are as in lp_get/3.


lp_get(optimizer, -Value) and lp_get(optimizer_version, -Value)

Retrieve the name (currently 'cplex' or 'xpress') and version of the external optimizer. This can be used to write portable code even when using solver-specific settings:
    ( lp_get(optimizer, xpress) ->
        ( lp_get(optimizer_version, Version), Version >= 13 -> 
            lp_set(Handler, optimize_param(maxnode), 100)
        ;
            lp_set(Handler, optimize_param(maxnod), 100)
        )
    ; lp_get(optimizer, cplex) ->
        lp_set(Handler, optimize_param(node_limit), 100)
    ), ...


next up previous index
Next: REPAIR: Constraint-Based Repair Up: EPLEX: The ECLiPSe/LP/MIP Interface Previous: Solver Behaviour Differences   Index
Warwick Harvey
2004-08-07