Running a Solver


Solve your optimization problems locally (via the glpsol command) or remotely (via the ampl or neos commands). There are important differences between these commands, which are explained below.

1. Run a solver on your browser

Use the glpsol command line to solve your model locally. GLPSOL is a large-scale linear and mixed integer programming solver built on top of the GLPK package. Using the WebAssembly technology, we are able to provide a way for you to run GLPSOL locally, directly from your browser. If you decide to use GLPSOL, keep in mind that:
  • GLPSOL requires the input files to be written in the GNU MathProg language (GMPL), which is a subset of the AMPL language. This means that most AMPL commands will work, but not all.
  • GLPSOL accepts only 2 input files: model and data. You will not be able to have a separate commands file like in the remote solving commands. Instead, put your solve, print and display commands at the end of your model file.
  • GLPSOL will use the CPU and memory from your machine. If your model is too large, we recommend you to use one of the remote execution options.

2. Run a solver on NEOS

Use the neos command line to solve your model on NEOS. NEOS is a free internet-based service for solving numerical optimization problems. Hosted by the Wisconsin Institutes of Discovery at the University of Wisconsin in Madison, the NEOS Server provides access to more than 60 state-of-the-art solvers in more than a dozen optimization categories. If you decide to use NEOS, keep in mind that:
  • NEOS accepts at most 3 files: model, data and commands.
  • NEOS renames your files internally, so if your program tries to read other files with model file_name;, data file_name; or include file_name; it will fail.
  • NEOS does not accept binary files, such as spreadsheets (.xlsx).
  • NEOS requires you to select a solver before-hand, without calling option solver solver_name in the commands file. Use the --solver command line option instead.
  • If you expect your job to take more than 5 minutes to complete, you must use the --priority long command line option. However, long jobs are not streamed, i.e., you will have to wait for the job to finish in order to see its output.
  • Some AMPL commands, such as shell and read <-, are disabled.
  • You can specify an email address to receive the job results when it is done. This is recommended especially if you are running long jobs. Use the --email command line option.

3. Run a solver on a PIFOP Optimization Server

Use the ampl command line to solve your model on a PIFOP Optimization Server. This command will execute the AMPL interpreter on the selected Optimization Server with all the files and options you pass to it. If you decide to use this option, keep in mind that:
  • This feature is not available for users in the free tier.
  • PIFOP does not provide Optimization Servers. To use an Optimization Server you need to either 1) host an optimization server yourself or 2) be allowed to use an Optimization Server hosted by someone else.
  • Files created during execution are not returned to the user, so print your results directly to the terminal.
  • Do not rely on the read <- command to set values for your parameters. During execution the terminal will be locked for input and will only be unlocked once the process is finished.
  • The time used by the process is limited in two ways. First, there is the limit that applies to all users of a particular optimization server due to restrictions of its owner account. Second, there is the limit that applies to a particular group of users due to restrictions set by the owner of the optimization server. Click here to learn more about account limits.
  • The memory used by a process will not exceed the limit set by the owner of the optimization server.

TIP: Use the Command Line Helper to compose a command line through a graphical interface.


TIP: When typing a command in the terminal, use the Up and Down arrow keys to navigate through the terminal input history instead of retyping a previously entered command. And use the Repeat Last Command button located just above the terminal. to re-enter the most recent command.