[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sumo-user] Traci Pedestrians: Is it possible to have control about the simulation's time?
|
Worked like a charm, Jakob.
Thanks.
Here is what happens:
- your network has disconnected components
- when you generate intermediate locations, there is a high probability that some of them are in different components of the network
- walks between disconnected are invalid and rejected when generating the route file
Here is the solution:
pre-process your network so that it only keeps the biggest component with
netconvert -s data/osm.net.xml.gz --keep-edges.components 1 -o data/fixed.net.xml
Sorry, Jakob.
I did a little change in the file's names and forgot to send it to you.
But the code now is:
With this code, I have 50 pedestrians walking for 18 minutes. Ped0 at de beginning and Ped49 at the end.
randomTrips algorithm gives me:
- osm.pedestrians.rou.xml (a walk for every person)
- trips.trips.xml (same walk but with just start and arrival junction)
When I include the --intermediate option, I have:
- osm.pedestrians.rou.xml (with zero information)
- trips.trips.xml (a lot of walks for each person)
But in this case, the simulation doesn't run anymore.
What is my goal? Run a walking simulation for 13 hours and get the position of every pedestrian hour by hour.
Please check the "data" directory that I'm sending you now.
Thanks for your help.
Regards,
calling randomTrips with your options creates 50 persons as expected.
Since your prior script references a different network (data/test.net.xml.gz) and also calls a test.sumocfg that you did not include, these are candidates where your problem may originate.
Hello Jakob.
Thanks for helping me.
I couldn't figure out why I can't generate intermedians walks.
Here is the network file.
If it's still unclear after that, feel free to provide the network file.
Hello.
Is it possible to have control about the simulation's time?
With this code I can have 50 pedestrians walking in a network in a random way:
randomTrips.main(randomTrips.get_options([
'--net-file', 'data/test.net.xml.gz',
'--route-file', 'test.pedestrians.rou.xml',
'--pedestrians',
'--prefix', 'ped',
'--trip-attributes', 'departPos="random" arrivalPos="random"',
'--end', '50']))
traci.start([sumoBinary, '-c', os.path.join('data', 'test.sumocfg'), "--fcd-output", "fcd.xml"])
But at the end of all walks, about 18 minutes, the simulation stops and I need to get data for 13 hours.
I had help from Jakob Erdmann and could generate intermediate (--intermediate) walks to have por simulation time. But when I include this option, the "test.pedestrian.rou.xml" is empty and the simulations don't run anymore.
Regards,
_______________________________________________
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
_______________________________________________
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