From 76399d17ef763f1e3017e0194a4c574164dfba29 Mon Sep 17 00:00:00 2001 From: Kristoffer Skare Date: Tue, 12 Mar 2024 13:03:30 +0100 Subject: [PATCH] Ran publish-interface-docs --- docs/interface/schema.html | 16 +++++---- docs/schema/schema.json | 74 +++++++++++++++++++++++++++++++++----- 2 files changed, 74 insertions(+), 16 deletions(-) diff --git a/docs/interface/schema.html b/docs/interface/schema.html index 5931a7d..f164f5f 100644 --- a/docs/interface/schema.html +++ b/docs/interface/schema.html @@ -4,7 +4,7 @@
"integer"
 

Description

Default: null

Short FMU variable description.

Type: string
Type: null

Default: null

Signal variability as defined by FMI.

Type: enum (of string)

Enum for signal variability.

Must be one of:

  • "constant"
  • "fixed"
  • "tunable"
  • "discrete"
  • "continuous"
Type: null

Startvalue

Default: 0

Initial value of the signal at time step 1. Type should match the variable type.

Type: number
Type: string
Type: boolean
Type: integer
Type: null

Isarray

Default: false

When dealing with an array signal, it is essential to specify the LENGTH parameter. Arrays are indexed starting from 0, and FMU signals will be structured as SIGNALNAME[0], SIGNALNAME[1], and so forth. By default, this feature is set to False.

Type: boolean
Type: null

Length

Default: null

Defines the number of entries in the signal if the signal is array.

Type: integer
Type: null

Examples:

3
 
5
-

Agentinputindexes

Type: array of string Default: null

Index or range of indices of agent inputs to which this FMU signal shall be linked to. Note: the FMU signal and the agent inputs need to have the same length.

No Additional Items

Each item of this array must be:

Type: string
Must match regular expression: ^(\d+|\d+:\d+)$

Examples:

"10"
+

Agentinputindexes

Type: array of string Default: []

Index or range of indices of agent inputs to which this FMU signal shall be linked to. Note: the FMU signal and the agent inputs need to have the same length.

No Additional Items

Each item of this array must be:

Type: string
Must match regular expression: ^(\d+|\d+:\d+)$

Examples:

"10"
 
"10:20"
 
"30"
 

Example:

