Class FacilityCapacity

java.lang.Object
neqsim.process.util.fielddevelopment.FacilityCapacity
All Implemented Interfaces:
Serializable

public class FacilityCapacity extends Object implements Serializable
Extended facility capacity analysis for field development planning.

This class builds on ProductionOptimizer to provide comprehensive facility capacity assessment capabilities including:

  • Current bottleneck identification and utilization analysis
  • Near-bottleneck equipment detection (approaching capacity)
  • Debottleneck option generation and evaluation
  • Multi-scenario comparison for capital planning
  • Capacity evolution over field life as production declines
  • NPV calculation for debottleneck investments

Bottleneck Analysis Concepts

The facility capacity is limited by the equipment with the highest utilization ratio:

Utilization = Current Duty / Maximum Capacity
The equipment with the highest utilization is the "bottleneck". Equipment with utilization above a threshold (typically 80%) are "near-bottlenecks" that may become constraints if the current bottleneck is relieved.

Debottleneck Option Generation

For each near-bottleneck, the system generates a FacilityCapacity.DebottleneckOption containing:

  • Current and proposed capacity
  • Incremental production enabled by the upgrade
  • Estimated CAPEX (if cost factors are configured)
  • Simple payback period

Integration with ProductionOptimizer

This class uses ProductionOptimizer for:

  • Finding maximum sustainable production rate
  • Evaluating utilization across all equipment
  • Running scenario comparisons for debottleneck cases

Example Usage

FacilityCapacity capacity = new FacilityCapacity(facilityProcess);

// Perform comprehensive capacity assessment
CapacityAssessment assessment = capacity.assess(
    feedStream,
    1000.0,    // lower bound
    100000.0,  // upper bound
    "kg/hr");

System.out.println("Current max rate: " + assessment.getCurrentMaxRate());
System.out.println("Bottleneck: " + assessment.getCurrentBottleneck());

// Review debottleneck options
for (DebottleneckOption option : assessment.getDebottleneckOptions()) {
    System.out.printf("%s: +%.0f kg/hr for $%.0f M (payback: %.1f years)%n",
        option.getEquipmentName(),
        option.getIncrementalProduction(),
        option.getCapex() / 1e6,
        option.getPaybackYears());
}

// Compare debottleneck scenarios
ScenarioComparisonResult comparison = capacity.compareDebottleneckScenarios(
    feedStream, assessment.getDebottleneckOptions().subList(0, 3),
    1000.0, 100000.0, "kg/hr");
