ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

15
ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim

Transcript of ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

Page 1: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

ZACH MA

WINTER 2015

A Parallelized Multi-Agent Transportation Simulation Using MASS

MATMASSim

Page 2: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

What Is Transportation Simulation? Microscopic

Car-following model

Macroscopic

Traffic flow model

Page 3: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

Why Multi-Agent Based? “Intelligent” Agent

Dynamic environment

Much more similar to those in the real world

Two key aspects in transportation simulation

Transport planning

Traffic flow simulation model

Page 4: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

Transport Planning Static Traffic Assignment

Disaggregation by individual travelers

Temporal dynamics

Dynamic Traffic Assignment(DTA)

Add consideration of departure time

Con: Still is an aggregated model

Agent-based

On individual level

OD pair is replace by individual

particles(agents)

Page 5: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

Traffic Flow Simulation Model Cellular Automata

Roads are divided into cells

Each cell can be either empty or occupied by a car

Drawback: Impractical for large numbers

Queue Based

Links are represented as queues

Performance increases by a factor of 10 to 100

Currently used by MATSim

Page 6: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

Bottleneck

Performance:

Execution Module(mobsim)

Balmer, M., K. Meister, and K. Nagel. Agent-based simulation of travel demand: Structure and computational performance of MATSim-T . ETH, Eidgenössische Technische Hochschule Zürich, IVT Institut für Verkehrsplanung und Transportsysteme, 2008.

Page 7: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

MATSim Overview

output

executionreplanning

scoring

controler

analyses

input

config Iterative process between execution,

scoring, and replanning

Ultimate Goal --> User Equilibrium

Hard to achieve in dynamic model

Page 8: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

Overall Architecture

Distribute computation of execution

model into multiple nodes

Page 9: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

Design & Data Flow

Map --> Network (Places)

Intersections --> Nodes (Place)

Roads --> Links (Place)

Population --> (Agents)

Travelers --> Persons (Agent)

Page 10: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

Data Structure – Adjacency List

Manual mapping for neighbours of each place

Page 11: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

Network

Program Structure

CentralController

LinkImpl QueueSimulationNetworImpl

NodeImpl

Scenario

PlanImpl PopulationImpl

ActivityImpl

Link_MASS Node_MASS Network_MASSElement_MASS

Page 12: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

Changes to MASS Java Create neighbours variable within Place class to store neighbouring

relationship between all place elements, along with accessor and mutator

methods

Remove destinations parameter with all exchangeAll(), and sendMessage() on

EXCHANGE_ALL TYPE

Replace destinations within Places_base with srcPlace.neighours

Page 13: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

Current Progress (Implementation) MASS modification - Completed

MASS changes completed and tested with simple parameter exchange

Test using MATSim’s sample XML input files (80%)

Integration with MATSim (50%)

Setting up own Git repository and sync through all workspaces

MATSim.Mobsim internal logic figured out (ObjectAid)

Refactor MATMASSim.Element_MASS with functionalities from

MATSim.QueueSim.Link and MATSim.QueueSim.Node

Page 14: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

Next Steps Insert MASS main logic into MATSim.QueueSim.SimulationEngine

Testing and benchmark

Simple scenario within MATSim

Gotthard scenario

Have a set of 50 000 trips going to the same destination

Greater Zurich Area

Consisted of 1.62 million agents, contained 163k links

Page 15: ZACH MA WINTER 2015 A Parallelized Multi-Agent Transportation Simulation Using MASS MATMASSim.

Appendix: Network XML Data <network name="example network">

<nodes>

<node id="1" x="0.0" y="0.0"/>

<node id="2" x="1000.0" y="0.0"/>

<node id="3" x="1000.0" y="1000.0"/>

</nodes>

<links>

<link id="1" from="1" to="2" length="3000.00" capacity="3600"

freespeed="27.78" permlanes="2" modes="car" />

<link id="2" from="2" to="3" length="4000.00" capacity="1800"

freespeed="27.78" permlanes="1" modes="car" />

<link id="3" from="3" to="2" length="4000.00" capacity="1800"

freespeed="27.78" permlanes="1" modes="car" />

<link id="4" from="3" to="1" length="6000.00" capacity="3600"

freespeed="27.78" permlanes="2" modes="car" />

</links>

</network>