Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Smooth Curves - and bi-directional track

Hi Joshua,

I think it's possible. You should use the PlainXML format of SUMO (https://sumo.dlr.de/docs/Networks/PlainXML.html).

Afterwards you build the net.xml with netconvert.

This is an example from my projects. The connection between the nodes e1 and B is bi-directional.

The type file

<?xml version="1.0" encoding="UTF-8" ?>
 <types>
  <type id="railway.rail" priority="15" numLanes="1" speed="77.7778" allow="rail rail_electric" _oneway_="1"/>
 </types>

and an excerpt from the edge-file

<?xml version="1.0" encoding="UTF-8" ?>
 <edges>
  <edge id="T1_0" type="railway.rail" length="900" speed="38.8889" spreadType="center" from="e1" to="B"/>
  <edge id="T1_1" type="railway.rail" length="900" speed="38.8889" spreadType="center" from="B" to="e1"/>
...

</edges>

For smooth curves you have to compute the coordinates and put them in the shape attribute (as pointed out by Jakob Erdmann)

For switches, double slip switches, crossings between rail and rail (diamonds) , directional rail signals you need also the con.xml file.

Regards, Harald


Am 23.01.20 um 18:59 schrieb Issa, Joshua:

Hi Harald,

 

I was hoping to automatically generate it with smooth curves and bi-directional into the xml format via Python code. Is this possible?

 

Thank you

 

From: sumo-user-bounces@xxxxxxxxxxx [mailto:sumo-user-bounces@xxxxxxxxxxx] On Behalf Of Harald Schaefer
Sent: January 23, 2020 12:22 PM
To: sumo-user@xxxxxxxxxxx
Subject: Re: [sumo-user] Smooth Curves - and bi-directional track

 

Hi Joshua,

how do you want to build your scenario?

The import from OpenStreetMap handles both bi-directional track and quasi smooth curves (see https://sumo.dlr.de/docs/Tools/Import/OSM.html#osmwebwizardpy).

If you use other sources, you have to do it on your own (e.g. with netedit and setting of intermediate points along the curve).

See also https://sumo.dlr.de/docs/Simulation/Railways.html#bidirectional_track_usage

Greetings Harald

Am 23.01.20 um 17:22 schrieb Issa, Joshua:

I am working on a SUMO project that involves railways, and I was wondering if there was a way to generate smooth curves  via xml.



_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top