Class BatchStudy.Builder

java.lang.Object
neqsim.process.util.optimization.BatchStudy.Builder
Enclosing class:
BatchStudy

public static class BatchStudy.Builder extends Object
Builder for BatchStudy.
Version:
1.0
Author:
ESOL
  • Field Details

  • Constructor Details

  • Method Details

    • vary

      public BatchStudy.Builder vary(String parameterPath, double... values)
      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

      public BatchStudy.Builder vary(String parameterPath, double min, double max, int steps)
      Adds a parameter to vary over a range.
      Parameters:
      parameterPath - path to parameter
      min - minimum value
      max - maximum value
      steps - 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 name
      direction - minimize or maximize
      extractor - function to extract objective value from process
      Returns:
      this builder
    • parallelism

      public BatchStudy.Builder parallelism(int threads)
      Sets the parallelism level.
      Parameters:
      threads - number of parallel threads
      Returns:
      this builder
    • name

      public BatchStudy.Builder name(String name)
      Sets the study name.
      Parameters:
      name - study name
      Returns:
      this builder
    • stopOnFailure

      public BatchStudy.Builder stopOnFailure(boolean stop)
      Sets whether to stop on first failure.
      Parameters:
      stop - true to stop on failure
      Returns:
      this builder
    • build

      public BatchStudy build()
      Builds the batch study.
      Returns:
      the configured BatchStudy