We recommend that you read the Overview of the Job Submission Process to learn about the steps involved in submitting a job to NEOS. Here, we describe the various methods to access the NEOS Server.
The NEOS Server can be utilized in a number of ways:
The web interface is recommended to those who are new to NEOS. Users should pick an appropriate solver and input format for their optimization problem. Not all input formats are available to every solver so check the list of solvers to make sure an appropriate format is chosen.
Once a solver and input format are chosen, the user should prepare the required files for their optimization problem. After the files are prepared, the user should navigate to the appropriate page on the NEOS server for the chosen solver and input format. The user then uploads the required files to the server and submits the problem.
After submitting the problem, the user is routed to a webpage where the assigned job number and password is displayed, along with the current NEOS job queue. The submitted problem should be listed in the queue. Take note of the job number and password as they allow the user to access the job results.
The page will reload in a few minutes - if the problem is solved within this time, results will be streamed to the page. Otherwise, the results are not streamed and the user will have to access the results via the Job Admin page using their job number and password. More information about job priorities, output streaming, and retrieving results can be found on the NEOS Server FAQ.
It is recommend that the user provide an email address on submission because the NEOS Server will notify you via email when the job terminates.
All optimization problems and files submitted to the NEOS Server are packaged as an XML file. This process is done internally if the web interface is used. Users can choose the "Dry Run" option on the web interface to see the XML format of their problem. Alternatively, click on "XML-RPC" in the top-right corner of any NEOS solver's webpage to see the XML template for that solver.
When the user assembles an optimization problem into XML format for the NEOS Server, the job can be sent to the server via the NEOS PythonClient.
The following is an example of a job submitted to Ipopt in AMPL format for XML-RPC:
<MyProblem> <category>nco</category> <solver>Ipopt</solver> <inputType>AMPL</inputType> <priority>long</priority> <email></email> <model><![CDATA[ .... ]]></model> <data><![CDATA[ .... ]]></data> <commands><![CDATA[ .... ]]></commands> <comments><![CDATA[ .... ]]></comments> </MyProblem>
with the AMPL model, data and commands inserted appropriately.
If the file 'myProblem.xml' contains your XML-formatted optimization problem, the file can be sent to the NEOS server with the following command:
python NeosClient.py myProblem.xml
Authenticated NEOS users can use the following command
python NeosClient.py myProblem.xml --username NeosFan --password secretpassword
(with appropriate username and password values) to send the job as an authenticated submission.
Users can also check the Job Queue with the following command:
python NeosClient.py queue
A description of all NEOS Python/XML-RPC functions is available:
In particular, a user can retrieve the XML template for a given and input format by calling the function
getSolverTemplate. These functions can be used to create new clients to the NEOS Server.
The NEOS Server can be accessed remotely from a locally-installed AMPL or GAMS modeling environment via the Kestrel interface. Please see this page for Information on how to use Kestrel.
A third-party Julia interface to the NEOS Server written by Oscar Dowson is available. Currently, the interface is supported in Julia v0.6 only. The NEOS.jl package allows users to submit XML-formatted jobs as in the Python/XMl-RPC interface described above. Furthermore, the package is integrated with JuMP, the modeling language for mathematical optimization in Julia, allowing users to formulate optimization problems in JuMP that can be sent to solvers on the NEOS Server. Currently, only a select number of solvers are supported: CPLEX, Mosek, Symphony, and Xpress.
The following is a simple example of using the CPLEX solver on NEOS via JuMP:
using JuMP, NEOS m = Model(solver=NEOSSolver(solver=:CPLEX, email="email@example.com")) # Model definition @variable(m, 0 <= x <= 2 ) @variable(m, 0 <= y <= 30 ) @objective(m, Max, 5x + 3*y ) @constraint(m, 1x + 5y <= 3.0 ) status = solve(m)
Note that an email is required for solvers CPLEX and Xpress.
Further information on Julia and JuMP can be found:
The NEOS team thanks Oscar Dowson for providing this interface!
Pyomo is a Python-based open-source software package that supports a diverse set of optimization capabilities for formulating, solving, and analyzing optimization models. Pyomo supports a wide range of problem types and can hook into solvers available on the NEOS server.
Pyomo can be installed via pip with the command
pip install pyomo. No additional packages are required for NEOS support. Users can then model optimization problems using the Pyomo modeling language and pass the problem to solvers on NEOS. The following is an example of calling
CPLEX on the NEOS server:
from pyomo import environ as pym # formulate optimization model model = ... solver_manager = pym.SolverManagerFactory('neos') results = solver_manager.solve(model, opt='cplex')
Solver can also be set at the command line. If
myModel.py is a file containing the Pyomo model only, then the command
pyomo solve --solver=cplex --solver-manager=neos myModel.py
will send your model to
CPLEX on the NEOS solver.
Further information on Pyomo can be found:
Solvers on the NEOS Server can be accessed via COIN-OR's OpenSolver, an Excel add-in package. OpenSolver allows access to optimization solvers within a spreadsheet environment.
More information on the NEOS/OpenSolver integration can be found on this page.
SolverStudio is another add-in for Excel that allows the user to build and solve optimization models in Excel using a number of modeling languages.
Please see SolverStudio & NEOS for more information.