Class Pump
- All Implemented Interfaces:
Serializable, Runnable, AutoSizeable, CapacityConstrainedEquipment, ProcessEquipmentInterface, PumpInterface, TwoPortInterface, ProcessElementInterface, SimulationInterface, NamedInterface
- Direct Known Subclasses:
ESPPump
This class simulates a centrifugal pump using one of three modes:
- Isentropic compression with specified outlet pressure and efficiency
- Manufacturer pump curves via
PumpChartfor realistic performance - Fixed outlet temperature mode using
setOutletTemperature(double, String)
Key Features
- Pump Curves: Support for head, efficiency, and NPSH curves with affinity law scaling
- Density Correction: Automatic head correction when pumping fluids different from chart test fluid
- NPSH Monitoring: Cavitation detection based on available vs required NPSH
- Operating Status: Surge, stonewall, and efficiency monitoring
- Outlet Temperature Mode: When outlet temperature is set, the pump performs a TP flash at the specified temperature and outlet pressure. Power is back-calculated from the enthalpy difference. This is useful when discharge conditions are known from plant data.
Usage Example
// Simple usage with outlet pressure
Pump pump = new Pump("MainPump", feedStream);
pump.setOutletPressure(10.0, "bara");
pump.setIsentropicEfficiency(0.75);
pump.run();
// With fixed outlet temperature (useful for plant data matching)
Pump pump2 = new Pump("PlantPump", feedStream);
pump2.setOutletPressure(10.0, "bara");
pump2.setOutletTemperature(35.0, "C");
pump2.run();
double power = pump2.getPower("kW"); // back-calculated
// With manufacturer pump curves
double[] speed = {1000.0, 1500.0};
double[][] flow = {{10, 20, 30}, {15, 30, 45}};
double[][] head = {{100, 95, 85}, {225, 214, 191}};
double[][] efficiency = {{70, 80, 75}, {72, 82, 77}};
double[] chartConditions = {18.0, 298.15, 1.0, 1.0, 998.0}; // Include ref density
pump.getPumpChart().setCurves(chartConditions, speed, flow, head, efficiency);
pump.getPumpChart().setHeadUnit("meter");
pump.setSpeed(1200.0);
pump.run();
- Version:
- $Id: $Id
- Author:
- esol
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanFlag indicating if pump has been auto-sized.private booleanprivate final Map<String, CapacityConstraint> Storage for capacity constraints.private boolean(package private) doubleprivate PumpElectricalDesignElectrical design for the pump.double(package private) static org.apache.logging.log4j.LoggerLogger object for class.private PumpMechanicalDesignMechanical design for the pump.private doubleprivate doubleprivate doubleprivate doubleboolean(package private) doubleprivate Stringprivate PumpChartInterfaceprivate static final longSerialization version UID.private double(package private) SystemInterfaceprivate booleanFields inherited from class TwoPortEquipment
inStream, outStreamFields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for Pump.Pump(String name, StreamInterface inletStream) Constructor for Pump. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCapacityConstraint(CapacityConstraint constraint) Adds a capacity constraint to this equipment.voidautoSize()Automatically size using default safety factor (1.2 = 20% margin).voidautoSize(double safetyFactor) Automatically size the equipment based on connected stream conditions.voidAutomatically size using company-specific design standards.voidcalculateAsCompressor(boolean setPumpCalcType) calculateAsCompressor.voidClears all capacity constraints from this equipment.voiddisplayResult.Gets the bottleneck (most limiting) constraint for this equipment.Gets all capacity constraints defined for this equipment.doublegetCapacityDuty.doublegetCapacityMax.doublegetDuty()getDuty.Get anelectricalDesignfor the equipment.doublegetEnergy.doublegetEntropyProduction(String unit) getEntropyProduction.getEquipmentState(String temperatureUnit, String pressureUnit, String flowUnit) Returns a map of key equipment properties with values and units.doubleGetter for the fieldisentropicEfficiency.doubleGets the maximum utilization across all enabled constraints.Get amechanicalDesignfor the equipment.doubleGetter for the fieldminimumFlow, e.g., the minimum flow rate for the pump.doubleGetter for the fieldmolarFlow.doubleCalculate the Net Positive Suction Head Available (NPSHa) at the pump inlet.doubleGet the NPSH safety margin factor.doubleGet the required Net Positive Suction Head (NPSHr) for the pump at current operating conditions.doubleGetter for the fieldoutTemperature.doublegetPower()getPower.doublegetPower.Getter for the fieldpumpChart.Get a detailed sizing report after auto-sizing.Get sizing report as JSON for programmatic access.doublegetSpeed()Getter for the fieldspeed.getThermoSystem.voidInitialize anelectricalDesignfor the equipment.protected voidInitializes default capacity constraints for the pump.voidInitialize ainitMechanicalDesignfor the equipment.booleanCheck if equipment has been auto-sized.booleanChecks if any capacity constraint is violated (exceeds 100% utilization).booleanCheck if the pump is at risk of cavitation based on NPSH criteria.booleanGet whether NPSH checking is enabled.booleanChecks if any HARD constraint limit is exceeded.booleanremoveCapacityConstraint(String constraintName) Removes a capacity constraint by name.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidsetCheckNPSH(boolean checkNPSH) Enable or disable NPSH checking during pump operation.voidsetIsentropicEfficiency(double isentropicEfficiency) Setter for the fieldisentropicEfficiency.voidsetMinimumFlow(double minimumFlow) Setter for the fieldminimumFlow, e.g., the minimum flow rate for the pump.voidsetMolarFlow(double molarFlow) Setter for the fieldmolarFlow.voidsetNPSHMargin(double npshMargin) Set the NPSH safety margin.voidsetOutletPressure(double pressure) Set outlet pressure of twoport.voidsetOutletPressure(double pressure, String unit) Setter for the fieldpressure.voidsetOutletTemperature(double outTemperature) Set the outlet temperature of the pump in Kelvin.voidsetOutletTemperature(double temperature, String unit) Set the outlet temperature of the pump with unit specification.voidsetOutTemperature(double outTemperature) Deprecated.voidsetPressure(double pressure) Setter for the fieldpressure.voidsetPressure(double pressure, String unit) Setter for the fieldpressure.voidsetPumpChartType(String type) setPumpChartType.voidsetSpeed(double speed) Setter for the fieldspeed.toJson()Serializes the Process Equipment along with its state to a JSON string.toJson(ReportConfig cfg) Serializes the Process Equipment with configurable level of detail.Methods inherited from class TwoPortEquipment
getInletPressure, getInletStream, getInletStreams, getInletTemperature, getMassBalance, getOutletPressure, getOutletStream, getOutletStreams, getOutletTemperature, setInletPressure, setInletStream, setInletTemperature, setOutletStream, validateSetupMethods inherited from class ProcessEquipmentBaseClass
addController, copy, equals, getAvailableMargin, getAvailableMarginPercent, getConditionAnalysisMessage, getConstraintEvaluationReport, getController, getController, getControllers, getEffectiveCapacityFactor, getEnergyStream, getExergyChange, getFailureMode, getMassBalance, getMaxUtilizationPercent, getPressure, getPressure, getProperty, getReferenceDesignation, getReport_json, getResultTable, getSpecification, getTemperature, getTemperature, getUtilizationSummary, hashCode, initializeDefaultConstraints, initInstrumentDesign, isActive, isActive, isCapacityAnalysisEnabled, isFailed, isNearCapacityLimit, isSetEnergyStream, reportResults, restoreFromFailure, run_step, runConditionAnalysis, setCapacityAnalysisEnabled, setController, setEnergyStream, setEnergyStream, setFailureMode, setFlowValveController, setReferenceDesignation, setRegulatorOutSignal, setSpecification, setTemperature, simulateDegradedOperation, simulateTrip, solvedMethods inherited from class SimulationBaseClass
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTimeMethods inherited from class NamedBaseClass
getName, getTagNumber, setName, setTagNumberMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CapacityConstrainedEquipment
disableAllConstraints, enableAllConstraints, getAvailableMargin, getAvailableMarginPercent, getMaxUtilizationPercent, getUtilizationSummary, isCapacityAnalysisEnabled, isNearCapacityLimit, setCapacityAnalysisEnabledMethods inherited from interface NamedInterface
getName, getTagName, getTagNumber, setName, setTagName, setTagNumberMethods inherited from interface ProcessEquipmentInterface
addController, equals, getAvailableMargin, getAvailableMarginPercent, getConditionAnalysisMessage, getController, getController, getControllers, getExergyChange, getExergyChange, getExergyDestruction, getExergyDestruction, getFluid, getInletStreams, getInstrumentDesign, getMassBalance, getMassBalance, getMaxUtilizationPercent, getOperatingEnvelopeViolation, getOutletFlowRate, getOutletPressure, getOutletStreams, getOutletTemperature, getPressure, getPressure, getReferenceDesignation, getReferenceDesignationString, getReport_json, getRestCapacity, getResultTable, getSimulationValidationErrors, getSpecification, getTemperature, getTemperature, getUtilizationSummary, hashCode, initInstrumentDesign, isNearCapacityLimit, isSimulationValid, isWithinOperatingEnvelope, needRecalculation, reportResults, runConditionAnalysis, setController, setReferenceDesignation, setRegulatorOutSignal, setSpecification, setTemperature, validateSetupMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run_step, run_step, runTransient, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime, solvedMethods inherited from interface TwoPortInterface
getInletPressure, getInletStream, getInletTemperature, getInStream, getOutletPressure, getOutletStream, getOutletTemperature, getOutStream, setInletPressure, setInletStream, setInletTemperature, setOutletStream, setOutPressure, setOutPressure, setOutTemperature
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class. -
mechanicalDesign
Mechanical design for the pump. -
electricalDesign
Electrical design for the pump. -
thermoSystem
SystemInterface thermoSystem -
dH
double dH -
pressure
double pressure -
molarFlow
private double molarFlow -
speed
private double speed -
minimumFlow
private double minimumFlow -
outTemperature
private double outTemperature -
useOutTemperature
private boolean useOutTemperature -
calculateAsCompressor
private boolean calculateAsCompressor -
isentropicEfficiency
public double isentropicEfficiency -
powerSet
public boolean powerSet -
pressureUnit
-
pumpChart
-
checkNPSH
private boolean checkNPSH -
npshMargin
private double npshMargin -
autoSized
private boolean autoSizedFlag indicating if pump has been auto-sized. -
capacityConstraints
Storage for capacity constraints.
-
-
Constructor Details
-
Pump
-
Pump
Constructor for Pump.
- Parameters:
name- name of pumpinletStream- aStreamInterfaceobject
-
-
Method Details
-
getMechanicalDesign
Get a
mechanicalDesignfor the equipment.- Specified by:
getMechanicalDesignin interfaceProcessEquipmentInterface- Overrides:
getMechanicalDesignin classProcessEquipmentBaseClass- Returns:
- a
MechanicalDesignobject
-
initMechanicalDesign
public void initMechanicalDesign()Initialize a
initMechanicalDesignfor the equipment.- Specified by:
initMechanicalDesignin interfaceProcessEquipmentInterface- Overrides:
initMechanicalDesignin classProcessEquipmentBaseClass
-
getElectricalDesign
Get an
electricalDesignfor the equipment.- Specified by:
getElectricalDesignin interfaceProcessEquipmentInterface- Returns:
- a
ElectricalDesignobject
-
initElectricalDesign
public void initElectricalDesign()Initialize an
electricalDesignfor the equipment.- Specified by:
initElectricalDesignin interfaceProcessEquipmentInterface- Overrides:
initElectricalDesignin classProcessEquipmentBaseClass
-
getEnergy
public double getEnergy()getEnergy.
- Specified by:
getEnergyin interfacePumpInterface- Returns:
- a double
-
getPower
public double getPower()getPower.
- Specified by:
getPowerin interfacePumpInterface- Returns:
- a double
-
getCapacityDuty
public double getCapacityDuty()getCapacityDuty.
- Specified by:
getCapacityDutyin interfaceProcessEquipmentInterface- Returns:
- a double
-
getCapacityMax
public double getCapacityMax()getCapacityMax.
- Specified by:
getCapacityMaxin interfaceProcessEquipmentInterface- Returns:
- a double
-
getPower
-
getEquipmentState
public Map<String, Map<String,Object>> getEquipmentState(String temperatureUnit, String pressureUnit, String flowUnit) Returns a map of key equipment properties with values and units.Provides a unified way to access equipment state without knowing the specific equipment type. Each entry in the outer map has a property name (e.g. "temperature", "pressure"). Each inner map contains "value" (Double) and "unit" (String).
The default implementation uses
ProcessEquipmentInterface.getOutletStreams()to report outlet conditions. Subclasses override this to add equipment-specific properties (e.g., valve opening, compressor power, separator liquid levels).- Specified by:
getEquipmentStatein interfaceProcessEquipmentInterface- Parameters:
temperatureUnit- temperature unit (e.g. "C")pressureUnit- pressure unit (e.g. "bara")flowUnit- flow unit (e.g. "kg/hr")- Returns:
- map of property name to value/unit maps
-
getDuty
public double getDuty()getDuty.
- Returns:
- a double
-
calculateAsCompressor
public void calculateAsCompressor(boolean setPumpCalcType) calculateAsCompressor.
- Parameters:
setPumpCalcType- a boolean
-
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Specified by:
runin interfaceSimulationInterface- Parameters:
id- UUID
-
displayResult
public void displayResult()displayResult.
- Specified by:
displayResultin interfaceProcessEquipmentInterface- Overrides:
displayResultin classProcessEquipmentBaseClass
-
getMolarFlow
public double getMolarFlow()Getter for the field
molarFlow.- Returns:
- a double
-
setMolarFlow
public void setMolarFlow(double molarFlow) Setter for the field
molarFlow.- Parameters:
molarFlow- a double
-
getThermoSystem
getThermoSystem.
- Specified by:
getThermoSystemin interfaceProcessEquipmentInterface- Overrides:
getThermoSystemin classProcessEquipmentBaseClass- Returns:
- a
SystemInterfaceobject
-
getIsentropicEfficiency
public double getIsentropicEfficiency()Getter for the field
isentropicEfficiency.- Returns:
- the isentropicEfficiency
-
setIsentropicEfficiency
public void setIsentropicEfficiency(double isentropicEfficiency) Setter for the field
isentropicEfficiency.- Parameters:
isentropicEfficiency- the isentropicEfficiency to set
-
getOutTemperature
public double getOutTemperature()Getter for the field
outTemperature.- Returns:
- a double
-
setOutletTemperature
public void setOutletTemperature(double outTemperature) Set the outlet temperature of the pump in Kelvin.When set, the pump skips the isentropic or pump-curve calculation and instead performs a TP flash at this temperature and the outlet pressure. Power is back-calculated from the enthalpy difference between inlet and outlet.
- Specified by:
setOutletTemperaturein interfaceTwoPortInterface- Overrides:
setOutletTemperaturein classTwoPortEquipment- Parameters:
outTemperature- outlet temperature in Kelvin
-
setOutletTemperature
Set the outlet temperature of the pump with unit specification.When set, the pump skips the isentropic or pump-curve calculation and instead performs a TP flash at this temperature and the outlet pressure. Power is back-calculated from the enthalpy difference between inlet and outlet. Supported units: "K" (Kelvin), "C" (Celsius), "F" (Fahrenheit), "R" (Rankine).
- Specified by:
setOutletTemperaturein interfaceTwoPortInterface- Overrides:
setOutletTemperaturein classTwoPortEquipment- Parameters:
temperature- outlet temperature valueunit- temperature unit ("K", "C", "F", or "R"), case-insensitive
-
setOutTemperature
Deprecated.usesetOutletTemperature(double)insteadSetter for the field
outTemperature.- Specified by:
setOutTemperaturein interfaceTwoPortInterface- Parameters:
outTemperature- outlet temperature in Kelvin
-
getEntropyProduction
getEntropyProduction.
- Specified by:
getEntropyProductionin interfaceProcessEquipmentInterface- Overrides:
getEntropyProductionin classProcessEquipmentBaseClass- Parameters:
unit- aStringobject- Returns:
- a double
-
setPressure
public void setPressure(double pressure) Setter for the field
pressure.- Specified by:
setPressurein interfaceProcessEquipmentInterface- Overrides:
setPressurein classProcessEquipmentBaseClass- Parameters:
pressure- a double
-
setPressure
-
setOutletPressure
public void setOutletPressure(double pressure) Set outlet pressure of twoport.- Specified by:
setOutletPressurein interfaceTwoPortInterface- Overrides:
setOutletPressurein classTwoPortEquipment- Parameters:
pressure- value to set in unit bara
-
setOutletPressure
Setter for the field
pressure.- Specified by:
setOutletPressurein interfaceTwoPortInterface- Overrides:
setOutletPressurein classTwoPortEquipment- Parameters:
pressure- a doubleunit- aStringobject
-
setSpeed
public void setSpeed(double speed) Setter for the field
speed.- Parameters:
speed- a double
-
getSpeed
public double getSpeed()Getter for the field
speed.- Returns:
- a double
-
getPumpChart
Getter for the field
pumpChart.- Returns:
- a
PumpChartobject
-
toJson
Serializes the Process Equipment along with its state to a JSON string.
- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classTwoPortEquipment- Returns:
- json string.
-
toJson
Serializes the Process Equipment with configurable level of detail.- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classTwoPortEquipment- Parameters:
cfg- report configuration- Returns:
- json string
-
setPumpChartType
setPumpChartType.
- Specified by:
setPumpChartTypein interfacePumpInterface- Parameters:
type- aStringobject
-
getMinimumFlow
public double getMinimumFlow()Getter for the field
minimumFlow, e.g., the minimum flow rate for the pump.- Specified by:
getMinimumFlowin interfacePumpInterface- Overrides:
getMinimumFlowin classProcessEquipmentBaseClass- Returns:
- a double
-
setMinimumFlow
public void setMinimumFlow(double minimumFlow) Setter for the field
minimumFlow, e.g., the minimum flow rate for the pump.- Specified by:
setMinimumFlowin interfacePumpInterface- Overrides:
setMinimumFlowin classProcessEquipmentBaseClass- Parameters:
minimumFlow- a double
-
getNPSHAvailable
public double getNPSHAvailable()Calculate the Net Positive Suction Head Available (NPSHa) at the pump inlet.NPSHa represents the absolute pressure head available at the pump suction above the fluid vapor pressure. It must exceed the pump's NPSHr to avoid cavitation.
Formula: NPSHa = (P_suction - P_vapor) / (ρ·g) + v²/(2·g) + z
- Specified by:
getNPSHAvailablein interfacePumpInterface- Returns:
- NPSHa in meters
-
getNPSHRequired
public double getNPSHRequired()Get the required Net Positive Suction Head (NPSHr) for the pump at current operating conditions.If a pump chart with NPSH curve is available, uses manufacturer data. Otherwise returns a conservative estimate based on pump type and flow rate.
- Specified by:
getNPSHRequiredin interfacePumpInterface- Returns:
- NPSHr in meters
-
isCavitating
public boolean isCavitating()Check if the pump is at risk of cavitation based on NPSH criteria.Cavitation occurs when NPSHa < NPSHr, causing vapor bubbles to form and collapse, potentially damaging the pump.
- Specified by:
isCavitatingin interfacePumpInterface- Returns:
- true if cavitation risk exists (NPSHa < npshMargin * NPSHr)
-
setCheckNPSH
public void setCheckNPSH(boolean checkNPSH) Enable or disable NPSH checking during pump operation.- Specified by:
setCheckNPSHin interfacePumpInterface- Parameters:
checkNPSH- true to enable NPSH checking
-
isCheckNPSH
public boolean isCheckNPSH()Get whether NPSH checking is enabled.- Returns:
- true if NPSH checking is enabled
-
setNPSHMargin
public void setNPSHMargin(double npshMargin) Set the NPSH safety margin. NPSHa must be greater than npshMargin × NPSHr.- Parameters:
npshMargin- safety margin factor (typically 1.1 to 1.5)
-
getNPSHMargin
public double getNPSHMargin()Get the NPSH safety margin factor.- Returns:
- NPSH margin factor
-
autoSize
public void autoSize(double safetyFactor) Automatically size the equipment based on connected stream conditions.This method calculates dimensions and design parameters using the inlet stream properties and applies the specified safety factor. The equipment must have a valid inlet stream connected before calling this method.
- Specified by:
autoSizein interfaceAutoSizeable- Parameters:
safetyFactor- multiplier for design capacity, typically 1.1-1.3 (10-30% over design)
-
autoSize
public void autoSize()Automatically size using default safety factor (1.2 = 20% margin).- Specified by:
autoSizein interfaceAutoSizeable
-
autoSize
Automatically size using company-specific design standards.This method applies design rules from the specified company's technical requirements (TR) documents. The standards are loaded from the NeqSim design database.
- Specified by:
autoSizein interfaceAutoSizeable- Parameters:
companyStandard- company name (e.g., "Equinor", "Shell", "TotalEnergies")trDocument- TR document reference (e.g., "TR2000", "DEP-31.38.01.11")
-
isAutoSized
public boolean isAutoSized()Check if equipment has been auto-sized.- Specified by:
isAutoSizedin interfaceAutoSizeable- Returns:
- true if autoSize() has been called successfully
-
getSizingReport
Get a detailed sizing report after auto-sizing.The report includes:
- Design basis (flow rates, pressures, temperatures)
- Calculated dimensions
- Design parameters (K-factor, Cv, velocity, etc.)
- Safety margins
- Specified by:
getSizingReportin interfaceAutoSizeable- Returns:
- formatted sizing report string
-
getSizingReportJson
Get sizing report as JSON for programmatic access.- Specified by:
getSizingReportJsonin interfaceAutoSizeable- Returns:
- JSON string with sizing data
-
initializeCapacityConstraints
protected void initializeCapacityConstraints()Initializes default capacity constraints for the pump.NOTE: All constraints are disabled by default for backwards compatibility. Enable specific constraints when pump capacity analysis is needed (e.g., after sizing).
-
getCapacityConstraints
Gets all capacity constraints defined for this equipment.Returns an unmodifiable map of constraint name to constraint object. Constraints are used by the optimization framework to detect bottlenecks, enforce limits, and guide production allocation. Equipment subclasses populate this map via
ProcessEquipmentInterface.addCapacityConstraint(CapacityConstraint).- Specified by:
getCapacityConstraintsin interfaceCapacityConstrainedEquipment- Specified by:
getCapacityConstraintsin interfaceProcessEquipmentInterface- Overrides:
getCapacityConstraintsin classProcessEquipmentBaseClass- Returns:
- unmodifiable map of constraint name to constraint, empty if none defined
-
getBottleneckConstraint
Gets the bottleneck (most limiting) constraint for this equipment.Returns the enabled constraint with the highest utilization ratio. If no constraints are defined or enabled, returns null.
- Specified by:
getBottleneckConstraintin interfaceCapacityConstrainedEquipment- Specified by:
getBottleneckConstraintin interfaceProcessEquipmentInterface- Overrides:
getBottleneckConstraintin classProcessEquipmentBaseClass- Returns:
- the most limiting constraint, or null if none
-
isCapacityExceeded
public 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.
- Specified by:
isCapacityExceededin interfaceCapacityConstrainedEquipment- Specified by:
isCapacityExceededin interfaceProcessEquipmentInterface- Overrides:
isCapacityExceededin classProcessEquipmentBaseClass- Returns:
- true if any enabled constraint utilization exceeds 1.0 (100%)
-
isHardLimitExceeded
public 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.
- Specified by:
isHardLimitExceededin interfaceCapacityConstrainedEquipment- Specified by:
isHardLimitExceededin interfaceProcessEquipmentInterface- Overrides:
isHardLimitExceededin classProcessEquipmentBaseClass- Returns:
- true if any enabled HARD constraint's max value is exceeded
-
getMaxUtilization
public double getMaxUtilization()Gets the maximum utilization across all enabled constraints.Returns the highest utilization ratio across all enabled constraints. Values above 1.0 indicate the equipment is over capacity. Returns 0.0 if no constraints are defined or enabled.
- Specified by:
getMaxUtilizationin interfaceCapacityConstrainedEquipment- Specified by:
getMaxUtilizationin interfaceProcessEquipmentInterface- Overrides:
getMaxUtilizationin classProcessEquipmentBaseClass- Returns:
- maximum utilization as fraction (1.0 = 100% of design capacity)
-
addCapacityConstraint
Adds a capacity constraint to this equipment.Constraints can be added at any time. If a constraint with the same name already exists, it is replaced. Use the fluent builder API on
CapacityConstraintto configure the constraint before adding.- Specified by:
addCapacityConstraintin interfaceCapacityConstrainedEquipment- Specified by:
addCapacityConstraintin interfaceProcessEquipmentInterface- Overrides:
addCapacityConstraintin classProcessEquipmentBaseClass- Parameters:
constraint- the capacity constraint to add (ignored if null)
-
removeCapacityConstraint
Removes a capacity constraint by name.- Specified by:
removeCapacityConstraintin interfaceCapacityConstrainedEquipment- Parameters:
constraintName- the name of the constraint to remove- Returns:
- true if the constraint was found and removed
-
clearCapacityConstraints
public void clearCapacityConstraints()Clears all capacity constraints from this equipment.- Specified by:
clearCapacityConstraintsin interfaceCapacityConstrainedEquipment
-
setOutletTemperature(double)instead