Coder Social home page Coder Social logo

lcodeca / sumoactivitygen Goto Github PK

View Code? Open in Web Editor NEW
38.0 6.0 23.0 30.9 MB

An Activity-based Multi-modal Mobility Scenario Generator for SUMO. This project is available in the Eclipse SUMO contributed tools section (https://github.com/eclipse/sumo/tree/master/tools/contributed) under the name SAGA (SUMO Activity GenerAtion).

License: Eclipse Public License 2.0

Python 98.62% Shell 1.38%
mobility-modeling simulation-framework sumo

sumoactivitygen's People

Contributors

abrac avatar behrisch avatar lcodeca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sumoactivitygen's Issues

Problems for generateTAZBuildingsFromOSM.py

Hi, when the information of building is missing(or the input is not osm), but I have terrain attribute data, and also I created the taz.xml , how can I generate TAZ_ weight.scv (do I just need to calculate the area of each TAZ by shapes, what does "#Node" stand for? Can it be calculated? Is it an essential element in creating an OD matrix? ).
Thanks in advance!

Compatibility with SUMO 1.5/1.6

Firstly, thank you for this amazing project!

What is the current state of compatibility with SUMO 1.5 and 1.6? I require Demand-Responsive Transport in my simulation (i.e. Taxis) which is not available in v1.4.

Administrative boundaries broken in osm

Hi, I want to know if I can use the defined net.xml and additional.xml (bus stop...) to replace the input OSM file. Because I have run most of the 10 steps of activitygen and made optimization and modification to the file before, I hope to use the modified file to replace the input. I don't know if it is feasible.
suzhou_gucheng.zip

TAZ generation problem

Hi, recently I am using SAGA to generate a traffic simulation for a certain area in Changsha city, China. But I found some problems with the TAZ extracted from inside OSM, so I deleted the abnormal TAZ and related buildings and weights, and then re-executed the later steps. Here are the problems I found throughout the simulation:
1、Taxi scale size can not be modified, the default is 10
2、Regenerating the OD matrix after modifying TAZ and generating activities will generate an error.

Issues with non-starting persons

Hey Lara,
I'm trying to use your scripts to generate a small scenario of part of Berlin. Overall it works really well but I'm facing some issues.

  • first of a lot of pedestrians are not starting their route-definitions, because they can't mount their bikes (see below). I believe this is because bike and person are not on the same position of an edge. Do you have any hints as to how to solve this problem.
    image
  • the second problem I'm facing is related to parking areas. As you can see below the generated parking areas are very small and sparse. And usually it is also possible to park on the side of the street, is there are way to manually broaden parking areas?
    image

Thanks in advance!

PT routes are not found and raises sagaexceptions.TripGenerationGenericError

For public transit routes, I get the following error
CRITICAL: _generate_intermodal_trip_traci from "['0']" to "['4']" with "public" generated 10 errors, trip generation aborted..

During the callstack

activitygen._compute_trips_per_slice()
_final_chain, _stages, _selected_mode = activitygen._generate_trip(
    self._conf['taz'][m_slice['loc_origin']],
    self._conf['taz'][m_slice['loc_primary']],
    _chain, _modes)
_person_steps, _person_stages = activitygen._generate_intermodal_trip_traci(
    from_area, to_area, activity_chain, mode)
_person_stages = activities._chains.generate_person_stages(
    from_area, to_area, activity_chain, mode)
from_edge, to_edge = activities._stages_define_main_locations(
    from_area, to_area, mode)

And the resulting route (line #109)

route = self._sumo.simulation.findIntermodalRoute(
    from_edge, to_edge, modes=_mode, pType=_ptype, vType=_vtype)

does not pass sumoutils.is_valid_route() because stage.line=='' forall stages in the route, i.e. because it is a walking route.
I believe this is because no depart time is provided, and the current simulation time is 0.0. This is midnight, when basically no PT routes are running, so its not surprising the cheapest route returned by this call to traci.simulation.findIntermodalRoute() returns a walking route and the trip generation fails.

I'm curious why in activitygen._generate_intermodal_trip_traci(), the depart time is selected after finding the _person_stages?

FILE NOT FIND: "saga/defaults/default-gui.xml"

Hi, I tried out the simplest example by running scenarioFromOSM.py:
In the command line I started with:

python scenarioFromOSM.py --osm merzig.osm --out test

and then I got the following error:

FileNotFoundError: [Errno 2] No such file or directory: '/home/anjie/Desktop/sumo-1.7.0/tools/contributed/saga/defaults/default-gui.xml'

It seems the file "default-gui.xml" is missing the tools file in SUMO, and it does after I checked it. In the "tools/contributed/saga/defaults", only the following file can be found:

'
activitygen.json basic.vType.xml duarouter.sumocfg osm.netccfg osm.sumocfg
'

Btw, I'm using SUMO 1.7.0 and python 3.8

Implement Taxi Generation

This issue tracks the implementation of taxi generation.

Targets (in order of priority):

  • Sep 15:
    • Familiarise myself with the structure of the existing source code
  • To be scheduled:
    • Extract taxi stops from OSM
    • Complete taxi generation to/from any parking area
    • Complete taxi generation to/from taxi stops

The problem of generating traffic flow in one day

Hi,Lara Codeca
Recently I have been using SAGA to generate traffic flow for a small area of the city, but I found that one day's traffic flow in the city doesn't quite match reality as shown below:
微信截图_20231026161334
You can notice that traffic has been flat until 5:00 a.m., and the curve has only one peak, and there is no morning or evening rush hour,a more realistic traffic curve would look like the following:
image
Can you tell me the underlying reasons for this?
Looking forward to your reply!

intermodal trips with bicycle and public transport

Hi, I'm wondering if there is a way to get trips that include bicycle in one leg of the trip, use of public transport on another and of course walking to connect those modes?

From what I've read I think someone suggested registering bicycles as public transport with such characteristics, but I was wondering if there is a way to represent better the use of both of these modes with SAGA.

Thanks a lot for your help!

Juan Estrada #

Subway travel is ignored in Activitygen

Hi, when using Activitygen to generate activity-based travel, I found that passengers chose public transport but did not consider taking subway (the subway station has been established successfully and also the access lanes are available).

Issues with bikes using bike paths

Hi!
I was wonder if maybe you can help me. I have issues with the bikes, during the simulation it takes the driving lanes rather the bike paths. How can I configure the bike path to be available and the bikes take it?

Thanks!

Daniela

Only parking nodes are extracted from osm, not parking ways

In the map I'm using, the parking areas are defined as ways (<way id="..." .... >), where the capacity is also defined.
But when extracting parking areas, only nodes are considered (<node ...>, codeline).

Therefore, the parking areas are not extracted.
If you look at the example map file attached, there is a way with ID 107517292 that refers to a parking area (see on OSM). But osm_parking_areas.add.xml is empty.

Example file and results. I ran python scenarioFromOSM.py --to-step 3 --osm map.osm --out saga
saga.zip

Smart TAZ aggregation.

How can we provide a useful TAZ aggregation when the administrative boundaries provided by OSM aren't adequately defined.

Traci could not connect in activitygen.py

Hi, I have completed 7 steps and obtained the file osm_activitygen.json (input of activitygen.py), but the error occurs as the figure shows:
error
Is Traci unable to connect due to the large road network (it takes about 10 seconds to load with SUMO GUI)?
My sumo version is 1.6.
Thanks in advance.

Error with pedestrians while calling SUMO

Hi,

I have successfully generated all files, and am ready to launch the SUMO. However, I got the error report from the sumo as follows:

Launch sumo. 
Loading configuration ... done. 
Loading net-file from 'osm.net.xml' ... done (798ms). 
Loading additional-files from 'osm_polygons.add.xml' ... done (145ms). 
Loading additional-files from 'osm_stops.add.xml' ... done (11ms). 
Loading additional-files from 'osm_complete_parking_areas.add.xml' ... done (10ms). 
Loading additional-files from 'osm_parking_rerouters.add.xml' ... done (7ms). 
Loading additional-files from 'basic.vType.xml' ... done (1ms). 
Loading done. 
Error: value 'person' not in enumeration 
 In file 'osm_activitygen..merged.rou.xml' 
 At line/column 9/83.

Allowing generated traffic to park on road-side

Is it possible for SAGA to allow generated traffic to park on the side of the road (as shown in the image below) rather than in designated parking areas?

I see activitygen.py already does it for bicycles, but I'm not sure how to make it do it for all vehicles.

Additionally, it could be useful to trigger this behaviour when parking areas are far from the activity or all parking areas in the rerouter are full.

park_on_side

Unable to build current osm file

After I created the osm file through www.openstreetmap.org, the execution command failed to create it successfully, and the directory was confirmed to be correct

python3 scenarioFromOSM.py --osm map.osm --out test
Namespace(osm_file='map.osm', out_dir='test', left_hand_traffic=False, population=1000, taxi_fleet=10, density=3000.0, single_taz=False, admin_level=None, max_entrance=1000.0, html_filename='', processes=1, from_step=0, to_step=12, profiling=False, gui=False, local_defaults=False)                                                                                                 
Copying default configuration files to destination.                                                                                                                                          
Generate the net.xml with all the additional components (public transports, parkings, ..)                                                                                                    
Loading configuration...                                                                                                                                                                     
Error: No option with the name 'no-turnarounds.except-turnlane' exists.                                                                                                                      
Error: No option with the name 'no-turnarounds.fringe' exists.                                                                                                                               
Error: No option with the name 'junctions.join-same' exists.                                                                                                                                 
Error: No option with the name 'walkingareas.join-dist' exists.                                                                                                                              
Error: No option with the name 'bikelanes.guess' exists.                                                                                                                                     
Error: No option with the name 'bikelanes.guess.min-speed' exists.                                                                                                                           
Error: No option with the name 'bikelanes.guess.max-speed' exists.                                                                                                                           
Error: No option with the name 'bikelanes.guess.from-permissions' exists.                                                                                                                    
Error: No option with the name 'railway.topology.repair.stop-turn' exists.                                                                                                                   
Error: No option with the name 'railway.topology.direction-priority' exists.                                                                                                                 
Error: Could not load configuration 'osm.netccfg'.                                                                                                                                           
Quitting (on error).                                                                                                                                                                         
Traceback (most recent call last):                                                                                                                                                           
  File "/home/xxx/xxxx/veins-f2md/f2md-networks/securecomm2018/SUMOActivityGen/scenarioFromOSM.py", line 671, in <module>                                                            
    main(sys.argv[1:])                                                                                                                                                                       
  File "/home/xxx/xxxx/veins-f2md/f2md-networks/securecomm2018/SUMOActivityGen/scenarioFromOSM.py", line 586, in main                                                                
    _call_netconvert(args.osm_file, args.left_hand_traffic)                                                                                                                                  
  File "/home/xxx/xxxx/veins-f2md/f2md-networks/securecomm2018/SUMOActivityGen/scenarioFromOSM.py", line 270, in _call_netconvert                                                    
    subprocess.check_call(netconvert_options)                                                                                                                                                
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call                                                                                                                          
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['netconvert', '-c', 'osm.netccfg', '--osm', 'map.osm', '-o', 'osm.net.xml', '--ptstop-output', 'osm_stops.add.xml', '--ptline-output', 'osm_ptlines.xml', '--parking-output', 'osm_parking.xml', '--type-files', '/home/xxx/Programs/sumo-1.2.0/data/typemap/osmNetconvert.typ.xml,/home/xxx/Programs/sumo-1.2.0/data/typemap/osmNetconvertBicycle.typ.xml,/home/xxx/Programs/sumo-1.2.0/data/typemap/osmNetconvertPedestrians.typ.xml']' returned non-zero exit status 1.

Include demographic data to SAGA

Hi, I want to thank you for your previous response and as soon as I have some ideas on enhacement for bicycles. As I'm working on the usage of the SAGA and as I have previously have used the deprecated ActivityGen, if there are plans on using some of the demographic information such as age, generation of families or residential zones, to enhance the generation of activities after a first cycle of using ScenarioFromOSM and when only using AcivityGen on SAGA for activity generation to better model traffic. Also, what could be the way to go if I want to try and do these enhancements.

Thank you in advance.

Using additional data

Hey,
I want to use additional data to refine the scenario, e.g. high resolution census data, number of employees, customers and pupils on address level. What´s the best way to do so in SAGA? Is the age of the population considered for the activity-generation?

Many thanks for your help!

Problem with running the scenarioFromOSM.py

I tried to run a quick example using scenarioFromOSM.py but I got the following error:
TypeError: namedtuple() got an unexpected keyword argument 'defaults'
It refers to line 77 of activitygen. Is there any additional argument needed, other than providing an osm input file? Below is the command I used:
python ~/sumo-1.7.0/tools/contributed/saga/scenarioFromOSM.py --osm ./munich-200429.osm --out ./saga_output/
I am using Anaconda Python3.6 environment and SUMO-1.7.

Thanks
Sasan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.