LocalSolver

www.localsolver.com

LocalSolver www.localsolver.com is an innovative mathematical programming solver developed and maintained by the company LocalSolver. LocalSolver finds high-quality solutions for large-scale mixed-variable non-convex optimization problems. Based on a unique hybrid neighborhood search approach, it combines local search techniques, constraint propagation and inference techniques, linear and mixed-integer programming techniques, as well as nonlinear programming techniques.

LocalSolver works on the algebraic representation of the model. As such, most common GAMS functions are supported, including logical operators. However, GAMS extrinsic functions cannot be used together with LocalSolver. Also special-ordered-set variables are currently not supported.

LocalSolver requires all variables to have finite bounds. Currently, the GAMS/LocalSolver link sets missing variable bounds to ±1e10, but the user is invited to provide proper bounds. However, no bounds should be set for variables that can be aggregate out by the solver link (aggrvars option).

LocalSolver might not able to prove infeasibility of the problem or global optimality of a solution and thus continues the search until interrupted by a limit (iterlim, reslim) or the user (Ctrl+C) or when found a solution with value equal or better of the dualbound option. It is thus important to set an iteration limit or a time limit that is appropriate to the model.

The search in LocalSolver is not deterministic due to hybridizing various optimization techniques in a concurrent way. That is, obtaining the same results cannot be ensured when repeatedly running the same model with the same data and parameters on the same machine.

# The License

Starting with LocalSolver 7.5, the user is required to install a machine-specific LocalSolver license on their machine. Having LocalSolver as part of the GAMS license is not sufficient anymore. Further, users that have a GAMS/LocalSolver link license need to provide a separate LocalSolver license.

Users that bought a GAMS/LocalSolver license can obtain a machine-specific LocalSolver license by, first, executing the tool lskeygen that is part of the GAMS distribution. This will give an output like the following:

LocalSolver 7.5 (MacOS64, build 20171117)
Copyright (C) 2017 Innovation 24, Aix-Marseille University, CNRS.
All rights reserved. See LocalSolver Terms and Conditions for details.
Hardware signature : 170EEAC5C295E6A2

Please send this output and your GAMS license to the GAMS sales & marketing department (sales.nosp@m.@gam.nosp@m.s.com). They will contact LocalSolver to get a hardware-specific LocalSolver license for you and send this license back to you. Please do so with any machine on which you expect to run GAMS/LocalSolver.

Users with a GAMS/LocalSolver link license should contact LocalSolver directly to obtain a LocalSolver license.

Next, the LocalSolver license file (license.dat) needs to be places on the machine so that it can be found by LocalSolver. By default, LocalSolver looks for its license file in 3 different locations in the following order:

1. In the file specified by the environment variable LS_LICENSE_PATH.
2. In the current directory, that is the directory from where GAMS is spawned. If a file license.dat exists in this directory, it is used as default license.
3. In /opt/localsolver_X_Y/license.dat on Linux and Mac OS X and C:\localsolver_X_Y\license.dat on Windows.

# Using GAMS/LocalSolver

The following statement can be used inside your GAMS program to specify using LocalSolver:

Option MINLP = LocalSolver;  { or MIQCP or NLP or ... }

The above statement should appear before the solve statement. If LocalSolver was specified as the default solver during GAMS installation, the above statement is not necessary.

The following GAMS options are used by GAMS/LocalSolver: iterlim, reslim, and threads.

Note
The GAMS option iterlim is limited to the range 0..2147483647, while LocalSolver supports larger iteration limits and defaults to 9223372036854775807. To allow to run with the default iteration limit, the GAMS/Localsolver link treats a setting of GAMS option iterlim to 2147483647 as if it has not been set.

Additionally, a GAMS/LocalSolver run can be customized by a using a solver options file. With the following example, one disables the automated aggregation of variables in the GAMS/LocalSolver link and sets the seed for the random number generator in LocalSolver to 42:

aggrvars 0
seed     42

The following options can be set:

Option Description Default
aggrvars Automatically find and aggregate out variables.
If this option is enabled, the GAMS/LocalSolver link will look for free continuous variables that it can substitute out by using equality equations in which these variables appear linearly. A heuristic procedure has been implemented to substitute out as many variables as possible.
1
annealinglevel Simulated annealing level (higher numbers increase the number of uphill moves, thus increases chances to reach better solutions).
Range: {0, ..., 9}
1
dualbound Dual bound on objective function (lower bound for minimization, upper bound for maximization).
If a value has been set, GAMS/LocalSolver will stop when it found a feasible solution with an objective function value equal or better to the dual bound.
unused
hierarchicalobj Whether to interpret the GAMS objective function as a specification for an hierarchical optimization. 0
logfreq Iteration frequency for printing iteration log 10000
seed Seed of random number generator. 0
solvetrace Filename of solving trace file.
solvetracetime Time interval when a trace record is written. 1
verbosity Level of log verbosity
Range: {0, ..., 2}
1
writelsp Name of file into which to write instance as LocalSolver .lsp file.

## Hierarchical Optimization of Multiple Objective Functions

If the option hierarchicalobj is enabled, then the objective function in the GAMS model is interpreted as a specification of the priorities for an hierarchical optimization.

That is, assume the GAMS objective function is

$\sum_{i=1}^p c_i x_i$

If hierarchicalobj is enabled, the GAMS/LocalSolver link will request LocalSolver to optimize each of the $$x_i$$ variables in a hierarchical way. The highest priority will be given to a variable with largest value for $$|c_i|$$, the 2nd highest priority to a variable with 2nd largest absolute coefficient value, etc. Further, if $$c_i$$ is negative, then the optimization direction for $$x_i$$ will be flipped (w.r.t. the objective sense specified in the GAMS solve statement).

Note, that GAMS will still report the value of the objective function $$\sum_{i=1}^p c_i x_i$$ in the GAMS listing file and model attribute.

### Example

Let's assume we have 3 hierarchical objective functions,

o1 =e= ...
o2 =e= ...
o3 =e= ...

Assume we want to first minimize o1, secondly maximize o2, and thirdly minimize o3. To do this with GAMS/LocalSolver, you have to build a "weighted" combined objective and using the weights and the sign of the weight to determine the order and the direction:

o =e= 1000*o1 - 200*o2 + 50*o1;
solve m minimizing o using minlp;

or

o =e= -1000*o1 + 200*o2 - 50*o3;
solve m maximizing o using minlp;
GAMS Development Corp.
GAMS Software GmbH

General Information and Sales
U.S. (+1) 202 342-0180
Europe: (+49) 221 949-9170