7. Model Building#

7.1. Supply Editor#

Supply editor menu

There are elements in the Supply database that are rather static relationships between several elements of the network, and therefore atomic operations to enforce such would not make much sense.

To have access to these operations, one can access Menu Polaris → Supply Editor after opening the network, as shown on the imagine to the right.

There are two things to keep in mind before using any of these tools, however:

  • They may take a long time to run, depending on the size of the network

  • Data is deleted at the start of each process (with the exception of Global Geo-Consistency), so stopping said processes will break the supply file as far as Polaris is concerned.

These changes, which may depend on user input for specific parameters, are not expected to be frequent, as most of these changes are necessary when bulk data import is made to the network or new infrastructure (TNC charger stations, transit routes/systems, micromobility docks, etc.) are introduced in the supply.

7.1.1. Global Geo-consistency#

Global Geo-consistency tool

The global-Geo-consistency tool is responsible for rebuilding the spatial references across tables required by Polaris, such as the Zone, link and walk link to which each location is associated.

The user may choose any combination of geo-associations to run, as they are independent processes that will be ran in sequence.

_images/blank.png

7.1.4. Rebuilding the Location_Parking table#

Rebuild Location_Parking tool

The Location_Parking table associates the closest parking facilities to each location.

During the table re-creation process, parking locations are created to coincide with the Location positions every time there is no pre-existing parking facility within the threshold determined by the user, which results in a Parking with potentially as many entries as the Location table. Additionally, parking facilities tagged as corresponding to a specific location are not associated to any other location on the Location_Parking table.

7.1.5. Fixing zones with no locations#

Zone with no locations tool

One of the common issues to prevent Polaris from running successfully is the existence of zones to which no locations are assigned. Although it would be reasonable to expect that the construction of the model would see that this does not happen, it is useful to have a method to quash that problem if it does happen.

In order to make sure the analyst is fully aware of the changes they are making to the supply file, this tool is built as a two-step process:

  1. First the user needs to identify all zones with no locations (which will be selected on the map)

  2. Execute the creation of one location per identified zone

7.2. Import and Export networks#

It is best practice to version controlled Polaris supply models, and therefore there are built-in facilities to import and export supply files from/to text format.

Import/Export menu

7.2.1. Import (load from text)#

Importing Supply files from text requires the user to choose the folder where the supply files are and that there are no file called polaris_network.sqlite in such folder, as that will be the name of the output file.

7.2.2. Import from GMNS#

Before importing networks from GMNS, the user must make sure that all GMNS files are unzipped inside a single folder and named accordingly to the GMNS standard.

After doing that, the user can access the GMNS importer GUI under the Import-Export menu, which will show the menu below.

GMNS importer

Unless otherwise stated, the GMNS projection system will be 4326, while the target/project projection will have to be projected in meters. In doubt, the user can choose 3857 (Pseudo-Mercator).

7.2.3. Export (Dump to text)#

Exporting a supply file requires only that the user chooses a folder to which export all text files to (there are two per table), and the user should be aware that any pre-existing files would be overwritten.

7.2.4. Export to GMNS#

When exporting networks to GMNS, the user must choose the desired projection for the output geographical information, and we recommend using 4326 (WGS84).

The user can access the GMNS exporter GUI under the Import-Export menu, which will show the menu below.

GMNS exporter

7.3. Danger Zone#

Are you sure you want to do this? I would rather you did not.

Danger Zone menu

7.3.1. Adding and removing triggers#

At times, the network triggers may impede more advanced edits to the database, so you can remove the triggers with a single command and, after manipulating your network, re-add those triggers.

Note

The process will fail if you delete tables or fields required by one or more triggers or if your version of the supply database is not the same shipped with the plugin.

Permanent changes to the database structure that require new/changed triggers must be incorporated in the Python library before being incorporated in the plugin.