This are the steps I follow:
-
Draw TAZ in netedit and obtain myscenario.add.xml
whic contains, for example,
<taz id="taz_0" shape="2710.71,11936.74 2678.73,11810.97 2829.37,11781.83 2852.11,11918.26 2714.26,11934.60 2714.26,11935.32 2710.72,11936.70 2710.71,11936.74" color="blue">
<tazSource id="-23393174#0" weight="1.00"/>
<tazSink id="-23393174#0" weight="0.00"/>
<tazSource id="23393174#0" weight="0.00"/>
<tazSink id="23393174#0" weight="1.00"/>
-
Write a OD file like this:
<data>
<interval id="passenger1" begin="0" end="3599.0">
<tazRelation from="taz_1" to="taz_2" count="20"/>
<tazRelation from="taz_1" to="taz_33" count="10"/>
<tazRelation from="taz_2" to="taz_1" count="15"/>
...
</interval>
...
</data>
-
Create a file with the edges in each district by running python $SUMO_HOME/tools/edgesInDistricts.py -n myscenario.net.xml -t myscenario.add.xml -o myscenario.taz.xml and obtain:
<taz id="taz_0" color="blue" edges="-23393174#0 -454892515#2 23393174#0 454892515#2"/>
-
Filter with python $SUMO_HOME/tools/district/filterDistricts.py -n myscenario.net.xml -t myscenario.taz.xml -o passengerTaz.taz.xml --vclass passenger and obtain:
<taz color="blue" edges="-23393174#0 -454892515#2 23393174#0 454892515#2" id="taz_0"/>
I took as an example a taz with low number of edges just for simplicity so in this example no edges are filtered out, but it works correctly in other tazs where it filters out edges that are for trucks only. I don't think the problem is the filtering but that
I am missing something before...am I correct?
Da: Jakob Erdmann <namdre.sumo@xxxxxxxxx>
Inviato: lunedì 14 aprile 2025 13:42
A: Federico De Falco <defalco@xxxxxxxxxxxxxxxxxxxx>
Cc: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Oggetto: Re: [sumo-user] od2trips vehicle restrictions
In our own tests, filtering preserves the distinction between <source> and <sink> edges.
Can you provide a minimal input example where filtering causes the loss of information?
Hi,
your solution worked, thank you!
Now I am facing another problem related to this one. I draw TAZs in netedit's TAZ mode, and I chose some edges that are sources and other taht are sinks, that are saved into a
.add.xml file. Anyway, when I use od2trips and pass the filtered taz file as a parameter it contains all the edges, without any information about sources/sinks, and thus tries to generate trips that start from wrong edges.
Is there a way to generate trips from OD taking into account both sources/sinks and the vehicles allowed on each edge?
Thank you
od2trips doesn't read a networks and thus doesn't take into account permissions.
Hi everybody,
I am using od2trips to generate trips from a O/D and a TAZ file. My problem is that a TAZ may contain some edges that does not allow all types of vehicle.
For example, in my case a TAZ contains some source/sink edges (the source/sinks are described in .add.xml file ... is this taken into account by od2trips?) that does not allow passenger vehicles. This is the command I am using:
od2trips --taz-files test.taz.xml -z tazCount.xml -o odOutput.xml
where the test.taz.xml looks like this:
<taz id="taz_0" color="blue" edges="-23393174#0 -454892515#2 23393174#0 454892515#2"/>
and the tazCount.xml like this:
<tazRelation from="taz_0" to="taz_2" count="41"/>
then I want to use duarouter (I am using the command duarouter -n test.net.xml --route-files odOutput.xml -o duarouter.rou.xml )
but I get some errors like Error: Vehicle '2620' is not allowed to depart on edge 'E243'.
. Edge E243 in fact allows only trucks.
How can I solve this problem?
Thank you
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user
|