Class FunctionalLocation

java.lang.Object
neqsim.process.util.topology.FunctionalLocation
All Implemented Interfaces:
Serializable, Comparable<FunctionalLocation>

public class FunctionalLocation extends Object implements Serializable, Comparable<FunctionalLocation>
Represents a functional location tag following STID/ISO 14224 conventions.

Format: PPPP-TT-NNNNN[S] where:

  • PPPP = Platform/Installation code (e.g., 1775 = Gullfaks C)
  • TT = Equipment type code (KA=compressor, PA=pump, VA=valve, etc.)
  • NNNNN = Sequential number
  • S = Suffix for parallel units (A, B, C...)

Example: 1775-KA-23011A = Gullfaks C, Compressor, unit 23011, train A

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

  • Constructor Details

    • FunctionalLocation

      public FunctionalLocation(String stidTag)
      Creates a functional location from a full STID tag.
      Parameters:
      stidTag - the full STID tag (e.g., "1775-KA-23011A")
    • FunctionalLocation

      public FunctionalLocation(String installationCode, String equipmentTypeCode, String sequentialNumber, String trainSuffix)
      Creates a functional location with individual components.
      Parameters:
      installationCode - the installation code (e.g., "1775")
      equipmentTypeCode - the equipment type code (e.g., "KA")
      sequentialNumber - the sequential number (e.g., "23011")
      trainSuffix - the train suffix (e.g., "A") or null
  • Method Details

    • parseTag

      private void parseTag(String tag)
    • buildTag

      private String buildTag()
    • getInstallationNameFromCode

      private String getInstallationNameFromCode(String code)
    • getEquipmentTypeDescription

      public String getEquipmentTypeDescription()
      Gets the equipment type description from code.
      Returns:
      human-readable equipment type
    • isParallelUnit

      public boolean isParallelUnit()
      Checks if this is a parallel unit (has train suffix).
      Returns:
      true if parallel unit
    • getBaseTag

      public String getBaseTag()
      Gets the base tag without train suffix (for finding parallel units).
      Returns:
      base tag without suffix
    • isSameInstallation

      public boolean isSameInstallation(FunctionalLocation other)
      Checks if this equipment is on the same installation.
      Parameters:
      other - other functional location
      Returns:
      true if same installation
    • isParallelTo

      public boolean isParallelTo(FunctionalLocation other)
      Checks if this is a parallel train to another equipment.
      Parameters:
      other - other functional location
      Returns:
      true if parallel trains (same base tag, different suffix)
    • isSameSystem

      public boolean isSameSystem(FunctionalLocation other)
      Checks if this is in the same system (same first 2 digits of sequential number).
      Parameters:
      other - other functional location
      Returns:
      true if same system
    • builder

      public static FunctionalLocation.Builder builder()
      Creates a new builder for FunctionalLocation.
      Returns:
      new builder instance
    • getInstallationCode

      public String getInstallationCode()
      Gets the installation code.
      Returns:
      installation code
    • getInstallationName

      public String getInstallationName()
      Gets the installation name.
      Returns:
      installation name
    • getEquipmentTypeCode

      public String getEquipmentTypeCode()
      Gets the equipment type code.
      Returns:
      equipment type code
    • getSequentialNumber

      public String getSequentialNumber()
      Gets the sequential number.
      Returns:
      sequential number
    • getTrainSuffix

      public String getTrainSuffix()
      Gets the train suffix.
      Returns:
      train suffix or null
    • getFullTag

      public String getFullTag()
      Gets the full STID tag.
      Returns:
      full tag
    • getSystem

      public String getSystem()
      Gets the system.
      Returns:
      system
    • setSystem

      public void setSystem(String system)
      Sets the system.
      Parameters:
      system - system
    • getSubsystem

      public String getSubsystem()
      Gets the subsystem.
      Returns:
      subsystem
    • setSubsystem

      public void setSubsystem(String subsystem)
      Sets the subsystem.
      Parameters:
      subsystem - subsystem
    • getArea

      public String getArea()
      Gets the area.
      Returns:
      area
    • setArea

      public void setArea(String area)
      Sets the area.
      Parameters:
      area - area
    • getDescription

      public String getDescription()
      Gets the description.
      Returns:
      description
    • setDescription

      public void setDescription(String description)
      Sets the description.
      Parameters:
      description - description
    • compareTo

      public int compareTo(FunctionalLocation other)
      Specified by:
      compareTo in interface Comparable<FunctionalLocation>
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object