System.out.println(comparison.toMarkdownTable());
Version:
1.0
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • DEFAULT_NEAR_BOTTLENECK_THRESHOLD

      public static final double DEFAULT_NEAR_BOTTLENECK_THRESHOLD
      Default threshold for near-bottleneck detection (80% utilization).
      See Also:
    • DEFAULT_CAPACITY_INCREASE_FACTOR

      public static final double DEFAULT_CAPACITY_INCREASE_FACTOR
      Default capacity increase factor for debottleneck options.
      See Also:
    • facility

      private final ProcessSystem facility
      Process system representing the surface facility.
    • optimizer

      private transient ProductionOptimizer optimizer
      Production optimizer for bottleneck analysis.
    • nearBottleneckThreshold

      private double nearBottleneckThreshold
      Threshold for near-bottleneck detection.
    • capacityIncreaseFactor

      private double capacityIncreaseFactor
      Default capacity increase factor for debottleneck options.
    • costFactorsByType

      private final Map<Class<?>,Double> costFactorsByType
      Cost factors by equipment type for CAPEX estimation.
    • costFactorsByName

      private final Map<String,Double> costFactorsByName
      Cost factors by equipment name for CAPEX estimation.
  • Constructor Details

    • FacilityCapacity

      public FacilityCapacity(ProcessSystem facility)
      Creates a facility capacity analyzer.
      Parameters:
      facility - process system representing the surface facility
  • Method Details

    • assess

      public FacilityCapacity.CapacityAssessment assess(StreamInterface feedStream, double lowerBound, double upperBound, String rateUnit)
      Performs comprehensive capacity assessment.

      This method:

      1. Runs production optimization to find maximum sustainable rate
      2. Identifies the current bottleneck and its utilization
      3. Finds all near-bottleneck equipment (>80% utilization)
      4. Generates debottleneck options for each near-bottleneck
      5. Estimates CAPEX and payback for each option
      Parameters:
      feedStream - feed stream for rate adjustment
      lowerBound - lower bound for rate optimization
      upperBound - upper bound for rate optimization
      rateUnit - rate unit
      Returns:
      comprehensive capacity assessment
    • generateDebottleneckOptions

      private List<FacilityCapacity.DebottleneckOption> generateDebottleneckOptions(ProductionOptimizer.OptimizationResult baseResult, StreamInterface feedStream, double lowerBound, double upperBound, String rateUnit)
      Generates debottleneck options for near-bottleneck equipment.
    • createDebottleneckOption

      private FacilityCapacity.DebottleneckOption createDebottleneckOption(ProcessEquipmentInterface equipment, ProductionOptimizer.OptimizationResult baseResult, StreamInterface feedStream, double lowerBound, double upperBound, String rateUnit)
      Creates a debottleneck option for a piece of equipment.
    • estimateCapex

      private double estimateCapex(ProcessEquipmentInterface equipment, double currentCapacity, double upgradedCapacity)
      Estimates CAPEX for a capacity upgrade.
    • calculateSimpleNPV

      private double calculateSimpleNPV(double dailyIncrementalProduction, double revenuePerUnit, double capex, double discountRate, int years)
      Calculates simplified NPV for a debottleneck investment.
    • findEquipment

      private ProcessEquipmentInterface findEquipment(String name)
      Finds equipment by name in the facility.
    • compareDebottleneckScenarios

      public ProductionOptimizer.ScenarioComparisonResult compareDebottleneckScenarios(StreamInterface feedStream, List<FacilityCapacity.DebottleneckOption> options, double lowerBound, double upperBound, String rateUnit)
      Compares multiple debottleneck scenarios.

      Creates and runs optimization scenarios for each debottleneck option, allowing direct comparison of production gains and costs.

      Parameters:
      feedStream - feed stream for optimization
      options - debottleneck options to compare
      lowerBound - lower bound for rate optimization
      upperBound - upper bound for rate optimization
      rateUnit - rate unit
      Returns:
      scenario comparison result
    • analyzeOverFieldLife

      public List<FacilityCapacity.CapacityPeriod> analyzeOverFieldLife(ProductionProfile.ProductionForecast forecast, StreamInterface feedStream)
      Analyzes capacity evolution over field life.

      Tracks how the bottleneck shifts as production declines, identifying when the facility becomes unconstrained.

      Parameters:
      forecast - production forecast from ProductionProfile
      feedStream - feed stream for facility analysis
      Returns:
      list of capacity periods showing evolution
    • calculateDebottleneckNPV

      public double calculateDebottleneckNPV(FacilityCapacity.DebottleneckOption option, double productPrice, double opexPerUnit, double discountRate, int yearsOfBenefit)
      Calculates NPV for a debottleneck investment.

      Uses discounted cash flow analysis considering:

      • Incremental production over the benefit period
      • Product price and operating costs
      • Capital expenditure
      • Discount rate for time value of money
      Parameters:
      option - debottleneck option to evaluate
      productPrice - price per unit of production (e.g., $/bbl)
      opexPerUnit - operating cost per unit
      discountRate - annual discount rate (e.g., 0.10 for 10%)
      yearsOfBenefit - number of years to realize benefit
      Returns:
      net present value
    • getOptimizer

      private ProductionOptimizer getOptimizer()
      Gets the production optimizer instance.
      Returns:
      optimizer (creates if needed)
    • getFacility

      public ProcessSystem getFacility()
      Gets the facility process system.
      Returns:
      facility
    • setNearBottleneckThreshold

      public void setNearBottleneckThreshold(double threshold)
      Sets the near-bottleneck threshold.
      Parameters:
      threshold - utilization threshold (0-1)
    • getNearBottleneckThreshold

      public double getNearBottleneckThreshold()
      Gets the near-bottleneck threshold.
      Returns:
      threshold
    • setCapacityIncreaseFactor

      public void setCapacityIncreaseFactor(double factor)
      Sets the capacity increase factor for debottleneck options.
      Parameters:
      factor - multiplication factor (e.g., 1.5 for 50% increase)
    • setCostFactorForType

      public void setCostFactorForType(Class<?> equipmentType, double costPerUnit)
      Sets a cost factor for a specific equipment type.
      Parameters:
      equipmentType - equipment class
      costPerUnit - cost per unit of capacity increase
    • setCostFactorForName

      public void setCostFactorForName(String equipmentName, double costPerUnit)
      Sets a cost factor for a specific equipment name.
      Parameters:
      equipmentName - equipment name
      costPerUnit - cost per unit of capacity increase