KappaTools icon indicating copy to clipboard operation
KappaTools copied to clipboard

Use a variable as a timing in an intervention

Open ysard opened this issue 7 years ago • 1 comments

Currently the syntax is as follows (example taken from the doc, chapter 2.5.1):

 // test at a specified time
%mod: alarm 2.3 [true] do $PLOTENTRY; repeat [true]

Expected result: I would like the float used as timing to be a variable passed to the model via a command line with the following syntax:

KaSim -var 'interval' 2.3 ...

Thank you for reading.

ysard avatar Sep 17 '18 13:09 ysard

Just to add an example usage that would dump a predictable number of snapshots, evenly spaced in time, after some equilibration time has elapsed, in a parametric fashion. Variables with alarm clocks would support this.

%mod: alarm 'snap_spacing' ([T] > 'snap_offset') do $SNAPSHOT ; repeat [true]
%mod: [T] > 'snap_num' * 'snap_spacing' + 'snap_offset' do $STOP ;

hmedina avatar May 02 '19 19:05 hmedina