Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove computed from Clock #1692

Merged
merged 2 commits into from
Feb 24, 2022
Merged
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
67 changes: 32 additions & 35 deletions docs/2_2_common_mechanisms.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -555,41 +555,32 @@ The importer calls <<fmi3GetClock>> to inquire the Clock's activation state.
h|<<causality>>
h|<<intervalVariability>>

.7+|<<time-based-clock,time-based>>
.5+|[[periodic-clock]]periodic
.5+|<<input>>
.5+|<<time-based-clock,time-based>>
.3+|[[periodic-clock]]periodic
.3+|<<input>>
|`constant`
|[[constant-clock]]<<fmi3SetClock>> in <<EventMode>>,
<<fmi3ActivateModelPartition>> in <<ClockActivationMode>>,
<<fmi3GetInterval>> and <<fmi3GetShift>> in <<InitializationMode>>
|clocked PI-controller with a defined constant interval

|`fixed`
|[[fixed-clock]]<<fmi3SetClock>> in <<EventMode>>,
a|[[fixed-clock]]<<fmi3SetClock>> in <<EventMode>>,
<<fmi3ActivateModelPartition>> in <<ClockActivationMode>>,
<<fmi3SetInterval>> in <<InitializationMode>>
|clocked PI-controller with an adaptable interval

* if <<intervalDecimal>> is defined, <<fmi3SetInterval>> in <<InitializationMode>>,
* if <<intervalDecimal>> is not defined, <<fmi3GetInterval>> and <<fmi3GetShift>> in <<InitializationMode>>

|clocked PI-controller with directly or indirectly adaptable interval

|`tunable`
|[[tunable-clock]]<<fmi3SetClock>> in <<EventMode>>,
a|[[tunable-clock]]<<fmi3SetClock>> in <<EventMode>>,
<<fmi3ActivateModelPartition>> in <<ClockActivationMode>>,
<<fmi3SetInterval>> in <<InitializationMode>>, <<EventMode>> and in <<ClockActivationMode>>
|clocked PI-controller with an adaptable interval

|`fixed` and +
`computed = true`
|[[fixed-computed-clock]]<<fmi3SetClock>> in <<EventMode>>,
<<fmi3ActivateModelPartition>> in <<ClockActivationMode>>,
<<fmi3GetInterval>> and <<fmi3GetShift>> in <<InitializationMode>>
|clocked PI-controller with interval defined by fixed parameter(s) of the FMU
* if <<intervalDecimal>> is defined, <<fmi3SetInterval>> in <<InitializationMode>>, <<EventMode>> and in <<ClockActivationMode>>
* if <<intervalDecimal>> is not defined, <<fmi3GetShift>> in <<InitializationMode>>, <<fmi3GetInterval>> in <<InitializationMode>>, <<EventMode>> and in <<ClockActivationMode>>

|`tunable` and +
`computed = true`
|[[tunable-computed-clock]]<<fmi3SetClock>> in <<EventMode>>,
<<fmi3ActivateModelPartition>> in <<ClockActivationMode>>,
<<fmi3GetShift>> in <<InitializationMode>>,
<<fmi3GetInterval>> in <<InitializationMode>>, <<EventMode>> and in <<ClockActivationMode>>
|clocked PI-controller with interval defined by tunable parameter(s) of the FMU
|clocked PI-controller with directly or indirectly tunable interval

.2+|[[aperiodic-clock]]aperiodic
.2+|<<input>>
Expand Down Expand Up @@ -677,25 +668,31 @@ is a time-based periodic clock that defines its <<intervalDecimal>> and optional

Fixed periodic Clock::
is a time-based periodic Clock which ticks with an arbitrary, but fixed interval latexmath:[\mathbf{T}_{\mathit{interval}}] starting after an arbitrary latexmath:[\mathbf{T}_{\mathit{shift}}], both interval and shift can be changed by the importer.
The importer informs the FMU about the Clock's `fixed` interval using <<fmi3SetInterval>> in <<InitializationMode>>.
If the function is not called the value given in <<intervalDecimal,`intervalDecimal`>> and <<intervalCounter,`intervalCounter`>> is used. +
_[This information enables the FMU to adapt internal computations to the `fixed` Clock interval determined by the importer.]_

+
If <<intervalDecimal,`intervalDecimal`>> is specified, the importer sets the Clock's `fixed` interval using <<fmi3SetInterval>> in <<InitializationMode>>.
If the function is not called the value given in <<intervalDecimal,`intervalDecimal`>> and <<intervalCounter,`intervalCounter`>> is used.

+
_[Calling <<fmi3SetInterval>> informs the FMU about the interval determined by the importer to enable the FMU to adapt internal computations to this `fixed` interval.]_

+
If <<intervalDecimal,`intervalDecimal`>> is not specified, then the importer must use <<fmi3GetInterval>> and <<fmi3GetShift>> to retrieve the Clock interval and shift in <<InitializationMode>> because they depend on <<fixed>> <<parameter, parameters>>.

