The Models atom represents a branch for all underlying model atoms. Creating the models is typically the first step in a simulation work flow.
Model atoms inherit from ./src/model/model.js and the Models atom istself is an executable model. Executing a Models atom simply means that all of its runnable child atoms are executed.
A new Models atom is created either
-
from the context menu of an existing Root atom in the Tree View or
-
by calling the corresponding factory method of the Root atom in the source code of the Editor View:
...
let models = root.createModels();
The context menu of the Models atom allows to add child atoms:
- Path
- GenericInput
- DatabaseModifier
- FileCleanup
- FileCopy
- InputFileGenerator
- Executable
- JavaExecutable
- TableImport
- SqLiteAppender
- JavaScriptModel
- PythonModel
The Models atom has two properties that are used to differentiate subsequent runs:
The property studyId is only used if a model is remotely executed as part of a study. The studyId cannot be manually specified in the Properties View for a model but is specified in the Properties View for a study. While executing a study, the studyId is automatically injected to the models. The models are able to apply the studyId when generating results. If a model is manually executed, the studyId is undefined.
The property jobId is 1 by default. If a model is manually executed by a user, the jobId is automatically increased by one after the current job (=model run) has been finished.
You can reset the jobId with the "Reset jobId to 1" button of the Models atom in the Properties View.
You can also see the jobId for the next run in the Properties View.
If a model is remotely executed as part of a study (or as part of a parent model), a parent jobId is determined and the local/manual jobId is overwritten.
You can execute the Models atom either
a) with the run button in the upper right corner of the Properties View or
b) with the run button in the context menu of the atom in the Tree View or
c) remotely with another atom (e.g. as part of a Sweep study.
Executing a Models atom simply means that all of its runnable child atoms are executed. The progress is shown in the Monitoring View. After the execution has been finished, the jobId is increased by one.