Next: Documenting subsystems Up: The documentation statements Previous: Special statements

Subsections


Simple statements

Simple statements serve for definition of the logical structure of the document. Each simple statement creates a new section with a corresponding caption. The list of simple statements is in table 12.1. The list is stored in the file template\dyn2tex.ini, so it can be easily modified.


Statement Section caption
:::EXCI System excitation
:::TASK Task
:::ORIG Example origin
:::VARI Model variables
:::SYST System
:::MODEL Model
:::ASSUM Modeling assumptions
:::ANALY Model analysis
:::RESUL Results
:::PURP Purpose
:::CONCL Conclusion
Table 12.1: Simple statements

The FIG statement.

:::FIG[suffix,width]{title}

The FIG command inserts a figure from an external file in Encapsulated PostScript format. The file must be placed in the same folder as the documentation file. The name of the file must be formed by the name of the documentation file followed by the suffix suffix.

If the parameter width (in millimeters) is entered, the figure is scaled to the given width (preserving the aspect ratio). Otherwise the original size is used. You may also specify the percentage of the original size.

The figure will get the title title.

All parameters are optional.

Example:

: File problem.prb
:::FIG[a]{the figure}
inserts an image from file problema.eps, preserves its original size, and adds title 'the figure'.
:::FIG[,80%]
inserts an image from file problem.eps, and scales it down to 80% of the original size.

The DIAGRAM statement.

:::DIAGRAM[width]{title}

The DIAGRAM command generates a figure in EPS format corresponding to the diagram of the current simulation experiment or library model, and inserts it to the documentation. The diagram file must be placed in the same folder as the documentation file, and must have the same name.

If the parameter width (in millimeters) is entered, the figure is scaled to the given width (preserving the aspect ratio). Otherwise the original size is used. You may also specify the percentage of the original size.

The figure will get the title title.

All parameters are optional.

Example:

: File problem.prb
:::DIAGRAM{the diagram}
inserts an image of the diagram problem.dia, preserves its original size, and adds title 'the diagram'.
:::DIAGRAM[80%]
inserts an image of the diagram problem.eps, and scales it down to 80% of the original size.

The SYMBOL statement.

:::SYMBOL{library}{symbol}{title}

The SYMBOL command generates a figure in EPS format corresponding to the library symbol, and inserts it to the documentation.

The parameter library specifies the name of the library, The parameter symbol specifies the name of the symbol in the library.

The figure will get the title title.

Example:

: File problem.prb
:::SYMBOL{electric}{R_ELE}{Symbol}
inserts an image of the library symbol R_ELE from the library file electric.lbr, and assigns a title 'Symbol'.

The PLOT statement.

:::PLOT[parameter=value,parameter=value...]{title}

The PLOT command generates a figure in EPS format corresponding to the output of the current simulation experiment, and inserts it to the documentation. The output file must be placed in the same folder as the documentation file, and must have the same name. If the output file does not exists, it is created by running the DYNAST simulator on the current simulation experiment.

The figure will get the title title.

By default, the figure has dimensions 50x50mm, and displays the relationship of the second quantity on the first quantity of the first table of the output file. You may change the default behavior by submitting one or more parameters listed in table 12.2.


PARAMETER
[ DEFAULT]
VALUE
w[50] the width of the figure in milimeters
h[50] the height of the figure in milimeters
plot[1] which plot (table) of the output file will be displayed, 1 denotes the first table
indep[0] independent quantity, counts from zero
deps[1] dependent quantities, count from zero; you may specify more quantities separated by the plus ('+'), or ranges separated by the hyphen ('-'), such as '1-5+10' for quantities 1,2,3,4,5 and 10
range n custom range of the n-th quantity (quantities counts from zero); n may be specified as range by two integers separated by the hyphen--range is then set for all quantities in the range; the range specification has the form lower.. upper, where lower and upper are constants
import imports another plot to the current plot; the import specification has the form file; plot; indep, where file is the name of the output file to import from without extension (empty string stands for the current file), plot is the index of the plot (table) in the file (counts from one), and indep is the index of the quantity to be considered as indepentent (counts from zero)
grid[yes] 'no' disables the grid
multiple[yes] 'no' disables the Multiple Y mode
common[no] 'yes' enables the Common Y mode
zero[no] 'yes' enables the Zero Offset Y mode
log[no] 'yes' enables the Log X mode
discrete[no] 'yes' enables the Discrete X mode
marks[no] 'yes' enables the point marks
occ[1] sets the density of point marks, the bigger number, the lower density
title[yes] 'no' disables drawing of the plot title
Table 12.2: Parameters of the PLOT command

Example:

: File problem.prb
:::PLOT[w=100,h=80]{The plot}
inserts an image generated from the output file problema.o, with size 100x80mm, displaying the first plot of the output file, with the zeroth variable as independent, and the first one as dependent.
:::PLOT[indep=2,deps=3-6+8-9]{The plot}
sets the second variable as independent and variables 3,4,5,6,8,9 as dependents
:::PLOT[log=yes,discrete=yes]{The plot}
sets the modes Log X and Discrete X on
:::PLOT[range0=0..1E6,range1-4=-1..3]{The plot}
sets the range of the zeroth variable from 0 to 106, and ranges of variables 1,2,3,4 from -1 to 3
:::PLOT[import=b;2;5,deps=1-20]{The plot}
imports the second plot of the file b.o to the current plot, and sets the fifth quantity of the plot as independent (the dependent quantities 1-20 now refer to the concatenation of quantities from the original plot and the imported plot)

