sumo

How to create a highway in sumo


I want to create a highway 6 km long consists of 10 connected segments. I tried to create it using netedit but it's too long to use the edge creation mode . Is there another way to create it. Iam using SUMO 0.32


Solution

  • You can zoom out in netedit (try your scrolling wheel) so it should be possible but if it is too awkward (I never tested it with 0.32) you can do XML input as well. Write a node file nodes.xml:

    <nodes>
        <node id="J0" x="0.00" y="0.00"/>
        <node id="J1" x="600.00" y="0.00"/>
        <node id="J2" x="1200.00" y="0.00"/>
        <node id="J3" x="1800.00" y="0.00"/>
    ...
    </nodes>
    

    and an edge file edges.xml:

    <edges>
        <edge id="E0" from="J0" to="J1" numLanes="1" speed="13.89"/>
        <edge id="E1" from="J1" to="J2" numLanes="1" speed="13.89"/>
    ...
    </edges>
    

    (You can freely adapt speed and number of lanes.)

    Then call

    netconvert -n nodes.xml -e edges.xml -o mynet.net.xml
    

    This is also described in detail here: https://sumo.dlr.de/docs/Networks/PlainXML.html