Class BatchStudy
java.lang.Object
neqsim.process.util.optimization.BatchStudy
- All Implemented Interfaces:
Serializable
Parallel parameter study for rapid concept screening.
This class enables cloud-scale batch simulations by:
- Parameter Variation: Define ranges for design variables
- Parallel Execution: Run thousands of cases concurrently
- Multi-Objective Ranking: Compare by CAPEX, OPEX, emissions, etc.
- Result Aggregation: Collect and analyze results efficiently
Usage Example:
ProcessSystem baseCase = new ProcessSystem();
// ... configure base case ...
BatchStudy study = BatchStudy.builder(baseCase).vary("heater.duty", 1.0e6, 5.0e6, 5) // 5 values
.vary("compressor.pressure", 30.0, 80.0, 6) // 6 values
.addObjective("power", Objective.MINIMIZE).addObjective("throughput", Objective.MAXIMIZE)
.parallelism(8).build();
BatchStudyResult result = study.run();
System.out.println("Total cases: " + result.getTotalCases());
System.out.println("Best case: " + result.getBestCase("power"));
result.exportToCSV("batch_results.csv");
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classResults of a batch study.static classBuilder for BatchStudy.static classResult of a single case.static enumOptimization direction.static classDefinition of an objective.static classA set of parameter values for one case.private static classDefinition of a parameter variation. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ProcessSystemprivate final Map<String, Function<ProcessSystem, Double>> private final Map<String, BatchStudy.ObjectiveDefinition> private intprivate static final longprivate booleanprivate Stringprivate final List<BatchStudy.ParameterVariation> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidapplyParameter(ProcessSystem process, String paramPath, double value) static BatchStudy.Builderbuilder(ProcessSystem baseCase) Creates a builder for a batch study.private List<BatchStudy.ParameterSet> private voidgenerateCasesRecursive(List<BatchStudy.ParameterSet> cases, Map<String, Double> currentValues, int varIndex) intGets the total number of cases to be run.run()Runs the batch study.private BatchStudy.CaseResultrunCase(BatchStudy.ParameterSet params)
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
baseCase
-
variations
-
objectives
-
objectiveExtractors
-
parallelism
private int parallelism -
studyName
-
stopOnFailure
private boolean stopOnFailure
-
-
Constructor Details
-
BatchStudy
-
-
Method Details
-
builder
Creates a builder for a batch study.- Parameters:
baseCase- the base process system to vary- Returns:
- a new builder
-
run
-
generateAllCases
-
generateCasesRecursive
private void generateCasesRecursive(List<BatchStudy.ParameterSet> cases, Map<String, Double> currentValues, int varIndex) -
runCase
-
applyParameter
-
getTotalCases
public int getTotalCases()Gets the total number of cases to be run.- Returns:
- case count
-