Interface CapacityConstrainedEquipment
- All Known Implementing Classes:
AdiabaticPipe, AdiabaticTwoPhasePipe, AirCooler, BlowdownValve, CheckValve, Compressor, Condenser, ControlValve, Cooler, Ejector, ESDValve, ESPPump, Expander, GasScrubber, GasScrubberSimple, Heater, HeatExchanger, HIPPSValve, Hydrocyclone, Hydrocyclone, IncompressiblePipeFlow, LevelControlValve, Manifold, Mixer, MultiphasePipe, MultiStreamHeatExchanger, MultiStreamHeatExchanger2, NeqGasScrubber, NeqHeater, OnePhasePipeLine, PipeBeggsAndBrills, Pipeline, PressureControlValve, PressureDrop, PSDValve, Pump, Reboiler, Riser, RuptureDisk, SafetyReliefValve, SafetyValve, Separator, SimpleAbsorber, SimpleTEGAbsorber, SimpleTPoutPipeline, SimpleTray, Splitter, StaticMixer, StaticNeqMixer, StaticPhaseMixer, SteamHeater, Tank, ThreePhaseSeparator, ThrottlingValve, TopsidePiping, TubingPerformance, TurboExpanderCompressor, TwoFluidPipe, TwoPhasePipeLine, TwoPhaseSeparator, VLSolidTray, WaterCooler, WaterHammerPipe, WaterStripperColumn
This interface provides a standardized way to query capacity limits and utilization for any process equipment. Equipment implementing this interface can participate in automated bottleneck detection and optimization routines.
Example equipment types that should implement this interface:
- Separators - gas load factor, liquid residence time
- Compressors - speed, power, surge margin, discharge temperature
- Pumps - NPSH margin, flow rate, power
- Heat Exchangers - duty, approach temperature, pressure drop
- Valves - Cv utilization, pressure drop
- Pipes - velocity, erosional velocity ratio
- Version:
- 1.0
- Author:
- NeqSim Development Team
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddCapacityConstraint(CapacityConstraint constraint) Adds a new capacity constraint to this equipment.voidClears all capacity constraints from this equipment.default intDisables all capacity constraints for this equipment.default intEnables all capacity constraints for this equipment.default doubleGets the available margin (headroom) on the most limiting constraint.default doubleGets the available margin as a percentage.Gets the constraint with the highest utilization (the bottleneck).Gets all capacity constraints defined for this equipment.doubleGets the maximum utilization across all constraints.default doubleGets the maximum utilization as a percentage.Gets a summary of all constraint utilizations.booleanChecks if capacity analysis is enabled for this equipment.booleanChecks if any capacity constraint is violated (exceeds 100% utilization).booleanChecks if any HARD constraint limit is exceeded.default booleanChecks if any constraint is near its limit (above warning threshold).booleanremoveCapacityConstraint(String constraintName) Removes a capacity constraint by name.voidsetCapacityAnalysisEnabled(boolean enabled) Enables or disables capacity analysis for this equipment.
-
Method Details
-
isCapacityAnalysisEnabled
boolean isCapacityAnalysisEnabled()Checks if capacity analysis is enabled for this equipment.When disabled, this equipment is excluded from bottleneck detection, capacity utilization summaries, and optimization routines. The equipment still tracks its constraints but doesn't contribute to system-level analysis.
Note: The actual field is stored in
ProcessEquipmentBaseClassand is enabled by default for all equipment. Equipment classes should not override this method as it delegates to the base class implementation.- Returns:
- true if capacity analysis is enabled (default is true)
-
setCapacityAnalysisEnabled
void setCapacityAnalysisEnabled(boolean enabled) Enables or disables capacity analysis for this equipment.When disabled, this equipment is excluded from:
- System bottleneck detection (
ProcessSystem.findBottleneck()) - Capacity utilization summaries (
ProcessSystem.getCapacityUtilizationSummary()) - Equipment near capacity lists (
ProcessSystem.getEquipmentNearCapacityLimit()) - Optimization constraint checking
The equipment still calculates and tracks its constraints internally.
Note: The actual field is stored in
ProcessEquipmentBaseClassand is enabled by default for all equipment.- Parameters:
enabled- true to include in capacity analysis, false to exclude
- System bottleneck detection (
-
getCapacityConstraints
Map<String, CapacityConstraint> getCapacityConstraints()Gets all capacity constraints defined for this equipment.The map keys are constraint names (e.g., "speed", "gasLoadFactor") and values are the corresponding CapacityConstraint objects containing design values, current values, and utilization calculations.
- Returns:
- unmodifiable map of constraint name to CapacityConstraint
-
getBottleneckConstraint
CapacityConstraint getBottleneckConstraint()Gets the constraint with the highest utilization (the bottleneck).This method identifies which constraint is closest to or exceeding its design limit. Use this to determine what is limiting equipment capacity.
- Returns:
- the bottleneck constraint, or null if no constraints are defined
-
isCapacityExceeded
boolean isCapacityExceeded()Checks if any capacity constraint is violated (exceeds 100% utilization).A violated constraint means the equipment is operating beyond its design capacity. For HARD constraints, this may indicate equipment trip or failure. For SOFT constraints, this indicates reduced efficiency or accelerated wear.
- Returns:
- true if any constraint utilization exceeds 1.0 (100%)
-
isHardLimitExceeded
boolean isHardLimitExceeded()Checks if any HARD constraint limit is exceeded.HARD limits represent absolute equipment limits (e.g., maximum speed) that cannot be exceeded without equipment trip or damage. This is more severe than general capacity exceedance.
- Returns:
- true if any HARD constraint's max value is exceeded
-
getMaxUtilization
double getMaxUtilization()Gets the maximum utilization across all constraints.This gives a single number representing how close the equipment is to its limiting constraint. Values above 1.0 indicate the equipment is over capacity.
- Returns:
- maximum utilization as fraction (1.0 = 100% of design capacity)
-
getMaxUtilizationPercent
default double getMaxUtilizationPercent()Gets the maximum utilization as a percentage.- Returns:
- maximum utilization as percentage (100.0 = 100% of design capacity)
-
getAvailableMargin
default double getAvailableMargin()Gets the available margin (headroom) on the most limiting constraint.Returns the remaining capacity before the bottleneck constraint reaches 100%. Negative values indicate the equipment is already over capacity.
- Returns:
- available margin as fraction (0.2 = 20% headroom remaining)
-
getAvailableMarginPercent
default double getAvailableMarginPercent()Gets the available margin as a percentage.- Returns:
- available margin as percentage
-
isNearCapacityLimit
default boolean isNearCapacityLimit()Checks if any constraint is near its limit (above warning threshold).The warning threshold is typically set at 90% of design capacity to provide early warning before constraints are violated. Only enabled constraints are checked.
- Returns:
- true if any enabled constraint is above its warning threshold
-
getUtilizationSummary
Gets a summary of all constraint utilizations.Returns a map of constraint names to their current utilization percentages. Only enabled constraints are included. Useful for reporting and visualization.
- Returns:
- map of constraint name to utilization percentage
-
addCapacityConstraint
Adds a new capacity constraint to this equipment.This allows dynamic addition of constraints at runtime. Constraints can be added during equipment configuration or based on operating conditions.
- Parameters:
constraint- the constraint to add
-
removeCapacityConstraint
Removes a capacity constraint by name.- Parameters:
constraintName- the name of the constraint to remove- Returns:
- true if the constraint was found and removed
-
clearCapacityConstraints
void clearCapacityConstraints()Clears all capacity constraints from this equipment. -
disableAllConstraints
default int disableAllConstraints()Disables all capacity constraints for this equipment.When constraints are disabled, they are excluded from utilization calculations, bottleneck detection, and optimization feasibility checks. Use this for what-if scenarios or to exclude specific equipment from capacity analysis.
To re-enable constraints, call
enableAllConstraints().- Returns:
- the number of constraints that were disabled
-
enableAllConstraints
default int enableAllConstraints()Enables all capacity constraints for this equipment.Re-enables all constraints that were previously disabled. This restores the equipment to normal capacity analysis mode.
- Returns:
- the number of constraints that were enabled
-