Skip to content

Commit

Permalink
Add <{Basic|Hybrid|Scheduled}CoSimulation> elements to XML (#841)
Browse files Browse the repository at this point in the history
and rename fmi3FMUType.xsd to fmi3InterfaceType.xsd
  • Loading branch information
t-sommer authored Mar 10, 2020
1 parent 397a9d2 commit 3a61aa0
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docs/examples/build_configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<ModelExchange modelIdentifier="PIDContoller"/>

<CoSimulation modelIdentifier="PlantModel"/>
<BasicCoSimulation modelIdentifier="PlantModel"/>

<!-- tag::PIDContoller[] -->
<BuildConfiguration modelIdentifier="PIDContoller">
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/co_simulation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
version="1.0"
generationDateAndTime="2011-09-23T16:57:33Z"
variableNamingConvention="structured">
<CoSimulation
<BasicCoSimulation
modelIdentifier="MyLibrary_SpringMassDamper"
canHandleVariableCommunicationStepSize="true"
canInterpolateInputs="true"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/co_simulation_early_return.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
version="1.0"
generationDateAndTime="2011-09-23T16:57:33Z"
variableNamingConvention="structured">
<CoSimulation
<BasicCoSimulation
modelIdentifier="MyLibrary_SpringMassDamper"
canHandleVariableCommunicationStepSize="true"
canReturnEarlyAfterIntermediateUpdate="true"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/model_structure_example1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
instantiationToken=""
description=""
generationDateAndTime="2019-04-14T13:06:01Z">
<CoSimulation modelIdentifier="example"/>
<BasicCoSimulation modelIdentifier="example"/>
<!-- tag::VariablesAndStructure[] -->
<ModelVariables>
<Float64 name="p" valueReference= "1"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/model_structure_example2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
instantiationToken=""
description=""
generationDateAndTime="2019-04-14T13:06:01Z">
<CoSimulation modelIdentifier="example"/>
<BasicCoSimulation modelIdentifier="example"/>
<ModelVariables>
<Float64 name="u" valueReference= "1"/>
<Float64 name="y" valueReference= "2"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/model_structure_example3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
instantiationToken=""
description=""
generationDateAndTime="2019-04-14T13:06:01Z">
<CoSimulation modelIdentifier="example"/>
<BasicCoSimulation modelIdentifier="example"/>
<ModelVariables>
<Float64 name="u" valueReference= "1"/>
<Float64 name="y" valueReference= "2"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/model_structure_example4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
instantiationToken=""
description=""
generationDateAndTime="2019-04-14T13:06:01Z">
<CoSimulation modelIdentifier="example"/>
<BasicCoSimulation modelIdentifier="example"/>
<!-- tag::VariablesAndStructure[] -->
<ModelVariables>
<Float64 name="u" valueReference= "1"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/unit_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
instantiationToken=""
description=""
generationDateAndTime="2019-04-14T13:06:01Z">
<CoSimulation modelIdentifier="example"/>
<BasicCoSimulation modelIdentifier="example"/>
<UnitDefinitions>
<!-- tag::UnitDefinitions[] -->
<Unit name="rad/s">
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/variable_types.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<fmiModelDescription fmiVersion="3.0-alpha" modelName="VariableTypes" instantiationToken="">

<CoSimulation modelIdentifier="VariableTypes"/>
<BasicCoSimulation modelIdentifier="VariableTypes"/>

<ModelVariables>
<Float32 name="Float32" valueReference="1" start="-INF -3.402823e+38 -1.175494e-38 NaN 1.175494e-38 3.402823e+38 INF">
Expand Down Expand Up @@ -47,7 +47,7 @@
<Dimension start="2"/>
</Binary>
</ModelVariables>

<ModelStructure/>

</fmiModelDescription>
9 changes: 3 additions & 6 deletions schema/fmi3FMUType.xsd → schema/fmi3InterfaceType.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</xs:documentation>
</xs:annotation>
<xs:include schemaLocation="fmi3Annotation.xsd"/>
<xs:complexType name="fmi3FMUType">
<xs:complexType name="fmi3InterfaceType" abstract="true">
<xs:sequence minOccurs="0">
<xs:element name="VendorAnnotations" type="fmi3Annotation" minOccurs="0"/>
</xs:sequence>
Expand All @@ -51,22 +51,19 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</xs:complexType>
<xs:complexType name="fmi3ModelExchange">
<xs:complexContent>
<xs:extension base="fmi3FMUType">
<xs:extension base="fmi3InterfaceType">
<xs:attribute name="completedIntegratorStepNotNeeded" type="xs:boolean" default="false"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="fmi3CoSimulation">
<xs:complexContent>
<xs:extension base="fmi3FMUType">
<xs:extension base="fmi3InterfaceType">
<xs:attribute name="canHandleVariableCommunicationStepSize" type="xs:boolean" default="false"/>
<xs:attribute name="canInterpolateInputs" type="xs:boolean" default="false"/>
<xs:attribute name="maxOutputDerivativeOrder" type="xs:unsignedInt" default="0"/>
<xs:attribute name="providesIntermediateVariableAccess" type="xs:boolean" default="false"/>
<xs:attribute name="canReturnEarlyAfterIntermediateUpdate" type="xs:boolean" default="false"/>
<xs:attribute name="providesHybridCoSimulation" type="xs:boolean" default="false"/>
<xs:attribute name="providesScheduledCoSimulation" type="xs:boolean" default="false"/>
<xs:attribute name="canNotUseBasicCoSimulation" type="xs:boolean" default="false"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Expand Down
15 changes: 5 additions & 10 deletions schema/fmi3ModelDescription.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<xs:include schemaLocation="fmi3Variable.xsd"/>
<xs:include schemaLocation="fmi3Terminal.xsd"/>
<xs:include schemaLocation="fmi3Type.xsd"/>
<xs:include schemaLocation="fmi3FMUType.xsd"/>
<xs:include schemaLocation="fmi3InterfaceType.xsd"/>
<xs:annotation>
<xs:documentation>
Copyright(c) 2008-2011 MODELISAR consortium,
Expand Down Expand Up @@ -43,15 +43,10 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<xs:element name="fmiModelDescription">
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:sequence>
<xs:element name="ModelExchange" type="fmi3ModelExchange" minOccurs="1" maxOccurs="1" />
<xs:element name="CoSimulation" type="fmi3CoSimulation" minOccurs="0" maxOccurs="1" />
</xs:sequence>
<xs:sequence >
<xs:element name="CoSimulation" type="fmi3CoSimulation" minOccurs="1" maxOccurs="1" />
</xs:sequence>
</xs:choice>
<xs:element name="ModelExchange" type="fmi3ModelExchange" minOccurs="0" maxOccurs="1" />
<xs:element name="BasicCoSimulation" type="fmi3CoSimulation" minOccurs="0" maxOccurs="1" />
<xs:element name="HybridCoSimulation" type="fmi3CoSimulation" minOccurs="0" maxOccurs="1" />
<xs:element name="ScheduledCoSimulation" type="fmi3CoSimulation" minOccurs="0" maxOccurs="1" />
<xs:element name="BuildConfiguration" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
Expand Down

0 comments on commit 3a61aa0

Please sign in to comment.