See also:
ðKREFð{plot}{changing properties}ðChanging properties of the plotð

The SITE statement.

:::SITE
::: site name ... site description
::: site name ... site description
::: :

The SITE command creates a section with description of subsystem sites of interaction. This description consists of several lines. Each line defines one site of interaction. The definition contains the name of the site and the description of the site, separated by ellipsis.

Example:

Input

:::SITE
::: A ... wheel
::: B ... car suspension
::: C ... car body

Output

Sites of interaction

A wheel
B car suspension
C car body

The PARA statement.

:::PARA

The PARA command inserts list of parameters. This list is taken from the active part of the data file. The parameters should be defined using following form:

  1. parameter = value; ::[dimension] description
  2. parameter = value; ::[dimension] description ::: p[d] = v
  3. parameter = value; ::[dimension] description :::%

The first form adds the following line to the table of the parameters:

parameter = value [dimension] description

Using the second form you may redefine the appearance of items parameter, dimension value using items p d v respectively. These items may contain an arbitrary fragment of LATEX code, which will be processed in LATEX math mode.

By using the percentage % after three colons you can disable adding of a line to the table of parameters.

The three colons and the text behind them will not be inserted to the output generated by DATA command.

Example:

Input
:::para
:::data
*SYSTEM;
x = 10;      :: [m] displacement
i = sqrt(2); :: [A] current          ::: = \sqrt{2}
v = 5;       :: [m/s] velocity       ::: [\frac{m}{s}]
omega = 5pi; :: [rad/s^-1] ang. vel. ::: \omega = 5\pi
beta = 10pi; :: [rad] angle          :::%
*END;

Output

System parameters




Input data

*SYSTEM;
x = 10;      :: [m] displacement
i = sqrt(2); :: [A] current
v = 5;       :: [m/s] velocity
omega = 5pi; :: [rad/s^-1] ang. vel.
beta = 10pi; :: [rad] angle
*END;

The DATA statement.

:::DATA

The DATA command inserts the active part of the data file (simulation data) to the documentation. The documentation (lines or line parts beginning with three colons) is removed.

When creating the electronic documentation to a simulation experiment, the DATA command inserts a form that can be used for remote simulation of the experiment.

For usage example see PARA command.

The MODP statement.

:::MODP

The MODP command inserts a list of modules (instances of submodels) to the documentation. Each module is accompanied by a list of parameters that were modified from their default values.

Example:

Input
:::MODP
chass1 > @ROD2 PX7-PX13,PY7-PY13,OM3/L=az1-a13;
chass2 > @ROD3 PX13-PX37,PY13-PY37,OM3/m=m3,J=J3;
spring20 > @SPRING1 0-PX2,PY20-PY2/c=k20,d=d20;

Output

Module parameters


Module: chass1 -- Rod
Submodel: ROD2 -- Weightless rigid rod link in polar coordinates
L = az1-a13 [m] rod length  


Module: chass2 -- Rod
Submodel: ROD3 -- Mass rigid rod link
m = m3 [kg] mass  
J = J3 [kg.m2] moment of inertia  


Module: spring20 -- Spring
Submodel: SPRING1 -- Linear weightless spring with damping
c = k20 [N.m-1] spring rate  
d = d20 [N.s.m-1] damping constant  

The INTER statement.

EXTP

:::INTER
:::EXTP

The commands INTER and EXTP can be used only for documenting of submodels. They insert the specification of the submodel interface and of the external parameters to the documentation.

Example:

Input
ROD3 ::Mass rigid rod link 
:with two pin joints
Ax-  :: mechanical inlet in the $x$-direction
Bx,  :: mechanical inlet in the $x$-direction
Ay-  :: mechanical inlet in the $y$-direction
By,  :: mechanical inlet in the $y$-direction
om/  :: mechanical inlet of rotation
LA=1,:: [m]  distance from A and G :::L_A
LB=1,:: [m]  distance from B and G :::L_B
m=0, :: [kg] mass
J=0, :: [kg.m^2] moment of inertia
g=9.81; :: [m.s^-2] acceleration of gravity
::: INTER
::: EXTP

Output

Interface
Ax   mechanical inlet in the x-direction
Bx   mechanical inlet in the x-direction
Ay   mechanical inlet in the y-direction
By   mechanical inlet in the y-direction
om   mechanical inlet of rotation


External Parameters
LA=1 [m] distance between joint A and G
LB=1 [m] distance between joint B and G
m=0 [kg] mass
J=0 [kg.m2] moment of inertia
g=9.81 [m.s-2] acceleration of gravity

The INCL statement.

:::INCL[category]{filename}

The INCL command affects only the electronic form of the documentation. It inserts a reference to an applet, which displays the DYNCAD schematic editor and loads the file filename into it. Files (diagrams) may be organized to categories. To use a category other than the default, you must name of the category.

Example:

:::INCL{d1}
Inserts a reference to the diagram d1 from the default category
:::INCL[mechanical]{d2}
Inserts a reference to the diagram d2 from category mechanical.



Next: Documenting subsystems Up: The documentation statements Previous: Special statements
(c) DYN 2002, feedback: dyn@virtual.cvut.cz