Tunable periodic Clock::
is a time-based periodic Clock which ticks with an arbitrary and changeble interval latexmath:[\mathbf{T}_{\mathit{interval}}] starting after an arbitrary latexmath:[\mathbf{T}_{\mathit{shift}}], both interval and shift can be changed by the importer.
The importer informs the FMU about the Clock's `tunable` interval using <<fmi3SetInterval>> in <<InitializationMode>>.
is a time-based periodic Clock which ticks with an arbitrary and changeable interval latexmath:[\mathbf{T}_{\mathit{interval}}] starting after an arbitrary latexmath:[\mathbf{T}_{\mathit{shift}}], both interval and shift can be changed by the importer.

+
If <<intervalDecimal,`intervalDecimal`>> is specified, the importer sets the Clock's `tunable` interval using <<fmi3SetInterval>> in <<InitializationMode>>.
It can later change this interval in <<EventMode>> or <<ClockActivationMode>>.
If the function is not called the value given in <<intervalDecimal,`intervalDecimal`>> and <<intervalCounter,`intervalCounter`>> is used. +
_[This information enables the FMU to adapt internal computations to the `tunable` Clock interval determined by the importer.]_
If the function is not called, the value given in <<intervalDecimal,`intervalDecimal`>> and <<intervalCounter,`intervalCounter`>> is used by the importer.

Fixed computed periodic Clock::
is a time-based periodic Clock whose interval and shift depend on <<fixed>> <<parameter, parameters>>.
The importer must use <<fmi3GetInterval>> and <<fmi3GetShift>> to retrieve the Clock interval and shift in <<InitializationMode>>.
+
_[Calling <<fmi3SetInterval>> informs the FMU about the interval determined by the importer to enable the FMU to adapt internal computations to this `tunable` interval.]_

Tunable computed periodic Clock::
is a time-based periodic Clock whose interval depends on <<tunable>> <<parameter, parameters>>.
+
If <<intervalDecimal,`intervalDecimal`>> is not specified, then the importer must use <<fmi3GetInterval>> to retrieve the Clock interval in <<InitializationMode>>, and later in <<EventMode>> or <<ClockActivationMode>>, if any of the <<tunable>> <<parameter, parameters>> the Clock's interval depends on was changed.
The shift may only depend on <<fixed>> <<parameter, parameters>>.
The importer must use <<fmi3GetInterval>> to retrieve the Clock interval in <<InitializationMode>>, and later in <<EventMode>> or <<ClockActivationMode>>, if any of the <<tunable>> <<parameter, parameters>> it depends on was changed.
The importer must use <<fmi3GetShift>> to retrieve the Clock shift in <<InitializationMode>>.

Aperiodic Clock::
Expand Down
6 changes: 0 additions & 6 deletions docs/2_4_common_schema.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -671,12 +671,6 @@ For multiple <<Clock,`Clocks`>> with the same priority the order is undefined.
[[intervalVariability,`intervalVariability`]]
The attribute `intervalVariability` declares the Clock type, see <<table-overview-clocks>>.

|`computed`
|
[[computed,`computed`]]
The attribute `computed` may only be used if <<intervalVariability>> is <<fixed-computed-clock,`fixed`>> or <<tunable-computed-clock,`tunable`>> and indicates that interval and shift of the Clock is defined by fixed or tunable parameters of the FMU.
The values of interval and shift must be retrieved by <<fmi3GetInterval>> and <<fmi3GetShift>>, see <<table-overview-clocks>>.

2+|The values of the following float and integer attributes refer to the unit of the <<independent>> variable.

|`intervalDecimal`
Expand Down
2 changes: 1 addition & 1 deletion docs/5_1_scheduled_execution_math.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
In Scheduled Execution the importer has to ensure that model partitions are scheduled according to their activation time and priorities.
This is realized in <<ClockActivationMode>> by calling <<fmi3ActivateModelPartition>> triggering their respective Clocks.

After <<fmi3ActivateModelPartition>> has been called for a <<fixed-computed-clock,`fixed`>>, <<tunable-computed-clock,`tunable`>> or <<changing-aperiodic-clock,aperiodic>> Clock the FMU provides the information on when the Clock will tick again, i.e. when the corresponding model partition must be scheduled the next time.
After <<fmi3ActivateModelPartition>> has been called for a <<fixed-clock,`fixed`>>, <<tunable-clock,`tunable`>> or <<changing-aperiodic-clock,aperiodic>> Clock the FMU provides the information on when the Clock will tick again, i.e. when the corresponding model partition must be scheduled the next time.
To retrieve this information the importer calls <<fmi3GetInterval>> on the Clock.

The FMU may request to schedule another model partition even while currently a model partition is being executed.
Expand Down
Binary file modified docs/images/schema/Clock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/schema/ClockType.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion schema/fmi3AttributeGroups.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="computed" type="xs:boolean" default="false"/>
<xs:attribute name="intervalDecimal" type="xs:float" use="optional"/>
<xs:attribute name="shiftDecimal" type="xs:float" default="0"/>
<xs:attribute name="supportsFraction" type="xs:boolean" default="false"/>
Expand Down