KESTREL - Remote Solver Execution on NEOS Servers

Table of Contents


The Kestrel client/server is a way of sending your GAMS solve job to be solved via the NEOS Server from within your usual GAMS modeling environment and receiving results that can be processed as with any local solver. Starting with distribution 23.7 the Kestrel solver is part of the GAMS distribution. The solve statement using the GAMS/KESTREL solver invokes a client program that sends your problem to a solver running on one of the NEOS Server's remote computers. The results from the NEOS Server are eventually returned through Kestrel to GAMS, where you can view and manipulate them locally in the usual way. The introduction below covers everything you need to know to start using GAMS/KESTREL. Further information about more advanced features and other uses of Kestrel can be found at the Kestrel page on the NEOS Server. Please also make you familiar with the NEOS optimization service terms of use before submitting jobs via GAMS/KESTREL.


The Kestrel solver can be used to solve a GAMS model remotely. For example, consider the trnsport model. It can be solved locally in GAMS through the following statements,

model transport /all/;
solve transport using lp minimizing z;

which specify the trnsport model and solve it with the default linear programming solver. We can add an option statement to the code to explicitly specify the solver. For example, if we change the linear programming solver to GAMS/MINOS, the code becomes

model transport /all/;
option lp=minos;
solve transport using lp minimizing z;

To solve the same problem remotely through the NEOS Server, we simply change the linear programming solver to Kestrel. In addition we have to provide an email address. This can be specified either in an option file or by setting the environment variable NEOS_EMAIL. In order to set this permanently, it is recommended to add NEOS_EMAIL to your gamsconfig.yaml file.

Without an option file Kestrel will submit the model instance to the NEOS server and use the default LP solver on NEOS.

option lp=kestrel;
solve transport using lp minimizing z;

We can support a Kestrel option file and determine the solver on the NEOS server:

option lp=kestrel;
solve transport using lp minimizing z;
$echo email > kestrel.opt
$echo kestrel_solver minos >> kestrel.opt

The statement transport.optfile=1 specifies that an options file, called kestrel.opt, will be used. The options file contains the email address, the remote solver name as well as any options for the remote solver. We instruct the Kestrel solver to use GAMS/MINOS as the remote solver by writing the following kestrel.opt file:

kestrel_solver minos

If you do not know what solvers are available via GAMS/KESTREL on NEOS, submitting a job with a nonexistent solver set will return a list of enabled solvers. If you want to change the URL of the server, you can specify the option neos_server. The complete format of the parameter is protocol://host:port.

A subsequent run of the code through the GAMS interpreter results in the transport model being solved through the NEOS Server with the GAMS/MINOS solver. Once the job is submitted to the NEOS Server, a job number, password, and Web address are displayed to the screen, which provide information on accessing the job and viewing the intermediate output, for example,

--- Executing KESTREL
Job has been submitted to Kestrel
Kestrel/NEOS Job number    : 93478
Kestrel/NEOS Job password  : utiwtxTK
Check the following URL for progress report :

To look at the solver's output while it is running, point your browser at the URL given in the Kestrel output as shown above, and click on View Intermediate Results in the web page that appears. This will take you to another page that shows all of the output produced by the solver for your problem so far. To track the solver's progress, simply update this page periodically.

If the NEOS Server or the network becomes unavailable after the submission, a particular job can be retrieved by setting both the kestrel job and kestrel password in the options file.

kestrel_solver minos
kestrel_job 93478
kestrel_password utiwtxTK

Re-issuing the command gams trnsport with this options file will retrieve the results for the specified job number.

By specifying neos_username and neos_user_password in the option file, you can submit an authenticated job using your NEOS user account. Authenticated jobs will appear in your user account on the NEOS website.

neos_username username
neos_user_password password