Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Proposals » Eclipse Sumo » How to set public transport network to a specific vType set in vehicle distribution
How to set public transport network to a specific vType set in vehicle distribution [message #1836802] Thu, 14 January 2021 10:26
Alejandro Rodríguez-Sánchez is currently offline Alejandro Rodríguez-SánchezFriend
Messages: 2
Registered: January 2021
Junior Member
Sorry to bother you again but I have another question. How could I associate my bus vType (called 'type2' in vTypeDistribution) with public transport routes? I've tried the following, assuming that --types refers to the vType that I want to use for public transport network.
This is what I am doing:

# 3. Create additional file for vehicle types and characteristics.
# Set a vehicle type distribution to include several vehicle types and save it in a file
echo "<additional>
<vTypeDistribution id='typedist1'>
<vType id='type1' emissionClass='HBEFA3/PC_G_EU5' accel='0.8' length='5' maxSpeed='18' probability='0.9' vClass='passenger'/>
<vType id='type2' emissionClass='HBEFA3/Bus' accel='1.8' length='15' maxSpeed='15' probability='0.1' vClass='bus'/>
</vTypeDistribution>
</additional>" > $add_file


# 4. Create trips (trip=begin/end points) with additional file where were defined the vehicle types to represent.
# There are more options of creating SUMO trips. For example, by reading origin/destination matrices (O/D matrices) with od2trips.py instead of randomtrips.py

python3 $SUMO_HOME/tools/randomTrips.py -n ${network} -e ${end_time} --trip-attributes='type="typedist1"' --additional-file ${add_file} --edge-permission passenger -o ${trips}


# 5. Create routes from trips
duarouter -n ${network} --route-files ${trips} --additional-files ${add_file} -o ${routes} --ignore-errors

# 5.2 Create public transport schedules
python3 $SUMO_HOME/tools/ptlines2flows.py -n ${network} -s ${ptstops_out} -l ${ptlines_out} --types='type2' -o ${ptroutes} -p 600 --use-osm-routes


However, the resulting public transport routes files is empty:

<?xml version="1.0" encoding="UTF-8"?>
<!-- generated on 2021-01-14 10:33:47.047398 by $Id$
options: -n sumonetwork.net.xml -s ptstops.xml -l ptlines.xml <doubleminus>types=type2 -o sumoptroutes.rou.xml -p 600 <doubleminus>use-osm-routes
-->
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vType id="bus" vClass="bus"/>
<vType id="tram" vClass="tram"/>
<vType id="train" vClass="rail"/>
<vType id="subway" vClass="rail_urban"/>
<vType id="light_rail" vClass="rail_urban"/>
<vType id="monorail" vClass="rail"/>
<vType id="trolleybus" vClass="bus"/>
<vType id="aerialway" vClass="bus"/>
<vType id="ferry" vClass="ship"/>
</routes>

What is the problem? Shoud vType id be the same in the vTypeDistribution and in the public transport routes file?

Best regards,
Alejandro
Previous Topic:Using vTypeDistribution and emissionClass
Next Topic:Eclipse IDE - CMakeList
Goto Forum:
  


Current Time: Sat Nov 09 01:37:25 GMT 2024

Powered by FUDForum. Page generated in 0.02892 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top