matsim-org / matsim-libs

Multi-Agent Transport Simulation
www.matsim.org
483 stars 447 forks source link

Offline multi-threading route calculation #1814

Open luchengqi7 opened 2 years ago

luchengqi7 commented 2 years ago

Is it possible to run the route calculation off line on parallell? The routers are capable of running on parallell, as this is what happens during a MATSim run. But it seems that it is not that straight forward if we want to run it offline (as error will appear. @rakow and I have tried several ways, but it didn't work in the end).

rakow commented 2 years ago

One needs to create a separate router and context for each thread. So it requires some boilerplate code, but it is certainly possible.