This is the last post of series simulating dynamic tanks using EMSO simulator. The first one shows the direct implementation of the dynamic tanks case using the modeling language of EMSO that applies concepts of object-oriented languages (part 1). The second one used (part 2) resources of EMSO GUI to link models to figures and create a block diagram of the process from the connection among them.
An important point on implementing of any application is its suitable documentation. Some comments in line codes or additional tags should usually be sufficient for personal purpose. However additional informations regarding to how to use the application should be required. EMSO has an internal engine to documentation generation that get specific tag of codes for HTML document creation. This tool is similar in features to the documentation generator Doxygen but particular for EMSO modeling language.
First of all some requirements must be presented:
- LaTeX package (MiKTeX for Windows and Tex Live for Linux)
- dvipng converter
EMSO documentation generator uses additional commands in ATTRIBUTES section and in the definition of parameters/variables to format the documentation. Let us starting from EMSO code of one dynamic tank shown in previous post. See below:
The lines 5, 15, and 25 use Brief command to a short description of the models. In this case we would assume it as the model’s title. On the other hand, Info command (line 26) add a detailed description of the model. Both commands accept most of wiki markups (Formatting help) as can be seen in lines 27-35 the usage of headings and bullet lists. EMSO documentation generator converts the equations of EQUATIONS section in images using LaTeX interpreter and dvipng converter so the basic knowledge of LaTeX symbols formatting would be applicable. If nothing is done variables/parameters are presented in the equations just as they are declared. Special formatting options are available using Symbol command in parameter/variable declarations. The lines 43 and 44 add LaTeX equation markups to superscript “in” and “out” to represent Inlet and Outlet variables thus Inlet.F is shown as Fin in equations. In the same way greek symbols would be added:
So once the file is ready, the documentation can be generated selecting the directory and requesting the generation after (Tasks > Generate Documentation…). The documentation for the tank’s model is available here (open in a new window).
Originally Posted on ChEngineer Space.