Class ProcessSystem.OptimizationBuilder

java.lang.Object
neqsim.process.processmodel.ProcessSystem.OptimizationBuilder
Enclosing class:
ProcessSystem

public static class ProcessSystem.OptimizationBuilder extends Object
Fluent builder for process optimization.

Provides a convenient API for configuring and running process optimizations.

Author:
esol
  • Field Details

    • process

      private final ProcessSystem process
    • inletPressure

      private double inletPressure
    • outletPressure

      private double outletPressure
    • minFlow

      private double minFlow
    • maxFlow

      private double maxFlow
    • algorithm

    • maxIterations

      private int maxIterations
    • tolerance

      private double tolerance
  • Constructor Details

    • OptimizationBuilder

      public OptimizationBuilder(ProcessSystem process)
      Creates a new optimization builder for the given process.
      Parameters:
      process - the process to optimize
  • Method Details

    • withPressures

      public ProcessSystem.OptimizationBuilder withPressures(double inlet, double outlet)
      Sets the inlet and outlet pressures.
      Parameters:
      inlet - inlet pressure in bara
      outlet - outlet pressure in bara
      Returns:
      this builder for chaining
    • withFlowBounds

      public ProcessSystem.OptimizationBuilder withFlowBounds(double min, double max)
      Sets the flow rate bounds.
      Parameters:
      min - minimum flow rate in kg/hr
      max - maximum flow rate in kg/hr
      Returns:
      this builder for chaining
    • usingAlgorithm

      Sets the search algorithm.
      Parameters:
      algorithm - the optimization algorithm to use
      Returns:
      this builder for chaining
    • withMaxIterations

      public ProcessSystem.OptimizationBuilder withMaxIterations(int iterations)
      Sets the maximum number of iterations.
      Parameters:
      iterations - maximum iterations
      Returns:
      this builder for chaining
    • withTolerance

      public ProcessSystem.OptimizationBuilder withTolerance(double tol)
      Sets the convergence tolerance.
      Parameters:
      tol - convergence tolerance
      Returns:
      this builder for chaining
    • findMaxThroughput

      public double findMaxThroughput()
      Finds the maximum throughput with the configured settings.
      Returns:
      the maximum feasible flow rate in kg/hr
    • optimize

      Runs optimization and returns detailed results.
      Returns:
      optimization result with full details
    • generateLiftCurve

      public ProcessOptimizationEngine.LiftCurveData generateLiftCurve(double[] pressures, double[] temperatures, double[] waterCuts, double[] GORs)
      Generates a lift curve with the configured settings.
      Parameters:
      pressures - array of pressures to evaluate (bara)
      temperatures - array of temperatures to evaluate (K)
      waterCuts - array of water cuts as fraction
      GORs - array of gas-oil ratios in Sm3/Sm3
      Returns:
      lift curve data