Class DegradedOperationOptimizer

java.lang.Object
neqsim.process.util.optimizer.DegradedOperationOptimizer
All Implemented Interfaces:
Serializable

public class DegradedOperationOptimizer extends Object implements 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:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • logger

      private static final org.apache.logging.log4j.Logger logger
      Logger.
    • processSystem

      private ProcessSystem processSystem
      The process system to optimize.
    • feedStreamName

      private String feedStreamName
      Name of the feed stream.
    • productStreamName

      private String productStreamName
      Name of the product stream.
    • tolerance

      private double tolerance
      Tolerance for optimization convergence.
    • maxIterations

      private int maxIterations
      Maximum optimization iterations.
    • minFlowFraction

      private double minFlowFraction
      Minimum flow rate as fraction of baseline.
    • flowStepFraction

      private double flowStepFraction
      Flow rate step size for search.
    • optimizeCompressorSpeeds

      private boolean optimizeCompressorSpeeds
      Whether to optimize compressor speeds.
    • optimizeTemperatures

      private boolean optimizeTemperatures
      Whether to optimize temperatures.
    • baselineProduction

      private transient Double baselineProduction
      Baseline production rate (cached).
    • baselinePower

      private transient Double baselinePower
      Baseline power consumption (cached).
  • Constructor Details

    • DegradedOperationOptimizer

      public DegradedOperationOptimizer(ProcessSystem processSystem)
      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 system
      feedStreamName - name of the feed stream
      productStreamName - name of the product stream
  • Method Details

    • autoDetectStreams

      private void autoDetectStreams()
    • setFeedStreamName

      public DegradedOperationOptimizer setFeedStreamName(String name)
      Sets the feed stream name.
      Parameters:
      name - the feed stream name
      Returns:
      this optimizer for chaining
    • setProductStreamName

      public DegradedOperationOptimizer setProductStreamName(String name)
      Sets the product stream name.
      Parameters:
      name - the product stream name
      Returns:
      this optimizer for chaining
    • setTolerance

      public DegradedOperationOptimizer setTolerance(double tolerance)
      Sets the optimization tolerance.
      Parameters:
      tolerance - the tolerance
      Returns:
      this optimizer for chaining
    • clearCache

      public void clearCache()
      Clears the cached baseline values.
    • optimizeWithEquipmentDown

      public DegradedOperationResult optimizeWithEquipmentDown(String equipmentName)
      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 equipment
      failureMode - the failure mode
      Returns:
      optimization result
    • optimizeWithMultipleFailures

      public DegradedOperationResult optimizeWithMultipleFailures(List<String> failedEquipment)
      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

      public DegradedOperationOptimizer.RecoveryPlan createRecoveryPlan(String failedEquipment)
      Creates a recovery plan with recommended actions.
      Parameters:
      failedEquipment - name of failed equipment
      Returns:
      recovery plan
    • applyFailure

      private void applyFailure(ProcessSystem process, String equipmentName, EquipmentFailureMode mode)
    • findOptimalFlowRate

      private DegradedOperationOptimizer.OptimizationPoint findOptimalFlowRate(ProcessSystem process, double baselineFlow)
    • captureSetpoints

      private Map<String,Double> captureSetpoints(ProcessSystem process)
    • getProductionRate

      private double getProductionRate(ProcessSystem process)
    • getTotalPower

      private double getTotalPower(ProcessSystem process)
    • determineOperatingMode

      private DegradedOperationOptimizer.OperatingMode determineOperatingMode(DegradedOperationOptimizer.OptimizationPoint optimal, double baseline)