Package: data2supplymodel
In the travel demand model, the performance of traffic systems is evaluated via traffic assignment for assessing the impacts of transportation improvement projects. The fundamentally important volume-delay functions (VDFs) have been used as the building blocks to account for the effects of traffic flow on roadway segments’ capacities.The data2supply is a data-driven calibration package for traffic flow model calibration, Bureau of Public Roads (BPR) function calibration, and the queueing characterization for transportation planners, engineers, and researchers.The development of data2supplymodel is motivated by the following perspectives.**1. Support the implementation of traffic assignment model **The development of the package is motivated by the evaluation of the current traffic assignment model  and implement a refined or modified BPR function. The calibration will be conducted under different area types (AT) and facility types (FT).2. Data-driven calibration and validation tool for integrated traffic analysisThe development goal of data2supply aims to provide an integrated open-source package for data processing workflow, parameter estimation in the traffic stream model (i.e., ultimate capacity, critical density, free-flow speed, and the speed at capacity as well as the validation of the traffic assignment results.3. Adopting open network standard of GMNSThe General Modeling Network Specification (GMNS) defines a common human and machine-readable format for sharing routable road network files. It is designed to be used in multi-modal static and dynamic transportation planning and operations models. Further details can be found inhttps://zephyrtransport.org/projects/2-network-standard-and-tools/4. New VDF calibration methodThis package also attempts to provide a theoretically consistent and practically effective framework for a data-driven VDF calibration process. By defining the queueing demand in the D/C ratio in the BPR function, the proposed Queue-based method (QBM) provides a new method for the BPR calibration and bridges the gap between the different temporal resolution of the demand-supply relation.Input files:link_performance.csvExample:link_idlaneslengthfrom_node_idto_node_idFTATtime_periodspeeddatevolumegeometry104011.3511548011400_1415721/1/2016186LINESTRING ( -112.0846681 33.461167)131731.3511512111400_141562.333333331/1/2016686LINESTRING ( -112.0846681 33.461168)104011.3511548011415_143071.666666671/1/2016197LINESTRING ( -112.0846681 33.461169)Field NameDescriptionSample Valuelink_idLink identification  number of a road segment10024ABlanesNumber of lanes of a  link2lengthLength of the link  (units: miles or km)0.22148from_node_idUpstream node of the  link12391to_node_idDownstream node of the  link27808FTFacility type6ATArea type1time_periodTimestamp of an  observation000_0015volumeObserved link count50speedObserved link speed24speed_limitSpeed limit of the link35dateDate of the data1/1/2018output files:speed_density fitting curvespeed_volume fitting curvevolume_density fitting curvetraining set for each AT and FThourly VDF fitting curve for each AT, FT and time periodperiod VDF fitting curve for each AT, FT and time perioddaily based calibration resultsummary.csvInstallation:pipinstalldata2supplyIf you meet installation issues, please refer to the user guide for solutions.Simple examples:Calibrate traffic flow modelsimportdata2supplymodelasds# insert the assignment period for the link performanceperiod_list=['1400_1800']ds.joinDemandPeriod(period_list,performance_file_name='link_performance.csv')# calibrate traffic flow models (when facility type = 1 and area type =1 )ds.calibrateFundamentalDiagram(ft_list=[1],at_list=[1],link_performance_file='link_performance.csv')# calibrate traffic flow models (for each combination of facility types and area types )ds.calibrateFundamentalDiagram()Calibrate volume-delay functions (VDFs)importdata2supplymodelasds# calibrate traffic flow models (for each combination of facility types and area types )ds.calibrateVdfCurve(ft_list=[1],at_list=[1],link_performance_file='link_performance.csv')# calibrate VDF (or BPR) functions (for each combination of facility types and area types )ds.calibrateVdfCurve()Integrate data2supplymodel with path4gmnsimportdata2supplymodelasdsperiod_list=['1400_1800']ds.joinDemandPeriod(period_list,performance_file_name='link_performance_1.csv')ds.calibrateFundamentalDiagram(ft_list=[1],at_list=[1],link_performance_file='link_performance_1.csv')ds.calibrateVdfCurve(ft_list=[1],at_list=[1],link_performance_file='link_performance_1.csv')ds.joinAllVdfFieldToLink(linkfilename='link.csv',dictfilename='updated_vdf_table.csv')importpath4gmnsaspg# no need to call read_network() like the python module# as network and demand loading will be handled within DTALite# path-based UEmode=1assignment_num=10column_update_num=10pg.perform_network_assignment_DTALite(mode,assignment_num,column_update_num)# no need to call output_columns() and output_link_performance()# since outputs will be processed within DTALiteprint('\npath finding results can be found in agent.csv')