atomica.model.run_model¶
- atomica.model.run_model(settings, framework, parset, progset=None, program_instructions=None, name=None)[source]¶
Build and process model
Running simulations is accomplished via the
Model
object in two stepsThe
Model
object is build, and all variables are initializedThe integration is carried out
run_model
serves as a wrapper for both of these steps, which are commonly performed together. However, in some cases it may be desired to split the operations. For exampleIn optimization, the same
Model
is used at each iteration, but with different instructions. To save time, the model is built just once, and deep-copied after building but before processingSometimes it may be required to make changes to the model’s structure e.g. to implement exotic cross-population interactions that cannot be expressed via the Excel inputs. In that case, it may again be necessary
- Parameters:
settings – Project settings defining simulation time span and time step
framework – A
ProjectFramework
instanceparset (
ParameterSet
) – AParameterSet
instanceprogset (
ProgramSet
) – Optionally provide aProgramSet
instance to use programsprogram_instructions (
ProgramInstructions
) – OptionalProgramInstructions
instance. Ifprogset
is specified, then instructions must be providedname (
str
) – Optionally specify the name to assign to the output result
- Returns:
A
Result
object containing the processed model