Version 0.5.0
-
new feature: All information available within an
evolve!
call is now managed in aDynamicState
structure. This enables full state dumps for seamless continuation of simulation runs. -
new feature: The callback API has been extended by two new optional functions
-
freeze!(::AbstractCallback, ::DynamicState)
is called on a callback instead offinalize
when the simulation is prematurely interrupted -
defrost!(::AbstractCallback)
can be used when restoring callbacks from a dumpedDynamicState
-
-
new feature: Three new callbacks are included with this version of InPartS
-
SignalHandlerCallback
captures POSIX signals for graceful termination ofevolve!
calls. This callback lives in an extension and depends on InterProcessCommunication.jl being loaded -
BinaryDumpCallback(trigger, filename)
: write aSerialization.serialize
dump of theDynamicState
when triggered and uponfinalize!
(andfreeze!
). -
ExponentialBackoffCallback
: A generic callback that triggers at first execution, then aftermax(max_interval, start_interval*factor^n)
withn
the amount of previous triggers. Starts back atn=0
afterdefrost!
-
-
new feature: the behaviour of the
SaveCallback
on encountering an already existing snapshot can now be specified -
breaking: The callback API has been overhauled, introducing several breaking changes:
- the meaning of callback return values has been changed: the only return values that do not terminate the simulation are
nothing
and a zero-value integer. All non-zero integers terminate the simulation, and will be returned byevolve!
. No return values other than Integers andnothing
are permitted. - the
(pre|post)propagate
andfinalize
hooks have been renamed(pre|post)propagate!
andfinalize!
respectively and now operate onDynamicState
s instead ofSimulation
s- this does not apply to the user-provided functions in generic callbacks (e.g. PeriodicCallback), which generally still operate on
Simulation
s
- this does not apply to the user-provided functions in generic callbacks (e.g. PeriodicCallback), which generally still operate on
- the meaning of callback return values has been changed: the only return values that do not terminate the simulation are
-
breaking:
evolve!
now returns an Integer return code (0
on regulartmax
termination or any non-zero callback return code) and aDynamicState
-
breaking: the execution order in single-threaded force computation is changed to the striping pattern using in multi-threading, thus simulation results should now be consistent independent of threading
-
breaking: The
offset
parameter inRealTimeCallback
s is now given in seconds relative to the firstprepropagate!
call.\ -
bugfix: Access to
sim.rng
is now type-stable, which should speed up simulations that rely on frequent random number generation. -
deprecation:
CallbackSet
is deprecated in favour ofCallbackList
which has a semantic ordering to the callback execution and uses early termination when a callback has a non-nothing return value.