Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Regarding Traffic Generation

In the traci_tutorial runner, the threshold of pEW controls the probability for a vehicle to be generated in each second.
If you copy the code, you can set a lower threshold to maintain the same amount of traffic.
Also, consider using flow definitions with probability attribute to achieve the same effect without a python script (https://sumo.dlr.de/wiki/Definition_of_Vehicles,_Vehicle_Types,_and_Routes#Repeated_vehicles_.28Flows.29).

Am Do., 8. Aug. 2019 um 00:56 Uhr schrieb Radha Reddy <radha.reddy.ipp@xxxxxxxxx>:
Hello,

With the following lines, the traffic will be generated from East to West:

if random.uniform(0, 1) < pEW:
            #East to South - Left Crossing
                print('    <vehicle id="right_%i" type="typeIDM" route="EW" depart="%i" color="1, 1, 0" />' % (vehNr, i), file=routes)
                vehNr += 1
 My question is, how to generate the traffic at East that can take either West, South or North?
If I use the above code 3 times each for West, South or North the traffic generation is multiple, I dont need that, I need multiple directions from single.  E.g., East to West, South, and North.

Please help me in solving this issue.

Regards
Radha
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top