Class ConformityResult

java.lang.Object
neqsim.process.mechanicaldesign.separator.conformity.ConformityResult
All Implemented Interfaces:
Serializable

public class ConformityResult extends Object implements Serializable
Result of a single conformity check against a design standard.

Each check evaluates an actual operating value against a limit from a named standard (e.g., TR3500). The result includes the check name, the internal it applies to (if any), the actual value, the limit, and a pass/warning/fail status.

Version:
1.0
Author:
NeqSim Development Team
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • checkName

      private final String checkName
    • standard

      private final String standard
    • internalType

      private final String internalType
    • actualValue

      private final double actualValue
    • limitValue

      private final double limitValue
    • unit

      private final String unit
    • status

      private final ConformityResult.Status status
    • direction

      private final ConformityResult.LimitDirection direction
    • description

      private final String description
  • Constructor Details

    • ConformityResult

      public ConformityResult(String checkName, String standard, String internalType, double actualValue, double limitValue, String unit, ConformityResult.LimitDirection direction, String description)
      Constructs a ConformityResult.
      Parameters:
      checkName - short identifier for the check (e.g., "k-factor", "inlet-momentum")
      standard - the conformity standard (e.g., "TR3500", "API-12J")
      internalType - the internal this check applies to (e.g., "mesh-pad", "demisting-cyclones") or empty string for vessel-level checks
      actualValue - the calculated actual value
      limitValue - the acceptance limit from the standard
      unit - the engineering unit (e.g., "m/s", "Pa", "mm")
      direction - whether the limit is a maximum or minimum
      description - human-readable description of the check
  • Method Details

    • notApplicable

      public static ConformityResult notApplicable(String checkName, String standard, String reason)
      Creates a NOT_APPLICABLE result when a check cannot be evaluated.
      Parameters:
      checkName - short identifier for the check
      standard - the conformity standard
      reason - why the check is not applicable
      Returns:
      a ConformityResult with NOT_APPLICABLE status
    • evaluateStatus

      private static ConformityResult.Status evaluateStatus(double actual, double limit, ConformityResult.LimitDirection dir)
      Evaluates the status based on actual value, limit, and direction.
      Parameters:
      actual - the actual value
      limit - the limit value
      dir - the direction (MAXIMUM or MINIMUM)
      Returns:
      the evaluated status
    • getCheckName

      public String getCheckName()
      Gets the check name.
      Returns:
      the check name
    • getStandard

      public String getStandard()
      Gets the standard name.
      Returns:
      the standard name
    • getInternalType

      public String getInternalType()
      Gets the internal type this check applies to.
      Returns:
      the internal type, or empty string for vessel-level checks
    • getActualValue

      public double getActualValue()
      Gets the actual calculated value.
      Returns:
      the actual value
    • getLimitValue

      public double getLimitValue()
      Gets the limit value from the standard.
      Returns:
      the limit value
    • getUnit

      public String getUnit()
      Gets the engineering unit.
      Returns:
      the unit string
    • getStatus

      public ConformityResult.Status getStatus()
      Gets the conformity status.
      Returns:
      PASS, WARNING, FAIL, or NOT_APPLICABLE
    • getDirection

      public ConformityResult.LimitDirection getDirection()
      Gets the limit direction.
      Returns:
      MAXIMUM or MINIMUM
    • getDescription

      public String getDescription()
      Gets the human-readable description.
      Returns:
      the description
    • isPassed

      public boolean isPassed()
      Returns true if the check passed (PASS or WARNING).
      Returns:
      true if status is PASS or WARNING
    • toString

      public String toString()
      Overrides:
      toString in class Object