Switching Within a Modeling Language

How you migrate from a modeling system depends on which modeling system you’re using. With the solver-independent systems — AIMMS, AMPL, GAMS and MPL — migrating is extremely easy: you simply need to install a license, set the solver to Gurobi, and set your parameters, if any.

With the single-solver systems — OPL and Mosel — you will need to migrate your existing model code. Since these are both algebraic modeling languages, this migration is straightforward. You can learn more on our Switching from OPL webpage.


Obtaining a Gurobi License

If you are using AMPL, we can sell you a license or provide an evaluation copy directly. Please contact us to request the license. If you are using AIMMS, GAMS or MPL, you’ll want to contact them directly and ask for a Gurobi License.

Selecting Gurobi as your solver

Depending on the modeling language, you will use either an IDE (AIMMS and MPL) or a change a line in the model file (AMPL and GAMS).

Modeling Language Change Required
AIMMS Select Gurobi via menu: Settings > Solver Confirguation
MPL Add Gurobi via menu: Options > Solver Menu
AMPL In model file, add: option solver gurobi_ampl;
GAMS In program file, add either: Option LP = Gurobi; or Option MIP = Gurobi;

If you do run into any issues or have any questions, we are happy to assist our users via our Support Portal.

Converting parameter settings

The final step is to set the Gurobi parameters. Below is a table with information on where in each modeling language you can go to set the parameters. In addition, our switching from CPLEX™ and switching from XPRESS™ pages contain a detailed list of common parameters used by each of those engines, along with their Gurobi equivalents.

Modeling Language Action Required
AIMMS First, in menu select Settings > Project Options; second, in Option Tree select Specific Solvers > Gurobi then set the parameters via the GUI.
MPL First, in menu select Options > Gurobi Parameters then set the parameters via the GUI
AMPL In model file, add: option gurobi_options 'presolve 2';
GAMS Use command-line flags, options file or IDE


Switching to Gurobi from within a modeling language can be done relatively quickly and with no changes required to your model. If you do run into any issues or have any questions, we are happy to assist our users via our Support Portal.

Commercial License

Commercial Users: Gurobi allows you to try a free, full-featured, commercial evaluation license for 30 days. During that time, you’ll also get:

  • Free benchmarking services
  • Free model tuning services
  • Access to Gurobi’s world-class technical support
  • Two free hours of one-on-one consulting services

Can’t view the form? Please click here to open it in a new window.

Note to Academic Users: Academic users at recognized degree-granting institutions should get a free academic license instead and not a commercial evaluation license.

Evaluation licenses are reserved for our commercial users who first want to verify it fits with their needs.

Students, teachers and researchers can quickly secure a free academic license.

You can get your free license and learn about our academic program here.

Thank you! The information has been submitted successfully.