Class ProcessSystem.OptimizationBuilder
java.lang.Object
neqsim.process.processmodel.ProcessSystem.OptimizationBuilder
- Enclosing class:
ProcessSystem
Fluent builder for process optimization.
Provides a convenient API for configuring and running process optimizations.
- Author:
- esol
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleprivate doubleprivate intprivate doubleprivate doubleprivate final ProcessSystemprivate double -
Constructor Summary
ConstructorsConstructorDescriptionOptimizationBuilder(ProcessSystem process) Creates a new optimization builder for the given process. -
Method Summary
Modifier and TypeMethodDescriptiondoubleFinds the maximum throughput with the configured settings.generateLiftCurve(double[] pressures, double[] temperatures, double[] waterCuts, double[] GORs) Generates a lift curve with the configured settings.optimize()Runs optimization and returns detailed results.Sets the search algorithm.withFlowBounds(double min, double max) Sets the flow rate bounds.withMaxIterations(int iterations) Sets the maximum number of iterations.withPressures(double inlet, double outlet) Sets the inlet and outlet pressures.withTolerance(double tol) Sets the convergence tolerance.
-
Field Details
-
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
Creates a new optimization builder for the given process.- Parameters:
process- the process to optimize
-
-
Method Details
-
withPressures
Sets the inlet and outlet pressures.- Parameters:
inlet- inlet pressure in baraoutlet- outlet pressure in bara- Returns:
- this builder for chaining
-
withFlowBounds
Sets the flow rate bounds.- Parameters:
min- minimum flow rate in kg/hrmax- maximum flow rate in kg/hr- Returns:
- this builder for chaining
-
usingAlgorithm
public ProcessSystem.OptimizationBuilder usingAlgorithm(ProcessOptimizationEngine.SearchAlgorithm algorithm) Sets the search algorithm.- Parameters:
algorithm- the optimization algorithm to use- Returns:
- this builder for chaining
-
withMaxIterations
Sets the maximum number of iterations.- Parameters:
iterations- maximum iterations- Returns:
- this builder for chaining
-
withTolerance
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 fractionGORs- array of gas-oil ratios in Sm3/Sm3- Returns:
- lift curve data
-