Kestrel for the NEOS Server

Kestrel is an interface to the NEOS Server that allows remote access to the solvers from a user's locally installed AMPL or GAMS modeling environment. It provides an easy mechanism for users to submit jobs to the NEOS solvers and receive the results within a local AMPL or GAMS modeling session.

Guide to Installing and Using the Kestrel AMPL Client

Installing AMPL and Kestrel

To use Kestrel with AMPL, you need to have the AMPL interactive environment installed on your local computer. If you do not have the AMPL environment installed, you can download a test version that accepts problems with up to 300 variables and 300 constraints; see the AMPL website for instructions.

Information on the Kestrel client for AMPL and binary downloads of the client can be found at Run AMPL on NEOS. The code for the client is hosted on github: GoKestrel.

Using Kestrel

  1. Develop your model within the AMPL environment.
  2. Set the solver options.
    • Choose option solver kestrel; as the solver.
    • Specify the remote solver name, e.g., CPLEX:
      option kestrel_options 'solver=cplex';
    • Note: If you do not know what solvers are available via Kestrel, omit the solver name and submit the job. The list of enabled solvers will be returned.
    • Specify the URL of the NEOS Server:
      option neos_server 'neos-server.org:3333';
    • Optional: Jobs can be submitted as an authenticated user by specifying your NEOS website login credentials:
      option neos_username 'your_username'
      option neos_user_password 'your_neos_password'
    • Optional: set solver-specific options in the format of: option SOLVERNAME_options 'your_options', e.g., for CPLEX:
      option cplex_options 'primal mipgap=1e-5 threads=1'.
  3. Submit the job to the NEOS Server by typing solve;.
  4. If you are disconnected from the Kestrel server during your job execution, there are a couple of ways your results can still be retrieved:
    • From the AMPL commandline, type
      option kestrel_options 'job=<jobNumber> password=<password>';
      and then
      solve;
      If your job is still in progress, your AMPL session will resume waiting. Otherwise, your results will be retrieved.
    • Results for your job can be retrieved from the NEOS Server admin page using your <jobNumber> and <password>.
    • Authenticated job submissions can be accessed from NEOS Server - My Jobs page. Your most recent 200 jobs can be accessed without having to keep track of job numbers or job passwords. Note: this link requires an active log-in.

Note: On Windows, you will get an error message that the client requires python24.dll to run. Please ignore this message, since the client can execute without this library.


Guide to Installing and Using the Kestrel GAMS Client

Installing GAMS and Kestrel

To use Kestrel with GAMS, you need to have GAMS 24.8 or newer installed on your local computer. The Kestrel GAMS client is included in the standard GAMS distribution for all supported architectures. For Windows, the necessary Python modules have been packaged with the GAMS/Kestrel solver. For non-Windows, you only need Python version 2.5 or above to be installed on your machine. Starting with GAMS 32, the Kestrel GAMS client uses the Python installation that comes with GAMS so no additional Python installation is required on any platform.

Using Kestrel with GAMS

  1. Develop your model within the GAMS environment.
  2. Create an options file called kestrel.opt.
    • Specify the name of the solver and (optionally) the URL for the NEOS Server.
      	  kestrel_solver <solverName>
                neos_server <hostname>[:port>]
      Example:
      	  kestrel_solver conopt
      	  neos_server neos-server.org:3333
    • Include any solver specific options, e.g., rtmaxj=1e12;
    • Note: If you do not know what solvers are available via Kestrel, omit the solver name and submit the job. The list of enabled solvers will be returned.
    • Optional: Jobs can be submitted as an authenticated user by specifying your NEOS website login credentials:
      	  neos_username 'your_username'
      	  neos_user_password 'your_neos_password'
  3. To run your GAMS/Kestrel job on the command line, set option solver=kestrel and set optfile=1 before the solve statement. The Kestrel solver accepts all model types.
          $onEcho > kestrel.opt
          kestrel_solver conopt
          rtmaxj=1e12
          $offEcho
          option solver=kestrel; mymodel.optFile=1;
          solve mymodel using nlp min obj;
  4. If you are disconnected from the Kestrel server during your job execution, there are a couple of ways your results can still be retrieved:
    • Results for your job can be retrieved from the NEOS Server admin page using your <jobNumber> and <password>.
    • Authenticated job submissions can be accessed from NEOS Server - My Jobs page. Your most recent 200 jobs can be accessed without having to keep track of job numbers or job passwords. Note: this link requires an active log-in.