Skip to content

Defining the Simulation

kalden edited this page Mar 19, 2013 · 12 revisions

The simulator mark-up defines the parameters controlling the overall simulation.

defineSim

The quietMode parameter allows the user to suppress output to the log file in order to save storage space and make simulations run a little faster. We recommend that this be used only once preliminary tests have been performed and the user is confident that their protocol is correct.

The restartPreviousRun parameter allows one to restart a previously-completed run, for instance to extend the time of simulation. Restarting in this manner will preserve the numbering of output files. To restart a previous run, merely edit the protocol file contained in the relevant results directory: change this parameter from false to true, change any other relevant parameters (such as ending time), and when running RunSimulation.bat choose the newly modified protocol file from the output directory.

The randomSeed parameter allows you to specify a value for the seed of the random number generator. To assess the effect of stochasticity on your model, you should run several simulations with different seeds and look at how the simulation results differ for each case. Note that if a random.state file is present in the same directory as the protocol file then this will override the randomSeed (see Section III).

The outputPeriod parameter gives the simulation time-interval between the generation of output files (state, summary and povray files). Low values (more frequent outputs) will lead to more files and higher use of disk space, while high values (fewer outputs) may not have sufficient time resolution to visualize transient behaviour. Therefore this parameter should be set based on the expected dynamics of your system.

The timeStep mark-up specifies all parameters for the time stepping of the simulation. This mark-up is analysed by the idyno.SimTimer constructor. If you want to use an adaptive timestep, set the parameter adaptive to true and assign values for timeStepMin and timeStepMax (minimum and maximum timestep value, respectively). Otherwise, set the parameter adaptive to false, then the timeStep will always be equal to value of timeStepIni. The parameter endOfSimulation defines the overall length of the simulation.

It is possible to specify a smaller timestep for agent dynamics using the agentTimeStep parameter, which means that the agents will be stepped several times between relaxations of the Diffusion-Reaction problem. If this mark-up is not present, agentTimeStep is equal to the overall simulation timestep.

The chemostat parameter must be set to true when simulating a chemostat scenario. In such simulations, the agents’ positions are ignored and are not changed and all agents have the same growth conditions in order to simulate a well-mixed chemostat.

It may be convenient for the simulation to stop automatically once there is only one microbial species remaining in the system. This is often the case in invasion or competition contests, and so by setting the invComp flag to true the user can save time.


Clone this wiki locally