First time here? Checkout the FAQ!
x
0 votes
by (1.2k points)

I am running an experiment for a long period of time(>10000 ms) and would like to save only the last 1000 ms to vm.igb. I tried using the chkpt options, but this does not seem to affect the .igb file itself.

How can I save only the last 1000 ms of an experiment to vm.igb?

1 Answer

+1 vote
by (1.3k points)
selected by
 
Best answer

I think the way to go is run a first pre-pacing simulation of 10000ms without writing down the igb (or just writing a little amount of points so that you are not storing a huge amount of data). Save the state variables at the end of the prepacing simulation:

'-write_statef', writestatef,
'-num_tsav', 1,
'-tsav[0]', tend_state,

And run a 1000ms simulaiton

'-start_statef', startstatef,

EDITED: you can use the 'spacedt' option as the duration of your simulation to reduce the igb file of the pre-pacing to just one point.

cheers,

Teo

by (1.2k points)
Hi Teo,

Thanks for your suggestion. I think this approach could work as long as there's a way to suppress the .igb output from being written to disk. Do you happen to know how? To me it looks like the vofile parameter isn't capable of handling this functionality.
by (1.3k points)
You can use the `spacedt` option, entering the same value as the simulation duration, so efectively you will have an igb file, but it will just have one point written on file.

-----------------------------------------------
openCARP +Help spacedt

spacedt:
    Defines the temporal interval to output data to files.
It can only be as small as 'dt/1000'.
For long simulations outputting every single calculated value, would yield terrabytes of data. So here you can reduce the outputted values.
--------------------------------------------
by (1.2k points)
I had not thought of that! This is great, thanks.
Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance
...