Class BatchStudy.Builder
java.lang.Object
neqsim.process.util.optimization.BatchStudy.Builder
- Enclosing class:
BatchStudy
Builder for BatchStudy.
- Version:
- 1.0
- Author:
- ESOL
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ProcessSystemprivate final Map<String, Function<ProcessSystem, Double>> private final Map<String, BatchStudy.ObjectiveDefinition> private intprivate booleanprivate Stringprivate final List<BatchStudy.ParameterVariation> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddObjective(String name, BatchStudy.Objective direction, Function<ProcessSystem, Double> extractor) Adds an objective to optimize.build()Builds the batch study.Sets the study name.parallelism(int threads) Sets the parallelism level.stopOnFailure(boolean stop) Sets whether to stop on first failure.Adds a parameter to vary with explicit values.Adds a parameter to vary over a range.
-
Field Details
-
baseCase
-
variations
-
objectives
-
objectiveExtractors
-
parallelism
private int parallelism -
studyName
-
stopOnFailure
private boolean stopOnFailure
-
-
Constructor Details
-
Builder
Builder(ProcessSystem baseCase)
-
-
Method Details
-
vary
Adds a parameter to vary with explicit values.- Parameters:
parameterPath- path to parameter (e.g., "heater.duty")values- explicit values to test- Returns:
- this builder
-
vary
Adds a parameter to vary over a range.- Parameters:
parameterPath- path to parametermin- minimum valuemax- maximum valuesteps- number of steps- Returns:
- this builder
-
addObjective
public BatchStudy.Builder addObjective(String name, BatchStudy.Objective direction, Function<ProcessSystem, Double> extractor) Adds an objective to optimize.- Parameters:
name- objective namedirection- minimize or maximizeextractor- function to extract objective value from process- Returns:
- this builder
-
parallelism
Sets the parallelism level.- Parameters:
threads- number of parallel threads- Returns:
- this builder
-
name
Sets the study name.- Parameters:
name- study name- Returns:
- this builder
-
stopOnFailure
Sets whether to stop on first failure.- Parameters:
stop- true to stop on failure- Returns:
- this builder
-
build
-