Closed ethulhu closed 5 months ago
When KaSim writes the inputs.ka file, >= in observations, variables, etc, is emitted as =, e.g. |A(c{>=1})| is emitted as |A(c{=1})|.
inputs.ka
>=
=
|A(c{>=1})|
|A(c{=1})|
Counters in rules are emitted correctly, and the simulation itself is correct, but cannot be rerun from inputs.ka.
For example:
$ cat test.ka %agent: A(c{=0 / +=2}) %init: 1 A(c{=0}) %init: 1 A(c{=1}) %init: 1 A(c{=2}) 'rule' A(c{>=1}) -> A(c{+= -1}) @ 1 %obs: A0 |A(c{>=0})| %obs: A1 |A(c{>=1})| %obs: A2 |A(c{>=2})|
becomes
$ cat inputs.ka // "uuid" : "423742465" %def: "seed" "1038706679" %def: "dumpIfDeadlocked" "true" %def: "maxConsecutiveClash" "3" %def: "progressBarSize" "70" %def: "progressBarSymbol" "#" %def: "plotPeriod" "1" "t.u." %def: "outputFileName" "data.csv" %agent: A(c{=0/+=2}) %var:/*0*/ 'A0' |A(c{=0})| %var:/*1*/ 'A1' |A(c{=1})| %var:/*2*/ 'A2' |A(c{=2})| %plot: [T] %plot: A0 %plot: A1 %plot: A2 'rule' A(c{>=1/+=-1}) @ 1 /*0*/%mod: (|A(c{=3})| = 1) do $PRINTF ""; $PRINTF "Counter c of agent A reached maximum"; $STOP "counter_perturbation.ka"; repeat [false] %init: 1 A(c{=0}) %init: 1 A(c{=1}) %init: 1 A(c{=2}) %mod: [E] = 3 do $STOP;
When KaSim writes the
inputs.ka
file,>=
in observations, variables, etc, is emitted as=
, e.g.|A(c{>=1})|
is emitted as|A(c{=1})|
.Counters in rules are emitted correctly, and the simulation itself is correct, but cannot be rerun from
inputs.ka
.For example:
becomes