Set the name of a LUA function that should be called during every run of a simulation. 

A simulation run is defined by a total number of runs and ends when all these runs have been carried out. 

However, the LUA function can be used to conditionally stop the simulation run before it has reached its total number of runs, and can have the two following arguments

  • Argument1: ID of the current run. 
  • Argument2: Total number of runs as defined by the user in the nrruns parameter in the P2Simulator:run_simulation function.

The LUA function set in the set_callback function should return a 0 (continue and go to the next simulation run) or 1 (stop this simulation). When no such a LUA function exists with the define name, a message will be shown to report this lack of function.

I/O Type Name Description
input string callback LUA function name (argument1,argument2)
function ()