Hello everybody,
I am following this procedure to generate routes for a microsimulation that involves cars and trucks:
-
Generate trips from O-D file for passengers and trucks:
od2trips -n passengerTaz.taz.xml -z passengerTazCount.xml --prefix p -o passengerOd.xml
od2trips -n truckTaz.taz.xml -z truckTazCount.xml --prefix t -o truckOd.xml
-
Use duarouter to generate routes:
duarouter -n Today.net.xml --additional-files ../../vehicles.vtype.xml --route-files passengerOd.xml --remove-loops true -o passengerRoutes.rou.xml
duarouter -n Today.net.xml --additional-files ../../vehicles.vtype.xml --route-files truckOd.xml --remove-loops true -o truckRoutes.rou.xml
-
Use routeSampler to force the number of vehicles through some edges:
python3 $SUMO_HOME/tools/routeSampler.py --attributes="type=\"passenger1\"" -r passengerRoutes.rou.xml --edgedata-files passengerEdgeCount.xml --prefix p --total-count 45355 -o passengerOut.xml
python3 $SUMO_HOME/tools/routeSampler.py --attributes="type=\"truck\"" -r truckRoutes.rou.xml --edgedata-files truckEdgeCount.xml --prefix t --total-count 3695 -o truckOut.xml
This works good for cars, but I have in my vehicles file 3 types of trucks:
<vType id="truck" vClass="truck" probability="0.333333333333" ...></vType>
<vType id="truck_semitrailer" vClass="truck" probability="0.333333333333" ...></vType>
<vType id="truck_trailer" vClass="truck" probability="0.333333333333" ...></vType>
but only the one with id="truck" is used with probability that becomes 1.0.
How can I have one single file for trucks that generates the three different types with probability 0.33?
Thank you.
|