GAMS MIRO Desktop is available for Windows, macOS, and Linux.
Welcome to the GAMS MIRO Quick Start Guide. This guide is designed to provide a fast, reliable onboarding path to help you transform your existing GAMS or GAMSPy optimization models into fully functional, interactive web applications.
In the following sections, we will walk you through the essential stages of building your first MIRO app. You will learn how to establish a data contract to seamlessly link your model's inputs and outputs to the MIRO interface, launch your application to immediately interact with your data, and customize the user experience using widgets and charts. Finally, we will cover how to package and deploy your application so it can be easily shared with end users.
This quick start guide covers the most important aspects of MIRO application development. The individual aspects are explained in more detail in corresponding linked chapters.
GAMS MIRO consists of several components that work together to turn GAMS and GAMSPy models into interactive applications. Understanding these components helps clarify how models, user interfaces, and deployment workflows interact during development and operation.
In the simplest setup, all MIRO components run locally on the same machine as GAMS or GAMSPy. This setup is referred to as GAMS MIRO Desktop.
GAMS MIRO Desktop is available for Windows, macOS, and Linux.
The most visible component is the MIRO user interface (MIRO UI). It provides the interactive application shown in the browser, where users can:
The GAMS/MIRO connector is responsible for the communication between the optimization model and the MIRO interface. It manages the MIRO data contract and transfers model input and output data between GAMS or GAMSPy and the MIRO application.
Locally deployed MIRO applications are managed through the MIRO Desktop Library. It acts as a central launcher for installed applications and also provides access to global settings such as language preferences, paths, and browser configuration.
Besides local desktop usage, MIRO applications can also be deployed in centralized cloud and enterprise environments using GAMS MIRO Server. In this setup, applications are hosted on a server and accessed directly through the browser, eliminating the need for local deployment on end-user machines. Optimization jobs are executed by GAMS Engine, which acts as the scalable backend infrastructure for MIRO Server and provides enterprise-grade job scheduling, execution, and user management capabilities.
Download and install GAMS MIRO Desktop. After installation, make sure that MIRO and your modeling environment know about each other.
If you work with GAMS Studio, go to File → Settings → Remote and check whether the MIRO installation location is correct.
On the MIRO side, open MIRO Desktop and go to Preferences → Paths. Ensure that the location of the correct GAMS version is specified. Restart MIRO if you change the path.
If MIRO is installed in one of the standard locations on Windows or macOS, GAMSPy usually detects it automatically. On Linux or when using a custom installation location, set the MIRO_PATH environment variable to the path of your MIRO executable. Alternatively, pass the path each time you call the GAMSPy CLI using the --path argument.
Typical executable paths are C:\Program Files\GAMS MIRO\GAMS MIRO.exe on Windows, /Applications/GAMS MIRO.app on macOS, /usr/bin/com.gams.miro on Debian/Ubuntu if installed via a .deb file, or an AppImage path such as ~/GAMS-MIRO-2.9.0.AppImage on other Linux distributions.
On the MIRO side, open MIRO Desktop and go to Preferences → Paths. Ensure that the location of the correct Python version, i.e. the environment in which GAMSPy is installed, is specified.
For GAMS-based MIRO applications, ensure that your license includes the GAMS MIRO connector. You can check this using the Licensing dialog in GAMS Studio.
No separate MIRO connector license is required when using GAMSPy. MIRO support is built into GAMSPy and is available with a valid GAMSPy license.
To install a GAMS license, use one of the following methods:
Once your environment is set up, there are several ways to start working with GAMS MIRO:
Alternatively:
Demo applications are a useful way to explore MIRO before building an app from scratch. They are also helpful reference projects because they show how the data contract, app configuration, and model execution fit together.
To work with the GAMS demo applications outside the MIRO Library, download the demo applications here, unzip the archive, and place the extracted miro_lib folder in your user model library directory. In GAMS Studio, you can find this directory under File → Settings → Misc. → user model library.
Then open GAMS → Model Library Explorer in GAMS Studio and select GAMS MIRO model collection. From the command line, you can access an app with:
To work with the GAMSPy demo applications, download the demo applications here and unzip the archive. The apps are located in the miro_lib_gamspy directory and can be launched directly with the GAMSPy CLI.
Before you can launch a model as a MIRO application, the model must define which symbols (sets, parameters, variables, or equations) should be available as inputs and outputs in the MIRO interface. This connection between the model and MIRO is called the "Data Contract". Symbols that are not part of the data contract are not shown in the app.
In our example we use the classic
transportation problem
from the GAMS model library. The only thing we
have to do in the model is to tell MIRO which
symbols we want to see in the application. We do
this by wrapping the corresponding
symbol declarations with the tags
$onExternalInput
/
$offExternalInput
for input data and
$onExternalOutput
/
$offExternalOutput
for output data. These tags can be used multiple
times within a model. Symbols which are not
tagged won’t be visible in MIRO.
Set
i 'canning plants' / seattle, san-diego /
j 'markets' / new-york, chicago, topeka /
;
$onExternalInput
Parameter
a(i) 'capacity of plant i in cases'
/ seattle 350
san-diego 600 /
b(j) 'demand at market j in cases'
/ new-york 325
chicago 300
topeka 275 /;
Table d(i,j) 'distance in thousands of miles'
new-york chicago topeka
seattle 2.5 1.7 1.8
san-diego 2.5 1.8 1.4
;
Scalar f 'freight in dollars per case per thousand miles' / 90 /;
$offExternalInput
Parameter c(i,j) 'transport cost in thousands of dollars per case';
c(i,j) = f*d(i,j)/1000;
$onExternalOutput
Variable
x(i,j) 'shipment quantities in cases'
z 'total transportation costs in thousands of dollars'
;
$offExternalOutput
Positive Variable x;
Equation
cost 'define objective function'
supply(i) 'observe supply limit at plant i'
demand(j) 'satisfy demand at market j';
cost.. z =e= sum((i,j), c(i,j)*x(i,j));
supply(i).. sum(j, x(i,j)) =l= a(i);
demand(j).. sum(i, x(i,j)) =g= b(j);
Model transport / all /;
solve transport using lp minimizing z;
display x.l, x.m;
In our example we use the classic transportation problem. All you need to do to use your GAMSPy models in GAMS MIRO is to annotate your MIRO input and output symbols. For example, the following code snippet declares symbol d as a MIRO input and symbol x as a MIRO output:
...
...
data preparation
...
...
a = Parameter(m, name="a", domain=[i], records=capacities)
b = Parameter(m, name="b", domain=[j], records=demands)
d = Parameter(m, name="d", domain=[i, j], records=distances, is_miro_input=True)
x = Variable(m, name="x", domain=[i, j], type="Positive", is_miro_output=True)
...
...
model.solve()
Symbols which are not annotated won't be visible in MIRO.
Once your model is prepared for MIRO, continue with the next step and launch it in Base Mode to verify that the app starts correctly.
After launching MIRO for the first time, all selected symbols are automatically available in tabular form. Even without additional configuration, you can already:
The complete workflow for preparing a model for MIRO, including detailed examples for GAMS and GAMSPy, is described here.
Run the model in MIRO Base Mode to verify that your data contract works and generates a default interface.
In GAMS Studio, open the model and choose Run Base Mode from the MIRO menu.
If you start MIRO via GAMS Studio, make sure that the model file you want to run is marked as the main file in the corresponding project group. If needed, right-click the file in the project explorer and select set as main file.
After you mark your miro symbols with is_miro_input and is_miro_output, you can run MIRO. Navigate to your model directory and launch MIRO from the command line:
You can omit --path if MIRO is installed in one of the standard locations on Windows or macOS, or if you configured the MIRO_PATH environment variable.
MIRO Base Mode will open. You will see an interactive interface where you can load input data, click "Solve model," and examine the outputs.
GAMS Studio and the GAMSPy CLI can start MIRO without executing the model first. This can be helpful for large models, but it should be used with caution: if model execution is skipped, the GAMS/MIRO data contract is not created or refreshed. Changes to MIRO input or output symbols are therefore not communicated to MIRO.
For long-running GAMS models, consider compiling the model instead of skipping execution completely. You can use the GAMS option a=c to update the data contract without solving the model. In this case, a new default scenario is created with input data only.
Use this option only if the current data contract is already up to date.
After launching an app, the MIRO interface is divided into a navigation bar and a main window. The navigation bar lets you switch between the main app views and trigger common actions such as loading data or solving the model.
The navigation bar provides access to the main views of a MIRO application:
The navigation bar also contains the main action buttons:
The main window displays the content of the selected view. Depending on the app configuration, this can include input widgets, output charts, scenario comparisons, logs, or a README section shown to users.
Additional functions are available in the header bar:
Take a look at Working with GAMS MIRO or our fact sheets to get to know the MIRO interface and its components better.
The default interface is fully functional, but you can enhance it by assigning widgets (sliders, drop-downs), defining charts, and setting global options. Read about the app configuration in detail here.
You will enter a configuration screen. Any change you save (e.g., turning a scalar input into a slider, or configuring a default Pivot chart) is automatically written to a <modelname>.json file in your model's conf_<modelname> directory.
When the MIRO app is completely configured, i.e. all graphics have been created, options have been set and adjustments have been made, the app can be packaged into a .miroapp file so that it can be easily shared and used in the daily business of your end users. No further changes to the model or the configuration can be made once it is deployed.
Deploying MIRO applications can be done directly from within GAMS Studio. In the MIRO menu, select Assembly and Deploy. In the dialog that opens, you first need to specify which files belong to your model. These are the main model file and all other files that are used by the model during a model run. Select all relevant files in the file selection window and click 'Create'. The information is then stored in the model assembly file. Optionally, you can Choose your execution environment (e.g., Single-user or Multi-user) and then click Deploy. See Deployment for more information.
To deploy a GAMSPy MIRO app, you first need to specify which files belong to your model. These are the main model file and all other files that are used by the model during a model run. Read more about this here. Once the model assembly file has been created, you can package all model files together with the app configuration into an app bundle. For this, run the GAMSPy command-line utility with --mode=deploy:
The result is a single .miroapp file which can be sent to the end user(s) of the application.
A <modelname>.miroapp file is created. Users can install it simply by double-clicking the file or by dragging and dropping it into their MIRO Desktop library.
This quick start guide covers the essential workflow for building and deploying a MIRO application. The following resources provide more detailed information about specific topics: