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.
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 lineslicence('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-OEMThe 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.
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(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) ), ...