Emme Users Group Presentation
description
Transcript of Emme Users Group Presentation
Integrated Modelling with
Emme using Python: The
TMG Experience June 27, 2014
1 Peter Kucirek, M.A.Sc.
Outline
1. About TMG
2. Converting Macros to Tools
3. Integrating GIS with Emme
4. Integrating Emme with XTMF
5. Discussion / Questions
2
What is TMG?
TMG = Travel Modelling Group
Research group within UTTRI (University of Toronto
Transportation Institute)
Supported by government partners:
4
MTO
Metrolinx
City of Toronto
Region of Durham
Region of York
Region of Peel
City of Mississauga
City of Brampton
Region of Halton
City of Hamilton
What does TMG do?
The primary role of the TMG is to facilitate the
development of common methods, tools, and techniques
pertaining to transportation demand modelling and
analysis, and to aid in the application and advancement of
modelling and analytics in transportation planning.
- TMG Terms of Reference Document June 2014
Four main areas of interest:
1. Research, development, and testing of innovative
modelling techniques for the simulation and analysis of a
wide range of policy areas of interest.
2. Development of software and tools to implement and
support modelling techniques
3. Consolidation of common data to support modelling.
4. Training and outreach 5
This is where Emme comes in
Specific TMG Projects
Development of Network Coding Standard 11 (NCS11)
Develoment of multi-time-period 2012 base Emme
network
Translation of existing Emme Macros to new Python Tool
format
Development of automated network editing procedures
Development of new assignment and analysis
procedures
Software development (all open-source):
XTMF
TMG Toolbox for Emme Python
6
Why convert macros?
Improved, mouse-based user interface
Better error-checking and catching of common user mistakes (and ability to check these mistakes early!)
Network API support allows direct access to network topology for automated editing
Opportunities to improve performance, e.g. using numpy
Ability to easily integrate with other data formats (ESRI shapefiles, XML, CSV, etc.)
Ability to write scripts inside of existing IDEs (such as Eclipse, Wing, etc.), which often include sub-version support for better code management
In my opinion, Python tools are much easier to read and write than Emme macros
8
Also debugging!
How to use GIS tools through
Emme Python
shapely is an open-source Python library installed with
Emme 4
shapely supports a wide variety of geometric
operations:
Intersection testing (contains, touches, etc.)
Set-theoretic (union, subtraction, etc.) of polygons
Buffering / offset
Linear projection
TMG developed a class to facilitate conversion to/from
ESRI shapefiles from/to shaplely geometries
16
Examples of usage
Generation of an adjancency matrix for TAZs using their
actul geometry
Saving the shapes of incompatible centroid connectors
when copying from one project to another
Load network attributes from shapefiles
Load transit fare zones from shapefiles (when
generating fare-based transit networks)
17
Case Study: CCGEN
Objective: To develop a tool for generating centroid
connectors for a given network and zone centroids.
One strong constraint provided by our users was that the
tool should prevent connectors from crossing physical
boundaries (e.g. rivers, highways, railways)
Tool also needs to determine which nodes are within a
zone’s boundary
18
What is XTMF?
XTMF = eXtensible Travel Modelling Framework
Written in C# for the .NET framework / Mono (Linux/Mac)
Designed to be a platform for modular models
Open-source license using GPLv3
Currently implemented in XTMF:
TASHA
Durham Region Model
GTAModel V2 (City of Toronto)
GTAModel V4.0
ILUTE
24
How does XTMF interface
with Emme?
25
XTMF
ModellerController.cs
Python
ModellerBridge.py
inro.emme.modeller.Modeller()
EMME
Case Study: Parameter
Estimation
Objective: To calibrate a new transit assignment procedure
for GTAModel V4.0. The first step was to estimate
parameter values using XTMF.
Process: XTMF has a generalized framework for estimating
model parameters using several algorithms (gradient
descent, particle swarm, etc.), and support for distributed
computing.
For an estimation run, we would launch 8 Emme
processes on each of 4 computers and run transit
assignment 1,000+ times
26
Case Study: Parameter
Estimation
28
500
550
600
650
700
750
800
850
900
950
1000
1050
1100
0 7 14 21 28 35 42 49 56 63 70
RM
SE o
f AM
Tra
nsi
t Lin
e B
oard
ings
Iteration
Learning Curve