Class TemperatureCondition

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

public class TemperatureCondition extends Object implements LogicCondition
Condition that checks if temperature meets a specified criteria.

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

Example usage:

// Check if temperature is above 80°C
TemperatureCondition minTemp = new TemperatureCondition(heater, 80.0, ">=");

// Check if temperature is below 200°C (max limit)
TemperatureCondition maxTemp = new TemperatureCondition(reactor, 200.0, "<");
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

    • TemperatureCondition

      public TemperatureCondition(ProcessEquipmentInterface equipment, double setpoint, String operator)
      Creates a temperature condition with default tolerance (1.0°C).
      Parameters:
      equipment - equipment with stream to check
      setpoint - temperature setpoint in °C
      operator - comparison operator (>, >=, <, <=, ==, !=)
    • TemperatureCondition

      public TemperatureCondition(ProcessEquipmentInterface equipment, double setpoint, String operator, double tolerance)
      Creates a temperature condition with specified tolerance.
      Parameters:
      equipment - equipment with stream to check
      setpoint - temperature setpoint in °C
      operator - comparison operator (>, >=, <, <=, ==, !=)
      tolerance - tolerance for equality checks (°C)
  • 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
    • getTemperature

      private double getTemperature()
    • 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