Interface ObjectiveFunction
- All Known Implementing Classes:
StandardObjective
public interface ObjectiveFunction
Interface representing an optimization objective for multi-objective optimization.
An objective function evaluates a process system and returns a scalar value to be optimized (either maximized or minimized). Multiple objectives can be combined for Pareto optimization.
- Version:
- 1.0
- Author:
- ASMF
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumDirection of optimization. -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectiveFunctioncreate(String name, ToDoubleFunction<ProcessSystem> evaluator, ObjectiveFunction.Direction direction, String unit) Create a custom objective function.doubleevaluate(ProcessSystem process) Evaluate the objective for the current process state.default doubleevaluateNormalized(ProcessSystem process) Get normalized value for comparison (converts MINIMIZE to negative for consistent sorting).Get the optimization direction.getName()Get the name of this objective for reporting.getUnit()Get the unit of the objective value for display.
-
Method Details
-
getName
-
getDirection
ObjectiveFunction.Direction getDirection()Get the optimization direction.- Returns:
- MAXIMIZE or MINIMIZE
-
evaluate
Evaluate the objective for the current process state.- Parameters:
process- the process system to evaluate- Returns:
- the objective value
-
getUnit
String getUnit()Get the unit of the objective value for display.- Returns:
- unit string (e.g., "kW", "kg/hr", "%")
-
evaluateNormalized
Get normalized value for comparison (converts MINIMIZE to negative for consistent sorting).- Parameters:
process- the process system to evaluate- Returns:
- normalized value where higher is always better
-
create
static ObjectiveFunction create(String name, ToDoubleFunction<ProcessSystem> evaluator, ObjectiveFunction.Direction direction, String unit) Create a custom objective function.- Parameters:
name- objective nameevaluator- function to evaluate the objectivedirection- optimization directionunit- unit string- Returns:
- new ObjectiveFunction instance
-