Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Starting Conditions

A trip is a vehicle going from Road A to Road B. I can manually define trips by arbitrarily selecting destinations. But then, because the vehicle reaches its destination, it leaves the simulation. 

Since I want the vehicle to keep driving around without leaving, I could give it a new destination so that it keeps moving around. I checked rerouters for this but they don't change the destination, they just reroute if the network topology is disturbed. Using Traci it seems like I can use changeTarget to change the target edge for a vehicle, but this is not scalable because I need to keep checking for each vehicle if they are close to the destination. 

The methods to achieve the constant number of vehicles stated in the documentation always consider generating the vehicular load randomly, distributed over time, so I can't setup the initial state of the simulation thoroughly. 


On Thu, Nov 14, 2024 at 1:40 AM Kerem Demirtas via sumo-user <sumo-user@xxxxxxxxxxx> wrote:
If you can't keep the vehicles in the simulation and they exit when reaching their destination, it means that you are actually generating the vehicles. Any vehicle that you generate will either move towards some destination and get disposed of eventually or stop (if you want). What do you mean by a random walk? Do you want the vehicles to just drive around without a destination?

On Wed, Nov 13, 2024 at 9:28 PM Toprak via sumo-user <sumo-user@xxxxxxxxxxx> wrote:
I already checked traci and randomtrips but I cant seem to find a way to generate routes automatically and let the vehicles stay inside the simulation. 
if I generate them by defining trips, they reach to their target and leave the simulation. I can’t add them using traci because I need to specify routes.

What I am trying to do is really simple, I dont know why there’s no straightforward way to generate a specific number of cars on specific roads and let them randomwalk for a specific number of time. 

On 13 Nov 2024, at 18:38, Jakob Erdmann via sumo-user <sumo-user@xxxxxxxxxxx> wrote:

- you can add cars via traci (traci.vehicle.add) : https://sumo.dlr.de/docs/TraCI.html
- you can write a script that generates xml inputs for the simulation (i.e. https://sumo.dlr.de/extractTest.php?path=complex/tutorial/traci_tls/plain)
- you can use ready-made scripts to generate traffic (also with specific numbers): https://sumo.dlr.de/docs/Tools/Trip.html#randomtripspy
  (and there are many more tools for traffic generation in sumo/tools)

Am Mi., 13. Nov. 2024 um 13:52 Uhr schrieb Toprak via sumo-user <sumo-user@xxxxxxxxxxx>:
Hi,
What is the best practice to initiate a simulation with a specific number of cars. I was using an additional file and input for the first time interval the occupancy but apparently it is not working. After researching it seems like there’s no straightforward method of adding lets say 5 cars to road 1 and 2 cars to road 2 and creating routes for these cars using a script?
Regards,
Toprak
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top