Class SplitRangeControllerStructure
java.lang.Object
neqsim.process.controllerdevice.structure.SplitRangeControllerStructure
- All Implemented Interfaces:
Serializable, ControlStructureInterface
Split-range control structure where a single controller drives two or more final control elements
(e.g. valves). Each element is assigned a sub-range of the controller output (0-100%). For
example, valve A may operate from 0-50% while valve B operates from 50-100%.
After runTransient(double) the individual outputs can be queried with
getOutput(int). The getOutput() method returns the raw controller output.
- Version:
- 1.0
- Author:
- NeqSim
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ControllerDeviceInterfaceprivate final double[]private booleanprivate final double[]private final double[]private doubleprivate static final long -
Constructor Summary
ConstructorsConstructorDescriptionSplitRangeControllerStructure(ControllerDeviceInterface controller, double[] rangeLow, double[] rangeHigh) Create a split-range structure with custom ranges for each element.SplitRangeControllerStructure(ControllerDeviceInterface controller, int numberOfElements) Create a split-range structure with equal-width ranges for the specified number of elements. -
Method Summary
Modifier and TypeMethodDescriptionintGet the number of final control elements in this split-range structure.doubleGet resulting output signal from the control structure.doublegetOutput(int elementIndex) Get the scaled output for a specific element after split-range mapping.booleanisActive()Check whether the control structure is currently active.voidrunTransient(double dt) Execute one transient calculation step.voidsetActive(boolean isActive) Enable or disable the entire control structure.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
controller
-
rangeLow
private final double[] rangeLow -
rangeHigh
private final double[] rangeHigh -
elementOutputs
private final double[] elementOutputs -
rawOutput
private double rawOutput -
isActive
private boolean isActive
-
-
Constructor Details
-
SplitRangeControllerStructure
Create a split-range structure with equal-width ranges for the specified number of elements. For two elements: element 0 gets 0-50%, element 1 gets 50-100%.- Parameters:
controller- the single controller driving the split-rangenumberOfElements- number of final control elements
-
SplitRangeControllerStructure
public SplitRangeControllerStructure(ControllerDeviceInterface controller, double[] rangeLow, double[] rangeHigh) Create a split-range structure with custom ranges for each element.- Parameters:
controller- the single controller driving the split-rangerangeLow- array of lower bounds (0-100%) for each elementrangeHigh- array of upper bounds (0-100%) for each element
-
-
Method Details
-
runTransient
public void runTransient(double dt) Execute one transient calculation step.- Specified by:
runTransientin interfaceControlStructureInterface- Parameters:
dt- time step in seconds
-
getOutput
public double getOutput(int elementIndex) Get the scaled output for a specific element after split-range mapping.- Parameters:
elementIndex- zero-based index of the final control element- Returns:
- output for the element scaled 0-100%
-
getNumberOfElements
public int getNumberOfElements()Get the number of final control elements in this split-range structure.- Returns:
- number of elements
-
getOutput
public double getOutput()Get resulting output signal from the control structure.- Specified by:
getOutputin interfaceControlStructureInterface- Returns:
- control signal
-
setActive
public void setActive(boolean isActive) Enable or disable the entire control structure.- Specified by:
setActivein interfaceControlStructureInterface- Parameters:
isActive- settrueto enable
-
isActive
public boolean isActive()Check whether the control structure is currently active.- Specified by:
isActivein interfaceControlStructureInterface- Returns:
trueif active
-