Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Generating routes from many trip files

Hello all,

I currently have around 2000 trip files, each describing the trip that a vehicle makes via a series of stops, as follows:

<trip id="Taxi1_Day1" type="eTaxi" depart="53564" from="173819953" to="802374502#1">
        <stop lane="173819953_0" until="53565"/>
        <stop lane="68612608#0_0" until="53650"/>
</trip>

Each trip file has around 750 stops. My aim is to generate a simulation corresponding to each trip file, which routes between the stops of that trip file.  All the trip files correspond to the same network file, which is around 480 MB big. I want to do the route generation from Python preferably.

My current approach is to run duaIterate.main() (from $SUMO_TOOLS/assign) for each of the trips. However, this is taking very long. I think the problem is that duaIterate.main() takes a lot of time to load the network each time. It also takes almost all of my RAM to load the network, so I can't run the process for multiple trip files concurrently. It would be great if duaIterate.main() provided a way to pass in the network object (i.e. sumolib.net.Net), rather than the path to the network file.

If I could do that, I think it would take much quicker, and I could run multiple duaIterate processes concurrently, without running out of ram. Do you know if it is possible, or if there is a better approach?

Regards,
Chris

Back to the top