Hi, you need to run the following script https://sourceforge.net/p/sumo/code/HEAD/tree/trunk/sumo/tools/createVehTypeDistribution.py?format=raw (please download a fresh copy from the link, the version in th release is buggy) and give it a config.txt with the following content:
maxSpeed; uniform(MIN_SPEED, MAX_SPEED) The call looks like this tools/createVehTypeDistribution.py config.txt --o out.add.xml --size 10 --name exampleDist The resulting out.add.xml needs to be loaded as additional file into the simulation and you can refer to the generated distribution by including type="exampleDist" into the vehicle parameters. Best regards, Michael Am 21.11.2016 um 15:47 schrieb Fatima kader: > Hi sir, > > thank you for your reply, > > i want the vehicles take a random speed between two values [minspeed, > maxspeed] that i define > > thank you again > > 2016-11-21 12:33 GMT+01:00 Michael Behrisch > <[email protected] <mailto:[email protected]>>: > > Hi, > it depends on the distribution you want and whether you want to modify > only the speed at departure or the maximum speed. If you want a uniform > distribution of departure speeds in [0, MAX_SPEED] you can use the > departSpeed="random" attribute when defining the vehicle or the flow. > For maximum speed I would recommend using the following script > http://sumo.dlr.de/wiki/Tools/Misc#createVehTypeDistributions.py > <http://sumo.dlr.de/wiki/Tools/Misc#createVehTypeDistributions.py> > and then use the resulting vTypeDistribution. > > Best regards, > Michael > > Am 21.11.2016 um 11:14 schrieb Fatima kader: > > Hello all, > > > > how can i generate a flow of vehicles with random speed in the > interval > > [MIN_SPEED, MAX_SPEED]. > > > > Thank you for your help > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > sumo-user mailing list > > [email protected] > <mailto:[email protected]> > > https://lists.sourceforge.net/lists/listinfo/sumo-user > <https://lists.sourceforge.net/lists/listinfo/sumo-user> > > > > ------------------------------------------------------------------------------ _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
