SolveEngine

# Introduction

GAMS/SolveEngine allows users to solve GAMS models using solvers from the Satalia SolveEngine. The SolveEngine aggregates different solution algorithms for optimization problems and automatically selects an algorithm that seems to suite best for a given model instance. Currently, LP and MIP problems can be handled by the SolveEngine.

The GAMS/SolveEngine link comes for free with any licensed GAMS system. Users must have an API key for the Satalia SolveEngine to submit jobs. The GAMS/SolveEngine link submits a GAMS model instance to the SolveEngine server, schedules it for processing, and waits until the problem has been solved.

# Usage

To run GAMS/SolveEngine, specify to use solveengine as solver. For example, if one wishes to solve the trnsport.gms model, one would run

> gams trnsport.gms solver=solveengine


A SolveEngine API key is necessary to submit jobs to the SolveEngine. Once a user has registered for SolveEngine, the API key is available after login. To make GAMS/SolveEngine aware of this key, either set the environment variable SOLVEENGINE_APIKEY to the key string, or use the option apikey.

Currently, only the GAMS option reslim is supported by the GAMS/SolveEngine link. The limit set by reslim is passed on to the SolveEngine and applied there for the running solver. It can therefore take longer for the GAMS/SolveEngine run to finish than what is specified by reslim. Further, note that SolveEngine requires a minimal value of 60 seconds for the time limit. The option hardtimelimit can be used to set a time limit that is enforced on the GAMS side. When a running SolveEngine job is interrupted before it is completed (either by hitten any of the time limits or by receiving a user-interrupt signal (Ctrl+C)), no solution will be available.

All GAMS/SolveEngine specific options are described in the section Options.

# Log

Running model trnsport using GAMS/SolveEngine gives the following log:

> gamslib trnsport
Copy ASCII : trnsport.gms
> gams trnsport.gms lp solveengine optfile 1
--- Job trnsport Start 07/14/17 15:00:27 24.9.0 r60947 LEX-LEG x86 64bit/Linux
--- Starting compilation
--- trnsport.gms(69) 3 Mb
--- Starting execution: elapsed 0:00:00.001
--- trnsport.gms(45) 4 Mb
--- Generating LP model transport
--- trnsport.gms(66) 4 Mb
---   6 rows  7 columns  19 non-zeroes
--- Executing SOLVEENGINE: elapsed 0:00:00.002
This is the GAMS link to Satalia SolveEngine.
>>  apikey ***secret***
Submitting Job.
Scheduling Job. ID: 57636b79317861c7be20e9f0088d4136120f37ba
1.0s Job Status: queued
2.2s Job Status: completed
Retrieving results.
Status: optimal
Objective Value: 1.5367500000e+02
--- Restarting execution
--- trnsport.gms(66) 2 Mb
--- Reading solution for model transport
***
*** Solver did not provide marginals for model transport
***
--- trnsport.gms(68) 3 Mb
*** Status: Normal completion
--- Job trnsport.gms Stop 07/14/17 15:00:30 elapsed 0:00:03.565


First, the options file solveengine.opt is read and echoed to the log. While doing so, echoing the API key itself is suppressed. Then a "job" is created on the SolveEngine server, to which the model instance is submitted. Next, the job is scheduled to be solved. Here, also the ID of the job on the SolveEngine server is printed. Further, a progress report on the solve status is printed. Finally, results are retrieved from SolveEngine and passed back to GAMS.

# Options

The following options can be set via a solver options file:

Option Description Default
apikey Satalia SolveEngine API key
debug Enabling debug output
Range: [0, 2]
0
hardtimelimit Hard timelimit that is applied to the time since the job has been submitted. If the job does not finish within this limit, it will be canceled by the GAMS/SolveEngine link. ∞
printjoblist Prints list of SolveEngine jobs 0
verifycert Whether to verify SSL certificate using the machines CA certificates storage 1

# Troubleshooting

If submitting a job to the SolveEngine fails with an SSL certificate problem, then one may disable the corresponding check by using the option verifycert.

Attention
Disabling verification of the certificate makes the communication insecure as it cannot be ensured anymore that GAMS is indeed communicating with the Satalia SolveEngine server.