Class DesignOptimizer
java.lang.Object
neqsim.process.design.DesignOptimizer
Integrated design-to-optimization workflow manager.
DesignOptimizer provides a unified workflow for:
- Building processes from templates
- Auto-sizing equipment
- Setting up constraints
- Running optimization
- Validating results
Example usage:
DesignResult result = DesignOptimizer.forProcess(process).autoSizeEquipment(1.2)
.applyDefaultConstraints().setObjective(ObjectiveType.MAXIMIZE_PRODUCTION).optimize();
- Version:
- 1.0
- Author:
- NeqSim Development Team
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumObjective types for optimization. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate ProcessBasisprivate static final org.apache.logging.log4j.Loggerprivate ProcessModuleprivate DesignOptimizer.ObjectiveTypeprivate ProcessSystemprivate double -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDesignOptimizer(ProcessModule module) Private constructor for ProcessModule - use factory methods.privateDesignOptimizer(ProcessSystem process) Private constructor - use factory methods. -
Method Summary
Modifier and TypeMethodDescriptionApply default constraints based on equipment types.private voidEnable auto-sizing of equipment with default safety factor (1.2).autoSizeEquipment(double safetyFactor) Enable auto-sizing of equipment with specified safety factor.private voidcheckViolations(DesignResult result) excludeEquipment(String... equipmentNames) Exclude equipment from optimization.private StreamInterfacestatic DesignOptimizerforProcess(ProcessModule module) Create a DesignOptimizer for an existing process module.static DesignOptimizerforProcess(ProcessSystem process) Create a DesignOptimizer for an existing process.static DesignOptimizerfromTemplate(ProcessTemplate template, ProcessBasis basis) Create a DesignOptimizer from a template.private List<ProcessEquipmentInterface> Get all unit operations from either ProcessSystem or ProcessModule.getBasis()Get the process basis.private ProcessSystemGet the first ProcessSystem (for result creation when using module).Get the process module.Get the process system.booleanCheck if this optimizer is working with a ProcessModule.optimize()Run the complete design and optimization workflow.private voidrecordConstraintStatus(DesignResult result) private voidrecordEquipmentSizes(DesignResult result) Run only equipment auto-sizing (no optimization).private voidRun the simulation (either ProcessSystem or ProcessModule).setObjective(DesignOptimizer.ObjectiveType objective) Set the optimization objective.validate()Validate the current design without optimization.
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
process
-
module
-
basis
-
safetyFactor
private double safetyFactor -
autoSizeEnabled
private boolean autoSizeEnabled -
objective
-
excludedEquipment
-
-
Constructor Details
-
DesignOptimizer
Private constructor - use factory methods.- Parameters:
process- the process to optimize
-
DesignOptimizer
Private constructor for ProcessModule - use factory methods.- Parameters:
module- the process module to optimize
-
-
Method Details
-
forProcess
Create a DesignOptimizer for an existing process.- Parameters:
process- the process system- Returns:
- new DesignOptimizer
-
forProcess
Create a DesignOptimizer for an existing process module.- Parameters:
module- the process module- Returns:
- new DesignOptimizer
-
fromTemplate
Create a DesignOptimizer from a template.- Parameters:
template- the process templatebasis- the process basis- Returns:
- new DesignOptimizer with created process
-
autoSizeEquipment
Enable auto-sizing of equipment with specified safety factor.- Parameters:
safetyFactor- the safety factor (typically 1.1-1.3)- Returns:
- this optimizer for chaining
-
autoSizeEquipment
Enable auto-sizing of equipment with default safety factor (1.2).- Returns:
- this optimizer for chaining
-
applyDefaultConstraints
Apply default constraints based on equipment types.- Returns:
- this optimizer for chaining
-
setObjective
Set the optimization objective.- Parameters:
objective- the objective type- Returns:
- this optimizer for chaining
-
excludeEquipment
Exclude equipment from optimization.- Parameters:
equipmentNames- names of equipment to exclude- Returns:
- this optimizer for chaining
-
optimize
Run the complete design and optimization workflow.- Returns:
- the design result
-
runAutoSizing
Run only equipment auto-sizing (no optimization).- Returns:
- this optimizer for further operations
-
validate
Validate the current design without optimization.- Returns:
- design result with validation status
-
runSimulation
private void runSimulation()Run the simulation (either ProcessSystem or ProcessModule). -
getAllUnitOperations
Get all unit operations from either ProcessSystem or ProcessModule.- Returns:
- list of all unit operations
-
getFirstProcessSystem
Get the first ProcessSystem (for result creation when using module).- Returns:
- the first ProcessSystem or null
-
autoSizeAllEquipment
private void autoSizeAllEquipment() -
findProductStream
-
recordEquipmentSizes
-
recordConstraintStatus
-
checkViolations
-
getProcess
Get the process system.- Returns:
- the process, or the first process system from the module if using a module
-
getModule
Get the process module.- Returns:
- the module or null if not using a module
-
isModuleMode
public boolean isModuleMode()Check if this optimizer is working with a ProcessModule.- Returns:
- true if using a ProcessModule, false if using a ProcessSystem
-
getBasis
-