.. _scenario: ================ Scenario Section ================ Once the project is created and data layers are added, the next step is to define the constraints affecting the location of our infrastructure. These restrictions are specified in the Scenarios. The constraints are defined by: * `Resistance values `_ assigned to each data layer ring (or raster value). Resistance values reflect the relative importance or cost of each spatial element in preventing the infrastructure to be located or crossing the area. * `Key points `_. In every scenario, the start and end points can be different. It is also possible to add intermediate points, to force the routes to pass through them. When the scenario points are set, they will be used instead of the project points. * Routing options. Different `algorithms `_ can be used to calculate the optimal routes. The available algorithms may depend on the company license. Check the documentation to see which one is best for your needs. The Scenario section provides the following options: .. image:: ./images/scenario_panel.png :width: 60% :align: center 1. *Create/Delete* a scenario. The minimum number of scenarios is one, but it is possible to create more and delete the ones we don't need any more. .. image:: ./images/new_scenario.png :width: 40% :align: center 2. To set the data constraints, click on the *Resistance* button. A window pane will open with a table containing all the layers included in the Pathfinder project, split in vector layers and rasters. In the case of vector layers, we can set the resistance value for each ring. To specify a **forbidden area**, use the special value **-999**. .. image:: ./images/resistance_settings.png :width: 80% :align: center .. note:: The scale of integer resistance values is arbitrary. They can range from 0 to 10, from -100 to 100, or any range you find useful. Use negative values in areas where you want to favor the location of the infrastructure. 3. *Settings*. A dockable pane will be shown, to define scenario settings in three different tabs: General, Points and Routing. .. image:: ./images/scenario_settings_all.png :width: 90% :align: center a. *General* parameters, like the scenario name, the `MCDA model `_ , the method to calculate the `corridor `_ and the `length optimization factor `_. b. *Scenario points*. The start and end points can be changed or added here. It is also possible to add intermediated points forcing the corridor and the paths to go through particular locations. Define these points by selecting an ArcGIS layer or drawing on the map. c. *Routing options*. In this tab, users can select the `routing algorithm `_ used to perform the routing calculation, as well as the minimum and maximum distances between the pylons (route nodes). The available routing algorithms may depend on your company license. The most common options are: **Basic algorithm**. The fastest to compute. It generates a single optimal path by finding the least resistance path across the resistance map, therefore, minimizing the total resistance. **Pylon spotting**. It also optimizes the pylon/node location and the angles at those locations. Because of the additional resources required to run this algorithm, it may fail in large projects. We recommend reducing as much as possible the difference between the minimum and the maximum pylon distances. See the algorithms documentation for additional info on its parameters. **Pathfinder explore**. It returns multiple path results, providing more alternative solutions with a fast and lean calculation. See the algorithms documentation for additional info on its parameters. 4. *Layer panel*. This button opens a dockable panel allowing control on the Pathfinder configuration of a selected ArcGIS layer. Two checkboxes can be used to: - Add or remove the layer in the Pathfinder project. - Display the rings set on the map In the case of a vector layer included in the Pathfinder project, users can set the ring sizes and resistance values in this layer panel. .. image:: ./images/layer_pane_display.png :width: 60% :align: center | In the case of a raster layer, users can choose the raster resistance mode and set its parameters. .. image:: ./images/layer_pane_raster_resOpt.png :width: 55% :align: center | 5. *Export or import* a scenario configuration to/from a JSON file. In order to backup or reuse the scenario resistances and settings, these values can be stored and recovered from JSON text files, which can be edited in any standard text editor. Use the Export button to save a JSON file with all the scenario resistances and settings. It is also possible to Import a previously saved or edited JSON to upload its resistance and scenario parameters. After the Import button is used, the new settings will be automatically applied to the Pathfinder project. .. image:: ./images/scenario_panel_export-import.png :width: 55% :align: center If there is a mismatch between the layers in the scenario file and the layers in the Pathfinder project, you may see this error message: .. image:: ./images/scenario_parse_error.png :width: 40% :align: center .. note:: Remember to **apply changes** after any modification. .. include:: footer.rst