Package at.jku.ssw.fp.sect05_4.dsl
Class LevelControl
- java.lang.Object
-
- at.jku.ssw.fp.sect05_4.dsl.StateModel<States>
-
- at.jku.ssw.fp.sect05_4.dsl.LevelControl
-
- All Implemented Interfaces:
Action
public class LevelControl extends StateModel<States>
State transition model for controlling the level of a tank.- Author:
- Herbert Praehofer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class at.jku.ssw.fp.sect05_4.dsl.StateModel
StateModel.State
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static double
EMPTY_LEVEL
Constants for full und empty level and constant inflow(package private) static double
FULL_LEVEL
Constants for full und empty level and constant inflowprivate DVar
inflow
Variables for the current level and the inflow (which is a control output)(package private) static double
INFLOW
Constants for full und empty level and constant inflowprivate DVar
level
Variables for the current levelprivate BVar
stop
Variable for the Boolean input signal to stop filling-
Fields inherited from class at.jku.ssw.fp.sect05_4.dsl.StateModel
current
-
-
Constructor Summary
Constructors Constructor Description LevelControl(DVar _level, BVar _stop, DVar _inflow)
Constructor for building the level control system.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
-
Methods inherited from class at.jku.ssw.fp.sect05_4.dsl.StateModel
exec, inState, nextState
-
-
-
-
Field Detail
-
FULL_LEVEL
static final double FULL_LEVEL
Constants for full und empty level and constant inflow- See Also:
- Constant Field Values
-
EMPTY_LEVEL
static final double EMPTY_LEVEL
Constants for full und empty level and constant inflow- See Also:
- Constant Field Values
-
INFLOW
static final double INFLOW
Constants for full und empty level and constant inflow- See Also:
- Constant Field Values
-
level
private final DVar level
Variables for the current level
-
inflow
private final DVar inflow
Variables for the current level and the inflow (which is a control output)
-
stop
private BVar stop
Variable for the Boolean input signal to stop filling
-
-
Constructor Detail
-
LevelControl
public LevelControl(DVar _level, BVar _stop, DVar _inflow)
Constructor for building the level control system. The input and out variables are set. Then the transition model is built using the DSL.- Parameters:
_level
- the variable for the current level_stop
- the variable for the stop signal_inflow
- the variable for the output of the controller defining the inflow to the tank
-
-