| 1 | within Modelica.Blocks; |
|---|
| 2 | package Types |
|---|
| 3 | "Library of constants and types with choices, especially to build menus" |
|---|
| 4 | extends Modelica.Icons.Library; |
|---|
| 5 | annotation ( Documentation(info="<HTML> |
|---|
| 6 | <p> |
|---|
| 7 | In this package <b>types</b> and <b>constants</b> are defined that are used |
|---|
| 8 | in library Modelica.Blocks. The types have additional annotation choices |
|---|
| 9 | definitions that define the menus to be built up in the graphical |
|---|
| 10 | user interface when the type is used as parameter in a declaration. |
|---|
| 11 | </p> |
|---|
| 12 | </HTML>")); |
|---|
| 13 | type Smoothness = enumeration( |
|---|
| 14 | LinearSegments "Table points are linearly interpolated", |
|---|
| 15 | ContinuousDerivative |
|---|
| 16 | "Table points are interpolated such that the first derivative is continuous") |
|---|
| 17 | "Enumeration defining the smoothness of table interpolation" |
|---|
| 18 | annotation (Documentation(info="<html> |
|---|
| 19 | |
|---|
| 20 | </html>")); |
|---|
| 21 | type Extrapolation = enumeration( |
|---|
| 22 | HoldLastPoint "Hold the last table point outside of the table scope", |
|---|
| 23 | LastTwoPoints |
|---|
| 24 | "Extrapolate linearly through the last two table points outside of the table scope", |
|---|
| 25 | |
|---|
| 26 | Periodic "Repeat the table scope periodically") |
|---|
| 27 | "Enumeration defining the extrapolation of time table interpolation" |
|---|
| 28 | annotation ( Documentation(info="<html> |
|---|
| 29 | |
|---|
| 30 | </html>")); |
|---|
| 31 | |
|---|
| 32 | type Init = enumeration( |
|---|
| 33 | NoInit |
|---|
| 34 | "No initialization (start values are used as guess values with fixed=false)", |
|---|
| 35 | |
|---|
| 36 | SteadyState |
|---|
| 37 | "Steady state initialization (derivatives of states are zero)", |
|---|
| 38 | InitialState "Initialization with initial states", |
|---|
| 39 | InitialOutput |
|---|
| 40 | "Initialization with initial outputs (and steady state of the states if possibles)") |
|---|
| 41 | "Enumeration defining initialization of a block" |
|---|
| 42 | annotation (Evaluate=true, Documentation(info="<html> |
|---|
| 43 | |
|---|
| 44 | </html>")); |
|---|
| 45 | |
|---|
| 46 | type InitPID = enumeration( |
|---|
| 47 | NoInit |
|---|
| 48 | "No initialization (start values are used as guess values with fixed=false)", |
|---|
| 49 | |
|---|
| 50 | SteadyState |
|---|
| 51 | "Steady state initialization (derivatives of states are zero)", |
|---|
| 52 | InitialState "Initialization with initial states", |
|---|
| 53 | InitialOutput |
|---|
| 54 | "Initialization with initial outputs (and steady state of the states if possibles)", |
|---|
| 55 | |
|---|
| 56 | DoNotUse_InitialIntegratorState |
|---|
| 57 | "Don't use, only for backward compatibility (initialize only integrator state)") |
|---|
| 58 | "Enumeration defining initialization of PID and LimPID blocks" |
|---|
| 59 | annotation (Documentation(info="<html> |
|---|
| 60 | <p> |
|---|
| 61 | This initialization type is identical to Types.Init and has just one |
|---|
| 62 | additional option <b>DoNotUse_InitialIntegratorState</b>. This option |
|---|
| 63 | is introduced in order that the default initialization for the |
|---|
| 64 | Continuous.PID and Continuous.LimPID blocks are backward |
|---|
| 65 | compatible. In Modelica 2.2, the integrators have been initialized |
|---|
| 66 | with their given states where as the D-part has not been initialized. |
|---|
| 67 | The option \"DoNotUse_InitialIntegratorState\" leads to this |
|---|
| 68 | initialization definition. |
|---|
| 69 | </p> |
|---|
| 70 | |
|---|
| 71 | </html>"), Evaluate=true); |
|---|
| 72 | |
|---|
| 73 | type SimpleController = enumeration( |
|---|
| 74 | P "P controller", |
|---|
| 75 | PI "PI controller", |
|---|
| 76 | PD "PD controller", |
|---|
| 77 | PID "PID controller") |
|---|
| 78 | "Enumeration defining P, PI, PD, or PID simple controller type" |
|---|
| 79 | annotation (Evaluate=true, Documentation(info="<html> |
|---|
| 80 | |
|---|
| 81 | </html>")); |
|---|
| 82 | |
|---|
| 83 | end Types; |
|---|