Core Components and Unified Algorithmic Structure¶
DistributedDesignOptimizer (DDO) Repository¶
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#e6f4f7', 'primaryBorderColor': '#035970', 'primaryTextColor': '#000000', 'lineColor': '#035970', 'secondaryColor': '#cce9ef', 'tertiaryColor': '#f5fafb', 'noteBkgColor': '#e6f4f7', 'noteBorderColor': '#035970', 'fontFamily': 'Arial, sans-serif'}}}%%
classDiagram
direction TB
%% Top-level packages / folders
class Distributed_Design_Optimizer["Distributed_Design_Optimizer/"]:::packageStyle
class docs_src["docs_src/"]:::packageStyle
class userfiles["userfiles/"]:::packageStyle
%% Top-level files
class LICENSE["LICENSE"]:::fileStyle
class README_md["README.md"]:::fileStyle
class main_ddo_viewer_py["main_ddo_viewer.py"]:::fileStyle
class requirements_txt["requirements.txt"]:::fileStyle
%% Style definitions
classDef packageStyle fill:#e8e8e8,stroke:#999999,stroke-width:2px
classDef fileStyle fill:#fff8e6,stroke:#FFCC80,stroke-width:2px
The repository contains (among others):
-
Distributed_Design_Optimizer- core package for distributed design optimization -
historyfilesandmain_ddo_viewer.py- storage and processing of logging data from executed optimizations. Executed optimizations store their logging data as.dillfiles in the respective use-case'shistoryfiles/folder underuserfiles/<usecasename>/. Further details in Tutorial > Processing. -
userfiles- existing example use-cases and future use-cases to be solved with DDO. Further details in Tutorial > Problem Definition and Algorithm Execution and Examples.
Distributed_Design_Optimizer Package¶
The package consists of several packages, three of which are fundamental to the implementation of distributed design optimization:
-
coordination/holdsCoordinator- responsible for initializing and calling the main routines of the Unified Algorithmic StructureInputFileInterfaceandInputFileBasis- prescribing the template for any distributed optimization problem formulationinnerloop_iterationscheme- executing subsystem (and controller) optimizations in series or parallel in the innerloop usingmultiprocessingconvergence- providing various innerloop and outerloop convergence criteriaupdatecouplingparametermethod- providing various innerloop and outerloop coupling parameter update schemescoordinationmethod- providing coordination method specific functionalities to initialize the distributed design optimization
-
subsystem/holdsSubSystemInterface,SubSystemBasisand coordination method specific subclasses - representing a distributed individual processing unit which collects all information and methods unique to a single subsystem in the distributed optimization algorithmscouplingparameters>CouplingParametersInterface,CouplingParametersBasisand coordination method specific subclasses - containing information relevant to the coupling between two subsystems. Each subsystem holds a list of these coupling parameters instances (one for each pairwise coupling with a neighboring subsystem).optimization>AnalysisInterface,designproblemandsolverpackages - providing functionalities to formulate and solve each subsystem optimization problem. Further details in SubSystem Optimization.toolspackage - holding various classes and methods utilized by each subsystem instance, such asScalerBasis,FiniteDifferencesJacobianandHessianApproximationBFGS. Further details can be found under Problem Definition and Algorithm Execution and Derivative Computation.
-
middlelevel/holdsMiddleLevelCouplingInterface,MiddleLevelCouplingBasisand coordination method specific subclasses - holding the information being exchanged between two neighboringSubSystemBasisinstances which can write and read theMiddleLevelDataStorageBasis.MiddleLevelDataStorageInterface,MiddleLevelDataStorageBasisand coordination method specific subclasses - representing the shared resource interface storage betweenSubSystemBasisinstances. Each instance is guarded by amultiprocessinglock and holds two instances ofMiddleLevelCouplingInterface(or subclasses).
The intricate relationship between a subsystem's couplingparameter for a neighboring subsystem and the middlelevel data storage between them is further detailed in Information Sharing via CouplingParameters and MiddleLevelDataStorage.
Unified Algorithmic Structure Pseudocode-to-Code Traceability¶
Given the definition of a distributed design optimization problem from userfiles,
the Distributed_Design_Optimizer package implements the Unified Algorithmic Structure as illustrated by the pseudocode-to-code traceability shown below.
Highlighted lines are linked to the implementation. Hover or click to see the implementing classes/methods, then click through to the full API documentation.
InputFileInterface.get_Subsystems()
InputFileInterface.get_CoordinationMethod()
InputFileBasis.__init__()
CoordinationMethodInterface.createSubSystems()
CoordinationMethodInterface.createControllerSubSystem()
Coordinator.__init__()
CreateMiddleLevels.createMiddleLevels()SubSystemBasis.run_IterativeOptimization()
OptimizationInterface.callOptimizer()
LocalSubSystemBasis.evaluateTotalObjective()
LocalSubSystemBasis.evaluateTotalConstraint()
LocalSubSystemBasis.runAnalysis()
AnalysisInterface.evaluateLocalResponses()
LocalObjectiveInterface.evaluateLocalObjective()
LocalConstraintsInterface.evaluateEqualityLocalConstraints()
LocalConstraintsInterface.evaluateInEqualityLocalConstraints()SubSystemInterface.postprocess_Optimization()
SubSystemBasis.updateSubsystemfromOptimdata()
LocalSubSystemBasis.updateSubsystemfromOptimdata()IterationSchemeBasis.run_subsystem()
SubSystemBasis.run_innerloop_job()
ControllerSubSystemBasis.__init__()SubSystemBasis.run_updateCouplingParameters_innerLoop_job()
SubSystemInterface.updateCouplingParameters_innerLoop()
ControllerSubSystemALADIN.updateCouplingParameters_innerLoop()SubSystemBasis.evaluate_InnerLoopConvergenceIndicator()
Local_ConvergenceIndicator_Innerloop_Interface.evaluate()
Local_ConvergenceIndicator_Innerloop_DeWit.evaluate()
Centralized_ConvergenceIndicator_Innerloop_Interface.evaluate()
Centralized_ConvergenceIndicator_Innerloop_DeWit.evaluate()LocalSubSystemBasis.run_prepare_updateCouplingParameters_job()
SubSystemInterface.prepare_updateCouplingParameters()
CoordinationMethodInterface.centralized_prepare_updateCouplingParameters()LocalSubSystemBasis.run_updateCouplingParameters_outerLoop_job()
SubSystemBasis.CopyFromMiddleLevel()LocalSubSystemBasis.run_updateCouplingParameters_outerLoop_job()
SubSystemInterface.updateCouplingParameters_outerLoop()Coordinator.outerloop_iteration()
LocalSubSystemBasis.evaluate_Inconsistencies()
SubSystemBasis.evaluate_OuterLoopConvergenceIndicator()
Local_ConvergenceIndicator_Outerloop_Interface.evaluate()
Local_ConvergenceIndicator_Outerloop_DeWit.evaluate()
Centralized_ConvergenceIndicator_Outerloop_Interface.evaluate()
Centralized_ConvergenceIndicator_Outerloop_DeWit.evaluate()LocalObjectiveInterface.evaluateLocalObjective()
LocalSubSystemBasis.evaluateLocalObjective()
LocalSubSystemBasis.get_LocalObjectiveValue()LocalConstraintsInterface.evaluateInEqualityLocalConstraints()
LocalSubSystemBasis.evaluateLocalConstraints()LocalConstraintsInterface.evaluateEqualityLocalConstraints()
LocalSubSystemBasis.evaluateLocalConstraints()SubSystemInterface.evaluateCoordinationEqualityConstraint()
SubSystemBasis.get_CoordinationEqualityConstraintValue()AnalysisInterface.evaluateLocalResponses()
LocalSubSystemBasis.runAnalysis()
LocalSubSystemBasis.get_Responses_Unscaled()