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.
AMPL supports multiple usage modes for the Kestrel interface to the NEOS Server, allowing users to solve models remotely without installing solvers locally:
# Install Python API for AMPL: $ python -m pip install amplpy --upgrade # Install AMPL & solver modules: $ python -m amplpy.modules install gokestrel # install Kestrel # Activate your license (e.g., free https://ampl.com/start-free-now/): $ python -m amplpy.modules activate <your-license-uuid>
How to use:
# Submit and solve a model on NEOS using Kestrel in Python (amplpy) from amplpy import AMPL ampl = AMPL() # ... read/define model and data ... # Select Kestrel (NEOS) and choose a remote solver ampl.set_option("solver", "kestrel") ampl.set_option("kestrel_options", "solver=cplex") ampl.set_option("cplex_options", "outlev=2") # Optional: pass solver-specific options through Kestrel ampl.set_option("email", "neos@ampl.com") # Optional: email notification from NEOS ampl.solve() # Solve the problem
# ... read/define model and data ... ampl: option solver kestrel; # Select Kestrel (NEOS) as the solver ampl: option kestrel_options 'solver=cplex'; # Choose the remote solver on NEOS ampl: option cplex_options 'outlev=2'; # Optional: solver-specific options (example for CPLEX) ampl: option email "neos@ampl.com"; # Optional: NEOS email notification ampl: solve; # Solve the problem
Complete documentation — including installation, configuration, supported solvers, and AMPL/Python/API examples — is available at https://dev.ampl.com/solvers/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.
kestrel.opt.
kestrel_solver <solverName>
neos_server <hostname>[:port>]
Example:
kestrel_solver conopt neos_server neos-server.org:3333
rtmaxj=1e12;neos_username 'your_username' neos_user_password 'your_neos_password'
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;
<jobNumber>
and <password>.