Class DegradedOperationOptimizer
java.lang.Object
neqsim.process.util.optimizer.DegradedOperationOptimizer
- All Implemented Interfaces:
Serializable
Optimizer for finding optimal operating conditions during degraded operation.
When equipment fails or operates at reduced capacity, this optimizer finds the best operating point for the remaining plant to maximize production while respecting constraints.
Key Capabilities
- Find maximum throughput with failed equipment
- Optimize setpoints for remaining equipment
- Compare operating modes (run degraded vs. partial shutdown)
- Generate recovery plan with recommended actions
Example Usage
DegradedOperationOptimizer optimizer = new DegradedOperationOptimizer(processSystem);
optimizer.setFeedStreamName("Well Feed");
// Optimize with compressor down
DegradedOperationResult result = optimizer.optimizeWithEquipmentDown("HP Compressor");
// Get recommended setpoints
Map<String, Double> setpoints = result.getOptimizedSetpoints();
- Version:
- 1.0
- Author:
- NeqSim Development Team
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumOperating mode options during degraded operation.private static classstatic classRecovery action for the recovery plan.static classRecovery plan for restoring normal operation. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DoubleBaseline power consumption (cached).private DoubleBaseline production rate (cached).private StringName of the feed stream.private doubleFlow rate step size for search.private static final org.apache.logging.log4j.LoggerLogger.private intMaximum optimization iterations.private doubleMinimum flow rate as fraction of baseline.private booleanWhether to optimize compressor speeds.private booleanWhether to optimize temperatures.private ProcessSystemThe process system to optimize.private StringName of the product stream.private static final longprivate doubleTolerance for optimization convergence. -
Constructor Summary
ConstructorsConstructorDescriptionDegradedOperationOptimizer(ProcessSystem processSystem) Creates a degraded operation optimizer for the given process system.DegradedOperationOptimizer(ProcessSystem processSystem, String feedStreamName, String productStreamName) Creates optimizer with specified streams. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidapplyFailure(ProcessSystem process, String equipmentName, EquipmentFailureMode mode) private voidcaptureSetpoints(ProcessSystem process) voidClears the cached baseline values.createRecoveryPlan(String failedEquipment) Creates a recovery plan with recommended actions.determineOperatingMode(DegradedOperationOptimizer.OptimizationPoint optimal, double baseline) evaluateOperatingModes(String failedEquipment) Finds the best operating mode for the given failure scenario.findOptimalFlowRate(ProcessSystem process, double baselineFlow) private doublegetProductionRate(ProcessSystem process) private doublegetTotalPower(ProcessSystem process) optimizeWithEquipmentDown(String equipmentName) Optimizes operation with a single equipment down.optimizeWithEquipmentDown(String equipmentName, EquipmentFailureMode failureMode) Optimizes operation with a specific failure mode.optimizeWithMultipleFailures(List<String> failedEquipment) Optimizes operation with multiple equipment failures.setFeedStreamName(String name) Sets the feed stream name.setProductStreamName(String name) Sets the product stream name.setTolerance(double tolerance) Sets the optimization tolerance.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
logger
private static final org.apache.logging.log4j.Logger loggerLogger. -
processSystem
The process system to optimize. -
feedStreamName
Name of the feed stream. -
productStreamName
Name of the product stream. -
tolerance
private double toleranceTolerance for optimization convergence. -
maxIterations
private int maxIterationsMaximum optimization iterations. -
minFlowFraction
private double minFlowFractionMinimum flow rate as fraction of baseline. -
flowStepFraction
private double flowStepFractionFlow rate step size for search. -
optimizeCompressorSpeeds
private boolean optimizeCompressorSpeedsWhether to optimize compressor speeds. -
optimizeTemperatures
private boolean optimizeTemperaturesWhether to optimize temperatures. -
baselineProduction
Baseline production rate (cached). -
baselinePower
Baseline power consumption (cached).
-
-
Constructor Details
-
DegradedOperationOptimizer
Creates a degraded operation optimizer for the given process system.- Parameters:
processSystem- the process system to optimize
-
DegradedOperationOptimizer
public DegradedOperationOptimizer(ProcessSystem processSystem, String feedStreamName, String productStreamName) Creates optimizer with specified streams.- Parameters:
processSystem- the process systemfeedStreamName- name of the feed streamproductStreamName- name of the product stream
-
-
Method Details
-
autoDetectStreams
private void autoDetectStreams() -
setFeedStreamName
Sets the feed stream name.- Parameters:
name- the feed stream name- Returns:
- this optimizer for chaining
-
setProductStreamName
Sets the product stream name.- Parameters:
name- the product stream name- Returns:
- this optimizer for chaining
-
setTolerance
Sets the optimization tolerance.- Parameters:
tolerance- the tolerance- Returns:
- this optimizer for chaining
-
clearCache
public void clearCache()Clears the cached baseline values. -
optimizeWithEquipmentDown
Optimizes operation with a single equipment down.- Parameters:
equipmentName- name of the failed equipment- Returns:
- optimization result with recommended setpoints
-
optimizeWithEquipmentDown
public DegradedOperationResult optimizeWithEquipmentDown(String equipmentName, EquipmentFailureMode failureMode) Optimizes operation with a specific failure mode.- Parameters:
equipmentName- name of the failed equipmentfailureMode- the failure mode- Returns:
- optimization result
-
optimizeWithMultipleFailures
Optimizes operation with multiple equipment failures.- Parameters:
failedEquipment- list of failed equipment names- Returns:
- optimization result
-
evaluateOperatingModes
public Map<DegradedOperationOptimizer.OperatingMode, Double> evaluateOperatingModes(String failedEquipment) Finds the best operating mode for the given failure scenario.- Parameters:
failedEquipment- name of failed equipment- Returns:
- map of operating mode to expected production
-
createRecoveryPlan
Creates a recovery plan with recommended actions.- Parameters:
failedEquipment- name of failed equipment- Returns:
- recovery plan
-
applyFailure
-
findOptimalFlowRate
private DegradedOperationOptimizer.OptimizationPoint findOptimalFlowRate(ProcessSystem process, double baselineFlow) -
captureSetpoints
-
getProductionRate
-
getTotalPower
-
determineOperatingMode
private DegradedOperationOptimizer.OperatingMode determineOperatingMode(DegradedOperationOptimizer.OptimizationPoint optimal, double baseline)
-