Class ProductionOptimizer.OptimizationObjective

java.lang.Object
neqsim.process.util.optimizer.ProductionOptimizer.OptimizationObjective
Enclosing class:
ProductionOptimizer

public static final class ProductionOptimizer.OptimizationObjective extends Object
Container for optimization objective configuration.

An objective defines a quantity to optimize (maximize or minimize) during the optimization process. Multiple objectives can be combined with weights to form a composite score.

Java Example

OptimizationObjective throughput = new OptimizationObjective("throughput",
    proc -> proc.getUnit("outlet").getFlowRate("kg/hr"), 1.0, ObjectiveType.MAXIMIZE);

Python Example (via JPype)

from jpype import JImplements, JOverride

@JImplements("java.util.function.ToDoubleFunction")
class ThroughputEvaluator:
    @JOverride
    def applyAsDouble(self, proc):
        return proc.getUnit("outlet").getFlowRate("kg/hr")

throughput = OptimizationObjective("throughput", ThroughputEvaluator(), 1.0)
Version:
1.0
Author:
NeqSim Development Team
  • Field Details

  • Constructor Details

    • OptimizationObjective

      public OptimizationObjective(String name, ToDoubleFunction<ProcessSystem> evaluator, double weight)
      Constructs an objective with MAXIMIZE direction.
      Parameters:
      name - unique name for the objective
      evaluator - function to compute objective value from process state
      weight - relative weight for composite scoring (typically 0.0-1.0)
    • OptimizationObjective

      public OptimizationObjective(String name, ToDoubleFunction<ProcessSystem> evaluator, double weight, ProductionOptimizer.ObjectiveType type)
      Constructs an objective with explicit direction.
      Parameters:
      name - unique name for the objective
      evaluator - function to compute objective value from process state
      weight - relative weight for composite scoring (typically 0.0-1.0)
      type - MAXIMIZE or MINIMIZE direction
  • Method Details

    • getName

      public String getName()
      Returns the objective name.
      Returns:
      objective name
    • getWeight

      public double getWeight()
      Returns the objective weight.
      Returns:
      weight value
    • getType

      Returns the objective type (MAXIMIZE or MINIMIZE).
      Returns:
      objective type
    • evaluate

      public double evaluate(ProcessSystem process)
      Evaluates the objective for the given process state.
      Parameters:
      process - the process system to evaluate
      Returns:
      computed objective value