This chapter shows the first steps of how to use GAMS MIRO and how to deploy your own GAMS models. For using this application a few components have to be installed first, see section Installation.
In this and subsequent sections we will mainly deal with the GAMS MIRO base mode. In the base mode, you can supply your models with input data, generate, display and save the results of your optimization as well as compare different scenarios with each other, everything visually supported by various graphic tools. The Hypercube mode will be the subject of an extra section, see here.
IntroductionThis chapter shows the first steps of how to use GAMS MIRO and how to deploy your own GAMS models. For using this application a few components have to be installed first, see section Installation.
In this and subsequent sections we will mainly deal with the GAMS MIRO base mode. In the base mode, you can supply your models with input data, generate, display and save the results of your optimization as well as compare different scenarios with each other, everything visually supported by various graphic tools. The Hypercube mode will be the subject of an extra section, see here.
To get a feeling for the use of GAMS MIRO, it is recommended to have a look at the demo applications first. They can be found in the GAMS data utilities library. You can get them e.g. in GAMS Studio via GAMS -> Model Library Explorer or via Shortcut F6. You can also find those demo applications here.
In order to use the GAMS MIRO BETA version, a special installation is necessary. Until an official release of GAMS MIRO, the demo models will only be available via this special version in the data utilities library.
The following demos are available:
The well-known model from the GAMS model library is called trnsport. To avoid two models of the same name, the GAMS MIRO Demo model is called transport.
![]()
or using the command prompt:
cd path/to/model && gams transport.gms miro=launch
Note: To use the command prompt, GAMS must be included in the PATH environment variable of your operating system!
If you run a model with "miro=launch", all required R packages will be loaded. When you start the application for the first time, the packages are installed. This may take a while.
Some of the example models included in the GAMS MIRO installation require additional Python packages (this is not true for the beta version of GAMS MIRO). If you want to use any of these models, you may need to install them first: from the command line navigate to your GAMS installation folder and then to the subfolder: GMSPython\Scripts (e.g.: cd C:\GAMS\win64\26.0\GMSPython\Scripts). To install the respective package, enter: pip install <package_name>. Below you find a table with the python packages required by the different example models.
Demo ApplicationPython packagesLet's take the famous trnsport example from George Dantzig to guide us throgh this documentation: We own a bunch of factories and wish to find a least cost shipping schedule that meets the demand at markets we are shipping to. Furthermore, the capacity constraints of our factories must not be violated. In order to launch the MIRO app for this model, we open the transport.gms file in GAMS Studio and run it with the GAMS command line parameter miro=launch.
Once all the packages have been loaded, the MIRO app will start. Below you see the input mask as it appears after the launch.

The screen is essentially divided into two parts:
Navigation bar:
On the left side you can find the navigation bar. Here you can navigate between the different views:
In addition, the buttons for loading input data and for starting a GAMS run are located here:
The main window always displays the content of the section selected by the user in the navigation bar. Here, for example, data is visualized, scenarios are compared and analyses are carried out.
Besides navigation bar and main window, some important functions are accessible via the header bar:
There are several ways to use GAMS MIRO. However, a typical workflow could look like this:
A GAMS MIRO app is quite useful if there is data to be visualized, e.g. as tables, diagrams or other graphics. This applies to output data as well as input data. Input data which should be visualized in MIRO can be (re-)imported either from existing scenarios in the database or locally via an Excel spreadsheet. To import such data, click on the Load data button in the navigation bar. The following window pops up:


You can decide whether you want to import an existing scenario from the database or load a spreadsheet from your local computer. When you start a GAMS MIRO app for a specific GAMS model for the first time, there is no data in the database yet, so you should start with a local file. For the model shown here, there is an Excel spreadsheet in the directory from which the model was started, e.g. in C:\Users\<user_Name>\Documents\GAMSStudio\workspace\transport.xlsx.
Every time you start a MIRO app, an Excel spreadsheet is created in the directory of the executed model. This file contains data extracted from the GAMS model.
To load the Excel spreadsheet select the menu item Local and click on browse. Navigate to the directory of the currently running app and select the spreadsheet. Now assign a name for the new scenario and confirm the data import with a click on import. A new (currently still unsaved) scenario is now created under the name specified.
Instead of the whole spreadsheet you can also load individual symbols of your input data. For this click on Manually choose datasets and select the desired symbols to be imported from the selected spreadsheet. The other data remain unchanged.
Besides the local and the database import there is the third option: "Hypercube". This tab allows you to import scenarios that have been generated and saved in the Hypercube mode. Since Hypercube scenarios are identified by their hash value (read more about this here) and not by a user-defined name like in base mode, you need to import them differently.
run will also be saved and can be accessed when re-loading the corresponding scenario.
扫码加好友,拉您进群



收藏
