Skip to content

faq 268271617

Billy Charlton edited this page Sep 5, 2018 · 2 revisions

Pause/Resume in MATSim Standalone 0.9.1 available?

by Wolfgang Schieder on 2018-04-18 12:34:13


Hello MATSim people out there,

I was wondering, if there is a built-in solution for my quite simple task:

PAUSE a run of Version 0.9.1 of MATSim standalone and RESUME the run at any time.

That would be an additional button like PAUSE/RESUME in the GUI, which would be very helpful for me. Perhaps a useful idea for Version 10.0.x?

Anyway, is there any other solution to easily maintain such a behaviour and still let the simulation run stable?

Best regards,

Wolfgang


Comments: 1


Re: Pause/Resume in MATSim Standalone 0.9.1 available?

by Kai Nagel on 2018-04-18 17:10:28

In principle, this code https://github.com/agentsoz/bdi-abm-integration/blob/master/integrations/bdi-matsim/src/main/java/io/github/agentsoz/bdimatsim/MATSimModel.java addresses exactly that problem. It starts MATSim in a separate thread, and plays/pauses it as needed.

It is set up and called from here: https://github.com/agentsoz/bdi-abm-integration/blob/master/examples/bushfire/src/main/java/io/github/agentsoz/ees/Main.java .

This is functionality that is still in flux to no guarantee that the syntax will be exactly the same in 5 years from now. But in general, it has been around for many years (as part of OTFVIS) and was extracted and made available in more general for the bdi-abm-integration project about 2 years back.

Can't say how much of this was already in v9.

Clone this wiki locally