Skip to content

Commit

Permalink
Convert inline variables to latexmath (modelica#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-sommer authored Mar 13, 2019
1 parent cfc978b commit 22aeeec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions docs/3_1_model_exchange_math.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ image::images/ArtificialAlgebraicLoop.svg[width=80%, align="center"]
_In the upper diagram, FMU1 and FMU2 are connected in such a way that by an appropriate sequence of `fmi3SetXXX` and `fmi3GetXXX` calls, the FMU variables can be computed.
In the lower diagram, FMU3 and FMU4 are connected in such a way that a "real" algebraic loop is present.
This loop might be solved iteratively with a Newton method.
In every iteration the iteration variable u~4~ is provided by the solver, and via the shown sequence of `fmi3SetXXX` and `fmi3GetXXX` calls, the residue is computed and is provided back to the solver.
Based on the residue a new value of u~4~ is provided.
In every iteration the iteration variable latexmath:[u_4] is provided by the solver, and via the shown sequence of `fmi3SetXXX` and `fmi3GetXXX` calls, the residue is computed and is provided back to the solver.
Based on the residue a new value of latexmath:[u_4] is provided.
The iteration is terminated when the residue is close to zero.
These types of artifical or real algebraic loops can occur in all the different modes, such as Initialization Mode, Event Mode, and Continuous-Time Mode.
Since different variables are computed in every Mode and the causality of variable computation can be different in Initialization Mode as with respect to the other two Modes, it might be necessary to solve different kinds of loops in the different Modes.]_
Expand All @@ -235,7 +235,7 @@ For an output argument, calling `fmi3GetXXX` on such a variable returns always t
Function `fmi3SetXXX` is an abbreviation for functions `fmi3SetReal`, `fmi3SetBoolean`, `fmi3SetInteger` and `fmi3SetString` respectively.
Function `fmi3GetXXX` is an abbreviation for functions `fmi3GetReal`, `fmi3GetBoolean`, `fmi3GetInteger` and `fmi3GetString` respectively.

_[In the following table the setting of the super dense time, (t~R~, t~I~), is precisely described.
_[In the following table the setting of the super dense time, (latexmath:[t_R], latexmath:[t_I]), is precisely described.
Tools will usually not have such a representation of time.
However, super-dense time defines precisely when a new "model evaluation" starts and therefore which variable values belong to the same "model evaluation" at the same (super dense) time instant and should be stored together.]_

Expand All @@ -252,8 +252,7 @@ However, super-dense time defines precisely when a new "model evaluation" starts
discrete-time and continuous-time equations)#| `[lime]#fmi3EnterInitializationMode#`
|Set variables latexmath:[\mathbf{v}_{initial=exact}] that have a start value with
`initial="exact"` (independent parameters latexmath:[\mathbf{p}] and
continuous-time states with start values latexmath:[\mathbf{x_c}],
initial=exact_~ are included here) | `fmi3SetXXX`
continuous-time states with start values latexmath:[\mathbf{x}_{c,initial=exact}] are included here) | `fmi3SetXXX`
|Set continuous-time and discrete-time inputs latexmath:[\mathbf{u}(\color{grey}t_{\color{grey} 0})]| `fmi3SetXXX`
|[blue]#latexmath:[\mathbf{v}_{initialUnknowns}:=f_{init}(\mathbf{u_c}, \mathbf{u_d}, \color{grey}t_{\color{grey} 0}, \mathbf{v}_{initial=exact}])# | `[blue]#fmi3GetXXX#`, `[blue]#fmi3GetContinuousStates#`
|[lime]#Exit Initialization Mode (de-activate initialization equations)#| `[lime]#fmi3ExitInitializationMode#`
Expand Down
4 changes: 2 additions & 2 deletions docs/3___model_exchange.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ image::images/model-exchange-data-flow.svg[width=80%, align="center"]

[blue]*Blue* arrows: Information provided by the FMU. +
[red]*Red* arrows : Information provided to the FMU. +
*v*~start~, *u*, *y*, *w*, *x*~d~ are of type Real, Integer, Boolean, String;
*t*, *x*~c~, *z* are of type Real.
latexmath:[\mathbf{v}_{start}], latexmath:[\mathbf{u}], latexmath:[\mathbf{y}], latexmath:[\mathbf{w}], latexmath:[\mathbf{x}_d] are of type Real, Integer, Boolean, String;
latexmath:[\mathbf{t}], latexmath:[\mathbf{x}_c], latexmath:[\mathbf{z}] are of type Real.

0 comments on commit 22aeeec

Please sign in to comment.