Class TieInCapacityPlanner

java.lang.Object
neqsim.process.fielddevelopment.tieback.capacity.TieInCapacityPlanner
All Implemented Interfaces:
Serializable

public class TieInCapacityPlanner extends Object implements Serializable
Time-series host tie-in planner for capacity allocation, satellite holdback, process-model checks, and debottleneck recommendations.

The planner has three layers:

  1. Nameplate ullage: base-host and satellite rates are checked against gas, oil, water, and liquid capacities in HostFacility.
  2. Process capacity: when a process model and HostTieInPoint are configured, the accepted satellite load is injected into a host stream and equipment capacity constraints are checked.
  3. Decision layer: deferred or curtailed production value is summarized and converted into a simple debottleneck recommendation.
Version:
1.0
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

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

      private final HostFacility hostFacility
      Host facility receiving the satellite production.
    • hostProductionProfile

      private ProductionProfileSeries hostProductionProfile
      Base host production profile.
    • satelliteProductionProfile

      private ProductionProfileSeries satelliteProductionProfile
      Satellite production profile.
    • allocationPolicy

      private CapacityAllocationPolicy allocationPolicy
      Allocation policy for constrained periods.
    • holdbackPolicy

      private HoldbackPolicy holdbackPolicy
      Holdback policy for unaccepted satellite production.
    • tieInPoint

      private HostTieInPoint tieInPoint
      Optional process-model tie-in point.
    • processUtilizationLimit

      private double processUtilizationLimit
      Maximum accepted process utilization as fraction.
    • processSearchIterations

      private int processSearchIterations
      Number of binary-search iterations for process holdback.
    • defaultGasValueUsdPerMSm3

      private double defaultGasValueUsdPerMSm3
      Gas value in USD per MSm3 used when loads do not carry values.
    • defaultOilValueUsdPerBbl

      private double defaultOilValueUsdPerBbl
      Oil value in USD per bbl used when loads do not carry values.
    • defaultWaterValueUsdPerM3

      private double defaultWaterValueUsdPerM3
      Water value in USD per m3 used when loads do not carry values.
    • defaultLiquidValueUsdPerM3

      private double defaultLiquidValueUsdPerM3
      Liquid value in USD per m3 used when loads do not carry values.
    • discountRate

      private double discountRate
      Discount rate used for deferred value.
    • defaultDebottleneckCapexMusd

      private double defaultDebottleneckCapexMusd
      Default debottleneck investment estimate.
  • Constructor Details

    • TieInCapacityPlanner

      public TieInCapacityPlanner(HostFacility hostFacility)
      Creates a tie-in capacity planner.
      Parameters:
      hostFacility - host facility to evaluate
  • Method Details

    • setHostProductionProfile

      public TieInCapacityPlanner setHostProductionProfile(ProductionProfileSeries hostProductionProfile)
      Sets the base host production profile.
      Parameters:
      hostProductionProfile - host production profile
      Returns:
      this planner for method chaining
    • setSatelliteProductionProfile

      public TieInCapacityPlanner setSatelliteProductionProfile(ProductionProfileSeries satelliteProductionProfile)
      Sets the satellite production profile.
      Parameters:
      satelliteProductionProfile - satellite production profile
      Returns:
      this planner for method chaining
    • setAllocationPolicy

      public TieInCapacityPlanner setAllocationPolicy(CapacityAllocationPolicy allocationPolicy)
      Sets the allocation policy.
      Parameters:
      allocationPolicy - allocation policy
      Returns:
      this planner for method chaining
    • setHoldbackPolicy

      public TieInCapacityPlanner setHoldbackPolicy(HoldbackPolicy holdbackPolicy)
      Sets the holdback policy.
      Parameters:
      holdbackPolicy - holdback policy
      Returns:
      this planner for method chaining
    • setTieInPoint

      public TieInCapacityPlanner setTieInPoint(HostTieInPoint tieInPoint)
      Sets the process-model tie-in point.
      Parameters:
      tieInPoint - process-model tie-in point
      Returns:
      this planner for method chaining
    • setProcessUtilizationLimit

      public TieInCapacityPlanner setProcessUtilizationLimit(double processUtilizationLimit)
      Sets the process utilization limit.
      Parameters:
      processUtilizationLimit - maximum utilization fraction allowed in the process model
      Returns:
      this planner for method chaining
    • setDefaultCommodityValues

      public TieInCapacityPlanner setDefaultCommodityValues(double gasUsdPerMSm3, double oilUsdPerBbl, double waterUsdPerM3, double liquidUsdPerM3)
      Sets default commodity values.
      Parameters:
      gasUsdPerMSm3 - gas value in USD/MSm3
      oilUsdPerBbl - oil value in USD/bbl
      waterUsdPerM3 - water value in USD/m3
      liquidUsdPerM3 - liquid value in USD/m3
      Returns:
      this planner for method chaining
    • setDiscountRate

      public TieInCapacityPlanner setDiscountRate(double discountRate)
      Sets the discount rate.
      Parameters:
      discountRate - annual discount rate as a fraction
      Returns:
      this planner for method chaining
    • setDefaultDebottleneckCapexMusd

      public TieInCapacityPlanner setDefaultDebottleneckCapexMusd(double defaultDebottleneckCapexMusd)
      Sets default debottleneck CAPEX.
      Parameters:
      defaultDebottleneckCapexMusd - default debottleneck CAPEX in MUSD
      Returns:
      this planner for method chaining
    • run

      public TieInCapacityResult run()
      Runs the capacity and holdback study.
      Returns:
      aggregated tie-in capacity result
    • validateProfiles

      private void validateProfiles()
      Validates required profiles before running.
    • getFirstYear

      private int getFirstYear()
      Gets the first year in the satellite profile.
      Returns:
      first satellite profile year
    • getBaseLoad

      private ProductionLoad getBaseLoad(int year, int index, String periodName)
      Gets base host production for a period.
      Parameters:
      year - calendar year
      index - zero-based profile index
      periodName - period name
      Returns:
      base host production load
    • allocateNameplate

      private TieInCapacityPlanner.AllocationResult allocateNameplate(ProductionLoad baseRequest, ProductionLoad satelliteRequest)
      Allocates nameplate capacity between base and satellite production.
      Parameters:
      baseRequest - base host request
      satelliteRequest - satellite request
      Returns:
      allocation result before process-model holdback
    • getHostCapacityLoad

      private ProductionLoad getHostCapacityLoad(int year, String periodName)
      Builds a production-load object representing host nameplate capacity.
      Parameters:
      year - calendar year
      periodName - period name
      Returns:
      nameplate capacity load
    • scaleAgainstCapacity

      private double scaleAgainstCapacity(ProductionLoad request, ProductionLoad capacity)
      Calculates the feasible scale against host capacity.
      Parameters:
      request - requested load
      capacity - capacity load
      Returns:
      feasible scale between zero and one
    • requiredDimensionScale

      private double requiredDimensionScale(double requested, double capacity)
      Calculates scale for one required capacity dimension.
      Parameters:
      requested - requested rate
      capacity - available capacity rate
      Returns:
      scale for the dimension
    • clampScale

      private double clampScale(double scale)
      Clamps a scale factor to the valid allocation range.
      Parameters:
      scale - raw scale
      Returns:
      scale between zero and one
    • identifyNameplateBottleneck

      private String identifyNameplateBottleneck(ProductionLoad request, ProductionLoad capacity)
      Identifies the most constrained nameplate capacity category.
      Parameters:
      request - combined production request
      capacity - host capacity
      Returns:
      bottleneck category name
    • addUtilization

      private void addUtilization(Map<String,Double> utilizations, String name, double requested, double capacity, boolean active)
      Adds one utilization entry when the capacity dimension is active.
      Parameters:
      utilizations - utilization map
      name - capacity category name
      requested - requested rate
      capacity - capacity rate
      active - true if the dimension should constrain allocation
    • applyProcessCapacity

      Applies process-model capacity checks and additional holdback if required.
      Parameters:
      baseRequest - base production request
      allocation - nameplate allocation result
      Returns:
      process-adjusted allocation
    • evaluateProcessCapacity

      private TieInCapacityPlanner.ProcessOutcome evaluateProcessCapacity(ProductionLoad acceptedBase, ProductionLoad acceptedSatellite)
      Evaluates the process model for a base-plus-satellite operating point.
      Parameters:
      acceptedBase - accepted base production
      acceptedSatellite - accepted satellite production
      Returns:
      process outcome
    • calculateTargetProcessRate

      private double calculateTargetProcessRate(double originalFlow, ProductionLoad acceptedBase, ProductionLoad acceptedSatellite)
      Calculates the target process-stream rate for a trial operating point.
      Parameters:
      originalFlow - original process-stream rate
      acceptedBase - accepted base production
      acceptedSatellite - accepted satellite production
      Returns:
      target process-stream flow rate
    • restoreProcessStream

      private void restoreProcessStream(ProcessSystem processSystem, StreamInterface stream, double originalFlow)
      Restores the process stream after a trial process-model run.
      Parameters:
      processSystem - process system containing the stream
      stream - stream to restore
      originalFlow - original flow rate in the tie-in point rate unit
    • calculateDailyValueUsd

      private double calculateDailyValueUsd(ProductionLoad load)
      Calculates daily value using load-specific values or planner defaults.
      Parameters:
      load - production load
      Returns:
      daily value in USD/d
    • calculatePeriodValueMusd

      private double calculatePeriodValueMusd(ProductionLoad load)
      Calculates total period value.
      Parameters:
      load - production load
      Returns:
      period value in MUSD
    • discount

      private double discount(double valueMusd, int periodIndex)
      Discounts a value by period index.
      Parameters:
      valueMusd - value in MUSD before discounting
      periodIndex - zero-based period index
      Returns:
      discounted value in MUSD
    • buildDebottleneckDecisions

      private List<DebottleneckDecision> buildDebottleneckDecisions(List<TieInPeriodResult> periods)
      Builds debottleneck decisions from period results.
      Parameters:
      periods - period results
      Returns:
      debottleneck decisions
    • chooseMostFrequentBottleneck

      private String chooseMostFrequentBottleneck(Map<String,Integer> bottleneckCounts)
      Chooses the most frequent bottleneck from constrained periods.
      Parameters:
      bottleneckCounts - bottleneck occurrence counts
      Returns:
      most frequent bottleneck name
    • buildPeriodSummary

      private String buildPeriodSummary(ProductionLoad scheduledSatellite, TieInCapacityPlanner.ProcessAdjustedAllocation adjusted, ProductionLoad heldBack)
      Builds a period summary string.
      Parameters:
      scheduledSatellite - scheduled satellite load
      adjusted - process-adjusted allocation
      heldBack - held-back satellite load
      Returns:
      summary string
    • buildResultSummary

      private String buildResultSummary(List<TieInPeriodResult> periods, List<DebottleneckDecision> decisions)
      Builds an aggregate result summary.
      Parameters:
      periods - period results
      decisions - debottleneck decisions
      Returns:
      summary string