73
1/26 WWW.PTVap.COM Vikas Sharma, PTV Asia Pacific BSTM-MM in VISUM

BSTM-MM in VISUM

Embed Size (px)

Citation preview

Page 1: BSTM-MM in VISUM

1/26

WWW.PTVap.COM

Vikas Sharma, PTV Asia Pacific

BSTM-MM in VISUM

Page 2: BSTM-MM in VISUM

BSTM is for Brisbane SD

• South East Queensland

• Brisbane SD

• Brisbane City

• Brisbane SD == BSTM

“The Study Area”

Page 3: BSTM-MM in VISUM

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

Page 4: BSTM-MM in VISUM

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

Page 5: BSTM-MM in VISUM

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

Page 6: BSTM-MM in VISUM

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]

Page 7: BSTM-MM in VISUM

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

Page 8: BSTM-MM in VISUM

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

Page 9: BSTM-MM in VISUM

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

Page 10: BSTM-MM in VISUM

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’

Page 11: BSTM-MM in VISUM

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)

Page 12: BSTM-MM in VISUM

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)

Page 13: BSTM-MM in VISUM

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

Page 14: BSTM-MM in VISUM

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

Page 15: BSTM-MM in VISUM

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%

Page 16: BSTM-MM in VISUM

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?

Page 17: BSTM-MM in VISUM

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)

Page 18: BSTM-MM in VISUM

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

Page 19: BSTM-MM in VISUM

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

Page 20: BSTM-MM in VISUM

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%

Page 21: BSTM-MM in VISUM

21/26

Trip Distribution - Workers

Page 22: BSTM-MM in VISUM

22/26

Trip Distribution - Shoppers

Page 23: BSTM-MM in VISUM

23/26

Ass

ign

men

t

Page 24: BSTM-MM in VISUM

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

Page 25: BSTM-MM in VISUM

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

Page 26: BSTM-MM in VISUM

26/26

Comparing EMME VISUM Car volumes

Page 27: BSTM-MM in VISUM

27/26

Comparing EMME VISUM Car volumes

Page 28: BSTM-MM in VISUM

28/26

Comparing EMME VISUM Car volumes

Page 29: BSTM-MM in VISUM

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

Page 30: BSTM-MM in VISUM

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

Page 31: BSTM-MM in VISUM

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

Page 32: BSTM-MM in VISUM

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")

Page 33: BSTM-MM in VISUM

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

Page 34: BSTM-MM in VISUM

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

Page 35: BSTM-MM in VISUM

35/26

Data Visualisation

• Wealth of Python extensions

• Excel charting

• Matplotlib library

Page 36: BSTM-MM in VISUM

36/26

Custom User Interfaces

• wxPython – GUI library

– Comprehensive C++ GUI toolkit

Page 37: BSTM-MM in VISUM

37/26

Looking ahead...

• Just about anything is possible with Python!

• Script sharing

• VisumPy will grow

• Exciting future ahead

Page 38: BSTM-MM in VISUM

38/26

Network Calculator

Page 39: BSTM-MM in VISUM

39/26

Matrix Calculator

Page 40: BSTM-MM in VISUM

40/26

Matrix Convolution

Page 41: BSTM-MM in VISUM

41/26

Matrix Balancing

Page 42: BSTM-MM in VISUM

42/26

PT Line Buffers / Google Transit Import

Page 43: BSTM-MM in VISUM

43/26

PyCrust in VISUM

Page 44: BSTM-MM 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

Page 45: BSTM-MM in VISUM

45/26

The editor opens alongside the main network mapper...

45

Page 46: BSTM-MM in VISUM

46/26

And provides control over directly related network objects...

46

Page 47: BSTM-MM in VISUM

47/26

Graphical and tabular views are in sync

47

Page 48: BSTM-MM in VISUM

48/26

Attributes in tabular views can be edited...Set of attributes displayed can be fully customised...

48

Page 49: BSTM-MM in VISUM

49/26

Geometry view provides manipulation of junction specific network objects...

49

Page 50: BSTM-MM in VISUM

50/26

Signal controller and signal heads can be manipulated......added, deleted and assigned to lane-turns

50

Page 51: BSTM-MM in VISUM

51/26

An extended signal time editor (VISSIG) can be used for including multiple signal programs

51

Page 52: BSTM-MM in VISUM

52/26

A daily signal program ‘list’ can be generated

52

Page 53: BSTM-MM in VISUM

53/26

...and activated programmatically/ procedurally

53

Page 54: BSTM-MM in VISUM

54/26

‘One time’ global settings are specified separately...

54

Page 55: BSTM-MM in VISUM

55/26

Intersection Geometry

1. Intersection performance (using HCM 2000/2010)

2. Node impedance during assignment

3. Micro-sim model generation

Page 56: BSTM-MM in VISUM

56/26

Intersection Performance Report

Page 57: BSTM-MM in VISUM

57/26

Intersection Performance Report

Page 58: BSTM-MM in VISUM

58/26

Intersection Performance Report

Page 59: BSTM-MM in VISUM

59/26

Intersection Performance Report

Page 60: BSTM-MM in VISUM

60/26

Node Impedance

1. Turn VDF

2. Turn VDF + Node VDF

3. HCM 2010

Page 61: BSTM-MM in VISUM

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

Page 62: BSTM-MM in VISUM

62/26

Signal investigations

• Visualise signal settings through time-space diagrams

• Signal cycle and split optimisation

• Signal coordination

Page 63: BSTM-MM in VISUM

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

Page 64: BSTM-MM in VISUM

64/26

Visualise the time table

Page 65: BSTM-MM in VISUM

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

Page 66: BSTM-MM in VISUM

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’

Page 67: BSTM-MM in VISUM

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

Page 68: BSTM-MM in VISUM

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

Page 69: BSTM-MM in VISUM

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

Page 70: BSTM-MM in VISUM

70/26

Kinds of line coupling

Page 71: BSTM-MM in VISUM

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

Page 72: BSTM-MM in VISUM

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

Page 73: BSTM-MM in VISUM

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