[
@@ -24,7 +24,7 @@
 
"integer"
 

Description

Default: null

Short FMU variable description.

Type: string
Type: null

Default: null

Signal variability as defined by FMI.

Type: enum (of string)

Enum for signal variability.

Must be one of:

  • "constant"
  • "fixed"
  • "tunable"
  • "discrete"
  • "continuous"
Type: null

Startvalue

Default: 0

Initial value of the signal at time step 1. Type should match the variable type.

Type: number
Type: string
Type: boolean
Type: integer
Type: null

Isarray

Default: false

When dealing with an array signal, it is essential to specify the LENGTH parameter. Arrays are indexed starting from 0, and FMU signals will be structured as SIGNALNAME[0], SIGNALNAME[1], and so forth. By default, this feature is set to False.

Type: boolean
Type: null

Length

Default: null

Defines the number of entries in the signal if the signal is array.

Type: integer
Type: null

Examples:

3
 
5
-

Agentoutputindexes

Type: array of string Default: null

Index or range of indices of agent outputs that will be linked to this output signal. Note: the FMU signal and the agent outputs need to have the same length.

No Additional Items

Each item of this array must be:

Type: string
Must match regular expression: ^(\d+|\d+:\d+)$

Examples:

"10"
+

Agentoutputindexes

Type: array of string Default: []

Index or range of indices of agent outputs that will be linked to this output signal. Note: the FMU signal and the agent outputs need to have the same length.

No Additional Items

Each item of this array must be:

Type: string
Must match regular expression: ^(\d+|\d+:\d+)$

Examples:

"10"
 
"10:20"
 
"30"
 

Example:

[
@@ -44,7 +44,7 @@
 
"integer"
 

Description

Default: null

Short FMU variable description.

Type: string
Type: null

Default: null

Signal variability as defined by FMI.

Type: enum (of string)

Enum for signal variability.

Must be one of:

  • "constant"
  • "fixed"
  • "tunable"
  • "discrete"
  • "continuous"
Type: null

Startvalue

Default: 0

Initial value of the signal at time step 1. Type should match the variable type.

Type: number
Type: string
Type: boolean
Type: integer
Type: null

Isarray

Default: false

When dealing with an array signal, it is essential to specify the LENGTH parameter. Arrays are indexed starting from 0, and FMU signals will be structured as SIGNALNAME[0], SIGNALNAME[1], and so forth. By default, this feature is set to False.

Type: boolean
Type: null

Length

Default: null

Defines the number of entries in the signal if the signal is array.

Type: integer
Type: null

Examples:

3
 
5
-

Agentinputindexes

Type: array of string Default: null

Index or range of indices of agent inputs to which this FMU signal shall be linked to. Note: the FMU signal and the agent inputs need to have the same length.

No Additional Items

Each item of this array must be:

Type: string
Must match regular expression: ^(\d+|\d+:\d+)$

Examples:

"10"
+

Agentinputindexes

Type: array of string Default: []

Index or range of indices of agent inputs to which this FMU signal shall be linked to. Note: the FMU signal and the agent inputs need to have the same length.

No Additional Items

Each item of this array must be:

Type: string
Must match regular expression: ^(\d+|\d+:\d+)$

Examples:

"10"
 
"10:20"
 
"30"
 

Example:

[
@@ -58,7 +58,9 @@
         "variability": null
     }
 ]
-

Type: object Default: []

Internal states that will be stored in the simulation model's memory, these will be passed as inputs to the agent in the next time step.

Agentoutputindexes

Type: array of string Default: null

Index or range of indices of agent outputs that will be stored as internal states and will be fed as inputs in the next time step. Note: the FMU signal and the agent outputs need to have the same length.

No Additional Items

Each item of this array must be:

Type: string
Must match regular expression: ^(\d+|\d+:\d+)$

Examples:

"10"
-
"10:20"
-
"30"
-

Usestime

Default: false

Whether the agent consumes time data from co-simulation algorithm.

Type: boolean
Type: null
\ No newline at end of file +

States

Type: array Default: []

Internal states that will be stored in the simulation model's memory, these will be passed as inputs to the agent in the next time step.

No Additional Items

Each item of this array must be:

Type: object

Name

Default: null

Unique name for state. Only needed if start_value is set (!= None). Initialization FMU parameters will be generated using this name

Type: string
Type: null

Examples:

"initialWindSpeed"
+
"initialWindDirection"
+

Description

Default: null

Short FMU variable description.

Type: string
Type: null

Startvalue

Default: null

The default value of the parameter used for initialization. If this field is set parameters for initialization will be automatically generated for these states.

Type: number
Type: null

Initializationvariable

Default: null

The name of a an input or parameter in the same model interface that should be used to initialize this state.

Type: string
Type: null

Agentoutputindexes

Type: array of string Default: []

Index or range of indices of agent outputs that will be stored as internal states and will be fed as inputs in the next time step. Note: the FMU signal and the agent outputs need to have the same length.

No Additional Items

Each item of this array must be:

Type: string
Must match regular expression: ^(\d+|\d+:\d+)$

Examples:

"10"
+
"10:20"
+
"30"
+

Usestime

Default: false

Whether the agent consumes time data from co-simulation algorithm.

Type: boolean
Type: null
\ No newline at end of file diff --git a/docs/schema/schema.json b/docs/schema/schema.json index fe30e07..2181d98 100644 --- a/docs/schema/schema.json +++ b/docs/schema/schema.json @@ -129,7 +129,7 @@ "title": "Length" }, "agentInputIndexes": { - "default": null, + "default": [], "description": "Index or range of indices of agent inputs to which this FMU signal shall be linked to. Note: the FMU signal and the agent inputs need to have the same length.", "examples": [ "10", @@ -149,8 +149,64 @@ }, "InternalState": { "properties": { - "agentOutputIndexes": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "default": null, + "description": "Unique name for state. Only needed if start_value is set (!= None). Initialization FMU parameters will be generated using this name", + "examples": [ + "initialWindSpeed", + "initialWindDirection" + ], + "title": "Name" + }, + "description": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Short FMU variable description.", + "title": "Description" + }, + "startValue": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The default value of the parameter used for initialization. If this field is set parameters for initialization will be automatically generated for these states.", + "title": "Startvalue" + }, + "initializationVariable": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The name of a an input or parameter in the same model interface that should be used to initialize this state.", + "title": "Initializationvariable" + }, + "agentOutputIndexes": { + "default": [], "description": "Index or range of indices of agent outputs that will be stored as internal states and will be fed as inputs in the next time step. Note: the FMU signal and the agent outputs need to have the same length.", "examples": [ "10", @@ -274,7 +330,7 @@ "title": "Length" }, "agentOutputIndexes": { - "default": null, + "default": [], "description": "Index or range of indices of agent outputs that will be linked to this output signal. Note: the FMU signal and the agent outputs need to have the same length.", "examples": [ "10", @@ -425,13 +481,13 @@ "type": "array" }, "states": { - "allOf": [ - { - "$ref": "#/$defs/InternalState" - } - ], "default": [], - "description": "Internal states that will be stored in the simulation model's memory, these will be passed as inputs to the agent in the next time step." + "description": "Internal states that will be stored in the simulation model's memory, these will be passed as inputs to the agent in the next time step.", + "items": { + "$ref": "#/$defs/InternalState" + }, + "title": "States", + "type": "array" }, "usesTime": { "anyOf": [