Error using counters
Closed this issue · 3 comments
wwaites commented
With the latest release of KaSim, the following error happens reliably when using counters. It is not clear what it means or why it is happening:
Parsing delay.ka...
done
+ simulation parameters
+ Sanity checks
+ Compiling...
+ Building initial simulation conditions...
-variable declarations
-rules
-interventions
-observables
-update_domain construction
20 (sub)observables 704 navigation steps
-initial conditions
+ Self seeding...
+ Building initial state (256 agents)
Done
+ Command line to rerun is: 'KaSim' '-l' '20' 'delay.ka' -seed 488104363
0.01 time units (0.03%) in 1 eventsFailure("Matching.reconstruct renaming error at root 488")
A small example that produces this error is:
%agent: A(c{=0 / += 10})
%agent: B()
// I wish I could just write c{<10}
'wait0' A(c{=0 / += 1}) @ 1
'wait1' A(c{=1 / += 1}) @ 1
'wait2' A(c{=2 / += 1}) @ 1
'wait3' A(c{=3 / += 1}) @ 1
'wait4' A(c{=4 / += 1}) @ 1
'wait5' A(c{=5 / += 1}) @ 1
'wait6' A(c{=6 / += 1}) @ 1
'wait7' A(c{=7 / += 1}) @ 1
'wait8' A(c{=8 / += 1}) @ 1
'wait9' A(c{=9 / += 1}) @ 1
'tick' A(c{=10}), . -> ., B() @ 1
%obs: A |A()|
%obs: B |B()|
%init: 100 A(c{=0})
wwaites commented
Same behaviour using current source. I'm at a loss!
feret commented
This bug has never been addressed.
It is still not working on current engine.
feret commented
The activity does not decrease when the agent with a counter is degraded.
I think this is a matter of preprocessing.
When destroyed, the variable concrete_removed contains only the agents and not the link between them.
When removing a chain, this is the link which initiates the update of the activity.