Class SplitRangeControllerStructure

java.lang.Object
neqsim.process.controllerdevice.structure.SplitRangeControllerStructure
All Implemented Interfaces:
Serializable, ControlStructureInterface

public class SplitRangeControllerStructure extends Object implements 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 Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • controller

      private final ControllerDeviceInterface 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

      public SplitRangeControllerStructure(ControllerDeviceInterface controller, int numberOfElements)
      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-range
      numberOfElements - 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-range
      rangeLow - array of lower bounds (0-100%) for each element
      rangeHigh - array of upper bounds (0-100%) for each element
  • Method Details

    • runTransient

      public void runTransient(double dt)
      Execute one transient calculation step.
      Specified by:
      runTransient in interface ControlStructureInterface
      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:
      getOutput in interface ControlStructureInterface
      Returns:
      control signal
    • setActive

      public void setActive(boolean isActive)
      Enable or disable the entire control structure.
      Specified by:
      setActive in interface ControlStructureInterface
      Parameters:
      isActive - set true to enable
    • isActive

      public boolean isActive()
      Check whether the control structure is currently active.
      Specified by:
      isActive in interface ControlStructureInterface
      Returns:
      true if active