View
217
Download
0
Tags:
Embed Size (px)
Citation preview
Customized Simulation Modeling Using PARAMICS Application Programming Interface
Henry Liu, Lianyu Chu & Will Recker
Paramics User Group Meeting
February 7, 2002
Overview
1. Presentation1. Presentation
• Role of API in Traffic Simulation
• PARAMICS API Development
• Plug-ins Developed
2. Demo2. Demo
3. Hands-on Experience3. Hands-on Experience
• Ramp Signal Control API
• Loop Data Aggregator API
• Full Actuated Signal Control API
1. PRESENTATION
User
Developer
Output Interface
Input Interface
GUI Tools
Professional Community Oversight
Core Model API
Introduction
Introduction (Contd.)
API provides users with a functional interface
Command-based
With GUI
With API
Data Interface
Functional Interface
Simulation Program
Introduction (Contd.)
function calls:vehicle related..
link related..and others
user-definedprograms
Main simulation loop PluginsAPI
data
Other applications
/APIs
Role of a typical API
functions
Introduction (Contd.)
CustomizationCustomization
pushing the limitspushing the limits
More on the API…
Plug-and-play environmentPlug-and-play environment
reusable and generic pluginsreusable and generic plugins
API: the “soft key” to the black-box API: the “soft key” to the black-box
Why Customize?
Incident Detection
Intelligent Parking
Travel Time Prediction
Signal Control Systems
Transit Priority
Electronic Road Pricing
Road Maintenance Scheduling & Monitoring
Bus Scheduling Assistance
TESTBED
Why Customize? (Contd.)
Network Building
Performance Measurement
Additional Functionality: ITS Elements
Basic Functionality: signals etc
Customize
PARAMICS API
Simulation Loop
Overload Functions
Override Functions
Callback Functions
Built-in Functions
Built-in Functions
User Functions
User Functions
User Functions
User Functions
User Functions
User Functions
User Functions
User Functions
User Functions
User Functions
User Functions
User Functions
User Functions
User Functions
User Functions
User Functions
User Functions
User Functions
PARAMICS API (Contd.)
Access via API
At every timestep (or at intervals)
When an event occurs in simulation
Event triggered by user
PARAMICS API Development
A Hierarchical Approach
Provided API Library
Developed API Library
Advanced Algorithms
Adaptive Signal Control
Adaptive Ramp Metering
Dynamic Network Loading
ATMIS Modules
Data Handling
Routing
Ramp
Signal
CORBA
Databases
Demand
XML
Developed Basic API Library
• Path-based Routing (Para-Dyn)
• Actuated Signal Controller
• Time-based Ramp Metering
• Loop Aggregator
• Performance Measurement
• Paramics-MySQL Communication
• Paramics-CORBA Communication
Modules Developed
Actuated Signal Control Plugin
Inputs: Signal Timing Plan, including phase sequence, initial green, maximum green, unit extension time and system recall phase, etc. Detectors need to be specified and associated with movements to be activated.
• Standard Dual-Ring Logic
• Actuated Signal Coordination
• Advanced Signal Control Algorithms1
6
4 7
5
2
3 8
1 2 3 4
5
6
7
8
9101112
13
14
15
16
Approach 1
Approach 3
Approach 2
Approach 4
NEMA Phase
Detector
Detector number
Modules Developed
Ramp Metering
• Basic Time-based Module:
Input: time-of-day ramp control plan such as 6-9 AM, cycle length 5 sec.
Logic: n-cars-per-green
• Advanced Modules:
• Demand-capacity strategy
• Percent-occupancy strategy
• ALINEA
• BOTTLENECK
• ZONE
dete
ctor
Stop Lane
Mainline Traffic
Utility Plugins Developed
Paramics-MySQL Communication
Connecting PARAMICS simulation environment with MYSQL database
The MYSQL database can be used in the following two folds:
• API users can store the simulation outputs to database;
• During a simulation process, MYSQL database can be used for storing intermediate simulation results, such as aggregated loop data, which can be queried by other external API modules at any time.
Utility Plugins Developed
Loop Aggregator
Input: time interval, smooth factor, detector name
Output: MYSQL database or ASCII file
volume, percent occupancy, speed, flow, headway
Performance Measurement Plugin
Utility Plugins Developed
To customize performance measurement for run-time interfacing with other tools such as data mining and signal optimization.
MOE: vehicle count, travel time, stopped time, vehicle-spent time in a specific speed range, turn counts from intersections, cycle time, individual phase time etc.
Data collected at a detector, node, link, corridor, OD pair or network levels, at specified time intervals, for specific type of vehicles where applicable.
Output can be in the form of database, spreadsheet, text file or on-screen reporting.
Wrap up
1. While GUI helps in building a basic simulation network, API helps in customization of various functional aspects of simulation modeling.
2. Plugins provide users with more freedom to interrupt and control simulation processes and hence facilitates overcoming some of the challenges faced in modeling traffic scenarios of the ITS era.
Publications
1. Liu, X., Chu, L., and Recker, W., “Paramics API Design Document for Actuated Signal, Signal Coordination and Ramp Control”, California PATH Working Paper, UCB-ITS-PWP-2001-11, University of California at Berkeley, 2001.
2. Chu, L., Liu, X., Recker, W., and Zhang, H. M., “Development of A Simulation Laboratory for Evaluating Ramp Metering Algorithms”, Accepted for the presentation at TRB 2002.
3. Liu, X., Oh, J., and Recker, W., “Adaptive Signal Control with On-line Performance Measure”, Accepted for the presentation at TRB 2002, publication pending for TRR.
2. PARAMICS API DEMO2. PARAMICS API DEMO
PARAMICS API HANDS-ONPARAMICS API HANDS-ON
EXPERIENCEEXPERIENCE
How to Load API
1. Store API files (*.dll) to a directory.
2. Specify the path and name of API in the “plugin” file located in “Plugins\Windows” under the PARAMICS installed directory.
3. Put the required input file in the network directory.
RAMP SIGNAL CONTROL API
Basic Time-based Module:
Input: time-of-day ramp control plan such as 6-9 AM, cycle length 5 sec.
Logic: n-cars-per-green
dete
ctor
Stop Lane
Mainline Traffic
INPUT FILES FOR RAMP SIGNAL CONTROL API
1. “ramp_control” file“ramp_control” file
ramp name
detector name
control plans
…
2. “priorities” file“priorities” file
Provides with the action and phase definition ramp signal
““ramp_control” fileramp_control” file
total number of controlled entrance ramps is XX
vehicle-actuated pre-timed control yes [or no]
on-ramp signal XX
name XX
presence detector XX
number of on-ramp lanes XX
number of control plans XX
from TIME1 to TIME2 AA with BB veh per CC sec
from TIME3 to TIME4 AA with BB veh per CC sec
““priorities” filepriorities” fileactions 92phase offset 0.00 secphase 1
0.00max 18.00
red phase 0.00fillall barred exceptphase 2
0.00max 18.00
red phase 0.00fillall barred exceptfrom 91 to 93 major
INPUT FILES FOR LOOP AGGREGATOR API
““loop_control” fileloop_control” file
detector count XX
gather smoothed data: no
output to files: yes
name XYZ
gather interval HH:MM:SS
name X’Y’Z’
gather interval HH:MM:SS
INPUT FILES FOR ACTUATED SIGNAL CONTROL API
1. “signal_control” file“signal_control” file
intersection name
signal timing plans
…
2. “priorities” file“priorities” file
Defines what movement can be allowed under each phase of an intersection.
““signal_control” filesignal_control” file
Node
Movement 1 2 3 4 5 6 7 8
Initial Green
Extension
Max Green
Recall Phase
Lanes
Right-Turn lanes
Detector 1
Detector 2
Detector 3
Detector 4
““priorities” filepriorities” file
actions 528zphase offset 0.00 secphase 1
0.00max 100.00
red phase 0.00fillall barred exceptfrom 7510 to 7511 minor from 7511 to 7612 minor from 7511 to 7510 major from 7612 to 7614 minor from 7614 to 7612 major from 7614 to 7510 minor
7612
7614
7510
7511528z
Intersection Layout
ENJOY YOUR SIMULATION!ENJOY YOUR SIMULATION!