MATSim Tutorial, May 17-19 2010,ETH Zurich Generating Demand and Supply Part 2: Initial demand generation F. Ciari IVT-ETH Zurich C. Dobler IVT-ETH Zurich
Scope of this Tutorial Having an idea, which type of data is necessary to build an own scenario and where to get the data Knowing the entry points in the software to create a synthetic population and the associated travel demand
MATSim Data Structures Population 1 2 3 Person (Agent) Plan 1 Plan 2 Plan 3 Plan n Act 1 Leg 1 Act 2 Leg 2 Leg n-1 Act n n Relevant Java Classes: Person, PersonImpl Plan, PlanImpl Act, ActImpl Leg, LegImpl
Generating the Demand: Population and Initial Plans <person id="103" sex="f" age="25" license="no" car_avail="never" employed="yes"> <plan selected="yes"> <act type="home" link="110" facility="1" x="60.0" y="110.0" start_time="00:00:00" dur="08:43:35" end_time="08:43:35" /> <leg num="0" mode="car" " " dep_time="08:43:35" "08433 " trav_time="00:00:00" "000000" arr_time="08:43:35"> "08433 " <act type="work" link="104" facility="2" x="310.0" y="70.0" start_time="08:43:35" dur="06:00:00" end_time="14:43:35" /> <leg num="1" mode="car" " " dep_time="14:43:35" "144335"trav_time="00:00:00" ti "000000" arr_time="14:43:35"> "144335" <act type="leisure" link="107" facility="9" x="250.0" y="270.0" start_time="14:43:35" dur="06:00:00" end_time="20:43:35" /> <leg num="2" mode="car" " " dep_time="20:43:35" "204335"trav_time="00:00:00" ti "000000" arr_time="20:43:35" "204335" <act type="home" link="110" facility="1" x="60.0" y="110.0" start_time="20:43:35" dur="03:16:25" end_time="24:00:00" /> </plan> </person>
Generating the Demand: Population and Initial Plans <person id=???" sex=???" age=???" license=???" car_avail=???" employed=???"> <plan selected="yes"> <act type=???" link=???" facility=???" x=???" y=???" start_time=???" dur=???" end_time=???" /> <leg num=???" mode=???" dep_time=???" trav_time=???" arr_time=???"> <act type=???" link=???" facility=???" x=???" y=???" start_time=???" dur=???" end_time=???" /> <leg num=???" mode=???" dep_time=???" trav_time=???" ti arr_time=???"> <act type=???" link=???" facility=???" x=???" y=???" start_time=???" dur=???" end_time=???" /> <leg num=???" mode=???" dep_time=???" trav_time=???" ti arr_time=???"> <act type=???" link=???" facility=?" x=???" y=???" start_time=???" dur=??? end_time=???" /> </plan> </person>
Which kind of data do I need?
Which kind of data do I need? Persons (Population) Population?
Which kind of data do I need? Persons (Population) Population Population Census
Which kind of data do I need? Persons (Population) Population Population Census Personal data (Age, Gender, Employment, etc.)
Generating the Demand: Population and Initial Plans <person id=???" sex=???" age=???" license=???" car_avail=???" employed=???"> <plan selected="yes"> <act type=???" link=???" facility=???" x=???" y=???" start_time=???" dur=???" end_time=???" /> <leg num=??????" mode=??????" dep_time=??????" trav_time=??? time=???" arr_time=??????"> > <act type=???" link=???" facility=???" x=???" y=???" start_time=???" dur=???" end_time=???" /> <leg num=??????" mode=??????" dep_time=??????" trav_time=??? time=???" arr_time=??????"> > <act type=???" link=???" facility=???" x=???" y=???" start_time=???" dur=???" end_time=???" /> <leg num=??????" mode=??????" dep_time=??????" trav_time=??? time=???" arr_time=??????"> > <act type=???" link=???" facility=?" x=???" y=???" start_time=???" dur=??? end_time=???" /> </plan> </person>
Generating the Demand: Population and Initial Plans <person id= 103" sex= f" age= 25" license=???" car_avail=???" employed= yes"> <plan selected="yes"> <act type=???" link=???" facility=???" x=???" y=???" start_time=???" dur=???" end_time=???" /> <leg num=??????" mode=??????" dep_time=??????" trav_time=??? time=???" arr_time=??????"> > <act type=???" link=???" facility=???" x=???" y=???" start_time=???" dur=???" end_time=???" /> <leg num=??????" mode=??????" dep_time=??????" trav_time=??? time=???" arr_time=??????"> > <act type=???" link=???" facility=???" x=???" y=???" start_time=???" dur=???" end_time=???" /> <leg num=???" mode=???" dep_time time=???" trav_time time=???" arr_time time=???"> > <act type=???" link=???" facility=?" x=???" y=???" start_time=???" dur=??? end_time=???" /> </plan> </person>
Which kind of data do I need? - Activities Population Population Census Personal data (Age, Gender, Employment, etc.) Activities?
Which kind of data do I need? - Activities Population Population Census Personal data (Age, Gender, Employment, etc.) Activities Mobility census
Which kind of data do I need? - Activities Population Population Census Personal data (Age, Gender, Employment, etc.) Activities Mobility census Where, when and why persons are y, y p traveling
Generating the Demand: Population and Initial Plans <person id= 103" sex= f" age= 25" license=???" car_avail=???" employed= yes"> <plan selected="yes"> <act type=???" link=???" facility=???" x=???" y=???" start_time=???" dur=???" end_time=???" /> <leg num=???" mode=???" dep_ time=???" trav_ time=???" arr_ time=???"> <act type=???" link=???" facility=???" x=???" y=???" start_time=???" dur=???" end_time=???" /> <leg num=???" mode=???" dep_ time=???" trav_ time=???" arr_ time=???"> <act type=???" link=???" facility=???" x=???" y=???" start_time=???" dur=???" end_time=???" /> <leg num=???" mode=???" dep_time=???" trav_time=???" arr_time=???"> <act type=???" link=???" facility=?" x=???" y=???" start_time=???" dur=??? end_time=???" /> </plan> </person>
Generating the Demand: Population and Initial Plans <person id="103" sex="f" age="25" license="no" car_avail="???" employed="yes"> <plan selected="yes"> <act type="home" link=???" facility=???" x="60.0" y="110.0" start_time="00:00:00" dur="08:43:35" end_time="08:43:35" /> <leg num="0" mode=???" dep_ time="08:43:35" trav_ time="00:00:00" arr_ time="08:43:35"> <act type="work" link=???" facility=???" x="310.0" y="70.0" start_time="08:43:35" dur="06:00:00" end_time="14:43:35" /> <leg num="1" mode=???" dep_ time="14:43:35" trav_ time="00:00:00" arr_ time="14:43:35"> <act type="leisure" link =???" facility =???" x="250.0" y="270.0" start_time="14:43:35" dur="06:00:00" end_time="20:43:35" /> <leg num="2" mode =???" dep_time="20:43:35" trav_time="00:00:00" arr_time="20:43:35" <act type="home" link =???" facility =???" x="60.0" y="110.0" start_time="20:43:35" dur="03:16:25" end_time="24:00:00" /> </plan> </person>
Which kind of data do I need? Mobility Behavior Population Population Census Personal data (Age, Gender, Employment, etc.) Activities Mobility census Where, when and why persons are traveling Mobility Behavior?
Which kind of data do I need? Mobility Behavior Population Population Census Personal data (Age, Gender, Employment, etc.) Activities Mobility census Where, when and why persons are traveling Mobility Behavior Mobility census
Which kind of data do I need? Mobility Behavior Population Population Census Personal data (Age, Gender, Employment, etc.) Activities Mobility census Where, when and why persons are traveling Mobility Behavior Mobility census Mobility Tools availability Mode Mobility Behavior Mobility census Mobility Tools availability, Mode choice
Generating the Demand: Population and Initial Plans <person id="103" sex="f" age="25" license="no" car_avail="???" employed="yes"> <plan selected="yes"> <act type="home" link=???" facility=???" x="60.0" y="110.0" start_time="00:00:00" dur="08:43:35" end_time="08:43:35" /> <leg num="0" mode=???" dep_ time="08:43:35" trav_ time="00:00:00" arr_ time="08:43:35"> <act type="work" link=???" facility=???" x="310.0" y="70.0" start_time="08:43:35" dur="06:00:00" end_time="14:43:35" /> <leg num="1" mode=???" dep_ time="14:43:35" trav_ time="00:00:00" arr_ time="14:43:35"> <act type="leisure" link =???" facility =???" x="250.0" y="270.0" start_time="14:43:35" dur="06:00:00" end_time="20:43:35" /> <leg num="2" mode =???" dep_time="20:43:35" trav_time="00:00:00" arr_time="20:43:35" <act type="home" link =???" facility =???" x="60.0" y="110.0" start_time="20:43:35" dur="03:16:25" end_time="24:00:00" /> </plan> </person>
Generating the Demand: Population and Initial Plans <person id="103" sex="f" age="25" license="no" car_avail= yes" employed="yes"> <plan selected="yes"> <act type="home" link=???" facility=???" x="60.0" y="110.0" start_time="00:00:00" dur="08:43:35" end_time="08:43:35" /> <leg num="0" mode= car" dep_ time="08:43:35" trav_ time="00:00:00" arr_ time="08:43:35"> <act type="work" link=???" facility=???" x="310.0" y="70.0" start_time="08:43:35" dur="06:00:00" end_time="14:43:35" /> <leg num="1" mode= car" dep_ time="14:43:35" trav_ time="00:00:00" arr_ time="14:43:35"> <act type="leisure" link =???" facility =???" x="250.0" y="270.0" start_time="14:43:35" dur="06:00:00" end_time="20:43:35" /> <leg num="2" mode = car" dep_time="20:43:35" trav_time="00:00:00" arr_time="20:43:35" <act type="home" link =???" facility =???" x="60.0" y="110.0" start_time="20:43:35" dur="03:16:25" end_time="24:00:00" /> </plan> </person>
Which kind of data do I need? - Facilities Population Population Census Personal data (Age, Gender, Employment, etc.) Activities Mobility census Where, when and why persons are traveling Mobility Behavior Mobility census Mobility Tools availability, Mode choice Facilities?
Which kind of data do I need? - Facilities Population Population Census Personal data (Age, Gender, Employment, etc.) Activities Mobility census Where, when and why persons are traveling Mobility Behavior Mobility census Mobility Tools availability, Mode choice Facilities Population Census + Enterprises Census
Which kind of data do I need? - Facilities Population Population Census Personal data (Age, Gender, Employment, etc.) Activities Mobility census Where, when and why persons are traveling Mobility Behavior Mobility census Mobility Tools availability, Mode choice Facilities Population Census + Enterprises Census Location of Facilities Population Census + Enterprises Census Location of facilities (Home, Work, Education, Shop, Leisure)
Generating the Demand: Population and Initial Plans <person id="103" sex="f" age="25" license="no" car_avail= yes" employed="yes"> <plan selected="yes"> <act type="home" link=???" facility=???" x="60.0" y="110.0" start_time="00:00:00" dur="08:43:35" end_time="08:43:35" /> <leg num="0" mode= car" dep_ time="08:43:35" trav_ time="00:00:00" arr_ time="08:43:35"> <act type="work" link=???" facility=???" x="310.0" y="70.0" start_time="08:43:35" dur="06:00:00" end_time="14:43:35" /> <leg num="1" mode= car" dep_ time="14:43:35" trav_ time="00:00:00" arr_ time="14:43:35"> <act type="leisure" link =???" facility =???" x="250.0" y="270.0" start_time="14:43:35" dur="06:00:00" end_time="20:43:35" /> <leg num="2" mode = car" dep_time="20:43:35" trav_time="00:00:00" arr_time="20:43:35" <act type="home" link =???" facility =???" x="60.0" y="110.0" start_time="20:43:35" dur="03:16:25" end_time="24:00:00" /> </plan> </person>
Generating the Demand: Population and Initial Plans <person id="103" sex="f" age="25" license="no" car_avail= yes" employed="yes"> <plan selected="yes"> <act type="home" link=???" facility= 1" x="60.0" y="110.0" start_time="00:00:00" dur="08:43:35" end_time="08:43:35" /> <leg num="0" mode= car" dep_ time="08:43:35" trav_ time="00:00:00" arr_ time="08:43:35"> <act type="work" link=???" facility= 2" x="310.0" y="70.0" start_time="08:43:35" dur="06:00:00" end_time="14:43:35" /> <leg num="1" mode= car" dep_ time="14:43:35" trav_ time="00:00:00" arr_ time="14:43:35"> <act type="leisure" link =???" facility = 9" x="250.0" y="270.0" start_time="14:43:35" dur="06:00:00" end_time="20:43:35" /> <leg num="2" mode = car" dep_time="20:43:35" trav_time="00:00:00" arr_time="20:43:35" <act type="home" link =???" facility = 1" x="60.0" y="110.0" start_time="20:43:35" dur="03:16:25" end_time="24:00:00" /> </plan> </person>
Which kind of data do I need? - Network Population Population Census Personal data (Age, Gender, Employment, etc.) Activities Mobility census Where, when and why persons are traveling Mobility Behavior Mobility census Mobility Tools availability, Mode choice Facilities Population Census + Enterprises Census Location of Facilities Population Census + Enterprises Census Location of facilities (Home, Work, Education, Shop, Leisure)
Which kind of data do I need? - Network Population Population Census Personal data (Age, Gender, Employment, etc.) Activities Mobility census Where, when and why persons are traveling Mobility Behavior Mobility census Mobility Tools availability, Mode choice Facilities Population Census + Enterprises Census Location of facilities (Home, Work, Education, Shop, Leisure) (Network Geocoded d Road Network Road network)
Generating the Demand: Population and Initial Plans <person id="103" sex="f" age="25" license="no" car_avail= yes" employed="yes"> <plan selected="yes"> <act type="home" link= 107" facility= 1" x="60.0" y="110.0" start_time="00:00:00" dur="08:43:35" end_time="08:43:35" /> <leg num="0" 0 mode= car" dep_time= time="08:43:35" trav_time= time="00:00:00" arr_time= time="08:43:35"> <act type="work" link= 105" facility= 2" x="310.0" y="70.0" start_time="08:43:35" dur="06:00:00" end_time="14:43:35" /> <leg num="1" 1 mode= car" dep_time= time="14:43:35" trav_time= time="00:00:00" arr_time= time="14:43:35"> <act type="leisure" link = 101" facility = 9" x="250.0" y="270.0" start_time="14:43:35" dur="06:00:00" end_time="20:43:35" /> <leg num="2" 2 mode = car" dep_time= time="20:43:35" trav_time= time="00:00:00" arr_time= time="20:43:35" <act type="home" link = 107" facility = 1" x="60.0" y="110.0" start_time="20:43:35" dur="03:16:25" end_time="24:00:00" /> </plan> </person>
Generating the Demand: Population and Initial Plans <person id="103" sex="f" age="25" license="no" car_avail= yes" employed="yes"> <plan selected="yes"> <act type="home" link= 107" facility= 1" x="60.0" y="110.0" start_time="00:00:00" dur="08:43:35" end_time="08:43:35" /> <leg num="0" 0 mode= car" dep_time= time="08:43:35" trav_time= time="00:00:00" arr_time= time="08:43:35"> <act type="work" link= 105" facility= 2" x="310.0" y="70.0" start_time="08:43:35" dur="06:00:00" end_time="14:43:35" /> <leg num="1" 1 mode= car" dep_time= time="14:43:35" trav_time= time="00:00:00" arr_time= time="14:43:35"> <act type="leisure" link = 101" facility = 9" x="250.0" y="270.0" start_time="14:43:35" dur="06:00:00" end_time="20:43:35" /> <leg num="2" 2 mode = car" dep_time= time="20:43:35" trav_time= time="00:00:00" arr_time= time="20:43:35" <act type="home" link = 107" facility = 1" x="60.0" y="110.0" start_time="20:43:35" dur="03:16:25" end_time="24:00:00" /> </plan> </person>
Which kind of data do I need? - Resuming Population Census Mobility census Enterprises Census Geocoded road Network (OpenStreetMap, Teleatlas, Navteq, Google, etc.)
Were is this data coming from? Population Census BfS (Federal Statistics Office) (www.bfs.admin.ch/bfs/portal/en/index/infothek/erhebungen quellen/blank/blank/vz /uebersicht.html) Mobility census BfS (www.bfs.admin.ch/bfs/portal/de/index/themen/11/07/01/02/01.html ) Enterprises Census BfS (www.bfs.admin.ch/bfs/portal/en/index/infothek/erhebungen quellen/blank/blank/bz /01.html) Geocoded road Network Teleatlas Network (http://www.teleatlas.com/index.htm)) Navteq network (http://www.navteq.com/ )
Initial Demand Generation Flow Chart (1)
Initial Demand Flow Chart (2)
Initial Demand Generation - Conclusions The generation of the initial demand is a very important task for the correct functioning of MATSim and may take a substantial amount of time (weeks or even months) Two are the main challenges: - To gather all the necessary data (many different data sets, high resolution) - To put the information together in a meaningful way (different dimension, different resolution)
Initial Demand Generation Let s work! Download and open files: Tutorial homepage - http://matsim.org/node/409 input_files_demandgeneration_tutorial.zip Config files Input sample (input_sample_zurich.txt) Variables description (variables_description.txt) Create folder and extract files to matsim/examples/tutorial/demandgeneration src_files_demandgeneration_tutorial.zip Java source files Create package and extract files to matsim/src/usermeeting/demandgeneration Edit PopulationCreator class