Running a model scenario

10. Running a model scenario#

QPolaris allows you to edit the parameters for a model and trigger the simulation from within QGIS, allowing for a zero-code interface to modeling with Polaris. However, this is not the preferred way to run Polaris models, as many of the tools available for customizing model runs, such as changing model parameters between iterations or computing bespoke statistics as the model runs are available only when running the model from Python.

10.1. Parameters files#

Before running a model, the user can open and edit all parameter files used in Polaris.

The interface provided is also a convenient way for new users to browse through Polaris’ parameter levers, as it could be inconvenient to browse through large json or yaml files, Polaris standard formats for model parameters.

Parameters menu

This menu is only available when a model is open, and it loads the top combo-box with the list of all files found in the ROOT of the model folder, while the “open external editor” opens the chosen file in the user’s designated editor for that file type (json or yaml). We recommend Notepad++ or VSCode to be set as default for editing these files.

List of editable files

There are two available views for parameter files, which are available through the tabs Tree View and Text view (circled in red), although only the Tree view has search capability (highlighted in green below).

Parameter views

The tree view shown below is also substantially more convenient for exploring values.

Parameters tree view

The tree view shown below may be more convenient in rare cases.

Parameters tree view

All values edited in one view are automatically transferred to the other view and the user can save its edits from any view. Invalid JSON will result in an error and will not affect the files on disk.

10.2. Running the model#

Running the model consists simply of selecting the “Run Model” from QPolaris panel and pressing the “Run model” button on the interface.

Currently, all run options are configured through the config file convergence_control.yaml Please set your desired number of iterations and other options there, then press the Run button to start.

model run main screen

After pressing the button, the screen will switch to another mode with two separate progress bars, one for the iterations being run and a second for the evolution of the current iteration as a fraction of the simulation day.

Running a model

The progress screen will, also display the last progress message available from the log file.

Note

UPDATES are infrequent, taking up to several minutes for large models

Note

QGIS will close itself after Polaris finishes the model run.