Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Generate a dataset with pedestrian positions

You are right.

Really gave me just 50 pedestrians and finally I understood the intermediate parameter (1000 intermediate walks). But I'm still having problems running my simulation.
I'm trying to change a simulation that I built using the OSM Wizard to have a restricted area. Running what wizard gave to me, the simulation runs fine - but not with just 50 pedestrians.

This is the build.bat file changed with your tip: python "%SUMO_HOME%\tools\" -n -o osm.pedestrian.trips.xml -r osm.pedestrian.rou.xml -e 50 --vclass pedestrian --prefix ped --pedestrians --intermediate 1000.
But when I run it, the simulation doesn't run anymore. I think it is because the "osm.pedestrian.rou.xml" is empty.

I tried to run using  a python script based on Traci Tutorials, but it didn't work either.
Method "getMinExpectedNumber" returns zero and getIDList as well. 

def run():
    while traci.simulation.getMinExpectedNumber() > 0:

        lstPeopleId = traci.person.getIDList()

        for personId in lstPeopleId:
            x, y = traci.person.getPosition(personId);
            lon, lat = traci.simulation.convertGeo(x, y)
            person = [personId, x, y, lat, lon, random.randint(0,355), traci.simulation.getTime()]


Em seg., 20 de mar. de 2023 às 04:50, Jakob Erdmann <namdre.sumo@xxxxxxxxx> escreveu:
With the suggested option, what you should be getting are 50 pedestrians (not 60) each having a number of walks.
Effektively, each pedestrian will keep walking around the network and you won't really see where one walk ends and another walk starts (if you look at fcd-output).
You can take the position of each pedestrian at some fixed time of your choice to get those locations. (i.e. once per hour by using options --fcd-output fcd.xml --person-device.fcd.period 3600).

Am Do., 16. März 2023 um 19:15 Uhr schrieb Gervalino Bilas <gervalino.bilas@xxxxxxxxx>:
Hi Jacob.
Thanks for anwer me.

Well, running with your tip I do get 50 pedestrian (actually 60 because the --intermediate parameter).
Those pedestrians have ids from 0 to 50. (ex: ped01)

But what I need is to have 50 walks for 50 different pedestrians and check their final location (x,y). Then, one after that, I have to do another 50 walks but with the same 50 pedestrians.
I have to do this 13 times.
At the end of this simulations, I got to have 13 registers of each pedestrians with their location (after the walk)
Any clue will be helpful.


Em qua., 15 de mar. de 2023 às 21:06, Jakob Erdmann <namdre.sumo@xxxxxxxxx> escreveu:
use: -e 50 --pedestrians --intermediate 1000

The value of 1000 is just a placeholder. The needed number of intermediate locations depends roughly on the desired travel duration divided by the time it takes to  traverse the network from one end to another.

Am Mi., 15. März 2023 um 19:49 Uhr schrieb Gervalino Bilas <gervalino.bilas@xxxxxxxxx>:

I'm trying to simulate 50 pedestrians walking by some fixed area for 13 hours.
My goal is to get the position (x,y ou geographic location) from every one of them hour by hour. So my simulation has to run with the same 50 pedestrians.

By now, using OSM Web Wizard, I could generate a simulation in my fixed area only for pedestrians by 13 hours. But it's not the same pedestrians - 743 pedestrians were generated.
I tried to repeat the same pedID 13 times, but it didn't work.

How can I run a simulation with the 50 pedestrians for 13 hours getting their position hour by hour?

Best regards,
sumo-user mailing list
To unsubscribe from this list, visit
sumo-user mailing list
To unsubscribe from this list, visit
sumo-user mailing list
To unsubscribe from this list, visit
sumo-user mailing list
To unsubscribe from this list, visit

Back to the top