Class ValvePositionCondition
java.lang.Object
neqsim.process.logic.condition.ValvePositionCondition
- All Implemented Interfaces:
LogicCondition
Condition that checks valve position/opening percentage.
Supports comparison operators: >, >=, <, <=, ==, !=
Example usage:
// Check if valve is closed (less than 5% open) ValvePositionCondition closed = new ValvePositionCondition(valve, "<", 5.0); // Check if valve is fully open ValvePositionCondition open = new ValvePositionCondition(valve, ">", 95.0);
- Version:
- 1.0
- Author:
- ESOL
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionValvePositionCondition(ValveInterface valve, String operator, double setpoint) Creates a valve position condition with default tolerance (1.0%).ValvePositionCondition(ValveInterface valve, String operator, double setpoint, double tolerance) Creates a valve position condition with specified tolerance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluate()Evaluates if the condition is currently met.Gets the current value being evaluated (for diagnostics).Gets a description of this condition.Gets the expected/setpoint value (for diagnostics).Gets the target equipment this condition monitors (if any).
-
Field Details
-
valve
-
setpoint
private final double setpoint -
operator
-
tolerance
private final double tolerance
-
-
Constructor Details
-
ValvePositionCondition
Creates a valve position condition with default tolerance (1.0%).- Parameters:
valve- valve to checkoperator- comparison operator (>, >=, <, <=, ==, !=)setpoint- position setpoint (0-100%)
-
ValvePositionCondition
public ValvePositionCondition(ValveInterface valve, String operator, double setpoint, double tolerance) Creates a valve position condition with specified tolerance.- Parameters:
valve- valve to checkoperator- comparison operator (>, >=, <, <=, ==, !=)setpoint- position setpoint (0-100%)tolerance- tolerance for equality checks (%)
-
-
Method Details
-
evaluate
public boolean evaluate()Description copied from interface:LogicConditionEvaluates if the condition is currently met.- Specified by:
evaluatein interfaceLogicCondition- Returns:
- true if condition is satisfied, false otherwise
-
getDescription
Description copied from interface:LogicConditionGets a description of this condition.- Specified by:
getDescriptionin interfaceLogicCondition- Returns:
- human-readable description
-
getTargetEquipment
Description copied from interface:LogicConditionGets the target equipment this condition monitors (if any).- Specified by:
getTargetEquipmentin interfaceLogicCondition- Returns:
- target equipment, or null if not equipment-specific
-
getCurrentValue
Description copied from interface:LogicConditionGets the current value being evaluated (for diagnostics).- Specified by:
getCurrentValuein interfaceLogicCondition- Returns:
- current value as string, or empty if not applicable
-
getExpectedValue
Description copied from interface:LogicConditionGets the expected/setpoint value (for diagnostics).- Specified by:
getExpectedValuein interfaceLogicCondition- Returns:
- expected value as string, or empty if not applicable
-