KappaTools icon indicating copy to clipboard operation
KappaTools copied to clipboard

More functions to the toplevel

Open hmedina opened this issue 6 years ago • 1 comments

It would be useful to have more functions available to the interactive mode / toplevel:

  • compile to simulation package
  • change plot period

As this mode is intended for exploratory simulations, one may not know what is a meaningful plotting period. And when simulation initialization is costly, having the option to dump a simulation package would reduce the time spent (re)initializing.

hmedina avatar May 13 '19 21:05 hmedina

Adding to the list from #586

  • Have the capacity to %mod: alarm [T>10] do $SNAPSHOT ; repeat [true] from the toplevel

How do you preserve this in the inputs.ka file if some arbitrary time has passed you say? Great question! How about adding the event number as a condition to the boolean conditioner of the precondition? I.e.

//%mod: alarm [T]>10 do $SNAPSHOT ; repeat [true]
%mod: alarm ([T]>10 && [E] > 563) do $SNAPSHOT ; repeat [true]

Where the first line is what the user wrote at the toplevel, when paused at say event number 563, and the second line is what actually happened.

hmedina avatar May 22 '19 17:05 hmedina