Schema: Simulation

(v0.0.1)

Simulation

kind: Simulation
metadata:
  name: project
  annotations:
    input: somefile.json
    generator: parse2ast
spec:
  simulation:
    arch: linux-amd64
    channels:
      - name: physical
      - name: network
        networks:
          - name: CAN
            mime_type: application/x
    uses:
      - name: model.linear
        url: https://github.com/boschglobal/dse.fmi
        version: 1.1.15
        path: model/linear/path
    vars:
      - name: enable
        value: true
    stacks:
      - name: stack_name
        stacked: true
        arch: linux-amd64
        models:
          - name: linear
            model: model.linear
            channels:
              - name: physical
                alias: scalar
            env:
              - name: SIMBUS_LOGLEVEL
                value: 4
            workflows:
              - name: generate-fmimcl
                vars:
                  - name: FMU_DIR
                    value: "{{.PATH}}/fmu"

Simulation Abstract Syntax Tree (AST).

Properties

NameTypeRequiredDescription
kindstringtruenone
metadataobjectfalseInformation relating to an object.
» namestringfalseThe name of the object.
» labelsobjectfalseIdentifying information used to identify objects within the system (e.g. giving a specific ’label’ to an object).
»» additionalPropertiesstringfalsenone
» annotationsobjectfalseNon identifying information (i.e. information specific to the object itself).
»» additionalPropertiesanyfalsenone
specSimulationSpectruenone

Enumerated Values

PropertyValue
kindSimulation

SimulationSpec

arch: linux-amd64
channels:
  - name: string
    networks:
      - name: string
        mime_type: string
uses:
  - name: string
    url: string
    version: string
    path: string
    metadata:
      ? property1
      ? property2
vars:
  - name: string
    value: string
    reference: uses
stacks:
  - name: string
    arch: linux-amd64
    stacked: true
    env:
      - name: string
        value: string
        reference: uses
    models:
      - name: string
        model: string
        uses: string
        metadata:
          ? property1
          ? property2
        arch: linux-amd64
        channels:
          - name: string
            alias: string
        files:
          - name: string
            value: string
            reference: uses
        env:
          - name: string
            value: string
            reference: uses
        workflows:
          - name: string
            uses: string
            vars:
              - name: string
                value: string
                reference: uses

Properties

NameTypeRequiredDescription
archstringtrueThe default system architecture for the simulation.
channels[SimulationChannel]trueThe list of channels available in this simulation.
uses[Uses]falseThe list of uses references to external artifacts or repos.
vars[Var]falseThe list of variables available to models in this simulation.
stacks[Stack]trueThe list of stacks contained within this simulation.

SimulationChannel

name: string
networks:
  - name: string
    mime_type: string

Properties

NameTypeRequiredDescription
namestringtrueThe name of this channel.
networks[SimulationNetwork]falseA list of networks associated with a channel.

SimulationNetwork

name: string
mime_type: string

A network definition.

Properties

NameTypeRequiredDescription
namestringtrueThe name of the network signal (on the associated channel).
mime_typestringtrueMIME type defining the network.

ModelChannel

name: string
alias: string

A model <-> simulation channel mapping.

Properties

NameTypeRequiredDescription
namestringtrueThe name of the channel in the simulation.
aliasstringtrueThe name (alias) of the channel in the model.

Uses

name: string
url: string
version: string
path: string
metadata:
  ? property1
  ? property2

Defines an external resource used by the simulation.

Properties

NameTypeRequiredDescription
namestringtrueThe name of uses item (to be used for references).
urlstringtrueThe URL of the uses item (repository or artefact).
versionstringfalseThe tag/version of the uses item.
pathstringfalseA sub-path relative to the uses artefact (URL or ZIP file) where the item is located.
metadataobjectfalseAdditional data relating to the uses item (e.g. container details).
» additionalPropertiesanyfalsenone

Var

name: string
value: string
reference: uses

A variable definition.

Properties

NameTypeRequiredDescription
namestringtrueA variable name.
valuestringtrueA corresponding variable value.
referencestringfalseThis value is derived from the specified reference (e.g. a downloaded file) The resource name is specified in the value.

Enumerated Values

PropertyValue
referenceuses

File

name: string
value: string
reference: uses

A file definition.

Properties

NameTypeRequiredDescription
namestringtrueName of the file (to be placed in the data folder of a model) or a relative path of the file (i.e. relative to the Model defining the file).
valuestringtrueA corresponding file value, interpret as a ‘uses’ reference or a local file path.
referencestringfalseThis value is derived from the specified reference (e.g. a downloaded file) The resource name is specified in the value.

Enumerated Values

PropertyValue
referenceuses

Stack

name: string
arch: linux-amd64
stacked: true
env:
  - name: string
    value: string
    reference: uses
models:
  - name: string
    model: string
    uses: string
    metadata:
      ? property1
      ? property2
    arch: linux-amd64
    channels:
      - name: string
        alias: string
    files:
      - name: string
        value: string
        reference: uses
    env:
      - name: string
        value: string
        reference: uses
    workflows:
      - name: string
        uses: string
        vars:
          - name: string
            value: string
            reference: uses

A stack definition which composes one or more models as a logical unit of the simulation.

Properties

NameTypeRequiredDescription
namestringtrueThe name of the stack.
archstringfalseThe architecture of the stack, if different from the simulation default architecture.
stackedbooleanfalseIndicate that models in this stack should be run in a ‘stacked’ configuration (i.e. as a single process).
env[Var]falseSets environment variables in the runtime of this simulation stack.
models[Model]trueThe list of models belonging to this simulation stack.

Model

name: string
model: string
uses: string
metadata:
  ? property1
  ? property2
arch: linux-amd64
channels:
  - name: string
    alias: string
files:
  - name: string
    value: string
    reference: uses
env:
  - name: string
    value: string
    reference: uses
workflows:
  - name: string
    uses: string
    vars:
      - name: string
        value: string
        reference: uses

Properties

NameTypeRequiredDescription
namestringtrueThe name of the model in the simulation (i.e. the model instance name).
modelstringtrueThe name of the model this instance represents (as named in the associated repository metadata).
usesstringtrueName of the uses item that represents the implementation of the model.
metadataobjectfalseAdditional data relating to the model implementation (e.g. package layout details).
» additionalPropertiesanyfalsenone
archstringfalseThe architecture of the model, if different from the stack or simulation default architecture.
channels[ModelChannel]trueAn array of model <-> simulation channel mappings.
files[File]falseAn array of files to be combined with the model deployment. Files specified without a path are placed
in the model data folder (i.e. ‘sim//data’), otherwise the file is placed relative to the
model folder.
env[Var]falseSets environment variables in the runtime of this model.
Values defined here supersede those set in the simulation stack (of the model).
workflows[Workflow]falseAn array of workflows used to construct/process artifacts used by this model instance.

Workflow

name: string
uses: string
vars:
  - name: string
    value: string
    reference: uses

Properties

NameTypeRequiredDescription
namestringtrueThe name of the workflow.
usesstringfalseIf a workflow is located in a different repository than the model, indicate that here.
vars[Var]falseSet variable values to be used by the workflow.

undefined