We have seen how to setup the parameters of one scenario in the project, defining the constraints for the route optimization calculation.
However, the users normally create multiple scenarios with different parameters to compare the results of different criteria or different start/end points.
Users with an administrator or editor rol can define new scenarios or modify their existing ones. However, viewer users can only access shared scenarios. They can’t create new ones or modify any of them.
Scenarios and Projects¶
Each scenario in the project contains an assignation of resistances to the project layers and weights for the categories where layers are grouped. In addition, the scenario contains other settings like key points, cost calculation factors, etc.
A project may contain multiple scenarios, each of them with different settings, but only one of them is the active scenario. Changes applied to layer resistances, category weights and other settings, as well as the result calculations and analysis charts, all operate on the active scenario.
Because it may be interesting to keep scenario settings to be reused in multiple projects sharing the same layers and categories (for instance, projects for different areas in the same country), scenarios can be stored or copied to be reused.
Scenarios are independent and private to each user, unless they are copied or shared.
Create New Scenario¶
Except in the case of viewer users, there is always one default scenario in the project.
However, if we are a viewer user or we want to try multiple scenarios with different settings, we need to explicitly add more scenarios to our project.
A new scenario can be created or imported by using the Scenario/New Scenario menu option.
It can also be created by using the corresponding button in the Right Panel header.
In either case, the Add Scenario dialog will popup.
This dialog offers three ways to add a new scenario to the project:
By importing a saved scenario file:
The new scenario will become the new active escenario.
Select the Active Scenario¶
As mentioned, any changes in the layer resistance assignation, category weights and other settings, or the result calculations, operate on the active scenario, which is highlighted in the Scenario Selector and also in the Results section of the Right Panel with a different color.
To change the active scenario, the user can pick it directly in the Scenario Selector:
Or use the Scenario/Select Scenario menu option:
And pick the scenario from the following dialog:
To change the name of a scenario, double click on it and type the new name, finishing with the Enter key.
Scenarios can be removed from the project if we discard them as a viable option or have no more use for them.
The removal can be invoked from the top menu:
In both cases, a dialog will appear to select which scenario to remove from the project:
Direct removal is possible by clicking on the trash icon in the Scenario Selector:
In both cases, a confirmation dialog will pop up:
As with other delete operations in Pathfinder, scenario removal cannot be undone. The Results associated to the deleted scenario will be removed permanently.
Reusing and Sharing Scenarios¶
Because users and organizations invest time and effort in defining the scenario parameters (resistances, costs), it makes sense to reuse them as much as possible in different projects and scenarios belonging to different users.
Another reason for sharing scenarios is to allow other users to see our results without the need to recalculate them in their own scenarios, for instance, for public discussion purposes. Viewer users can only access shared scenarios created by other users, and will not be able to modify them.
There are three options to share scenarios, which we detail below:
Save them in the Scenario Catalog, so they are visible to all users of the company, who can import them from the catalog.
This method can be used to share scenario settings in the same project and among different projects, as long as the projects have layers created from the same base datasets and use the same ring settings. Otherwise, the results of importing the scenario from the catalog might not be correct.
Save them to Scenario Files which can be imported later.
This method is meant to be used as a backup for scenario settings, or to share scenario settings among different users of the same project.
Mark the scenario as shared in a project so other users can open it and display the results, but not change it.
This method also works only in the same project.
In some cases it may be convenient to reuse the same scenario in different projects. For instance, if our company operates in different areas of the same country, using the same base datasets and constraints, it’s a good idea to save the scenario settings to be assigned later to other projects.
It is common that different public organizations have their own route analysis methodology and constraint preferences. In that case, it is convenient to store specific scenarios for each one to reuse in multiple projects.
The active scenario can be saved from the corresponding Scenario header button:
And give it a name in the catalog:
Another button in the Scenario header allows us to load a scenario from the catalog.
Beware that the current scenario values and settings will be overwritten in this operation. Create a new scenario or save the settings in the catalog or as an external file if you need to preserve them.
After loading the new scenario, a dialog will confirm which settings could be applied successfully to the project. It is possible that some layers, categories or settings were not applied (e.g. resistances for layers which do not exist in the current project):
It is not required for the current project to have the same layers/categories than the scenario we load from the catalog. Those layers/categories which exist in both the project and the scenario will be assigned the saved values.
The Scenario Catalog is shared with all members of your company.
Importing and Exporting Scenarios¶
Another way to share and backup scenario settings is by using the file export and import options of Pathfinder.
This feature is more limited than the Scenario Catalog, because it is used only to backup or share scenarios of a specific project. It can be used to store safety copies of our user scenario parameters (in case we modify something and we want to revert to a previous state) or to share a scenario with other company user working in the same project.
To export the active scenario settings, use the top menu option:
A JSON text file will be downloaded, and it can easily be viewed in text editors:
Scenarios can be imported from files in the same format:
A message will report when the importing is completed.
Unlike loading scenarios from the catalog, loading a scenario from the external file requires the same project configuration. The layers and categories in the project must be the same as when the file was saved, including the ring configuration of layers.
Same as when loading a scenario from the catalog, importing it from a file will not create a new scenario, but overwrite the active one.
As described above, we can also import directly a saved scenario file when we create a new scenario.