Sensitivity Based Distributed Programming (SBDP) Pseudocode-to-Code Traceability¶
This page maps each step of the Sensitivity Based Distributed Programming (SBDP) pseudocode to the implementing classes and methods in the codebase.
Highlighted lines are linked to the implementation. Hover or click to see the implementing classes/methods, then click through to the full API documentation.
SBDP.__init__()
LocalSubSystemSBDP.__init__()
LocalSubSystemSBDP.initializeCouplingParameters_after_CopyFromMiddleLevel()
MiddleLevelDataStorageSBDP.__init__()
CouplingParametersSBDP.__init__()Coordinator.innerloop_iteration()
IterationSchemeInterface.run_innerloop_jobs_multiprocessing()
SubSystemBasis.run_innerloop_job()SubSystemBasis.CopyFromMiddleLevel()
MiddleLevelDataStorageBasis.get_StoredCoupling()
CouplingParametersSBDP.CopyFromMiddleLevelCoupling()LocalSubSystemSBDP.prepare_OptimizationProblem()
CouplingParametersSBDP.set_Sensitivity_Gradient()
LocalSubSystemSBDP.evaluate_Gradient_CoordinationObjective()SubSystemBasis.run_IterativeOptimization()
LocalSubSystemSBDP.evaluateCoordinationObjective()
LocalSubSystemSBDP.evaluateCoordinationEqualityConstraint()
LocalSubSystemSBDP.evaluateCoordinationInequalityConstraint()
LocalSubSystemBasis.evaluateTotalObjective()
LocalSubSystemBasis.evaluateTotalConstraint()
OptimizationInterface.callOptimizer()LocalSubSystemSBDP.postprocess_Optimization()
SubSystemBasis.check_MultipliersNotSet()
SubSystemBasis.compute_KKT_multipliers()
LocalSubSystemSBDP.set_Multipliers_MappedResponse_Minus_CopyCouplingVariable()
LocalSubSystemSBDP.set_Multipliers_SharedDesignVariable_Minus_CopyTargetSharedDesignVariable()SubSystemBasis.CopyToMiddleLevel()
MiddleLevelDataStorageBasis.set_Coupling()
CouplingParametersSBDP.CopyToMiddleLevelCoupling()Coordinator.outerloop_iteration()
SubSystemBasis.evaluate_OuterLoopConvergenceIndicator()
Local_ConvergenceIndicator_Outerloop_DeWit.evaluate()
Centralized_ConvergenceIndicator_Outerloop_DeWit.evaluate()
LocalSubSystemSBDP.evaluate_Inconsistencies()CouplingParameters and MiddleLevel¶
Algorithm Options / Hyperparameters¶
The SBDP coordination method is selected and configured in the use case InputFile.py by assigning an SBDP instance to self._coordinationmethod. All algorithmic behaviour is wired through four constructor arguments:
self._coordinationmethod: CoordinationMethodInterface = SBDP(
convergence_indicator_innerloop=ConvergenceIndicator_Innerloop_AlwaysConverged(),
convergence_indicator_outerloop=ConvergenceIndicator_Outerloop_DeWit(
toleranceconsistency=1E-4),
updatecouplingparametermethod_outerloop=UpdateCouplingParameterMethod_OnlyInitialMultipliers(
initialmultiplier=0.0),
iterationscheme=Parallel())
SBDP does not relax the coupling with an augmented-Lagrangian penalty. Instead it keeps the coordination equality as a hard constraint in each subsystem's local problem and couples subsystems through a first-order sensitivity correction \(\nabla_{{}^{i}d}{}^{j}L^{(k)}\) (Algorithm 3 in SBDP). Consequently there are no penalty weights \(s\) and no penalty-adaption hyperparameters \(\beta\), \(\gamma\); the coordination multipliers \(\lambda_h\) and \(\lambda_z\) are recovered directly from the KKT system of the local optimization rather than updated by a dual step.
Convergence criteria¶
SBDP runs a single decentralized pass per outer iteration (there is no inner fixed-point loop), so the two indicators play asymmetric roles:
-
Inner loop —
convergence_indicator_innerloopmust beConvergenceIndicator_Innerloop_AlwaysConverged. Because SBDP performs exactly one primal solve per outer step, the inner loop is required to report convergence immediately after that single pass;LocalSubSystemSBDPrestricts the inner-loop indicator to this always-converged variant. -
Outer loop —
convergence_indicator_outerloop, evaluated bySubSystemBasis.evaluate_OuterLoopConvergenceIndicator. SBDP requiresConvergenceIndicator_Outerloop_DeWit, which terminates once all coupling inconsistencies \(c = \left({}^{i}_{j}H({}^{i}r) - {}^{i}_{j}h,\; {}^{i}_{j}S_z\,{}^{i}d - {}^{j}_{i}z,\ldots\right)\) and their step-to-step changes fall withintoleranceconsistency. This tolerance plays the role of the SBDP hyperparameter \(\epsilon_k\) (see the Hyperparameter ε_k section below).
Both indicators are validated in LocalSubSystemSBDP, which restricts SBDP to the always-converged inner indicator and the DeWit outer indicator.
Update method (multiplier recovery)¶
updatecouplingparametermethod_outerloop must be UpdateCouplingParameterMethod_OnlyInitialMultipliers. SBDP does not perform a dual/penalty update: the coordination-equality multipliers \(\lambda_h\) and \(\lambda_z\) are recovered from the KKT system of each local solve (pseudocode line 9, postprocess_Optimization / compute_KKT_multipliers on LocalSubSystemSBDP) and exchanged with neighbours through the interface storage. The update method therefore only seeds the multipliers before the first iteration:
initialmultiplier— the initial coordination multipliers \({}^{i}_{j}\lambda_h^{(0)}\), \({}^{i}_{j}\lambda_z^{(0)}\) (recommended0.0). From the first outer iteration onward the values are overwritten by the recovered KKT multipliers, so this argument only sets the starting point of the sensitivity correction.
The recovered multipliers and the coupling data are stored per coupling in CouplingParametersSBDP.
Iteration scheme¶
iterationscheme controls how the decentralized subsystem solves (pseudocode line 5) are scheduled by the IterationSchemeInterface. SBDP has no controller and each subsystem's local problem is independent within an outer step, so parallel execution is recommended:
Parallel— a Jacobi sweep: all subsystem problems are solved simultaneously from the previous iterate (recommended for SBDP).SequentialForward/SequentialBackward— a Gauss–Seidel sweep: subsystems are solved one after another. These are allowed but not recommended, since the independent subproblems gain nothing from sequential execution.
Hyperparameter ε_k¶
The pseudocode "Require" block (Algorithm 3, lines 1–2) lists the single hyperparameter \(\epsilon_k\) alongside the initial multipliers \({}^{j}_{i}\lambda_h\), \({}^{j}_{i}\lambda_z\). In the implementation \(\epsilon_k\) is realised as the outer-loop consistency tolerance toleranceconsistency of ConvergenceIndicator_Outerloop_DeWit:
- \(\epsilon_k\) (
toleranceconsistency) — the consensus tolerance on the coupling inconsistencies \(c\). A smaller \(\epsilon_k\) (e.g.1E-4) enforces tighter agreement between coupled subsystems at the cost of more outer iterations; a larger value terminates the coordination earlier with looser consensus. Because SBDP has no penalty weights, \(\epsilon_k\) is the primary control on the accuracy/effort trade-off.