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
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
        arch: linux-amd64
        channels:
          - name: string
            alias: string
        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

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.
versionstringfalseThe tag/version of the uses item.
pathstringfalseA sub-path relative to the uses artefact (URL or ZIP file) where the item is located.

Var

name: string
value: string
reference: uses

A variable definition.

Properties

NameTypeRequiredDescription
namestringtrueA variable name.
valuestringtrueA coresponding variable value.
referencestringfalseThis value is derived from the specified reference (e.g. a downloaded file) The resouce 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
    arch: linux-amd64
    channels:
      - name: string
        alias: string
    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
arch: linux-amd64
channels:
  - name: string
    alias: string
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.
archstringfalseThe architecture of the model, if different from the stack or simulation default architecture.
channels[ModelChannel]trueAn array of model <-> simulaiton channel mappings.
env[Var]falseSets environmnet 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 artefacts 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