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
Modelobject in two stepsThe
Modelobject is build, and all variables are initializedThe integration is carried out
run_modelserves 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
Modelis 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
ProjectFrameworkinstanceparset (
ParameterSet) – AParameterSetinstanceprogset (
ProgramSet) – Optionally provide aProgramSetinstance to use programsprogram_instructions (
ProgramInstructions) – OptionalProgramInstructionsinstance. Ifprogsetis specified, then instructions must be providedname (
str) – Optionally specify the name to assign to the output result
- Returns:
A
Resultobject containing the processed model