7. Model Building#
7.1. Supply Editor#
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#
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.
7.1.2. Breaking long links#
Due to the micro-simulated nature of Polaris, as well as some of the assumptions made during the loading of the demand onto the network, the existence of very long links may create localized distortions that might be difficult to diagnose when running a model.
For this reason, it is recommended that you have no links longer than 1km in your network, and all networks regularly maintained by the team at Argonne already follow this practice.
When building a new network or analyzing the impact of link lengths, however, this tool can be leveraged to enforce a maximum link length in the network by breaking links longer than the desired threshold.
Stopping this tool while it is running might permanently corrupt your network, so it is recommended that you back it up before starting.
7.1.3. Rebuilding the Location_Links table#
The Location_Links table dictates which links can be accessed by each location.
There are two different assumptions that can be used when building this table.
The first is that each location can only access its closest link, in which case the “Multiple Links per location” check box should be left unchecked.
The second possibility is that a location can access up to 4 links (within a distance threshold), such that the links are the closest one, plus three others at 90, 180 and 270 degrees from the direction that connects the location to the closest link.
The latter is the standard assumption.
7.1.4. Rebuilding the Location_Parking table#
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#
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:
First the user needs to identify all zones with no locations (which will be selected on the map)
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.
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.
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.
7.3. Danger Zone#
Are you sure you want to do this? I would rather you did not.
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.