Note
Go to the end to download the full example code.
Forecasting#
In this example, we present a full forecasting workflow for the Sioux Falls example model.
We start creating the skim matrices, running the assignment for the base-year, and then distributing these trips into the network. Later, we estimate a set of future demand vectors which are going to be the input of a future year assignment with select link analysis.
See also
Several functions, methods, classes and modules are used in this example:
aequilibrae.routing.graph()aequilibrae.distribution.ipf()aequilibrae.distribution.gravity_calibration()aequilibrae.distribution.gravity_application()aequilibrae.distribution.synthetic_gravity_model()
# Imports
from os.path import join
from tempfile import gettempdir
from uuid import uuid4
import pandas as pd
from aequilibrae.examples import create_example
from aequilibrae.utils import basic_config
# We create the example project inside our temp folder
fldr = join(gettempdir(), uuid4().hex)
project = create_example(fldr)
fldr
'/tmp/cbeaa4cdb1934db0995dce52eebe6317'
# We'll also apply a basic logging configuration.
basic_config()
project.parameters
{'run': {'example_function_with_kwargs': {'arg1': 'parameters.yml argument'}, 'matrix_summary': None, 'graph_summary': None, 'results_summary': None}, 'assignment': {'equilibrium': {'maximum_iterations': 250, 'rgap': 0.0001}}, 'vdfs': {'default': 'bpr', 'bpr_sioux_falls': {'function': 'bpr', 'spec': {'alpha': {'fillNA': 0.15, 'bounds': [0, inf]}, 'beta': {'fillNA': 1.0, 'bounds': [0, inf]}}}}, 'distribution': {'gravity': {'max error': 0.0001, 'max iterations': 100, 'max trip length': -1}, 'ipf': {'balancing tolerance': 0.001, 'convergence level': 0.0001, 'max iterations': 5000}}, 'network': {'links': {'fields': {'one-way': [{'link_id': {'description': 'Link ID. THIS FIELD CANNOT BE CHANGED', 'type': 'integer'}}, {'a_node': {'description': 'Node of origin of the link. THIS FIELD CANNOT BE CHANGED', 'type': 'integer'}}, {'b_node': {'description': 'Node of destinaiton of the link. THIS FIELD CANNOT BE CHANGED', 'type': 'integer'}}, {'direction': {'description': 'Direction of the link. THIS FIELD CANNOT BE CHANGED', 'type': 'integer'}}, {'distance': {'description': 'Length in meters for the link. THIS FIELD CANNOT BE CHANGED', 'type': 'numeric'}}, {'modes': {'description': 'Set of modes allowed in this link. THIS FIELD CANNOT BE CHANGED', 'type': 'text'}}, {'link_type': {'description': 'Classification of link (local, arterial, etc). THIS FIELD CANNOT BE CHANGED', 'osm_source': 'highway', 'type': 'varchar'}}, {'name': {'description': 'name', 'osm_source': 'name', 'type': 'text'}}], 'two-way': [{'lanes': {'description': 'lanes', 'osm_behaviour': 'divide', 'osm_source': 'lanes', 'type': 'integer'}}, {'capacity': {'description': 'capacity', 'type': 'numeric'}}, {'speed': {'description': 'speed', 'osm_behaviour': 'copy', 'osm_source': 'maxspeed', 'type': 'numeric'}}]}, 'link_types': [{'centroid_connector': {'description': 'VIRTUAL centroid connectors only', 'lane_capacity': 10000, 'lanes': 10, 'link_type_id': 'z'}}, {'default': {'description': 'Default link type. Due to lack of information', 'lane_capacity': 900, 'lanes': 2, 'link_type_id': 'y'}}]}, 'modes': [{'car': {'description': 'All motorized vehicles', 'letter': 'c'}}, {'transit': {'description': 'All links capable of supporting transit-vehicles', 'letter': 't'}}, {'walk': {'description': 'Linkes where walking is permitted', 'letter': 'w'}}, {'bicycle': {'description': 'All Bicycles', 'letter': 'b'}}], 'nodes': {'fields': [{'node_id': {'description': 'node_id. THIS FIELD CANNOT BE CHANGED', 'type': 'integer'}}, {'is_centroid': {'description': 'is_centroid', 'type': 'integer'}}]}, 'osm': {'all_link_types': ['secondary_link', 'escalator', 'trail', 'cycleway', 'path', 'trunk_link', 'secondary', 'escape', 'track', 'road', 'motorway_link', 'primary', 'corridor', 'residential', 'footway', 'motorway', 'primary_link', 'unclassified', 'bus_guideway', 'tertiary_link', 'living_street', 'pedestrian', 'bridleway', 'elevator', 'motor', 'trunk', 'tertiary', 'service', 'steps', 'proposed', 'raceway', 'construction', 'abandoned', 'platform', 'unclassified'], 'modes': {'bicycle': {'link_types': ['cycleway', 'corridor', 'pedestrian', 'path', 'track', 'trail', 'unclassified'], 'mode_filter': {'bicycle': 'no'}, 'unknown_tags': True}, 'car': {'link_types': ['motor', 'motorway', 'trunk', 'primary', 'secondary', 'tertiary', 'unclassified', 'residential', 'motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary_link', 'living_street', 'service', 'escape', 'road'], 'mode_filter': {'motor_vehicle': 'no'}, 'unknown_tags': True}, 'transit': {'link_types': ['motor', 'motorway', 'trunk', 'primary', 'secondary', 'tertiary', 'unclassified', 'residential', 'motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary_link', 'living_street', 'service', 'escape', 'road', 'bus_guideway'], 'unknown_tags': True}, 'walk': {'link_types': ['cycleway', 'footway', 'steps', 'corridor', 'pedestrian', 'elevator', 'escalator', 'path', 'track', 'trail', 'bridleway', 'unclassified'], 'mode_filter': {'pedestrian': 'no'}, 'unknown_tags': True}}}, 'gmns': {'critical_dist': 2, 'node': {'equivalency': {'node_id': 'node_id'}, 'fields': {'node_id': {'description': 'Unique key', 'type': 'integer', 'required': True}, 'name': {'description': 'Node name', 'type': 'text', 'required': False}, 'x_coord': {'description': 'Coordinate system specified in GMNS config file', 'type': 'numeric', 'required': True}, 'y_coord': {'description': 'Coordinate system specified in GMNS config file', 'type': 'numeric', 'required': True}, 'z_coord': {'description': 'Altitude in short length units', 'type': 'numeric', 'required': False}, 'node_type': {'description': 'What it represents', 'type': 'text', 'required': False}, 'ctrl_type': {'description': 'From GMNS ControlType_Set', 'type': 'text', 'required': False}, 'zone_id': {'description': 'TAZ or city, or census tract', 'type': 'integer', 'required': False}, 'parent_node_id': {'description': 'The parent of this node', 'type': 'integer', 'required': False}}}, 'link': {'equivalency': {'link_id': 'link_id', 'a_node': 'from_node_id', 'b_node': 'to_node_id', 'direction': 'directed', 'distance': 'length', 'speed': 'free_speed', 'capacity': 'capacity', 'lanes': 'lanes', 'name': 'name', 'link_type': 'facility_type', 'modes': 'allowed_uses', 'geometry': 'geometry'}, 'fields': {'link_id': {'description': 'Primary key', 'type': 'integer', 'required': True}, 'name': {'description': 'Name', 'type': 'text', 'required': False}, 'from_node_id': {'description': 'Foreign key (Nodes table)', 'type': 'integer', 'required': True}, 'to_node_id': {'description': 'Foreign key (Nodes table)', 'type': 'integer', 'required': True}, 'directed': {'description': 'Whether the link is directed (travel only occurs from the from_node to the to_node) or undirected.', 'type': 'integer', 'required': True}, 'dir_flag': {'description': 'Shapepoints direction', 'type': 'integer', 'required': False}, 'length': {'description': 'GMNS length in long_length units', 'type': 'numeric', 'required': False}, 'geometry_id': {'description': 'Foreign key from geometry table', 'type': 'integer', 'required': False}, 'geometry': {'description': 'Link geometry, in well-known text (WKT) format.', 'type': 'text', 'required': False}, 'parent_link_id': {'description': 'The parent of this link', 'type': 'integer', 'required': False}, 'grade': {'description': 'Percent grade of the link', 'type': 'integer', 'required': False}, 'facility_type': {'description': 'Facility type (e.g., freeway, arterial, etc.)', 'type': 'text', 'required': False}, 'capacity': {'description': 'Capacity (veh / hr / lane)', 'type': 'numeric', 'required': False}, 'free_speed': {'description': 'Free flow speed in long_length units per hour', 'type': 'numeric', 'required': False}, 'lanes': {'description': 'Number of lanes in the direction of travel', 'type': 'inetger', 'required': False}, 'bike_facility': {'description': 'Type of bicycle accommodation', 'type': 'text', 'required': False}, 'ped_facility': {'description': 'Type of pedestrian accommodation', 'type': 'text', 'required': False}, 'parking': {'description': 'Type of parking', 'type': 'text', 'required': False}, 'allowed_uses': {'description': 'Set of allowed uses', 'type': 'text', 'required': False}, 'toll': {'description': 'Toll in currency units', 'type': 'numeric', 'required': False}, 'jurisdiction': {'description': 'Owner/operator of the link', 'type': 'text', 'required': False}, 'row_width': {'description': 'Width of the entire right-of-way (both directions)', 'type': 'numeric', 'required': False}}}, 'use_definition': {'fields': {'use': {'description': 'Short name of the vehicle', 'type': 'text', 'required': True}, 'persons_per_vehicle': {'description': 'Average persons per vehicle. Used to compute person-based performance measures (0 for non-travel uses)', 'type': 'numeric', 'required': True}, 'pce': {'description': 'Passenger car equivalents, used for capacity calculations (0 for non-travel uses)', 'type': 'numeric', 'required': True}, 'special_conditions': {'description': 'Treatment of these special conditions may be needed in a future version of GMNS', 'type': 'text', 'required': False}, 'description': {'description': 'A longer description of the mode', 'type': 'text', 'required': False}}, 'equivalency': {'mode_name': 'use'}}}}, 'osm': {'overpass_endpoint': 'http://overpass-api.de/api', 'nominatim_endpoint': 'https://nominatim.openstreetmap.org/', 'accept_language': 'en', 'max_attempts': 50, 'timeout': 540, 'max_query_area_size': 2500000000, 'sleeptime': 10}, 'system': {'cpus': 0, 'default_directory': 'C:\\', 'logging': True, 'logging_directory': '/temp/', 'spatialite_path': 'C:\\mod_spatialite-NG-win-amd64', 'temp directory': '/temp'}}
Traffic assignment with skimming#
In this step, we’ll set the skims for the variable free_flow_time, and execute the
traffic assignment for the base-year.
from dataclasses import replace
from aequilibrae.traffic import TrafficAssignment, TrafficClass, VDF
Let’s get the demand matrix directly from its file, and inspect what matrices we have in the project.
proj_matrices = project.matrices
proj_matrices.get_available_matrices_and_metadata()
{'skims.omx': {'procedure': None, 'procedure_id': None, 'timestamp': None, 'description': 'Example skim'}, 'demand.omx': {'procedure': None, 'procedure_id': None, 'timestamp': '2020-11-24 08:47:18', 'description': 'Original data imported to OMX format'}, 'demand_mc.omx': {'procedure': None, 'procedure_id': None, 'timestamp': '2021-02-24 00:51:35', 'description': None}}
Load the demand matrix core for computation.
demand = proj_matrices.get_matrix("demand.omx", subset=["matrix"])
Let’s perform the traffic assignment
# Create the assignment class
assigclass = TrafficClass(
name="car",
mode="c",
cost="free_flow_time",
demand=demand,
skimming=["free_flow_time", "distance"],
# Every node in Sioux Falls is a centroid, so paths must pass through centroids.
graph_options={"block_centroid_flows": False},
)
from aequilibrae.routing.cython.vdf_core import akcelik, bpr, bpr2, conical, delta_akcelik, delta_bpr, delta_bpr2, delta_conical, delta_inrets, inrets
bpr_spec = {
"alpha": {"fill_NA": 0.15, "bounds": (0.0, float("inf"))},
"beta": {"fill_NA": 4.0, "bounds": (1.0, float("inf"))},
}
vdf = VDF("bpr_example", bpr, bpr_spec, delta_bpr)
# Configure the VDF, network fields, and assignment algorithm.
assig = TrafficAssignment(
network=network,
project=project,
classes=[assigclass],
vdf=vdf,
name_mapping={"alpha": "b", "beta": "power"},
time_field="free_flow_time",
capacity_field="capacity",
algorithm="bfw",
)
assig.execute(max_iterations=1000, rgap=0.001)
Equilibrium Assignment : 0%| | 0/1000 [00:00<?, ?it/s]
All-or-Nothing - Traffic Class: car : 0%| | 1/1000 [00:00<00:00, 31775.03it/s]
Equilibrium Assignment - Iteration: 1/1000 - RGap: inf: 0%| | 1/1000 [00:00<00:00, 1725.34it/s]
Equilibrium Assignment : 0%| | 2/1000 [00:00<00:00, 2982.09it/s]
All-or-Nothing - Traffic Class: car : 0%| | 2/1000 [00:00<00:00, 2669.83it/s]
Equilibrium Assignment - Iteration: 2/1000 - RGap: 0.897805: 0%| | 2/1000 [00:00<00:00, 1168.33it/s]
Equilibrium Assignment : 0%| | 3/1000 [00:00<00:00, 1663.75it/s]
All-or-Nothing - Traffic Class: car : 0%| | 3/1000 [00:00<00:00, 1591.16it/s]
Equilibrium Assignment - Iteration: 3/1000 - RGap: 0.527933: 0%| | 3/1000 [00:00<00:01, 989.30it/s]
Equilibrium Assignment : 0%| | 4/1000 [00:00<00:00, 1275.45it/s]
All-or-Nothing - Traffic Class: car : 0%| | 4/1000 [00:00<00:00, 1247.28it/s]
Equilibrium Assignment - Iteration: 4/1000 - RGap: 0.288744: 0%| | 4/1000 [00:00<00:01, 869.38it/s]
Equilibrium Assignment : 0%| | 5/1000 [00:00<00:00, 1066.22it/s]
All-or-Nothing - Traffic Class: car : 0%| | 5/1000 [00:00<00:00, 1048.47it/s]
Equilibrium Assignment - Iteration: 5/1000 - RGap: 0.196074: 0%| | 5/1000 [00:00<00:01, 803.08it/s]
Equilibrium Assignment : 1%| | 6/1000 [00:00<00:01, 949.83it/s]
All-or-Nothing - Traffic Class: car : 1%| | 6/1000 [00:00<00:01, 938.04it/s]
Equilibrium Assignment - Iteration: 6/1000 - RGap: 0.223256: 1%| | 6/1000 [00:00<00:01, 775.93it/s]
Equilibrium Assignment : 1%| | 7/1000 [00:00<00:01, 894.44it/s]
All-or-Nothing - Traffic Class: car : 1%| | 7/1000 [00:00<00:01, 885.49it/s]
Equilibrium Assignment - Iteration: 7/1000 - RGap: 0.171572: 1%| | 7/1000 [00:00<00:01, 789.06it/s]
Equilibrium Assignment : 1%| | 8/1000 [00:00<00:01, 892.22it/s]
All-or-Nothing - Traffic Class: car : 1%| | 8/1000 [00:00<00:01, 884.06it/s]
Equilibrium Assignment - Iteration: 8/1000 - RGap: 0.0844232: 1%| | 8/1000 [00:00<00:01, 799.20it/s]
Equilibrium Assignment : 1%| | 9/1000 [00:00<00:01, 889.00it/s]
All-or-Nothing - Traffic Class: car : 1%| | 9/1000 [00:00<00:01, 881.61it/s]
Equilibrium Assignment - Iteration: 9/1000 - RGap: 0.0782634: 1%| | 9/1000 [00:00<00:01, 771.30it/s]
Equilibrium Assignment : 1%| | 10/1000 [00:00<00:01, 850.22it/s]
All-or-Nothing - Traffic Class: car : 1%| | 10/1000 [00:00<00:01, 844.59it/s]
Equilibrium Assignment - Iteration: 10/1000 - RGap: 0.0930102: 1%| | 10/1000 [00:00<00:01, 759.30it/s]
Equilibrium Assignment : 1%| | 11/1000 [00:00<00:01, 829.15it/s]
All-or-Nothing - Traffic Class: car : 1%| | 11/1000 [00:00<00:01, 824.16it/s]
Equilibrium Assignment - Iteration: 11/1000 - RGap: 0.0692189: 1%| | 11/1000 [00:00<00:01, 769.52it/s]
Equilibrium Assignment : 1%| | 12/1000 [00:00<00:01, 834.40it/s]
All-or-Nothing - Traffic Class: car : 1%| | 12/1000 [00:00<00:01, 830.01it/s]
Equilibrium Assignment - Iteration: 12/1000 - RGap: 0.0402345: 1%| | 12/1000 [00:00<00:01, 778.69it/s]
Equilibrium Assignment : 1%|▏ | 13/1000 [00:00<00:01, 838.68it/s]
All-or-Nothing - Traffic Class: car : 1%|▏ | 13/1000 [00:00<00:01, 834.13it/s]
Equilibrium Assignment - Iteration: 13/1000 - RGap: 0.0329665: 1%|▏ | 13/1000 [00:00<00:01, 760.44it/s]
Equilibrium Assignment : 1%|▏ | 14/1000 [00:00<00:01, 814.30it/s]
All-or-Nothing - Traffic Class: car : 1%|▏ | 14/1000 [00:00<00:01, 810.42it/s]
Equilibrium Assignment - Iteration: 14/1000 - RGap: 0.0350811: 1%|▏ | 14/1000 [00:00<00:01, 751.87it/s]
Equilibrium Assignment : 2%|▏ | 15/1000 [00:00<00:01, 801.40it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 15/1000 [00:00<00:01, 797.77it/s]
Equilibrium Assignment - Iteration: 15/1000 - RGap: 0.032004: 2%|▏ | 15/1000 [00:00<00:01, 745.08it/s]
Equilibrium Assignment : 2%|▏ | 16/1000 [00:00<00:01, 790.85it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 16/1000 [00:00<00:01, 787.51it/s]
Equilibrium Assignment - Iteration: 16/1000 - RGap: 0.0210404: 2%|▏ | 16/1000 [00:00<00:01, 751.47it/s]
Equilibrium Assignment : 2%|▏ | 17/1000 [00:00<00:01, 794.79it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 17/1000 [00:00<00:01, 791.72it/s]
Equilibrium Assignment - Iteration: 17/1000 - RGap: 0.0129254: 2%|▏ | 17/1000 [00:00<00:01, 758.69it/s]
Equilibrium Assignment : 2%|▏ | 18/1000 [00:00<00:01, 799.98it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 18/1000 [00:00<00:01, 797.30it/s]
Equilibrium Assignment - Iteration: 18/1000 - RGap: 0.012294: 2%|▏ | 18/1000 [00:00<00:01, 752.81it/s]
Equilibrium Assignment : 2%|▏ | 19/1000 [00:00<00:01, 791.24it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 19/1000 [00:00<00:01, 787.72it/s]
Equilibrium Assignment - Iteration: 19/1000 - RGap: 0.0123165: 2%|▏ | 19/1000 [00:00<00:01, 747.06it/s]
Equilibrium Assignment : 2%|▏ | 20/1000 [00:00<00:01, 783.48it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 20/1000 [00:00<00:01, 780.87it/s]
Equilibrium Assignment - Iteration: 20/1000 - RGap: 0.011735: 2%|▏ | 20/1000 [00:00<00:01, 741.73it/s]
Equilibrium Assignment : 2%|▏ | 21/1000 [00:00<00:01, 774.39it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 21/1000 [00:00<00:01, 770.10it/s]
Equilibrium Assignment - Iteration: 21/1000 - RGap: 0.0135925: 2%|▏ | 21/1000 [00:00<00:01, 734.19it/s]
Equilibrium Assignment : 2%|▏ | 22/1000 [00:00<00:01, 766.56it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 22/1000 [00:00<00:01, 764.31it/s]
Equilibrium Assignment - Iteration: 22/1000 - RGap: 0.00994976: 2%|▏ | 22/1000 [00:00<00:01, 738.94it/s]
Equilibrium Assignment : 2%|▏ | 23/1000 [00:00<00:01, 770.05it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 23/1000 [00:00<00:01, 767.78it/s]
Equilibrium Assignment - Iteration: 23/1000 - RGap: 0.00730011: 2%|▏ | 23/1000 [00:00<00:01, 744.07it/s]
Equilibrium Assignment : 2%|▏ | 24/1000 [00:00<00:01, 774.12it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 24/1000 [00:00<00:01, 771.40it/s]
Equilibrium Assignment - Iteration: 24/1000 - RGap: 0.00680425: 2%|▏ | 24/1000 [00:00<00:01, 740.15it/s]
Equilibrium Assignment : 2%|▎ | 25/1000 [00:00<00:01, 768.76it/s]
All-or-Nothing - Traffic Class: car : 2%|▎ | 25/1000 [00:00<00:01, 766.86it/s]
Equilibrium Assignment - Iteration: 25/1000 - RGap: 0.00539346: 2%|▎ | 25/1000 [00:00<00:01, 732.82it/s]
Equilibrium Assignment : 3%|▎ | 26/1000 [00:00<00:01, 759.88it/s]
All-or-Nothing - Traffic Class: car : 3%|▎ | 26/1000 [00:00<00:01, 758.12it/s]
Equilibrium Assignment - Iteration: 26/1000 - RGap: 0.00585136: 3%|▎ | 26/1000 [00:00<00:01, 729.85it/s]
Equilibrium Assignment : 3%|▎ | 27/1000 [00:00<00:01, 755.99it/s]
All-or-Nothing - Traffic Class: car : 3%|▎ | 27/1000 [00:00<00:01, 754.23it/s]
Equilibrium Assignment - Iteration: 27/1000 - RGap: 0.00771341: 3%|▎ | 27/1000 [00:00<00:01, 726.85it/s]
Equilibrium Assignment : 3%|▎ | 28/1000 [00:00<00:01, 751.93it/s]
All-or-Nothing - Traffic Class: car : 3%|▎ | 28/1000 [00:00<00:01, 750.38it/s]
Equilibrium Assignment - Iteration: 28/1000 - RGap: 0.00666555: 3%|▎ | 28/1000 [00:00<00:01, 724.99it/s]
Equilibrium Assignment : 3%|▎ | 29/1000 [00:00<00:01, 748.96it/s]
All-or-Nothing - Traffic Class: car : 3%|▎ | 29/1000 [00:00<00:01, 747.29it/s]
Equilibrium Assignment - Iteration: 29/1000 - RGap: 0.00478169: 3%|▎ | 29/1000 [00:00<00:01, 730.29it/s]
Equilibrium Assignment : 3%|▎ | 30/1000 [00:00<00:01, 753.69it/s]
All-or-Nothing - Traffic Class: car : 3%|▎ | 30/1000 [00:00<00:01, 752.15it/s]
Equilibrium Assignment - Iteration: 30/1000 - RGap: 0.00426152: 3%|▎ | 30/1000 [00:00<00:01, 735.89it/s]
Equilibrium Assignment : 3%|▎ | 31/1000 [00:00<00:01, 758.67it/s]
All-or-Nothing - Traffic Class: car : 3%|▎ | 31/1000 [00:00<00:01, 757.20it/s]
Equilibrium Assignment - Iteration: 31/1000 - RGap: 0.00381267: 3%|▎ | 31/1000 [00:00<00:01, 733.32it/s]
Equilibrium Assignment : 3%|▎ | 32/1000 [00:00<00:01, 755.31it/s]
All-or-Nothing - Traffic Class: car : 3%|▎ | 32/1000 [00:00<00:01, 753.81it/s]
Equilibrium Assignment - Iteration: 32/1000 - RGap: 0.00390184: 3%|▎ | 32/1000 [00:00<00:01, 732.17it/s]
Equilibrium Assignment : 3%|▎ | 33/1000 [00:00<00:01, 753.38it/s]
All-or-Nothing - Traffic Class: car : 3%|▎ | 33/1000 [00:00<00:01, 751.96it/s]
Equilibrium Assignment - Iteration: 33/1000 - RGap: 0.00276918: 3%|▎ | 33/1000 [00:00<00:01, 731.02it/s]
Equilibrium Assignment : 3%|▎ | 34/1000 [00:00<00:01, 751.66it/s]
All-or-Nothing - Traffic Class: car : 3%|▎ | 34/1000 [00:00<00:01, 750.40it/s]
Equilibrium Assignment - Iteration: 34/1000 - RGap: 0.0029226: 3%|▎ | 34/1000 [00:00<00:01, 732.43it/s]
Equilibrium Assignment : 4%|▎ | 35/1000 [00:00<00:01, 752.58it/s]
All-or-Nothing - Traffic Class: car : 4%|▎ | 35/1000 [00:00<00:01, 751.33it/s]
Equilibrium Assignment - Iteration: 35/1000 - RGap: 0.0025376: 4%|▎ | 35/1000 [00:00<00:01, 731.34it/s]
Equilibrium Assignment : 4%|▎ | 36/1000 [00:00<00:01, 750.73it/s]
All-or-Nothing - Traffic Class: car : 4%|▎ | 36/1000 [00:00<00:01, 749.47it/s]
Equilibrium Assignment - Iteration: 36/1000 - RGap: 0.00258702: 4%|▎ | 36/1000 [00:00<00:01, 728.60it/s]
Equilibrium Assignment : 4%|▎ | 37/1000 [00:00<00:01, 747.37it/s]
All-or-Nothing - Traffic Class: car : 4%|▎ | 37/1000 [00:00<00:01, 745.74it/s]
Equilibrium Assignment - Iteration: 37/1000 - RGap: 0.00225626: 4%|▎ | 37/1000 [00:00<00:01, 727.18it/s]
Equilibrium Assignment : 4%|▍ | 38/1000 [00:00<00:01, 745.42it/s]
All-or-Nothing - Traffic Class: car : 4%|▍ | 38/1000 [00:00<00:01, 743.85it/s]
Equilibrium Assignment - Iteration: 38/1000 - RGap: 0.00197123: 4%|▍ | 38/1000 [00:00<00:01, 725.85it/s]
Equilibrium Assignment : 4%|▍ | 39/1000 [00:00<00:01, 743.60it/s]
All-or-Nothing - Traffic Class: car : 4%|▍ | 39/1000 [00:00<00:01, 742.45it/s]
Equilibrium Assignment - Iteration: 39/1000 - RGap: 0.00169449: 4%|▍ | 39/1000 [00:00<00:01, 722.77it/s]
Equilibrium Assignment : 4%|▍ | 40/1000 [00:00<00:01, 740.00it/s]
All-or-Nothing - Traffic Class: car : 4%|▍ | 40/1000 [00:00<00:01, 738.35it/s]
Equilibrium Assignment - Iteration: 40/1000 - RGap: 0.00185543: 4%|▍ | 40/1000 [00:00<00:01, 719.94it/s]
Equilibrium Assignment : 4%|▍ | 41/1000 [00:00<00:01, 736.48it/s]
All-or-Nothing - Traffic Class: car : 4%|▍ | 41/1000 [00:00<00:01, 735.32it/s]
Equilibrium Assignment - Iteration: 41/1000 - RGap: 0.00206881: 4%|▍ | 41/1000 [00:00<00:01, 717.48it/s]
Equilibrium Assignment : 4%|▍ | 42/1000 [00:00<00:01, 733.82it/s]
All-or-Nothing - Traffic Class: car : 4%|▍ | 42/1000 [00:00<00:01, 732.85it/s]
Equilibrium Assignment - Iteration: 42/1000 - RGap: 0.00197741: 4%|▍ | 42/1000 [00:00<00:01, 716.62it/s]
Equilibrium Assignment : 4%|▍ | 43/1000 [00:00<00:01, 732.47it/s]
All-or-Nothing - Traffic Class: car : 4%|▍ | 43/1000 [00:00<00:01, 731.54it/s]
Equilibrium Assignment - Iteration: 43/1000 - RGap: 0.00159214: 4%|▍ | 43/1000 [00:00<00:01, 716.30it/s]
Equilibrium Assignment : 4%|▍ | 44/1000 [00:00<00:01, 731.47it/s]
All-or-Nothing - Traffic Class: car : 4%|▍ | 44/1000 [00:00<00:01, 730.60it/s]
Equilibrium Assignment - Iteration: 44/1000 - RGap: 0.00125555: 4%|▍ | 44/1000 [00:00<00:01, 717.83it/s]
Equilibrium Assignment : 4%|▍ | 45/1000 [00:00<00:01, 733.03it/s]
All-or-Nothing - Traffic Class: car : 4%|▍ | 45/1000 [00:00<00:01, 732.12it/s]
Equilibrium Assignment - Iteration: 45/1000 - RGap: 0.0011702: 4%|▍ | 45/1000 [00:00<00:01, 716.40it/s]
Equilibrium Assignment : 5%|▍ | 46/1000 [00:00<00:01, 731.52it/s]
All-or-Nothing - Traffic Class: car : 5%|▍ | 46/1000 [00:00<00:01, 730.53it/s]
Equilibrium Assignment - Iteration: 46/1000 - RGap: 0.00129903: 5%|▍ | 46/1000 [00:00<00:01, 714.97it/s]
Equilibrium Assignment : 5%|▍ | 47/1000 [00:00<00:01, 729.48it/s]
All-or-Nothing - Traffic Class: car : 5%|▍ | 47/1000 [00:00<00:01, 728.66it/s]
Equilibrium Assignment - Iteration: 47/1000 - RGap: 0.00162518: 5%|▍ | 47/1000 [00:00<00:01, 714.90it/s]
Equilibrium Assignment : 5%|▍ | 48/1000 [00:00<00:01, 729.07it/s]
All-or-Nothing - Traffic Class: car : 5%|▍ | 48/1000 [00:00<00:01, 728.23it/s]
Equilibrium Assignment - Iteration: 48/1000 - RGap: 0.0012404: 5%|▍ | 48/1000 [00:00<00:01, 711.31it/s]
Equilibrium Assignment : 5%|▍ | 49/1000 [00:00<00:01, 725.04it/s]
All-or-Nothing - Traffic Class: car : 5%|▍ | 49/1000 [00:00<00:01, 724.13it/s]
Equilibrium Assignment - Iteration: 49/1000 - RGap: 0.00111975: 5%|▍ | 49/1000 [00:00<00:01, 710.10it/s]
Equilibrium Assignment : 5%|▌ | 50/1000 [00:00<00:01, 723.36it/s]
All-or-Nothing - Traffic Class: car : 5%|▌ | 50/1000 [00:00<00:01, 722.47it/s]
Equilibrium Assignment - Iteration: 50/1000 - RGap: 0.00108492: 5%|▌ | 50/1000 [00:00<00:01, 709.02it/s]
Equilibrium Assignment : 5%|▌ | 51/1000 [00:00<00:01, 722.25it/s]
All-or-Nothing - Traffic Class: car : 5%|▌ | 51/1000 [00:00<00:01, 721.43it/s]
After finishing the assignment, we can easily see the convergence report.
convergence_report = assig.report()
convergence_report.head()
And we can also see the results of the assignment
results = assig.results()
results.head()
We can export our results to CSV or get a Pandas DataFrame, but let’s put it directly into the results database
assig.save_results("base_year_assignment")
ResultRecord(scenario=None, year=None, table_name='base_year_assignment', reference_table='links', procedure='traffic assignment', procedure_id='f8de214a22d74fe791b7615f764e43b8', procedure_report='"{\\"convergence\\": {\\"iteration\\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51], \\"time\\": [0.001556120999794075, 0.0026707989998158155, 0.004030793999845628, 0.005588577999787958, 0.007209629999806566, 0.008731215999887354, 0.009852555999941615, 0.010998441999845454, 0.012651362999804405, 0.014143704999924012, 0.015290742999923168, 0.016391815999895698, 0.01806097700000464, 0.019595827999864923, 0.021101925999801097, 0.022270733999903314, 0.023395160999825748, 0.024887261999992916, 0.0264111829999365, 0.02794236699992325, 0.029595448000009128, 0.03075053099996694, 0.031894824999881166, 0.033412473999987924, 0.03506967199996325, 0.036601938999865524, 0.038077008999835016, 0.0396154759998808, 0.04069873599996754, 0.04174788099999205, 0.043256532999976116, 0.044682741999849895, 0.046100885999976526, 0.04741334199979974, 0.048841734999996333, 0.050386634999995294, 0.05185560299992176, 0.05333198499988612, 0.05494754599999396, 0.056530286999986856, 0.058109970999794314, 0.05958352799984823, 0.0610119709999708, 0.062278942999910214, 0.06376007299991215, 0.06529367199982516, 0.0667242989998158, 0.0682507749997967, 0.06997372599994378, 0.0714878389999285, 0.07224034099999699], \\"rgap\\": [Infinity, 0.89780457879145, 0.5279325275367827, 0.28874383368012313, 0.19607377855371996, 0.22325602275663892, 0.17157154728042692, 0.08442324131581802, 0.07826339212239238, 0.09301015583411931, 0.06921891008667841, 0.040234500847269324, 0.03296645686481366, 0.035081093446416724, 0.03200399984459911, 0.021040384142766117, 0.012925420204469549, 0.012294041013807001, 0.012316538874428259, 0.011735043381187355, 0.013592539642584927, 0.00994976386388666, 0.007300114596153, 0.006804251749703222, 0.005393460474102812, 0.005851357665095232, 0.007713407379077174, 0.006665546808826156, 0.004781690445278009, 0.004261520961977526, 0.0038126726071258076, 0.0039018385989099892, 0.0027691782467265474, 0.002922596383931646, 0.0025376020166008187, 0.0025870156274787927, 0.002256256926787925, 0.0019712280906955966, 0.0016944864716724052, 0.001855434633644199, 0.002068813194238471, 0.0019774079905162064, 0.0015921406213157043, 0.0012555453136291039, 0.0011701957344778826, 0.0012990275462257785, 0.0016251801857951145, 0.0012404030429357153, 0.0011197535305810323, 0.001084921254077063, 0.0008283431216585221], \\"alpha\\": [1.0, 0.32839952448634563, 0.18660240547488702, 0.24114774402917927, 0.8185470737942451, 1.0, 0.16910548905080566, 0.2373694741062248, 0.5860366441988628, 1.0, 0.11507399176716364, 0.15591705624574248, 0.2778261672706741, 0.6208345025526621, 1.0, 0.11598592580715987, 0.1073638625831236, 0.1558846600948632, 0.33733828320278225, 0.5959894379150801, 1.0, 0.07079581621265686, 0.07166629092302472, 0.16836899188970833, 0.17808313987176075, 0.3501427558560422, 0.7043109868542726, 1.0, 0.04490489890507015, 0.07014221441138183, 0.09742344627690626, 0.06258400921325322, 0.06719595392325393, 0.12319408791407051, 0.12906133722764354, 0.08532578952857073, 0.1731558811922753, 0.15293940408908577, 0.12413536741025445, 0.21741995994704033, 0.1935494212591544, 0.44975105825027883, 0.17421327791691452, 0.13748393745882995, 0.10615777662183085, 0.2592836388961607, 0.22776458945281172, 0.22479302809702625, 0.16572384651685768, 0.20326482699172146, NaN], \\"warnings\\": [\\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"Invalid BFW mu coefficient; using the Frank-Wolfe direction.\\", \\"\\", \\"\\", \\"\\", \\"Invalid BFW mu coefficient; using the Frank-Wolfe direction.\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"Invalid BFW mu coefficient; using the Frank-Wolfe direction.\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"Invalid BFW mu coefficient; using the Frank-Wolfe direction.\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"Invalid BFW mu coefficient; using the Frank-Wolfe direction.\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\"], \\"beta0\\": [1.0, 1.0, 1.0, 1.0, 0.6073815058784465, 0.07423949064975859, 1.0, 0.8978530762747693, 0.5210859419543844, 0.1310033991660148, 1.0, 0.9742007731752091, 0.6352581871354512, 0.2722926744813646, 0.09981147064012809, 1.0, 0.6455493939118717, 0.5446197221699854, 0.37684414353412243, 0.16621614561922343, 0.04991453282323065, 1.0, 0.7074847674334792, 0.4072593278628423, 0.40744644365281185, 0.20433348406491295, 0.06663070239531205, 0.029625006738385674, 1.0, 0.5852667007449526, 0.4424370061333522, 0.3708511650436959, 0.4551343032566526, 0.2748343405904143, 0.22452183524522543, 0.20186352946257047, 0.16232137716499528, 0.1259922663383409, 0.1615674198680147, 0.15289844737629416, 0.12132552966917991, 0.06015011468395385, 0.06792101594525256, 0.10930383488126696, 0.10902569537616233, 0.07965537234423714, 0.06287953215867469, 0.07618194736558329, 0.04815025482449651, 0.048560120740651316, NaN], \\"beta1\\": [0.0, 0.0, 0.0, 0.0, 0.3926184941215534, 0.9219957845105672, 0.0, 0.10214692372523075, 0.4789140580456156, 0.8197346588839601, 0.0, 0.025799226824790834, 0.3647418128645487, 0.5721070219950798, 0.8181558381669438, 0.0, 0.35445060608812834, 0.4000965092918508, 0.4927909805267271, 0.6548989237156498, 0.7769507091170393, 0.0, 0.29251523256652084, 0.28549566818797606, 0.592553556347188, 0.5576934139435734, 0.6817201921586137, 0.8163820339273872, 0.0, 0.4147332992550475, 0.460177344064391, 0.5738578607038743, 0.37492390353725413, 0.4607323288241859, 0.509807610503288, 0.6619456170545638, 0.34772563023431324, 0.7353255450795453, 0.8384325801319853, 0.7604848469753155, 0.8786744703308201, 0.5133108057202137, 0.6564197384787078, 0.4267799495993852, 0.6184552488281203, 0.5705998302076256, 0.8286395700832462, 0.49426833985049434, 0.6279091242565378, 0.6527313799882105, NaN], \\"beta2\\": [0.0, 0.0, 0.0, 0.0, 0.0, 0.003764724839674331, 0.0, 0.0, 0.0, 0.04926194195002498, 0.0, 0.0, 0.0, 0.15560030352355556, 0.08203269119292825, 0.0, 0.0, 0.05528376853816371, 0.1303648759391504, 0.1788849306651267, 0.1731347580597302, 0.0, 0.0, 0.30724500394918164, 0.0, 0.23797310199151364, 0.2516491054460742, 0.15399295933422713, 0.0, 0.0, 0.09738564980225695, 0.055290974252429695, 0.16994179320609326, 0.2644333305853997, 0.26567055425148656, 0.13619085348286575, 0.48995299260069153, 0.13868218858211373, 0.0, 0.08661670564839039, 0.0, 0.42653907959583237, 0.27565924557603955, 0.46391621551934775, 0.27251905579571745, 0.34974479744813725, 0.10848089775807905, 0.42954971278392234, 0.3239406209189658, 0.2987084992711381, NaN], \\"conjugacy_prev\\": [NaN, NaN, NaN, 0.009131125464184143, -2.8919736861073706e-18, -0.012511873440793726, NaN, NaN, 9.752112149740471e-17, -0.01421060232796462, NaN, NaN, -5.180557641603795e-17, -0.03721667928957669, -0.04232333304460143, NaN, NaN, -9.054458857724459e-05, -0.00599182744972153, 0.006162339055411461, -0.007986557804704938, NaN, NaN, 0.004880909102529844, 1.5231514511258254e-16, 0.00467255658374935, -0.007193655299715711, -0.004901760723609507, NaN, NaN, 0.0007232929946526874, 7.544979653403968e-05, -6.704952251526902e-05, -0.0013564303708551416, -0.00012783640107913652, 0.0007741767294959595, 0.001178485086821133, 0.0003441741181014419, -4.5556893021176925e-17, -0.00010649996786908598, -1.816473036328716e-16, -0.0020837002783275784, -0.0002144675944955004, -0.0004330480114696872, -8.092878046182701e-05, -0.00020829470406362387, -0.00046207405415329126, -0.0014479060710527714, -9.254720616895141e-05, -0.00035889450234194545, NaN], \\"conjugacy_prev2\\": [NaN, NaN, NaN, 0.15050043269340133, 0.021601664936027155, -0.2642675529346801, NaN, NaN, 0.28017408784291503, -0.05927016099392479, NaN, NaN, 0.2803824954703134, -0.08575523367277281, -0.1096874048538775, NaN, NaN, -0.0005017604791585371, -0.020422748016858314, 0.012649178133339902, -0.013055424727827317, NaN, NaN, 0.006768499271202243, 0.12252034341003173, 0.013370079227946679, -0.011095890630428802, -0.006554309703401488, NaN, NaN, 0.002301386623972259, 0.0005818622776930699, -0.0002586772162807555, -0.0033470987061794614, -0.00020690333696106846, 0.003715793060792712, 0.0025013983969461003, 0.0011484359452320892, 0.04631206018352924, -0.001260021423547524, 0.03392168236437078, -0.004718828010445438, -0.0002238746805746971, -0.0019105744808382787, -0.0003513939430952122, -0.0006232238578322755, -0.001906964014079279, -0.003441148244840033, -0.0002631320716060108, -0.0010830181436810766, NaN], \\"hessian_drift\\": [NaN, NaN, NaN, 0.07677956339453926, -0.06916185755930719, -0.289376248048675, NaN, NaN, -0.02816755779577692, -0.03801781620375066, NaN, NaN, -0.09102804077988096, -0.07210923042491592, -0.0804766525163474, NaN, NaN, -0.0009016798345824896, -0.021791667020364055, 0.011136820823544244, -0.010569437978811937, NaN, NaN, 0.005878800227037329, 0.007459167322626112, 0.010803265852573003, -0.008479651188456349, -0.008888264229722404, NaN, NaN, 0.0031040050432984195, 0.001185455735074406, -0.00045607283930179676, -0.0029182540810906614, -0.0002497897074662279, 0.006245668916215601, 0.0019077997364233428, 0.0013943363656468942, 0.004679392374055461, -0.0013019729187760843, 0.003151011683804278, -0.00281699871434828, -0.0006718164508872158, -0.003303396410221019, -0.0005017025925719387, -0.0004350362038069228, -0.0028935715748487773, -0.0046576551129433865, -0.00031388510170638476, -0.0012176889884835357, NaN], \\"bfw_clamped\\": [NaN, NaN, NaN, true, true, false, NaN, NaN, true, false, NaN, NaN, true, false, false, NaN, NaN, false, false, false, false, NaN, NaN, false, true, false, false, false, NaN, NaN, false, false, false, false, false, false, false, false, true, false, true, false, false, false, false, false, false, false, false, false, NaN]}, \\"setup\\": {\\"Algorithm\\": \\"bfw\\", \\"Classes\\": {\\"car\\": {\\"network mode\\": \\"c\\", \\"cost\\": \\"free_flow_time\\", \\"PCE\\": 1.0, \\"Value-of-time\\": 1.0, \\"Fixed cost field\\": null, \\"Fixed cost multiplier\\": 1.0, \\"matrix_totals\\": {\\"matrix\\": 360600.0}}}, \\"Computer name\\": \\"runnervm0hi8g\\", \\"Maximum iterations\\": 1000, \\"Procedure ID\\": \\"f8de214a22d74fe791b7615f764e43b8\\", \\"Target RGap\\": 0.001}}"', timestamp='2026-11-19 08:27:41.247695', description='')
And save the skims
assig.save_skims("base_year_assignment_skims", which_ones="all", format="omx")
['base_year_assignment_skims_car.omx']
Trip distribution#
First, let’s have a function to plot the Trip Length Frequency Distribution.
from math import floor, log10
import matplotlib.pyplot as plt
def plot_tlfd(demand, skim, name):
plt.clf()
b = floor(log10(skim.shape[0]) * 10)
n, bins, patches = plt.hist(
np.nan_to_num(skim.flatten(), 0),
bins=b,
weights=np.nan_to_num(demand.flatten()),
density=False,
facecolor="g",
alpha=0.75,
)
plt.xlabel("Trip length")
plt.ylabel("Probability")
plt.title(f"Trip-length frequency distribution for {name}")
return plt
Calibration#
We will calibrate synthetic gravity models using the skims for free_flow_time that we just generated
import numpy as np
from aequilibrae.distribution import GravityCalibration
Load the demand matrix core for computation.
demand = proj_matrices.get_matrix("demand.omx", subset=["matrix"])
We also need the skims we just saved into our project. We select the congested-time core.
imped_core = "free_flow_time_final"
imped = proj_matrices.get_matrix("base_year_assignment_skims_car.omx", subset=[imped_core])
# Where ``free_flow_time_final`` is the congested time for the last iteration.
# Use 75% of the closest zone for intrazonal impedance.
impedance_values = imped[imped_core].copy()
np.fill_diagonal(impedance_values, 0)
intrazonals = np.amin(
impedance_values, where=impedance_values > 0, initial=impedance_values.max(), axis=1
)
intrazonals *= 0.75
np.fill_diagonal(impedance_values, intrazonals)
# Store the prepared core as a separate project matrix.
del imped[imped_core]
imped["final_time_with_intrazonals"] = impedance_values
proj_matrices.save_matrix(
"base_year_assignment_skims_car_intrazonals.omx",
matrix=imped,
)
Let’s calibrate our Gravity Model
for function in ["power", "expo"]:
gc = GravityCalibration(matrix=demand, impedance=imped, function=function, nan_as_zero=True)
gc.calibrate()
model = gc.model
# We save the model
model.save(join(fldr, f"{function}_model.mod"))
result_core = next(iter(gc.result_matrix))
_ = plot_tlfd(
gc.result_matrix[result_core], imped["final_time_with_intrazonals"], f"{function} model"
)
# We can save the result of applying the model as well
# We can also save the calibration report
with open(join(fldr, f"{function}_convergence.log"), "w") as otp:
for r in gc.report:
otp.write(r + "\n")

And let’s plot a trip length frequency distribution for the demand itself

Forecast#
We create a set of ‘future’ vectors using some random growth factors. We apply the model for inverse power, as the trip frequency length distribution (TFLD) seems to be a better fit for the actual one.
from aequilibrae.distribution import GravityApplication, Ipf, SyntheticGravityModel
Compute future vectors#
First thing to do is to compute the future vectors from our matrix.
origins = np.sum(demand["matrix"], axis=1)
destinations = np.sum(demand["matrix"], axis=0)
# Then grow them with some random growth between 0 and 10%, and balance them
orig = origins * (1 + np.random.rand(origins.shape[0]) / 10)
dest = destinations * (1 + np.random.rand(origins.shape[0]) / 10)
dest *= orig.sum() / dest.sum()
vectors = pd.DataFrame({"origins": orig, "destinations": dest}, index=demand.index[:])
IPF for the future vectors#
Let’s balance the future vectors. The output of this step is going to be used later in the traffic assignment for future year.
Save the balanced matrix into the project’s matrix folder
ipf.save_to_project(file_name="demand_ipfd.omx")
Impedance#
Let’s get the base-year assignment skim for car we created before and prepare it for computation
imped = proj_matrices.get_matrix(
"base_year_assignment_skims_car_intrazonals.omx", subset=["final_time_with_intrazonals"]
)
If we wanted the main diagonal to not be considered…
# np.fill_diagonal(imped["final_time_with_intrazonals"], np.nan)
Now we apply the Synthetic Gravity model
for function in ["power", "expo"]:
model = SyntheticGravityModel()
model.load(join(fldr, f"{function}_model.mod"))
args = {
"impedance": imped,
"vectors": vectors,
"row_field": "origins",
"model": model,
"column_field": "destinations",
"nan_as_zero": True,
}
gravity = GravityApplication(project=project, **args)
gravity.apply()
# We get the output matrix and save it to OMX too,
gravity.save_to_project(file_name=f"demand_{function}_modeled.omx")
We inspect the matrix files and verify that the new matrices are indeed there
proj_matrices.get_available_matrices_and_metadata()
{'demand_ipfd.omx': {'procedure': 'Iterative Proportional fitting', 'procedure_id': '109f9105fe1e4bb0b21e64ecbaae5b41', 'timestamp': '2026-11-19 08:27:41.676540', 'description': 'Original data imported to OMX format'}, 'base_year_assignment_skims_car.omx': {'procedure': 'Traffic Assignment', 'procedure_id': 'f8de214a22d74fe791b7615f764e43b8', 'timestamp': '2026-11-19 08:27:41.247695', 'description': 'Skimming for assignment procedure. Class car'}, 'demand_expo_modeled.omx': {'procedure': 'Synthetic gravity trip distribution', 'procedure_id': '38f1b69b66ed44cab51a5eb1a6d40310', 'timestamp': '2026-11-19 08:27:41.699080', 'description': 'Synthetic gravity trip distribution. EXPO'}, 'base_year_assignment_skims_car_intrazonals.omx': {'procedure': 'Traffic Assignment', 'procedure_id': 'f8de214a22d74fe791b7615f764e43b8', 'timestamp': '2026-11-19 08:27:41.247695', 'description': 'Skimming for assignment procedure. Class car'}, 'demand_power_modeled.omx': {'procedure': 'Synthetic gravity trip distribution', 'procedure_id': 'ef9ed344582b4fb69f70563630250393', 'timestamp': '2026-11-19 08:27:41.689611', 'description': 'Synthetic gravity trip distribution. POWER'}, 'skims.omx': {'procedure': None, 'procedure_id': None, 'timestamp': None, 'description': 'Example skim'}, 'demand.omx': {'procedure': None, 'procedure_id': None, 'timestamp': '2020-11-24 08:47:18', 'description': 'Original data imported to OMX format'}, 'demand_mc.omx': {'procedure': None, 'procedure_id': None, 'timestamp': '2021-02-24 00:51:35', 'description': None}}
Traffic assignment with Select Link Analysis#
We’ll perform traffic assignment for the future year.
Let’s get our future demand matrix, which corresponds to the IPF result we just saved,
and see what is the core we ended up getting. It should be matrix.
['matrix']
The selected matrix core is ready for computation.
The future year assignment is quite similar to the one we did for the base-year.
# So, let's create the assignment class
assigclass = TrafficClass(
name="car",
mode="c",
cost="free_flow_time",
demand=demand,
skimming=["free_flow_time", "distance"],
# Every node in Sioux Falls is a centroid, so paths must pass through centroids.
graph_options={"block_centroid_flows": False},
)
def quadratic(congested_time, link_flows, fftime, capacity, cores, a, b):
congested_time[:] = fftime * (a * (link_flows / capacity) ** 2 + b * (link_flows / capacity) + 1)
def quadratic_derivative(delta, link_flows, fftime, capacity, cores, a, b):
delta[:] = fftime * (2 * a * (link_flows / capacity) + b) / capacity
vdf = VDF(
"quadratic",
quadratic,
{"a": {"fill_NA": 0.15, "bounds": (0, float("inf"))}, "b": {"fill_NA": 0.1}},
quadratic_derivative,
)
Now we select two sets of links to execute select link analysis.
select_links = {
"Leaving node 1": [(1, 1), (2, 1)],
"Random nodes": [(3, 1), (5, 1)],
}
Note
As we are executing the select link analysis on a particular TrafficClass, we should set the
links we want to analyze. The input is a dictionary with string as keys and a list of tuples as
values, so that each entry represents a separate set of selected links to compute.
select_link_dict = {"set_name": [(link_id1, direction1), ..., (link_id, direction)]}
The string name will name the set of links, and the list of tuples is the list of selected links
in the form (link_id, direction), as it occurs in the Graph.
Direction can be one of 0, 1, or -1, where 0 denotes bi-directionality.
# We call this command on the class we are analyzing with our dictionary of values
assigclass = replace(assigclass, select_link_sets=select_links)
# Configure the VDF, network fields, and assignment algorithm.
assig = TrafficAssignment(
network=network,
project=project,
classes=[assigclass],
vdf=vdf,
name_mapping={"a": 0.15, "b": 1.0},
time_field="free_flow_time",
capacity_field="capacity",
algorithm="bfw",
)
assig.execute(max_iterations=500, rgap=0.00001)
<string>:16: UserWarning: Input string name has a space in it. Replacing with _
Equilibrium Assignment : 0%| | 0/500 [00:00<?, ?it/s]
All-or-Nothing - Traffic Class: car : 0%| | 1/500 [00:00<00:00, 38836.15it/s]
Equilibrium Assignment - Iteration: 1/500 - RGap: inf: 0%| | 1/500 [00:00<00:00, 775.00it/s]
Equilibrium Assignment : 0%| | 2/500 [00:00<00:00, 1447.56it/s]
All-or-Nothing - Traffic Class: car : 0%| | 2/500 [00:00<00:00, 1362.23it/s]
Equilibrium Assignment - Iteration: 2/500 - RGap: 0.337051: 0%| | 2/500 [00:00<00:00, 559.80it/s]
Equilibrium Assignment : 1%| | 3/500 [00:00<00:00, 818.35it/s]
All-or-Nothing - Traffic Class: car : 1%| | 3/500 [00:00<00:00, 795.18it/s]
Equilibrium Assignment - Iteration: 3/500 - RGap: 0.0947254: 1%| | 3/500 [00:00<00:01, 341.88it/s]
Equilibrium Assignment : 1%| | 4/500 [00:00<00:01, 451.05it/s]
All-or-Nothing - Traffic Class: car : 1%| | 4/500 [00:00<00:01, 446.86it/s]
Equilibrium Assignment - Iteration: 4/500 - RGap: 0.082708: 1%| | 4/500 [00:00<00:01, 327.78it/s]
Equilibrium Assignment : 1%| | 5/500 [00:00<00:01, 406.83it/s]
All-or-Nothing - Traffic Class: car : 1%| | 5/500 [00:00<00:01, 404.15it/s]
Equilibrium Assignment - Iteration: 5/500 - RGap: 0.0581121: 1%| | 5/500 [00:00<00:01, 346.93it/s]
Equilibrium Assignment : 1%| | 6/500 [00:00<00:01, 413.86it/s]
All-or-Nothing - Traffic Class: car : 1%| | 6/500 [00:00<00:01, 411.76it/s]
Equilibrium Assignment - Iteration: 6/500 - RGap: 0.0280976: 1%| | 6/500 [00:00<00:01, 352.13it/s]
Equilibrium Assignment : 1%|▏ | 7/500 [00:00<00:01, 408.59it/s]
All-or-Nothing - Traffic Class: car : 1%|▏ | 7/500 [00:00<00:01, 406.57it/s]
Equilibrium Assignment - Iteration: 7/500 - RGap: 0.0274953: 1%|▏ | 7/500 [00:00<00:01, 343.63it/s]
Equilibrium Assignment : 2%|▏ | 8/500 [00:00<00:01, 390.88it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 8/500 [00:00<00:01, 389.26it/s]
Equilibrium Assignment - Iteration: 8/500 - RGap: 0.0190088: 2%|▏ | 8/500 [00:00<00:01, 354.62it/s]
Equilibrium Assignment : 2%|▏ | 9/500 [00:00<00:01, 397.23it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 9/500 [00:00<00:01, 395.25it/s]
Equilibrium Assignment - Iteration: 9/500 - RGap: 0.00927929: 2%|▏ | 9/500 [00:00<00:01, 358.57it/s]
Equilibrium Assignment : 2%|▏ | 10/500 [00:00<00:01, 396.86it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 10/500 [00:00<00:01, 395.58it/s]
Equilibrium Assignment - Iteration: 10/500 - RGap: 0.00734357: 2%|▏ | 10/500 [00:00<00:01, 349.53it/s]
Equilibrium Assignment : 2%|▏ | 11/500 [00:00<00:01, 382.86it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 11/500 [00:00<00:01, 381.71it/s]
Equilibrium Assignment - Iteration: 11/500 - RGap: 0.00799178: 2%|▏ | 11/500 [00:00<00:01, 344.04it/s]
Equilibrium Assignment : 2%|▏ | 12/500 [00:00<00:01, 374.17it/s]
All-or-Nothing - Traffic Class: car : 2%|▏ | 12/500 [00:00<00:01, 373.18it/s]
Equilibrium Assignment - Iteration: 12/500 - RGap: 0.00582476: 2%|▏ | 12/500 [00:00<00:01, 350.78it/s]
Equilibrium Assignment : 3%|▎ | 13/500 [00:00<00:01, 378.94it/s]
All-or-Nothing - Traffic Class: car : 3%|▎ | 13/500 [00:00<00:01, 378.02it/s]
Equilibrium Assignment - Iteration: 13/500 - RGap: 0.00325445: 3%|▎ | 13/500 [00:00<00:01, 353.84it/s]
Equilibrium Assignment : 3%|▎ | 14/500 [00:00<00:01, 380.12it/s]
All-or-Nothing - Traffic Class: car : 3%|▎ | 14/500 [00:00<00:01, 379.24it/s]
Equilibrium Assignment - Iteration: 14/500 - RGap: 0.00171355: 3%|▎ | 14/500 [00:00<00:01, 348.92it/s]
Equilibrium Assignment : 3%|▎ | 15/500 [00:00<00:01, 372.99it/s]
All-or-Nothing - Traffic Class: car : 3%|▎ | 15/500 [00:00<00:01, 372.19it/s]
Equilibrium Assignment - Iteration: 15/500 - RGap: 0.00217861: 3%|▎ | 15/500 [00:00<00:01, 345.08it/s]
Equilibrium Assignment : 3%|▎ | 16/500 [00:00<00:01, 367.31it/s]
All-or-Nothing - Traffic Class: car : 3%|▎ | 16/500 [00:00<00:01, 366.64it/s]
Equilibrium Assignment - Iteration: 16/500 - RGap: 0.00142424: 3%|▎ | 16/500 [00:00<00:01, 342.94it/s]
Equilibrium Assignment : 3%|▎ | 17/500 [00:00<00:01, 363.44it/s]
All-or-Nothing - Traffic Class: car : 3%|▎ | 17/500 [00:00<00:01, 362.78it/s]
Equilibrium Assignment - Iteration: 17/500 - RGap: 0.00184335: 3%|▎ | 17/500 [00:00<00:01, 340.13it/s]
Equilibrium Assignment : 4%|▎ | 18/500 [00:00<00:01, 359.43it/s]
All-or-Nothing - Traffic Class: car : 4%|▎ | 18/500 [00:00<00:01, 358.78it/s]
Equilibrium Assignment - Iteration: 18/500 - RGap: 0.00140248: 4%|▎ | 18/500 [00:00<00:01, 337.47it/s]
Equilibrium Assignment : 4%|▍ | 19/500 [00:00<00:01, 355.56it/s]
All-or-Nothing - Traffic Class: car : 4%|▍ | 19/500 [00:00<00:01, 355.00it/s]
Equilibrium Assignment - Iteration: 19/500 - RGap: 0.00118204: 4%|▍ | 19/500 [00:00<00:01, 342.24it/s]
Equilibrium Assignment : 4%|▍ | 20/500 [00:00<00:01, 359.58it/s]
All-or-Nothing - Traffic Class: car : 4%|▍ | 20/500 [00:00<00:01, 358.88it/s]
Equilibrium Assignment - Iteration: 20/500 - RGap: 0.000754588: 4%|▍ | 20/500 [00:00<00:01, 344.33it/s]
Equilibrium Assignment : 4%|▍ | 21/500 [00:00<00:01, 360.96it/s]
All-or-Nothing - Traffic Class: car : 4%|▍ | 21/500 [00:00<00:01, 360.44it/s]
Equilibrium Assignment - Iteration: 21/500 - RGap: 0.0012674: 4%|▍ | 21/500 [00:00<00:01, 341.08it/s]
Equilibrium Assignment : 4%|▍ | 22/500 [00:00<00:01, 356.66it/s]
All-or-Nothing - Traffic Class: car : 4%|▍ | 22/500 [00:00<00:01, 356.14it/s]
Equilibrium Assignment - Iteration: 22/500 - RGap: 0.00061486: 4%|▍ | 22/500 [00:00<00:01, 338.69it/s]
Equilibrium Assignment : 5%|▍ | 23/500 [00:00<00:01, 353.56it/s]
All-or-Nothing - Traffic Class: car : 5%|▍ | 23/500 [00:00<00:01, 353.12it/s]
Equilibrium Assignment - Iteration: 23/500 - RGap: 0.000397821: 5%|▍ | 23/500 [00:00<00:01, 336.46it/s]
Equilibrium Assignment : 5%|▍ | 24/500 [00:00<00:01, 350.59it/s]
All-or-Nothing - Traffic Class: car : 5%|▍ | 24/500 [00:00<00:01, 350.17it/s]
Equilibrium Assignment - Iteration: 24/500 - RGap: 0.000333306: 5%|▍ | 24/500 [00:00<00:01, 334.04it/s]
Equilibrium Assignment : 5%|▌ | 25/500 [00:00<00:01, 347.49it/s]
All-or-Nothing - Traffic Class: car : 5%|▌ | 25/500 [00:00<00:01, 347.07it/s]
Equilibrium Assignment - Iteration: 25/500 - RGap: 0.000657171: 5%|▌ | 25/500 [00:00<00:01, 332.54it/s]
Equilibrium Assignment : 5%|▌ | 26/500 [00:00<00:01, 345.39it/s]
All-or-Nothing - Traffic Class: car : 5%|▌ | 26/500 [00:00<00:01, 345.01it/s]
Equilibrium Assignment - Iteration: 26/500 - RGap: 0.000473773: 5%|▌ | 26/500 [00:00<00:01, 330.92it/s]
Equilibrium Assignment : 5%|▌ | 27/500 [00:00<00:01, 343.13it/s]
All-or-Nothing - Traffic Class: car : 5%|▌ | 27/500 [00:00<00:01, 342.74it/s]
Equilibrium Assignment - Iteration: 27/500 - RGap: 0.000403203: 5%|▌ | 27/500 [00:00<00:01, 329.25it/s]
Equilibrium Assignment : 6%|▌ | 28/500 [00:00<00:01, 341.01it/s]
All-or-Nothing - Traffic Class: car : 6%|▌ | 28/500 [00:00<00:01, 340.66it/s]
Equilibrium Assignment - Iteration: 28/500 - RGap: 0.00035176: 6%|▌ | 28/500 [00:00<00:01, 327.87it/s]
Equilibrium Assignment : 6%|▌ | 29/500 [00:00<00:01, 339.18it/s]
All-or-Nothing - Traffic Class: car : 6%|▌ | 29/500 [00:00<00:01, 338.81it/s]
Equilibrium Assignment - Iteration: 29/500 - RGap: 0.000223436: 6%|▌ | 29/500 [00:00<00:01, 326.78it/s]
Equilibrium Assignment : 6%|▌ | 30/500 [00:00<00:01, 337.67it/s]
All-or-Nothing - Traffic Class: car : 6%|▌ | 30/500 [00:00<00:01, 337.35it/s]
Equilibrium Assignment - Iteration: 30/500 - RGap: 0.000422926: 6%|▌ | 30/500 [00:00<00:01, 325.85it/s]
Equilibrium Assignment : 6%|▌ | 31/500 [00:00<00:01, 336.34it/s]
All-or-Nothing - Traffic Class: car : 6%|▌ | 31/500 [00:00<00:01, 336.03it/s]
Equilibrium Assignment - Iteration: 31/500 - RGap: 0.000323706: 6%|▌ | 31/500 [00:00<00:01, 324.61it/s]
Equilibrium Assignment : 6%|▋ | 32/500 [00:00<00:01, 334.69it/s]
All-or-Nothing - Traffic Class: car : 6%|▋ | 32/500 [00:00<00:01, 334.31it/s]
Equilibrium Assignment - Iteration: 32/500 - RGap: 0.000207792: 6%|▋ | 32/500 [00:00<00:01, 323.60it/s]
Equilibrium Assignment : 7%|▋ | 33/500 [00:00<00:01, 333.37it/s]
All-or-Nothing - Traffic Class: car : 7%|▋ | 33/500 [00:00<00:01, 333.08it/s]
Equilibrium Assignment - Iteration: 33/500 - RGap: 0.000219737: 7%|▋ | 33/500 [00:00<00:01, 322.80it/s]
Equilibrium Assignment - Iteration: 33/500 - RGap: 0.000219737: 7%|▋ | 34/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 7%|▋ | 34/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 7%|▋ | 34/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 34/500 - RGap: 0.000257796: 7%|▋ | 34/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 7%|▋ | 35/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 7%|▋ | 35/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 35/500 - RGap: 0.000152473: 7%|▋ | 35/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 7%|▋ | 36/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 7%|▋ | 36/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 36/500 - RGap: 0.000175775: 7%|▋ | 36/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 7%|▋ | 37/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 7%|▋ | 37/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 37/500 - RGap: 0.000140024: 7%|▋ | 37/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 8%|▊ | 38/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 8%|▊ | 38/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 38/500 - RGap: 0.000192692: 8%|▊ | 38/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 8%|▊ | 39/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 8%|▊ | 39/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 39/500 - RGap: 0.000214599: 8%|▊ | 39/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 8%|▊ | 40/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 8%|▊ | 40/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 40/500 - RGap: 0.000212044: 8%|▊ | 40/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 8%|▊ | 41/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 8%|▊ | 41/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 41/500 - RGap: 0.000142719: 8%|▊ | 41/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 8%|▊ | 42/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 8%|▊ | 42/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 42/500 - RGap: 0.000194169: 8%|▊ | 42/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 9%|▊ | 43/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 9%|▊ | 43/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 43/500 - RGap: 0.000115939: 9%|▊ | 43/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 9%|▉ | 44/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 9%|▉ | 44/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 44/500 - RGap: 0.000141703: 9%|▉ | 44/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 9%|▉ | 45/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 9%|▉ | 45/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 45/500 - RGap: 0.000119939: 9%|▉ | 45/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 9%|▉ | 46/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 9%|▉ | 46/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 46/500 - RGap: 0.000172867: 9%|▉ | 46/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 9%|▉ | 47/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 9%|▉ | 47/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 47/500 - RGap: 0.000158589: 9%|▉ | 47/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 10%|▉ | 48/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 10%|▉ | 48/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 48/500 - RGap: 0.000120701: 10%|▉ | 48/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 10%|▉ | 49/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 10%|▉ | 49/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 49/500 - RGap: 0.000113531: 10%|▉ | 49/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 10%|█ | 50/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 10%|█ | 50/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 50/500 - RGap: 8.2153e-05: 10%|█ | 50/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 10%|█ | 51/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 10%|█ | 51/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 51/500 - RGap: 7.3983e-05: 10%|█ | 51/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 10%|█ | 52/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 10%|█ | 52/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 52/500 - RGap: 7.68678e-05: 10%|█ | 52/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 11%|█ | 53/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 11%|█ | 53/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 53/500 - RGap: 0.000103538: 11%|█ | 53/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 11%|█ | 54/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 11%|█ | 54/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 54/500 - RGap: 7.33001e-05: 11%|█ | 54/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 11%|█ | 55/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 11%|█ | 55/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 55/500 - RGap: 6.77755e-05: 11%|█ | 55/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 11%|█ | 56/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 11%|█ | 56/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 56/500 - RGap: 7.20275e-05: 11%|█ | 56/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 11%|█▏ | 57/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 11%|█▏ | 57/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 57/500 - RGap: 6.97111e-05: 11%|█▏ | 57/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 12%|█▏ | 58/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 12%|█▏ | 58/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 58/500 - RGap: 6.22907e-05: 12%|█▏ | 58/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 12%|█▏ | 59/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 12%|█▏ | 59/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 59/500 - RGap: 0.00011378: 12%|█▏ | 59/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 12%|█▏ | 60/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 12%|█▏ | 60/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 60/500 - RGap: 0.000116237: 12%|█▏ | 60/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 12%|█▏ | 61/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 12%|█▏ | 61/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 61/500 - RGap: 0.000105504: 12%|█▏ | 61/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 12%|█▏ | 62/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 12%|█▏ | 62/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 62/500 - RGap: 9.64414e-05: 12%|█▏ | 62/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 13%|█▎ | 63/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 13%|█▎ | 63/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 63/500 - RGap: 5.06562e-05: 13%|█▎ | 63/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 13%|█▎ | 64/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 13%|█▎ | 64/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 64/500 - RGap: 4.08973e-05: 13%|█▎ | 64/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 13%|█▎ | 65/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 13%|█▎ | 65/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 65/500 - RGap: 5.2903e-05: 13%|█▎ | 65/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 13%|█▎ | 66/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 13%|█▎ | 66/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 66/500 - RGap: 4.10806e-05: 13%|█▎ | 66/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 13%|█▎ | 67/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 13%|█▎ | 67/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 67/500 - RGap: 5.69043e-05: 13%|█▎ | 67/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 14%|█▎ | 68/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 14%|█▎ | 68/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 68/500 - RGap: 6.03666e-05: 14%|█▎ | 68/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 14%|█▍ | 69/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 14%|█▍ | 69/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 69/500 - RGap: 5.76003e-05: 14%|█▍ | 69/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 14%|█▍ | 70/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 14%|█▍ | 70/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 70/500 - RGap: 5.25973e-05: 14%|█▍ | 70/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 14%|█▍ | 71/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 14%|█▍ | 71/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 71/500 - RGap: 5.79243e-05: 14%|█▍ | 71/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 14%|█▍ | 72/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 14%|█▍ | 72/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 72/500 - RGap: 4.34623e-05: 14%|█▍ | 72/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 15%|█▍ | 73/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 15%|█▍ | 73/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 73/500 - RGap: 4.07065e-05: 15%|█▍ | 73/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment : 15%|█▍ | 74/500 [00:00<00:01, 332.28it/s]
All-or-Nothing - Traffic Class: car : 15%|█▍ | 74/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 74/500 - RGap: 3.23501e-05: 15%|█▍ | 74/500 [00:00<00:01, 332.28it/s]
Equilibrium Assignment - Iteration: 74/500 - RGap: 3.23501e-05: 15%|█▌ | 75/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 15%|█▌ | 75/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 15%|█▌ | 75/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 75/500 - RGap: 2.61543e-05: 15%|█▌ | 75/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 15%|█▌ | 76/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 15%|█▌ | 76/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 76/500 - RGap: 4.3932e-05: 15%|█▌ | 76/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 15%|█▌ | 77/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 15%|█▌ | 77/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 77/500 - RGap: 4.80944e-05: 15%|█▌ | 77/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 16%|█▌ | 78/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 16%|█▌ | 78/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 78/500 - RGap: 3.6993e-05: 16%|█▌ | 78/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 16%|█▌ | 79/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 16%|█▌ | 79/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 79/500 - RGap: 2.82649e-05: 16%|█▌ | 79/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 16%|█▌ | 80/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 16%|█▌ | 80/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 80/500 - RGap: 3.46377e-05: 16%|█▌ | 80/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 16%|█▌ | 81/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 16%|█▌ | 81/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 81/500 - RGap: 6.74276e-05: 16%|█▌ | 81/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 16%|█▋ | 82/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 16%|█▋ | 82/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 82/500 - RGap: 4.31555e-05: 16%|█▋ | 82/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 17%|█▋ | 83/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 17%|█▋ | 83/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 83/500 - RGap: 3.20022e-05: 17%|█▋ | 83/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 17%|█▋ | 84/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 17%|█▋ | 84/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 84/500 - RGap: 3.00988e-05: 17%|█▋ | 84/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 17%|█▋ | 85/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 17%|█▋ | 85/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 85/500 - RGap: 2.44329e-05: 17%|█▋ | 85/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 17%|█▋ | 86/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 17%|█▋ | 86/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 86/500 - RGap: 2.66553e-05: 17%|█▋ | 86/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 17%|█▋ | 87/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 17%|█▋ | 87/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 87/500 - RGap: 7.09093e-05: 17%|█▋ | 87/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 18%|█▊ | 88/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 18%|█▊ | 88/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 88/500 - RGap: 4.05885e-05: 18%|█▊ | 88/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 18%|█▊ | 89/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 18%|█▊ | 89/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 89/500 - RGap: 1.91121e-05: 18%|█▊ | 89/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 18%|█▊ | 90/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 18%|█▊ | 90/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 90/500 - RGap: 2.00545e-05: 18%|█▊ | 90/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 18%|█▊ | 91/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 18%|█▊ | 91/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 91/500 - RGap: 1.82515e-05: 18%|█▊ | 91/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 18%|█▊ | 92/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 18%|█▊ | 92/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 92/500 - RGap: 2.03573e-05: 18%|█▊ | 92/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 19%|█▊ | 93/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 19%|█▊ | 93/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 93/500 - RGap: 2.3874e-05: 19%|█▊ | 93/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 19%|█▉ | 94/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 19%|█▉ | 94/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 94/500 - RGap: 2.77969e-05: 19%|█▉ | 94/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 19%|█▉ | 95/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 19%|█▉ | 95/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 95/500 - RGap: 2.30493e-05: 19%|█▉ | 95/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 19%|█▉ | 96/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 19%|█▉ | 96/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 96/500 - RGap: 1.3718e-05: 19%|█▉ | 96/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 19%|█▉ | 97/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 19%|█▉ | 97/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 97/500 - RGap: 1.69596e-05: 19%|█▉ | 97/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 20%|█▉ | 98/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 20%|█▉ | 98/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 98/500 - RGap: 1.32778e-05: 20%|█▉ | 98/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 20%|█▉ | 99/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 20%|█▉ | 99/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 99/500 - RGap: 1.56993e-05: 20%|█▉ | 99/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 20%|██ | 100/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 20%|██ | 100/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 100/500 - RGap: 1.17202e-05: 20%|██ | 100/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 20%|██ | 101/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 20%|██ | 101/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 101/500 - RGap: 1.03524e-05: 20%|██ | 101/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 20%|██ | 102/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 20%|██ | 102/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 102/500 - RGap: 2.29874e-05: 20%|██ | 102/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 21%|██ | 103/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 21%|██ | 103/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 103/500 - RGap: 2.28107e-05: 21%|██ | 103/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 21%|██ | 104/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 21%|██ | 104/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 104/500 - RGap: 2.20812e-05: 21%|██ | 104/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 21%|██ | 105/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 21%|██ | 105/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 105/500 - RGap: 1.54873e-05: 21%|██ | 105/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 21%|██ | 106/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 21%|██ | 106/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 106/500 - RGap: 1.30024e-05: 21%|██ | 106/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 21%|██▏ | 107/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 21%|██▏ | 107/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 107/500 - RGap: 1.05486e-05: 21%|██▏ | 107/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 22%|██▏ | 108/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 22%|██▏ | 108/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 108/500 - RGap: 1.42107e-05: 22%|██▏ | 108/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 22%|██▏ | 109/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 22%|██▏ | 109/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 109/500 - RGap: 1.99285e-05: 22%|██▏ | 109/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 22%|██▏ | 110/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 22%|██▏ | 110/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 110/500 - RGap: 1.47692e-05: 22%|██▏ | 110/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 22%|██▏ | 111/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 22%|██▏ | 111/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment - Iteration: 111/500 - RGap: 1.25322e-05: 22%|██▏ | 111/500 [00:00<00:01, 375.07it/s]
Equilibrium Assignment : 22%|██▏ | 112/500 [00:00<00:01, 375.07it/s]
All-or-Nothing - Traffic Class: car : 22%|██▏ | 112/500 [00:00<00:01, 375.07it/s]
To save our select link results, all we need to do is provide it with a name. In addition to exporting the select link flows, it also exports the Select Link matrices in OMX format.
assig.save_select_link_results("select_link_analysis")
Note
Say we just want to save our select link flows, we can call: assig.save_select_link_flows("just_flows")
Or if we just want the select link matrices: assig.save_select_link_matrices("just_matrices")
Internally, the save_select_link_results calls both of these methods at once.
We can export the results to CSV or AequilibraE Data, but let’s put it directly into the results database
assig.save_results("future_year_assignment")
ResultRecord(scenario=None, year=None, table_name='future_year_assignment', reference_table='links', procedure='traffic assignment', procedure_id='27a5211f47284efa9ee2e32e543fafa4', procedure_report='"{\\"convergence\\": {\\"iteration\\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112], \\"time\\": [0.003098957000020164, 0.0053614240000570135, 0.01055972400013161, 0.014011578999998164, 0.01622544600013498, 0.018845640000108688, 0.022185675999935484, 0.024363576000041576, 0.026892620000126044, 0.030415046000143775, 0.03378450700006397, 0.036012731000028, 0.038527027000100134, 0.04193559100008315, 0.04527895299997908, 0.048460724000051414, 0.05178522100004557, 0.055149091999965094, 0.057323185000086596, 0.05988235500012706, 0.06337577699991925, 0.0667617890001111, 0.07016125600011947, 0.07365488799996456, 0.07698432500001218, 0.08036296299997048, 0.083758902999989, 0.08720430500011389, 0.09052420400007577, 0.09386946900008297, 0.09730052500003694, 0.1006786729999476, 0.1040255509999497, 0.10741798499998367, 0.110893754000017, 0.11420589800013659, 0.117542308000111, 0.12096017900012157, 0.12430146700012301, 0.12768146799999158, 0.13116055299997242, 0.13450546800004304, 0.13801554099995883, 0.14141893500004699, 0.14491500200006158, 0.1483680890000869, 0.15174064500001805, 0.15510526799994295, 0.15732282499993744, 0.159533625999984, 0.16154458400001204, 0.1634223240000665, 0.16530680699997902, 0.16715974099997766, 0.16913339999996424, 0.17107508999993115, 0.17307951600014349, 0.1750048250000873, 0.17695488999993358, 0.17881563800006006, 0.1807846189999509, 0.18268938999995044, 0.18453731399995377, 0.1863900979999471, 0.18825896099997408, 0.19026951900013955, 0.19214831099998264, 0.1940175760000784, 0.19587858499994582, 0.1977455450000889, 0.1995851849999326, 0.20148199000004752, 0.20335124500002166, 0.2052386729999398, 0.2071662060000108, 0.20904177200009144, 0.21107729699997435, 0.21296169900006134, 0.21492753400002584, 0.21690317599995979, 0.21875914600013857, 0.22064622400012013, 0.222571963000064, 0.2243954529999428, 0.2262686639999174, 0.22823800500009384, 0.23007232500003738, 0.2320623240000259, 0.23399377400005505, 0.23586758700002974, 0.23774480700012646, 0.23957049000000552, 0.24152782900000602, 0.2434058900000764, 0.245290703000137, 0.24725492400011717, 0.24912044200004857, 0.2511306290000448, 0.25298754999994344, 0.25484346000007463, 0.2568065890000071, 0.2586347569999816, 0.260641367000062, 0.2624687439999889, 0.2643124410001292, 0.2661570689999735, 0.2679968090001239, 0.26999173700005485, 0.27190458299992315, 0.2737665540000762, 0.27572546500005046, 0.27642076100005397], \\"rgap\\": [Infinity, 0.3370510868698823, 0.09472543541769923, 0.08270803235182693, 0.05811213649315941, 0.028097570258154247, 0.027495265153254997, 0.019008830664530282, 0.00927929409741829, 0.007343571208416812, 0.007991783668760213, 0.005824759160306611, 0.0032544471689692615, 0.0017135472073180136, 0.0021786078536055417, 0.0014242420980540586, 0.0018433548125224857, 0.001402478845766924, 0.0011820397903828269, 0.0007545881680902054, 0.0012673983921489748, 0.0006148602825977221, 0.0003978208535692757, 0.00033330632479182317, 0.0006571713030430837, 0.0004737727828602374, 0.0004032031971495991, 0.00035175995837661813, 0.00022343577734188242, 0.0004229257356971471, 0.0003237064766170153, 0.00020779151925383316, 0.00021973677641002647, 0.0002577956176059549, 0.00015247274437740858, 0.00017577508611838185, 0.0001400241361618732, 0.00019269244348776152, 0.00021459932080340567, 0.00021204358390193462, 0.00014271897398691546, 0.00019416922483236104, 0.00011593902635007409, 0.00014170290200905133, 0.00011993943725873545, 0.00017286741403287192, 0.00015858937500886944, 0.00012070088233894627, 0.00011353067061649623, 8.215301170669529e-05, 7.398302757176826e-05, 7.686783349160208e-05, 0.00010353826810859932, 7.330011402077128e-05, 6.777547421452283e-05, 7.202749383256222e-05, 6.97110576634777e-05, 6.229072066985096e-05, 0.00011378018970322447, 0.00011623720842583481, 0.00010550384402635587, 9.644142443695972e-05, 5.065617441350914e-05, 4.089733711847189e-05, 5.290302303074147e-05, 4.108060318262185e-05, 5.690432310103332e-05, 6.0366576743301586e-05, 5.7600329249549944e-05, 5.259732806222597e-05, 5.7924297164084216e-05, 4.346229145137771e-05, 4.070651604567012e-05, 3.235010491292245e-05, 2.6154254919840764e-05, 4.393198701393387e-05, 4.8094449778554845e-05, 3.699302927362064e-05, 2.826488805224184e-05, 3.463769154375489e-05, 6.742764978274743e-05, 4.315547478346928e-05, 3.20021649706003e-05, 3.00987661670981e-05, 2.4432897007781535e-05, 2.6655322771334743e-05, 7.090934814733317e-05, 4.058850523259716e-05, 1.911211672972815e-05, 2.0054495455702488e-05, 1.825147679913039e-05, 2.035733825693879e-05, 2.387397166241765e-05, 2.7796861916519364e-05, 2.3049273016101733e-05, 1.3718022861530003e-05, 1.69595950005729e-05, 1.3277847538367504e-05, 1.5699337895163574e-05, 1.1720165523820883e-05, 1.0352420057084988e-05, 2.2987443401431073e-05, 2.281068240272872e-05, 2.2081204948123892e-05, 1.54872596296235e-05, 1.300239353921093e-05, 1.0548575025830305e-05, 1.4210723228073493e-05, 1.9928475299397394e-05, 1.4769205387872098e-05, 1.2532160403320202e-05, 9.896166762582514e-06], \\"alpha\\": [1.0, 0.3407685241055581, 0.6460207675428535, 1.0, 0.23859161934931888, 0.5671641288985096, 1.0, 0.16725344263557584, 0.20179464414501389, 0.3908164543465547, 1.0, 0.19303578252980744, 0.12163507992875212, 0.21999864524131074, 0.20714605304446504, 0.4665938766046947, 0.8573014846487818, 1.0, 0.04721798328907663, 0.19515895149373452, 0.16510876492052912, 0.1714085387239048, 0.08116479916698707, 0.13541822654304725, 0.18658330166209408, 0.20279313054326834, 0.3385204887325922, 0.20928970468762031, 0.15876253544195432, 0.3891686285653627, 0.37080111026230345, 0.4006323467373799, 0.23893164766161246, 0.24056458130374075, 0.09316474471068938, 0.08205147802329749, 0.08576502836243494, 0.13007752540455572, 0.14157988567988752, 0.08874786807977209, 0.043142251023675006, 0.07192555856815419, 0.06680169725216273, 0.036798331020884874, 0.10239346274007723, 0.08723664495693327, 0.12473035734461205, 0.07745806153591195, 0.03686180486311369, 0.014218649890141672, 0.029380592315047437, 0.028283682971922967, 0.034060665683861145, 0.027947272715372153, 0.006974584338045143, 0.034259435646412956, 0.02362690644847362, 0.053391346676423056, 0.05619988822691414, 0.04367415751680116, 0.03973172560674213, 0.03530366932461474, 0.028439657680056397, 0.03779990528678397, 0.02537817123353756, 0.0347316239875208, 0.11279795483589969, 0.08480823479101907, 0.05504448224088269, 0.05124589019766321, 0.03665317400538656, 0.025981423635118676, 0.0528074533580153, 0.014683432539860384, 0.02008682014552573, 0.025583589305087674, 0.01480230609270739, 0.019433271079761474, 0.02737125104547849, 0.04070864088640701, 0.05752426072326627, 0.03020822036625197, 0.008107143039344034, 0.0206159505801902, 0.008560312615592295, 0.029967125230372718, 0.017706936736667348, 0.0117489222522656, 0.0036839533989635534, 0.022621912191627274, 0.004615624164720041, 0.011269953773349642, 0.010821365691384388, 0.006385984310598653, 0.007054162301885695, 0.006522165342055076, 0.005981513368739655, 0.0022903581587451222, 0.0033240383023370244, 0.005297223123762505, 0.009031993048171729, 0.011409468421819013, 0.008296829674876252, 0.012271853736358966, 0.008882926886750577, 0.007241024149752757, 0.01393674684993666, 0.018092445080627666, 0.008481548425584651, 0.021042773318364672, 0.007379488220134367, NaN], \\"warnings\\": [\\"\\", \\"\\", \\"\\", \\"\\", \\"Invalid BFW mu coefficient; using the Frank-Wolfe direction.\\", \\"\\", \\"\\", \\"Invalid BFW mu coefficient; using the Frank-Wolfe direction.\\", \\"\\", \\"\\", \\"\\", \\"Invalid BFW mu coefficient; using the Frank-Wolfe direction.\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"Invalid BFW mu coefficient; using the Frank-Wolfe direction.\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\", \\"\\"], \\"beta0\\": [1.0, 1.0, 1.0, 0.2386176646386766, 1.0, 1.0, 0.2438431673206244, 1.0, 0.9402365220069167, 0.6193671935663165, 0.32754085743752903, 1.0, 0.9336386447563491, 0.9227965847068752, 0.32219808241469927, 0.24501360129304317, 0.10120424393783897, 0.01432492591970639, 1.0, 0.8091607448814248, 0.2699250152871428, 0.3320367494350119, 0.3885583674216653, 0.5475430377822236, 0.154582079800113, 0.13243406334810554, 0.13020652330688767, 0.12364189217819757, 0.3270007030727395, 0.06402378901159739, 0.04498003161511856, 0.04577806160307798, 0.05348257755218689, 0.04552834233342262, 0.2481329913275638, 0.12227207592408706, 0.2978013477095873, 0.1505116735021486, 0.0981965586334744, 0.0755355234813279, 0.7206218996647946, 0.14342617907031474, 0.27983266266969403, 0.14668769918876726, 0.31970513091926195, 0.16613023815185807, 0.0916079865437861, 0.10986583776519332, 0.11347481001598352, 0.5307739773736463, 0.5947830323935561, 0.5024700661413652, 0.16002706927200774, 0.3185084666961013, 0.5042322636505571, 0.19164343234023432, 0.48549698630173915, 0.4130530342491591, 0.1541821454252065, 0.13844383995780113, 0.21181073733879188, 0.16526270237843996, 0.2788124534418742, 0.25817153938755477, 0.1096943798171151, 0.36149233931328567, 0.14287691336951738, 0.08593758708854393, 0.07449570529939904, 0.07519016801486504, 0.12789238657531002, 0.14372220984160763, 0.14398732075749796, 0.3164610697321499, 0.24913477589250188, 0.10947400234292044, 0.10448860769873348, 0.19958048605760742, 0.35107731112854723, 0.22612526894505838, 0.07169431549508219, 0.15321230722286291, 0.21749963248861717, 0.3194148348851902, 0.42357406680903814, 0.4191498185027183, 0.12149075393461532, 0.14100675137172355, 0.6995143586979341, 0.32307569344814446, 0.27602901130544505, 0.16690426810740322, 0.17807359517851137, 0.17495197922747222, 0.30940676391642374, 0.3804438873519917, 0.23038107561416057, 0.5444876346396262, 0.3452306086940144, 0.42498074614013764, 0.44828458496234425, 0.13297423761876448, 0.11626063441064316, 0.10118504881349208, 0.11884220910432317, 0.2550069977454183, 0.21599929603538393, 0.1833550584461255, 0.10144519088855138, 0.13571408886174807, 0.12312123460902571, NaN], \\"beta1\\": [0.0, 0.0, 0.0, 0.7263653887145314, 0.0, 0.0, 0.745521878034593, 0.0, 0.05976347799308339, 0.38063280643368347, 0.5745958803984048, 0.0, 0.06636135524365099, 0.07720341529312477, 0.6280039355999504, 0.4271575757728875, 0.7699844895776494, 0.9368565503228462, 0.0, 0.19083925511857522, 0.7300749847128571, 0.26846126003750304, 0.4908526285559942, 0.45245696221777654, 0.6070638856924007, 0.4988150493916854, 0.5553906553890714, 0.6124621729458163, 0.5243826806747759, 0.5648471197434232, 0.7480901755141779, 0.6790202686514875, 0.755395920867991, 0.5428806385984719, 0.751867008672436, 0.46671709878663903, 0.09672207823590341, 0.6542448215460892, 0.5861672836063773, 0.603369065509595, 0.2793781003352053, 0.29424885408581464, 0.5415507580847452, 0.7625332687497117, 0.0, 0.833869761848142, 0.5703537056186426, 0.45136268355415443, 0.4408656083411438, 0.0, 0.4052169676064439, 0.35738577623655843, 0.5107158626600117, 0.26248623327259835, 0.495767736349443, 0.14547429519941726, 0.514503013698261, 0.3562653043080991, 0.7054898873427511, 0.42561336044048753, 0.31428867469401495, 0.49231713102608954, 0.3990956419014599, 0.4023618175170187, 0.6089554862564532, 0.6161446805696741, 0.7353871541029166, 0.8079785399575307, 0.5055388303990597, 0.3437121889875044, 0.6995179050092427, 0.20463541345358052, 0.40890194740754066, 0.5451589916797039, 0.2960863690053439, 0.6462548225821086, 0.5554288171639522, 0.04643918956286068, 0.6489226888714528, 0.7738747310549414, 0.7397662229467323, 0.7230667450776581, 0.7825003675113829, 0.10983409555466403, 0.5353186450438927, 0.5808501814972816, 0.7868317541155131, 0.0, 0.30048564130206595, 0.27428327390641954, 0.7150505621896943, 0.22944414191117868, 0.8055361932819789, 0.4850300326852646, 0.2683635902288843, 0.6195561126480081, 0.5138309317819202, 0.45551236536037365, 0.36451950823263496, 0.37292016054605076, 0.5517154150376559, 0.7223126133605526, 0.22108734882052564, 0.45842335613002444, 0.24857530762540933, 0.3507560353577513, 0.09801489043113136, 0.8166449415538745, 0.8915429285748516, 0.21150478211629295, 0.8768787653909743, NaN], \\"beta2\\": [0.0, 0.0, 0.0, 0.03501694664679209, 0.0, 0.0, 0.010634954644782571, 0.0, 0.0, 0.0, 0.09786326216406607, 0.0, 0.0, 0.0, 0.0497979819853505, 0.32782882293406934, 0.1288112664845118, 0.048818523757447344, 0.0, 0.0, 0.0, 0.39950199052748503, 0.12058900402234042, 0.0, 0.23835403450748635, 0.36875088726020894, 0.314402821304041, 0.26389593487598634, 0.14861661625248454, 0.3711290912449795, 0.2069297928707035, 0.27520166974543453, 0.19112150157982227, 0.4115910190681053, 0.0, 0.41101082528927385, 0.6054765740545093, 0.19524350495176218, 0.31563615776014836, 0.32109541100907696, 0.0, 0.5623249668438707, 0.17861657924556085, 0.09077903206152112, 0.6802948690807381, 0.0, 0.3380383078375714, 0.4387714786806523, 0.44565958164287256, 0.4692260226263537, 0.0, 0.14014415762207627, 0.3292570680679806, 0.41900530003130043, 0.0, 0.6628822724603485, 0.0, 0.23068166144274183, 0.14032796723204244, 0.4359427996017113, 0.47390058796719325, 0.34242016659547053, 0.3220919046566659, 0.33946664309542635, 0.28135013392643166, 0.02236298011704028, 0.1217359325275662, 0.10608387295392555, 0.41996546430154125, 0.5810976429976306, 0.17258970841544724, 0.6516423767048118, 0.4471107318349615, 0.1383799385881463, 0.45477885510215416, 0.24427117507497087, 0.3400825751373141, 0.753980324379532, 0.0, 0.0, 0.18853946155818543, 0.12372094769947896, 0.0, 0.5707510695601458, 0.04110728814706915, 0.0, 0.09167749194987167, 0.8589932486282765, 0.0, 0.4026410326454358, 0.008920426504860602, 0.6036515899814181, 0.016390211539509775, 0.340017988087263, 0.422229645854692, 0.0, 0.25578799260391943, 0.0, 0.29024988307335065, 0.2020990933138116, 0.0, 0.14471314902068277, 0.6626520167688311, 0.44039159505648356, 0.6325824832702677, 0.39423696689683024, 0.6859858135334846, 0.0, 0.0070118805365969265, 0.6527811290219588, 0.0, NaN], \\"conjugacy_prev\\": [NaN, NaN, NaN, 0.08230936763552804, NaN, NaN, 0.012163499000588697, NaN, NaN, -7.305226165563503e-18, 0.00017649203683640826, NaN, NaN, -7.500394818968842e-18, -0.00025499597456257365, -0.0025495070385589107, -0.0017296527698598388, -0.0015766143393007087, NaN, NaN, -6.182154653842705e-17, -9.879042014026146e-05, -3.131007624446977e-05, 3.6617933120677085e-17, 2.741595849814772e-05, 9.140939414794026e-05, -6.312074945595694e-05, -7.274497371670702e-05, 1.095816214585243e-05, 0.00038460726942716984, 0.00026232084519396627, 0.00016205620438034215, -2.1682247276410157e-07, -7.3850273667068125e-06, 1.3128560953238993e-17, 4.5945290100519814e-05, 2.0774793254506413e-06, 4.3058380043962785e-05, 3.1129430772301076e-05, 6.42100593369548e-05, -4.644338552518815e-17, 0.00010765882189479016, 8.163744249988432e-06, -7.176715432843614e-08, 0.11781780966342634, -2.2456869996872763e-17, 4.8769207776154206e-05, 4.042898106554456e-05, 3.3257596779914064e-05, 0.022088325162495655, -4.122195799292545e-17, -8.317948521820448e-06, -4.088439522767868e-05, -2.365781454485747e-06, -7.098986197909129e-17, 4.536439920384965e-05, -7.487801500603182e-18, 5.428170014806134e-06, 1.172780796418479e-06, 1.6510042309383057e-05, 8.911215972623262e-05, 7.400880928179974e-05, 3.825643020234887e-05, 3.4443672243986404e-05, 2.6641049292568103e-05, 6.363626827700652e-07, 4.4861612529524275e-06, 6.169326216129043e-06, 5.524074139049046e-05, 1.6714682780711452e-05, 3.140047013542849e-06, 4.3986437001246064e-05, 2.4055407001084462e-05, -1.4513972793141346e-06, 6.571260003887186e-06, 9.072343459534162e-06, -6.938138987757048e-06, -3.489499699119878e-05, 7.44808553487306e-17, -1.4060187822843157e-17, 7.088580847762362e-06, -2.057625170162791e-06, -7.026634218407977e-17, -1.207674842413285e-05, 9.359596538620893e-07, -1.3076749018139867e-16, 3.592000982181067e-06, 0.2372787897533263, -7.511382934928385e-17, -6.528951575434717e-06, 2.17611831500793e-06, 1.2604015502085314e-05, 7.131440794456096e-08, 8.585325222088789e-07, 1.1183369261093134e-05, 1.70108269751034e-16, -6.466632978758517e-06, 6.347025730913647e-17, -3.997981678317536e-07, 8.091953601226844e-07, -1.2773176864203616e-16, -1.4749132845621006e-06, -1.1180972575114385e-05, 2.4394726015964934e-05, -5.479689626789095e-06, -2.5997541450663317e-06, 1.3196163170508432e-05, -2.8389637304149e-16, 1.4568014511885817e-07, -3.7569144979052304e-06, -3.7960289431111283e-17, NaN], \\"conjugacy_prev2\\": [NaN, NaN, NaN, 0.33722190805068053, NaN, NaN, 0.21824556910300263, NaN, NaN, 0.2681320947324289, 0.00048107913611788734, NaN, NaN, 0.10363425605564691, -0.001653309410072087, -0.00410931178624701, -0.00381560436292108, -0.004592615406857894, NaN, NaN, 0.036916054644695606, -0.00013973647826096347, -0.00011934468106944603, 0.07001737392454079, 7.693069096637748e-05, 0.0001286936749164264, -0.00012892800075465084, -0.00014196293575885095, 6.864945068769485e-05, 0.0015359239123266225, 0.00034188692028818194, 0.0004348125602413801, -7.95507473312513e-07, -3.129877455081989e-05, 0.04002373977258615, 0.000338056309746662, 1.9586583182159936e-06, 0.0002541803267887046, 5.732270199219982e-05, 0.0001490832297515278, 0.13841851754262563, 0.0006258202722186518, 1.2868908964074205e-05, -7.595381353090789e-07, -9.202689255940219e-05, 0.3257646225329513, 0.00012497481004126237, 4.678563630796155e-05, 8.451724475203867e-05, 9.233871008100678e-06, 0.2424815778618783, -2.031806090811886e-05, -9.971635311963285e-05, -2.2828440360078952e-06, 0.1653302595507672, 0.00013687196141683823, 0.05884712038230555, 2.6330877159457912e-05, 3.97467913135047e-06, 2.6187354822854958e-05, 0.00016319467838186603, 0.00022380569924313807, 7.710108673118448e-05, 7.950221481443536e-05, 6.262394347172338e-05, 1.665059005725019e-05, 4.2775392635499596e-05, 2.0059595998188257e-05, 0.00011569176441982772, 3.100710003234005e-05, 1.5851042126725927e-05, 9.498295924741202e-05, 5.078643249891499e-05, -4.737009560876008e-06, 2.82859240840366e-05, 2.2437900997949662e-05, -1.3830425778315154e-05, -5.033589744445274e-05, 0.1359087640318183, 0.5706368706586996, 2.5075234698276428e-05, -9.14451917953232e-06, 0.017768052881203856, -2.9170658874529175e-05, 9.550903343940901e-06, 0.2866710949025919, 1.8702426325983476e-05, -4.3300434060502584e-05, 0.07576344374310291, -3.0204017025491464e-05, 4.867193777024138e-05, 3.458202838419374e-05, 1.8669582875539645e-06, 2.3791169078672324e-06, 2.5581726769047448e-05, 0.26746248891291474, -1.7319552857519383e-05, 0.030546768085121474, -1.989915285759752e-06, 1.653052565397194e-06, 0.6414844145129805, -6.5077386887950905e-06, -1.0741879639180673e-05, 5.455339347221532e-05, -5.737817880762551e-06, -5.258774371746416e-06, 2.2457337194908184e-05, 0.19705770261797537, 1.7447187663865964e-05, -6.4620515697752235e-06, 0.3864734727902669, NaN], \\"hessian_drift\\": [NaN, NaN, NaN, 0.3009175379426151, NaN, NaN, 0.16633796632857872, NaN, NaN, -0.005708019286267548, 0.0004998915200846764, NaN, NaN, 0.0005828299715892918, -0.002147953798759228, -0.0032234193306634102, -0.004295424416334769, -0.003784635272667254, NaN, NaN, -0.001104679885784807, -0.00018973474597635886, -0.000297722522720453, -0.00035407497032623864, 6.686889746166828e-05, 0.00013744678503003176, -0.0001316764680255678, -0.00028349461172362886, 0.00019197979239088798, 0.000758326712146859, 0.0004402095744637674, 0.0005631860989616065, -2.018137594732989e-06, -4.290139895152299e-05, -2.552000564712286e-05, 0.00034108853680674134, 4.139661120254283e-06, 0.00022155117718395805, 5.966885801153374e-05, 0.000206764558482114, -8.90326858009019e-05, 0.0003077407377964503, 2.1567214582688656e-05, -1.0286996692548055e-06, -0.0001143450928160987, 0.1175978653527161, 8.96284990283494e-05, 7.279584671687124e-05, 0.0001476530109756262, 6.0523948703282115e-05, 0.02197354408506857, -4.0176535522051064e-05, -7.29155578380728e-05, -4.544445290679883e-06, 4.2959045021985956e-05, 4.8893222922678277e-05, 5.077922777454829e-05, 2.6648250331055912e-05, 3.99522265752522e-06, 3.498361474611179e-05, 0.0002674883484385288, 0.000250167807480842, 0.00011623562616803448, 8.272709336158335e-05, 6.613728105716213e-05, 3.6587768186503267e-05, 2.122767637095159e-05, 2.278687255228776e-05, 0.00015418583575508646, 3.529960522403716e-05, 3.099994687844099e-05, 0.00012558057337874666, 4.138726347079955e-05, -1.833879965368601e-05, 2.6080129760748714e-05, 1.9573625475125283e-05, -2.1297848642938366e-05, -6.752051407703179e-05, -2.4707470608584748e-05, 5.3151573910872344e-05, 1.860889841029148e-05, -1.849108570156827e-05, 1.4874264376430126e-05, -3.184666044241189e-05, 2.7240455899021412e-05, 1.2581187170068116e-05, 2.506919140378444e-05, -5.134654290313534e-05, 0.23727390526773554, -1.2580663765934245e-05, 0.00013427322719947562, 2.1916740975730875e-05, 2.622433690525827e-06, 4.058530787036875e-06, 4.2953480568031435e-05, 1.907547491126889e-05, -2.0465775987854565e-05, -1.4983764820313495e-05, -2.189324093289794e-06, 2.1903755671215655e-06, -1.5173969050125644e-05, -5.469208251823146e-06, -1.3429775393779108e-05, 4.618960002999037e-05, -7.032762311613473e-06, -1.0587926709595802e-05, 1.724064863688852e-05, 1.4738657456818972e-05, 2.5440002936477972e-05, -4.766853965393118e-06, -4.026835941788947e-05, NaN], \\"bfw_clamped\\": [NaN, NaN, NaN, false, NaN, NaN, false, NaN, NaN, true, false, NaN, NaN, true, false, false, false, false, NaN, NaN, true, false, false, true, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, true, false, false, false, true, true, false, false, false, true, true, false, false, false, true, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, false, false, true, false, false, true, false, true, true, false, false, false, false, false, false, true, false, true, false, false, true, false, false, false, false, false, false, true, false, false, true, NaN]}, \\"setup\\": {\\"Algorithm\\": \\"bfw\\", \\"Classes\\": {\\"car\\": {\\"network mode\\": \\"c\\", \\"cost\\": \\"free_flow_time\\", \\"PCE\\": 1.0, \\"Value-of-time\\": 1.0, \\"Fixed cost field\\": null, \\"Fixed cost multiplier\\": 1.0, \\"matrix_totals\\": {\\"matrix\\": 383990.8500308555}}}, \\"Computer name\\": \\"runnervm0hi8g\\", \\"Maximum iterations\\": 500, \\"Procedure ID\\": \\"27a5211f47284efa9ee2e32e543fafa4\\", \\"Target RGap\\": 1e-05}}"', timestamp='2026-11-19 08:27:41.721172', description='')
And save the skims
assig.save_skims("future_year_assignment_skims", which_ones="all", format="omx")
['future_year_assignment_skims_car.omx']
Run convergence study#
df = assig.report()
x = df.iteration.values
y = df.rgap.values
fig = plt.figure()
ax = fig.add_subplot(111)
plt.plot(x, y, "k--")
plt.yscale("log")
plt.grid(True, which="both")
plt.xlabel("Iterations")
plt.ylabel("Relative Gap")
plt.show()

Close the project
Total running time of the script: (0 minutes 1.123 seconds)