Class PressureCondition

java.lang.Object
neqsim.process.logic.condition.PressureCondition
All Implemented Interfaces:
LogicCondition

public class PressureCondition extends Object implements LogicCondition
Condition that checks if pressure meets a specified criteria.

Supports comparison operators: >, >=, <, <=, ==, !=

Example usage:

// Check if pressure is above 5 bara
PressureCondition minPressure = new PressureCondition(stream, 5.0, ">");

// Check if pressure is stable at 10 bara (within tolerance)
PressureCondition stable = new PressureCondition(stream, 10.0, "==", 0.5);
Version:
1.0
Author:
ESOL
  • Field Details

    • equipment

      private final ProcessEquipmentInterface equipment
    • setpoint

      private final double setpoint
    • operator

      private final String operator
    • tolerance

      private final double tolerance
  • Constructor Details

    • PressureCondition

      public PressureCondition(ProcessEquipmentInterface equipment, double setpoint, String operator)
      Creates a pressure condition with default tolerance (0.1 bara).
      Parameters:
      equipment - equipment with stream to check
      setpoint - pressure setpoint in bara
      operator - comparison operator (>, >=, <, <=, ==, !=)
    • PressureCondition

      public PressureCondition(ProcessEquipmentInterface equipment, double setpoint, String operator, double tolerance)
      Creates a pressure condition with specified tolerance.
      Parameters:
      equipment - equipment with stream to check
      setpoint - pressure setpoint in bara
      operator - comparison operator (>, >=, <, <=, ==, !=)
      tolerance - tolerance for equality checks (bara)
  • Method Details

    • evaluate

      public boolean evaluate()
      Description copied from interface: LogicCondition
      Evaluates if the condition is currently met.
      Specified by:
      evaluate in interface LogicCondition
      Returns:
      true if condition is satisfied, false otherwise
    • getPressure

      private double getPressure()
    • getDescription

      public String getDescription()
      Description copied from interface: LogicCondition
      Gets a description of this condition.
      Specified by:
      getDescription in interface LogicCondition
      Returns:
      human-readable description
    • getTargetEquipment

      public ProcessEquipmentInterface getTargetEquipment()
      Description copied from interface: LogicCondition
      Gets the target equipment this condition monitors (if any).
      Specified by:
      getTargetEquipment in interface LogicCondition
      Returns:
      target equipment, or null if not equipment-specific
    • getCurrentValue

      public String getCurrentValue()
      Description copied from interface: LogicCondition
      Gets the current value being evaluated (for diagnostics).
      Specified by:
      getCurrentValue in interface LogicCondition
      Returns:
      current value as string, or empty if not applicable
    • getExpectedValue

      public String getExpectedValue()
      Description copied from interface: LogicCondition
      Gets the expected/setpoint value (for diagnostics).
      Specified by:
      getExpectedValue in interface LogicCondition
      Returns:
      expected value as string, or empty if not applicable