222
6 Hierarchical Component Models
Fig. 6.22 On-screen graphical view of the LiquidSource model
Fig. 6.23 Building the LiquidSource icon
Now the hierarchical structure should look like Fig. 6.24.
Define the regulators. We will build them on the basis of the “open” (incomplete)
class of the BaseController controller that contains the main parameters, state variables, and two connectors: the first is for reading the liquid level sensor, the second
is for controlling the tank valve.
partial model BaseController ”Base class for tank level
controllers”
parameter Real ref(unit = ”m”) ”Reference level”;
Interfaces.ActSignalOutput u ”Control to actuator,
Précédent

- 233/274

Suivant