Hi,
no, it is not the same. Your second option is not right. If you already defined
a route, then you only need to add the “route” attribute to your vehicle
element.
<routes>
<route id="route0" color="1,1,0" edges="beg middle end rend"/>
<vehicle id="0" route="route0" depart="0" color="1,0,0"/>
</routes>
Your second example would be possible, if you are defining a new route as a
child of your vehicle, like this:
<routes>
<vehicle id="0" depart="0" color="1,0,0">
<route edges="beg middle end rend"/>
</vehicle>
</routes>
See
https://sumo.dlr.de/docs/Definition_of_Vehicles,_Vehicle_Types,_and_Routes.html#vehicles_and_routes
With routeDistribution, the definition of the routes according to the docu
would be:
<routes>
<routeDistribution id="routedist1">
<route id="route_0" edges="beg middle end rend" probability="0.1" />
<route id="route_1" edges="beg middle2 end rend" probability="0.9" />
</routeDistribution>
<vehicle id="0" depart="0" route="routedist1"/>
</routes>
Regards,
Giuliana
Von: [email protected] <[email protected]> Im Auftrag
von Theophile Cabannes
Gesendet: Montag, 9. November 2020 15:10
An: Sumo project User discussions <[email protected]>
Betreff: Re: [sumo-user] Use predefined routes in route distribution
Thank you Giuliana,
However
https://sumo.dlr.de/docs/Definition_of_Vehicles,_Vehicle_Types,_and_Routes.html#route_distributions
is a little bit different as the routes in the route distributions in the
example is not predefined outside the route distribution itself (i.e. the
routes contain the attribute edges).
If I can do what I have suggested, then I guess that the two following route
files will be understand the same way:
<routes>
<route id="route0" color="1,1,0" edges="beg middle end rend"/>
<vehicle id="0" route="route0" depart="0" color="1,0,0"/>
</routes>
end
<routes>
<route id="route0" color="1,1,0" edges="beg middle end rend"/>
<vehicle id="0" depart="0" color="1,0,0">
<route id="route0" />
</vehicle>
</routes>
Is this correct?
Thank you a lot!
On Mon, Nov 9, 2020 at 3:05 PM
<[email protected]<mailto:[email protected]>> wrote:
Hi Theo,
Yes it is possible, see
https://sumo.dlr.de/docs/Definition_of_Vehicles,_Vehicle_Types,_and_Routes.html#route_distributions.
Regards,
Giuliana
Von: [email protected]<mailto:[email protected]>
<[email protected]<mailto:[email protected]>> Im
Auftrag von Theophile Cabannes
Gesendet: Montag, 9. November 2020 13:39
An: [email protected]<mailto:[email protected]>
Betreff: [sumo-user] Use predefined routes in route distribution
Hi,
I would like to use route distribution using routes that have been already
defined in the route file. Is this possible?
I was thinking about writting something like:
<routes>
<route id="route_0" edges="beg middle end rend" />
<route id="route_1" edges="beg middle2 end rend" />
<vehicle id="0" type="type1" depart="0">
<routeDistribution>
<route id="route_0" probability="0.1" />
<route id="route_1" probability="0.9" />
</routeDistribution>
</routes>
Would that work?
Thank you a lot!
Theo
_______________________________________________
sumo-user mailing list
[email protected]<mailto:[email protected]>
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user