Skip to content

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
Hold "Alt" / "Option" to enable pan & zoom

The repository contains (among others):

Distributed_Design_Optimizer Package

The package consists of several packages, three of which are fundamental to the implementation of distributed design optimization:

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.

Algorithm 1 Unified Algorithmic Structure
Require: hyperparameters for inner and outerloop convergence criteria
Require: hyperparameters for update of relevant coupling parameters
Require: initial relevant coupling parameters in interface storage
 
\(k \leftarrow 0\) ▷ initialize outerloop iterator
repeat
\(l \leftarrow 0\) ▷ initialize innerloop iterator
repeat ▷ following some iteration scheme
for every \(i \in M\) do
Copy relevant coupling parameters of \({}^{i}_{j}u,\; {}^{j}_{i}u \;\forall\; j \in {}^{i}N\) and \({}^{i}_{C}u,\; {}^{C}_{i}u\) from interface storage
Prepare optimization problem formulation
\[\begin{aligned} {}^{i}d^{(k,\,l+1)} \leftarrow{} & \argmin_{{}^{i}d \;\in\; {}^{i}\mathcal{D}} \;\; {}^{i}v_f\!\left({}^{i}r\right) + {}^{i}P\!\left({}^{i}d,\; \left\{{}^{i}_{j}u,\; {}^{j}_{i}u\right\}_{j \in {}^{i}N},\; {}^{i}_{C}u,\; {}^{C}_{i}u\right) \\ & \text{s.t.} \;\; {}^{i}v_g\!\left({}^{i}r\right) \leq 0, \\ & \phantom{\text{s.t.}} \;\; {}^{i}v_h\!\left({}^{i}r\right) = 0, \\ & \phantom{\text{s.t.}} \;\; {}^{i}Q^{\leq}\!\left({}^{i}d,\; \left\{{}^{i}_{j}u,\; {}^{j}_{i}u\right\}_{j \in {}^{i}N},\; {}^{i}_{C}u,\; {}^{C}_{i}u\right) \leq 0, \\ & \phantom{\text{s.t.}} \;\; {}^{i}Q^{=}\!\left({}^{i}d,\; \left\{{}^{i}_{j}u,\; {}^{j}_{i}u\right\}_{j \in {}^{i}N},\; {}^{i}_{C}u,\; {}^{C}_{i}u\right) = 0. \end{aligned}\]
Post-process the optimization
Copy relevant coupling parameters of \({}^{i}_{j}u,\; {}^{j}_{i}u \;\forall\; j \in {}^{i}N\) and \({}^{i}_{C}u,\; {}^{C}_{i}u\) to interface storage
end for
 
for Controller do
Copy relevant coupling parameters of \({}^{C}_{i}u,\; {}^{i}_{C}u \;\forall\; i \in M\) from interface storage
Prepare optimization problem formulation
\[\begin{aligned} \Box \leftarrow{} & \argmin_{\Box} \;\; {}^{C}P\!\left(\Box,\; \left\{{}^{C}_{i}u,\; {}^{i}_{C}u\right\}_{i \in M}\right) \\ & \text{s.t.} \;\; {}^{C}Q^{\leq}\!\left(\Box,\; \left\{{}^{C}_{i}u,\; {}^{i}_{C}u\right\}_{i \in M}\right) \leq 0, \\ & \phantom{\text{s.t.}} \;\; {}^{C}Q^{=}\!\left(\Box,\; \left\{{}^{C}_{i}u,\; {}^{i}_{C}u\right\}_{i \in M}\right) = 0. \end{aligned}\]
Post-process the optimization
Copy relevant coupling parameters of \({}^{C}_{i}u,\; {}^{i}_{C}u \;\forall\; i \in M\) to interface storage
end for
 
for every \(i \in M\) and Controller in parallel do
Copy relevant coupling parameters of \({}^{i}_{j}u,\; {}^{j}_{i}u \;\forall\; j \in {}^{i}N\) and \({}^{i}_{C}u,\; {}^{C}_{i}u\) from interface storage
Update relevant coupling parameters \({}^{i}_{j}u,\; {}^{j}_{i}u \;\forall\; j \in {}^{i}N\) and \({}^{i}_{C}u,\; {}^{C}_{i}u\)
Copy relevant coupling parameters of \({}^{i}_{j}u,\; {}^{j}_{i}u \;\forall\; j \in {}^{i}N\) and \({}^{i}_{C}u,\; {}^{C}_{i}u\) to interface storage
end for
 
Compute innerloop convergence criterion
\(l \leftarrow l + 1\)
until innerloop convergence criterion is met
 
\({}^{i}d^{(k+1)} \leftarrow {}^{i}d^{(k,\,l)} \;\forall\; i \in M\)
 
for every \(i \in M\) and Controller in parallel do
Copy relevant coupling parameters of \({}^{i}_{j}u,\; {}^{j}_{i}u \;\forall\; j \in {}^{i}N\) and \({}^{i}_{C}u,\; {}^{C}_{i}u\) from interface storage
Prepare update of relevant coupling parameters \({}^{i}_{j}u,\; {}^{j}_{i}u \;\forall\; j \in {}^{i}N\) and \({}^{i}_{C}u,\; {}^{C}_{i}u\)
Copy relevant coupling parameters of \({}^{i}_{j}u,\; {}^{j}_{i}u \;\forall\; j \in {}^{i}N\) and \({}^{i}_{C}u,\; {}^{C}_{i}u\) to interface storage
end for
 
for every \(i \in M\) and Controller in parallel do
Copy relevant coupling parameters of \({}^{i}_{j}u,\; {}^{j}_{i}u \;\forall\; j \in {}^{i}N\) and \({}^{i}_{C}u,\; {}^{C}_{i}u\) from interface storage
Update relevant coupling parameters \({}^{i}_{j}u,\; {}^{j}_{i}u \;\forall\; j \in {}^{i}N\) and \({}^{i}_{C}u,\; {}^{C}_{i}u\)
Copy relevant coupling parameters of \({}^{i}_{j}u,\; {}^{j}_{i}u \;\forall\; j \in {}^{i}N\) and \({}^{i}_{C}u,\; {}^{C}_{i}u\) to interface storage
end for
 
Compute outerloop convergence criterion
\(k \leftarrow k + 1\)
until outerloop convergence criterion is met
return \(\left\{{}^{i}d^{(k)}\right\}_{i \in M}\)