Closed hmedina closed 3 years ago
Update: the perturbation need not be in a different file.
With a model containing the perturbation line:
%mod: alarm 400.0 ([T] > 0) do $STOP "snap_T_400.ka" ;
The witness file correctly holds:
/*1*/%mod: alarm 400. ([T] > 0) do $STOP "snap_T_400.ka"; repeat [false]
And yet the requested snapshot snap_T_400.ka
has:
[...]
%def: "T0" "200"
[...]
If T0 remains at 200, why did the perturbation fire?
When taking the mixture from a snapshot via
-mixture
, the internal clock should be fast-forwarded to the time declared in the mixture file. If perturbations in a different file use time, weird results happen. In the below, each code pod is in a different file. The perturbation calls for a snapshot at the end of the simulation.Invocation:
foo_ruleset.ka:
foo_mixture.ka:
foo_perturbation.ka:
snap.ka:
Kappa Simulator: v4.1-6-g89cf84617
Observations: 1) Zero events; KaSim did nothing 2)
1.00 time units in 0 events
but I requested a stop atalarm 4.0
3) Word options usually take double dash, whereas letter options take single dash, and so-mixture
makes my muscle memory trigger a syntax error Every. Single. Time. 4) The alarm for the mixture snapshot and the end-of-sim snapshot is the same 5) If I run without that--mixture
option, I get several thousand events byalarm 4.0