The vTypeDistribution must be defined before the vehicles or flows that
reference it. See http://sumo.dlr.de/wiki/SUMO#Loading_order_of_input_files
regards,
Jakob

2015-11-03 16:48 GMT+01:00 Bing Liu <[email protected]>:

> Hi all,
>
> I've been using the sumo 0.22 and I want to generate random flows with
> random vehicle types.
>
> I have tried the method shown in
> http://sourceforge.net/p/sumo/mailman/message/22753044/.
>
> However the duarouter can not recognize the randomized vehicle type.
>
> Here is my code :
> In .flows.xml,
> <flowdefs>
>
>     <flow id="f_right" from="1i" to="2o" type="random_vehicles" begin="0"
> end="100" departspeed="10" probability="0.2"/>
> </flowdefs>
>
> Where should I put the following code ?
> <vtypeDistribution id="random_vehicles">
> <vType id="bus" accel="1.5" decel="3.5" sigma="0" tau="1" length="10"
> width= "3" minGap="0" maxSpeed="22" guiShape="bus" probability="0.1"/>
> <vType id="truck" accel="1.5" decel="3.5" sigma="0" tau="1" length="8"
> width= "2.8" minGap="0" maxSpeed="20" guiShape="truck" probability="0.1"/>
> <vType id="wagon" accel="2.7" decel="4.5" sigma="0" tau="1" length="5.2"
> width= "2" minGap="0" maxSpeed="30" guiShape="passenger/wagon"
> probability="0.1"/>
> <vType id="hatchback" accel="3" decel="4.5" sigma="0" tau="1" length="3"
> width= "1.8" minGap="0" maxSpeed="40" guiShape="passenger/hatchback"
> probability="0.35"/>
> <vType id="sedan" accel="2.5" decel="5" sigma="0" tau="1" length="3.5"
> width= "1.6" minGap="0" maxSpeed="50" guiShape="passenger/sedan"
> probability="0.35"/>
> </vtypeDistribution>
>
> In fact, I've tried to put it in .rou.xml and .add.xml. And there is always
> the error: the vehicle type 'random_vehicles' for vehicle 'f_right' is not
> known.
>
> Could you help me with it ?
>
> Best regards
>
> LIU Bing
> PhD Student
> CNRS - CRIStAL - UMR 9189
> Ecole Centrale de Lille
> Cité Scientifique -B. P. 48 F 59651 Villeneuve D'Ascq cedex, France
>
> ------------------------------------------------------------------------------
> _______________________________________________
> sumo-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sumo-user
>
------------------------------------------------------------------------------
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to