Download - BSTM-MM in VISUM
1/26
WWW.PTVap.COM
Vikas Sharma, PTV Asia Pacific
BSTM-MM in VISUM
BSTM is for Brisbane SD
• South East Queensland
• Brisbane SD
• Brisbane City
• Brisbane SD == BSTM
“The Study Area”
3/26
BSTM Dimensions
• 1678 zones
• 1493 Internal Zones
• 16 External Zones
• 169 Special Zones
• 9788 nodes
• 24500 links
• 2304 PT lines
• Bus, rail and ferry routes
4/26
Modes
Modes
1. Car as Driver
2. Car as Passenger
3. Walk
4. Bike
5. Walk + PT
6. Car + PT (Park & Ride)
7. Car + PT (Kiss & Ride)
8. Truck
PT
i. Rail
ii. Bus
iii. Ferry
iv. Express Bus
v. Light Rail
5/26
Trip Purposes
1. Home based work (Blue Collar)
2. Home based work (White Collar)
3. Home based education (school)
4. Home based education (uni/ tafe)
5. Home based shopping
6. Home based other
7. Work based work
8. Other non-home based
6/26
Private Vehicle Loading
• Links divided into various types based on
– Max Capacity of a lane (600 cars to 2100 cars)
– Free Flow Speed (20kmph to 100kmph)
– J Factor
• Congested time on links is found by Akcelikfunction
t = to + 0.25 Tf [(V/C-1) + {(V/C-1)2 + 8 J (V/C) / (C Tf)}0.5]
7/26
Public Transport User Loading
1. Frequency of a service to guess wait time2. Commuters using trains and ferries ‘doubly’
familiar than those using buses3. Wait time 2 times more onerous than travelling
in the vehicle4. Commuters use walk (or bike) to reach a
station/bus stop but walking is 1.4 times more onerous than travelling in the vehicle
5. It takes 6 sec to board a train/ ferry but 9 sec to board a bus
8/26
Model Structure
Basic Structure Sub-models:
1. Commercial Vehicle Model
2. External Movement Model
3. Household Segmentation Model
– Based on workers & students
4. Accessibility Model
– PT/ Walk to Work
5. Vehicle Availability Model
6. Park & Ride/ Kiss & Ride
7. Time Period Split
Trip Generation
Trip Distribution
Mode Split
Assignment
9/26
Original Implementation in EMME
• Uses EMME’s network and matrix calculator through a series of macros– A wrapper macro calls various other macros for
different modules/ sub-models
– Multiple level of nesting: harnesses historical work done by recycling classical macros
– Uses multi-class equilibrium assignment for highway and multi-modal assignment for transit • with user defined ‘volume delay’ and
• ‘transit time’ functions
10/26
Adaptation in VISUM
• A combination of – VISUM’s off-the-shelf procedures and
– Custom scripts in Python
• Two levels of wrapping– Various operations and scripts are
bundled as ‘Procedure Parameter’ files
– Various ‘parameter files’ are loaded and ‘executed’ through a wrapper script• Also used for convergence tests and
• A solution for RAM Fragmentation problems leading to ‘Memory Errors’
11/26
Folder Setup
• Model can be run at any location in the computer but
– A pfd needs to be designed and saved (as std.pfd) and copied at <../PTV_Vision/VISUM10/Exe> folder
• Folder carrying the model has two sub-folders
– matrices: (to keep most of the output matrices)
– tpfmatrices: (to keep time period factor matrices)
12/26
Files
• Parameter files (7)1. 00.par
2. 01.par
3. 02_MCP_AM_TD.par
4. 03_MS.par
5. 04_PNRLogit_KNRLogit.par
6. 05_TP.par
7. 06_Ass.par
• Filter files– T2.fil
– T3.fil
– Normal bus roads.fil
– Normal buses_t2_t3.fil
• Version file (1)– bstm.ver
• Time period factor matrix files (48)– Six character name
• First two character for time period (am)
• Third character to mark if it is for Production or Attraction (a/p)
• Last two characters for the mode
– Cd (car driver)
– Cp (car passenger)
– Om (other modes)
13/26
Outputs
• Loads and paths in VISUM version file
• Matrices by purpose and mode
• A text log providing
– start and end time of every module
– Matrix sums
– Status of convergence criteria for every loop
– Continuously updated...can be opened and checked while model run is on
14/26
Scripts (60)
• TG*– Trip Generation
• TD*– Trip Distribution
• MCP*– Mode Choice
• MS*– Mode Split
• ASS*– Assignment related
• CV*– Commercial Vehicle
• EM*– External Traffic Modelling
• VA*– Vehicle Availability
• HS*– Household Segmentation
• PNR*/ KNR*– Park/ Kiss & Ride
• CA*– Accessibility Calculations
15/26
Script Hierarchy
Run
00 (Initial + TG)
Initial Assignment
Trip Generation
Household Segmentation
01 (sub-models)
Commercial Vehicle
Accessibility Calculations
Vehicle Availability
P&R SkimsMode Choice Preliminaries
External Model
02 (MCP/ TD)
Mode Choice Probabilities
Airport Model
Trip Distribution
03 (MS)
Set Run & Dwell Times
Mode Split (8 parts)
04 (PNR)
Park & Ride
Kiss & Ride
05 (TP)
Time Period Split
06 (Ass)
Car Assignment
PT Run time update
PT Assignment
if ATL change < 0.5%
16/26
Procedures
• 00 Initialisation/ TG– Edit Attribute (link costs)– Assignment– Calculate Skim Matrix
• 01 Submodals– CV
• Main zone modification• Levelling/ Smoothening heavy truck productions/ attractions
– PnR• Matrix Convolution (to find the best station)
– External Model• Edit Attribute?
17/26
Procedures
• 03 Mode Split– Set run and dwell times (turned off: only run in case of
network changes)
• 06 Assignment– Assignment
– Calculate Skim Matrix
– Read filters
– Edit Attributes (link PT run times)
– Set run and dwell times (only for segments which are NOT ferry, rail or busways)
18/26
Procedures/ Scripts to be run only when model is being modified
• 00– 00a Initialisation
• Procedure 2-4: “Edit Attribute” to recalculate link costs
– 00c PT Fare matrix and Airtrain adjustments• Procedure 11: PT Assignment with Fare matrix
calculation
• Procedure 12: A script to adjust for Airtrain fares
• 03 Mode Split– Procedure 2: Set PT runtime from EMME3 data
– Procedure 3: Set PT dwell times from EMME3 data
19/26
Pending Issues
1. Station Choice sub-model (part of Park & Ride sub-model) is limited to two iterations– Instead of original five– A simplified script is available which bypasses station
choice and dumps all trips marked for a station to it
2. Calculation of fare matrix for PT is time consuming and is recycled at the moment– Not a major issue as zonal fares do not change with
change in the network
3. Runtime for each iteration is 6 hours– Time reduces to 3 hours if station choice model for PnR/
KnR is bypassed
20/26
Mode Share comparison
Mode EMME Trips EMME Share VISUM Trips VISUM Share
Car Driver 3,421,810 57.6% 3,493,535 57.1%
Car Passenger 1,412,566 23.8% 1,511,798 24.7%
Bike 63,769 1.1% 46,525 0.8%
Kiss & Ride 76,689 1.3% 75,070 1.2%
Park & Ride 62,250 1.0% 56,394 0.9%
Walk (all the way) 568,763 9.6% 605,417 10.0%
Walk to PT 330,762 5.6% 331,778 5.4%
5,936,609 100.0% 6,120,515 100.0%
21/26
Trip Distribution - Workers
22/26
Trip Distribution - Shoppers
23/26
Ass
ign
men
t
24/26
How to use?
1. Code new network– Zones, connectors, links, lines, stops
2. Recalculate fare matrix3. Recalculate link costs4. Split base matrices
– Time period factor matrices – Truck seed matrix
• Relatively simple operation• Mostly, values will be repeated• Can be automated• EI.IE proportion matrix
25/26
Acquire data for new zones
– Households– Population– Children
• Total• School Age Children• Post Secondary Students
– Residents employed• Total• In blue collar industries• In white collar industries
– Dependents per household aged• 0-17• 18-65• >65
– Special Generators– School Enrolments
• Primary/ Pre-primary• Secondary• Tertiary
– Employment• Retail• Service• Professional• Industrial• Other
– Vehicles per household
26/26
Comparing EMME VISUM Car volumes
27/26
Comparing EMME VISUM Car volumes
28/26
Comparing EMME VISUM Car volumes
29/26
Python
• Object oriented programming/ scripting language
• Open source language
• Easily extensibel
• Interpreted language/ JITC
• Cross Platform
• Strong user base
• Often used to teach programming to non-programmers
• Easy to write and maintain code
30/26
Why use Python?
• Easy to learn
• Quick – written in C/C++
• Abundance of libraries– Matrices– Graphics– Simulation etc
• Popular– ESRI– Google– Nokia– NASA, etc
• Excellent for scientific applications– Networks– Data analysis– Land use modelling, etc Guido van Rossum
31/26
Learning Python
• Easy to learn
• Clean syntax
• PTV Vision Tutorial
– Using Python with VISUM
• All files (with examples) included with VISUM
• PythonWin interactive shell
• Lots of web resources –www.python.org
32/26
Basic interaction with VISUM
• Visum object exposed when running script
• Access to just about everything in VISUM
• VisumPy import numpy as np
import win32com.client
import VisumPy.helpers as h
import VisumPy.matrices as m
z = np.array(h.GetMulti(Visum.Net.Zones,"No"))
onhtrp=m.readBIMatrix(Visum.GetPath(69)+"onhtrp.mtx")
np1=m.readBIMatrix(Visum.GetPath(69)+"wnp1.mtx")
np2=m.readBIMatrix(Visum.GetPath(69)+"wnp2.mtx")
np3=m.readBIMatrix(Visum.GetPath(69)+"wnp3.mtx")
33/26
Matrix manipulation
• Numpy – Python matrix library
• Basic operations
• Matrix indexing
• VisumPy.matrices
– Aggregate
– Trip Length Frequency
– Matrix Balancing
– More...
#Car Driver
hwyamt = np.array(h.GetSkimMatrix(Visum,"hwyamt","CAD"))
hamcst = np.array(h.GetSkimMatrix(Visum,"hamcst","CAD"))
pkcost = np.array(h.GetMulti(Visum.Net.Zones,"pkcost"))
zoneah = np.reshape(h.GetMulti(Visum.Net.Zones,"zoneah"),(N,1))
zonevh = np.reshape(h.GetMulti(Visum.Net.Zones,"zonevh"),(N,1))
wbu1 = bmmtt * hwyamt+\
bcost * ( hamcst +0.5*(pkcost))+\
badvh * ( zoneah - zonevh )+\
bshftv
34/26
NumPy: Numerical Python
• An array/ matrix package for Python• Well suited for demand modelling – one function can
operate on the entire array• Slicing by dimensions and applying functions to these slices
– concise and straightforward• Nearly 400 methods defined for use with NumPy arrays
(e.g. Type conversions, mathematical, logical etc)• Resources
– NumPy homepage: http://numpy.scipy.org/– NumPy download: http://www.scipy.org/Download– NumPy tutorial (not complete):
http://www.scipy.org/Tentative_NumPy_Tutorial– NumPy Example List:
http://www.scipy.org/Numpy_Example_List_With_Doc
35/26
Data Visualisation
• Wealth of Python extensions
• Excel charting
• Matplotlib library
36/26
Custom User Interfaces
• wxPython – GUI library
– Comprehensive C++ GUI toolkit
37/26
Looking ahead...
• Just about anything is possible with Python!
• Script sharing
• VisumPy will grow
• Exciting future ahead
38/26
Network Calculator
39/26
Matrix Calculator
40/26
Matrix Convolution
41/26
Matrix Balancing
42/26
PT Line Buffers / Google Transit Import
43/26
PyCrust in VISUM
44/26
VISUM Junction Editor?
• VISUM started as a strategic travel demand modelling software– Classical node-link topology (or a graph of vertices and edges)– A junction essentially remains abstracted as a node (a point)
• More demanding assignment algorithms required more precise junction delay assessments– Dynamic User Equilibrium / Stochastic Dynamic etc– Blocking Back Analysis– Export to VISSIM for micro-simulation
• Need felt to let users manage junction attributes graphically– Lets users view and manipulate a junction’s attributes– Also lets manipulation of other network objects directly related to the
junction• Links, Turns, Legs, Lanes, Laneturns, Signal Controllers, Signal Groups, Signal
Timings
44
45/26
The editor opens alongside the main network mapper...
45
46/26
And provides control over directly related network objects...
46
47/26
Graphical and tabular views are in sync
47
48/26
Attributes in tabular views can be edited...Set of attributes displayed can be fully customised...
48
49/26
Geometry view provides manipulation of junction specific network objects...
49
50/26
Signal controller and signal heads can be manipulated......added, deleted and assigned to lane-turns
50
51/26
An extended signal time editor (VISSIG) can be used for including multiple signal programs
51
52/26
A daily signal program ‘list’ can be generated
52
53/26
...and activated programmatically/ procedurally
53
54/26
‘One time’ global settings are specified separately...
54
55/26
Intersection Geometry
1. Intersection performance (using HCM 2000/2010)
2. Node impedance during assignment
3. Micro-sim model generation
56/26
Intersection Performance Report
57/26
Intersection Performance Report
58/26
Intersection Performance Report
59/26
Intersection Performance Report
60/26
Node Impedance
1. Turn VDF
2. Turn VDF + Node VDF
3. HCM 2010
61/26
Assignment algorithm with more details
• Blocking – back calculations (pseudo dynamic assignment)
• Static assignment with HCM 2010
• Dynamic assignments
– Dynamic stochastic
– Dynamic user equilibrium
• Bi-criterion equilibrium assignments for toll investigations
62/26
Signal investigations
• Visualise signal settings through time-space diagrams
• Signal cycle and split optimisation
• Signal coordination
63/26
Public Transportation Improvements
• Incorporate the full time table (all systems)
• Visualise the timetable in its entirety
• Improve headway based assignment
– Headway calculation based on time table data
– Less volatility due to departure time variation in case of infrequent services
64/26
Visualise the time table
65/26
Perform time-table based assignment
• Take into account time-table coordination
• Precise PT performance indicator calculation
• Search connections for each OD pair
• Two alternative algorithms available for connection search
– Branch and bound
– Shortest path
66/26
Further improve headway based assignment
• Incorporate a choice model for boarding decision– No information and exponentially distributed
headways
– No information and constant headways
– Information on the elapsed wait times
– Information on the next departure times of the lines from the stop
– Complete information
• This can potentially incorporate behavioural effect of the ‘passenger information system’
67/26
Consolidate your stops
• Group stops as per the ground situation / real life modelling
• Manage walk connectors and walk times between group stopped easily
• Make do with less precise information
– System to system instead of stop to stop
68/26
Example: Queen St/ King George Sq
• All stops close-by / sharing platform grouped– Connectors created– Zero transfer time assumed
• All grouped stops can be further grouped if in vicinity– Connector created– Individual walk-times/
transfer times can be supplied....OR
– Generalised transfer times can be supplied
69/26
Incorporate more PT details
• Line coordination
– A headway of 20min means a wait of about 10min
– Effect of introducing a second line will depend on the exact departure time vis-a-vis the first line
• Line coupling/ split
– Managing coupled line route is made easier
– Changing one changes all other
70/26
Kinds of line coupling
71/26
Harness ticket data
• SEQ’s zone based fares and smart card deployment present a big opportunity
• A stop X stop (~ zone X zone) matrix can be generated
• Selected data can be used to improve matrices
– Enhanced PT specific matrix estimator
– Can use stop boarding, stop alighting or line load data
72/26
Other possible PT improvements...
• Not directly beneficial to ITP/TMR but...• Can increase models usability for sister
organisations...– Operational Indicator calculations– Line costing (line by line)– Revenue analysis (line by line)– Profitability analysis (line by line)
• Time table optimisation– Depot location/ dead kilometerage minimisation/
maximising fleet utilisation– Vehicle Scheduling
73/26
Emission Modelling
• A set of emission factors from Germany, Switzerland and Austria (HBEFA 3.1)
– More countries joining-in
• Systematic descriptors for traffic situation (ARTEMIS)– Assessment and Reliability of Transport Emission Models and
Inventory Systems
– Simplifies mapping from transport models to emission models
– Urban/Rural, road hierarchy, free flow speed and LOS
• Readymade as well as customisable fleet composition
– Enables localisation
• Cold/ warm start distinction also possible
• Output can be exported as shape file for more detailed modelling