Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docs/5___ssd.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The following XML child elements are specified for the SystemStructureDescriptio
|System |This required element specifies the root system of the model, see section 5.3.
|Enumerations |This optional element *MUST* contain definitions for all enumerations referenced in the system description file. See section 4.4.1 for its definition.
|Units |This optional element *MUST* contain definitions for all units referenced in the system description file. See section 4.4.2 for its definition.
|DefaultExperiment |This optional element *MAY* contain information of a default simulation setup that is supplied with the system definition for informational purposes, see description below.
|DefaultExperiment |This optional repeatable element *MAY* provide information of one or more default simulation setups that are supplied with the system definition for informational purposes, see description below.
|===

The root system of the model is specified through the required System element, see section 5.3.
Expand All @@ -40,8 +40,9 @@ image:images/image24.png[image,width=449,height=248]

This element contains information of a default simulation setup that is supplied with the system definition for informational purposes.

{empty}[ _Note that in contrast to FMI 2.0 only start and stop time are specified here, since values like step size or tolerance depend on the specific solver or master algorithms employed and are hence not specified in this global element.
Additional solver or master algorithm specific information can be supplied through the annotation mechanism, or using a future layered standard._ ]
Besides the setup information itself, the element can also specify stimuli and reference time-series data bindings, that can be used to provide reference results for basic validity checking.

Note that the simulation setup only provides for very basic simulation settings and does not support specifying advanced solver or co-simulation setups.

{empty}[ _The handling of systems comprising components with differing units for the independent variable depends on the implementation.
It should be noted that since FMI 2.0 the unit of the independent variable for FMUs is clearly specified: It defaults to seconds, however other units can be specified by explicitly defining the independent variable.
Expand All @@ -52,6 +53,8 @@ This standard does not specify additional measures to deal with differing indepe
|Attribute |Description
|startTime |This optional attribute gives the start time of the simulation.
|stopTime |This optional attribute gives the stop time of the simulation.
|stepSize |This optional attribute gives a suggested fixed step size for the simulation.
|tolerance |This optional attribute gives a suggested tolerance for the simulation.
|===

=== Common Model Element Type
Expand Down
146 changes: 144 additions & 2 deletions schema/SystemStructureDescription.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<xs:element name="System" type="ssd:TSystem"/>
<xs:element name="Enumerations" minOccurs="0" type="ssc:TEnumerations"/>
<xs:element name="Units" minOccurs="0" type="ssc:TUnits"/>
<xs:element name="DefaultExperiment" minOccurs="0" type="ssd:TDefaultExperiment"/>
<xs:element name="DefaultExperiment" minOccurs="0" maxOccurs="unbounded" type="ssd:TDefaultExperiment"/>
<xs:element name="Annotations" minOccurs="0" type="ssc:TAnnotations"/>
</xs:sequence>
<xs:attribute name="version" use="required">
Expand Down Expand Up @@ -941,8 +941,11 @@
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Stimuli" minOccurs="0" type="ssd:TTimeSeriesBindings"/>
<xs:element name="References" minOccurs="0" type="ssd:TTimeSeriesBindings"/>
<xs:element name="Annotations" minOccurs="0" type="ssc:TAnnotations"/>
</xs:sequence>
<xs:attributeGroup ref="ssc:ABaseElement"/>
<xs:attribute name="startTime" type="xs:double" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">Default start time of simulation</xs:documentation>
Expand All @@ -951,7 +954,146 @@
<xs:attribute name="stopTime" type="xs:double" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">Default stop time of simulation</xs:documentation>
</xs:annotation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="tolerance" type="xs:double" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">Default tolerance of simulation</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="stepSize" type="xs:double" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">Default step size of simulation</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>

<xs:complexType name="TTimeSeriesBindings">
<xs:sequence maxOccurs="unbounded">
<xs:element name="TimeSeriesBinding">
<xs:annotation>
<xs:documentation xml:lang="en">
This provides time series data for the overall system, either as a source of
stimuli, or as a source of reference outputs.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="TimeSeriesValues" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">
This optional element can be used to provide time series values inline
to the time series binding, in which case the source attribute of the
binding element must be empty.

The contents must be CSV according to the rules set out in XXX, if the
type attribute of the binding element is text/csv, or any other valid
mixed XML content if the type attribute references another MIME type
(in that case there should be a layered specification that defines how
embedding the content works for that MIME type).
</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:choice>
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
</xs:complexType>
</xs:element>
<xs:element name="TimeSeriesMapping" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">
This element provides an optional time series mapping, which specifies how
the variable names and values provided in the time series source are to be
mapped to the input/output connectors of the system in question. If no
mapping is supplied, the variables names of the time series source are used
as is for name matching against the names of connectors in the system and
the values of the time series source are not transformed further before
being applied.

The contents of the element can be used to provide a time series mapping
inline, in which case the source attribute of the TimeSeriesMapping element
must be empty.

The contents must be an ssm:ParameterMapping element, if the type attribute
of this element is application/x-ssp-parameter-mapping, or any other valid
XML content if the type attribute references another MIME type (in that case
there should be a layered specification that defines how embedding the content
works for that MIME type).
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice>
<!-- NOTE: In XML Schema 1.1 this choice would also contain the following entry:

<xs:element ref="ssm:ParameterMapping"/>

which specifies the proper way to directly embed a ParameterMapping inline.
Due to restrictions in XML Schema 1.0, this would lead to a violation of the
unique particle attribution schema component constraint, since the embedded
ssm:ParameterMapping element would also be matched by the more generic xs:any
specification. Since XML Schema 1.1 validators are still rare compared with
1.0 validators, the default schema files for SSP are still restricted to 1.0;
however if you have access to a 1.1 validator/validating parser, you can
use the 1.1 variant of these stylesheets instead.
-->
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
<xs:attributeGroup ref="ssc:ABaseElement"/>
<xs:attribute name="type" type="xs:string" use="optional" default="application/x-ssp-parameter-mapping"/>
<xs:attribute name="source" type="xs:anyURI" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
This attribute indicates the source of the time series mapping as a URI
(cf. RFC 3986). For purposes of the resolution of relative URIs
the base URI is the URI of the SSD.

If the source attribute is missing, the time series mapping is provided
inline as contents of the TimeSeriesMapping element, which must be
empty otherwise.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="Annotations" minOccurs="0" type="ssc:TAnnotations"/>
</xs:sequence>
<xs:attributeGroup ref="ssc:ABaseElement"/>
<xs:attribute name="type" type="xs:string" use="optional" default="text/csv">
<xs:annotation>
<xs:documentation xml:lang="en">
This attribute specifies the MIME type of the time series data source, which
defaults to text/csv to indicate the CSV file format as specified in XXX.
No further types are currently defined, but can of course be added at a later
date, e.g. for pre-existing time series file formats, like HDF5, MDF, etc.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="source" type="xs:anyURI" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">
This attribute indicates the source of the time series data as a URI
(cf. RFC 3986). For purposes of the resolution of relative URIs
the base URI is the URI of the SSD.

If the source attribute is missing, the time series data is provided
inline as contents of a TimeSeriesValues element, which must not be
present otherwise.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="prefix" type="xs:string" use="optional" default="">
<xs:annotation>
<xs:documentation xml:lang="en">
Defines the optional prefix for name resolution and mapping purposes
for this binding. If this attribute is empty or not supplied no
prefix is used for name resolution and mapping, otherwise the specified
prefix is prepended to all names in the time series source prior to
processing the normal name resolution or name mapping rules.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
Loading