Consensus Augmented Lagrangian Coordination (Consensus ALC) Pseudocode-to-Code Traceability¶
This page maps each step of the Consensus Augmented Lagrangian Coordination 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.
LocalSubSystemConsensusALC.__init__()
LocalSubSystemConsensusALC.initializeCouplingParameters_after_CopyFromMiddleLevel()
MiddleLevelDataStorageConsensusALC.__init__()
CouplingParametersConsensusALC.__init__()Coordinator.innerloop_iteration()
IterationSchemeInterface.run_innerloop_jobs_multiprocessing()
SubSystemBasis.run_innerloop_job()
SubSystemBasis.run_IterativeOptimization()
LocalSubSystemConsensusALC.evaluateCoordinationObjective()
LocalSubSystemBasis.evaluateTotalObjective()
LocalSubSystemBasis.evaluateTotalConstraint()
OptimizationInterface.callOptimizer()SubSystemBasis.CopyToMiddleLevel()
MiddleLevelDataStorageBasis.set_Coupling()
SubSysMiddleLevelCouplingBasis.set_MappedResponses()
SubSysMiddleLevelCouplingBasis.set_SharedDesignVariable()LocalSubSystemConsensusALC.update_AuxiliaryVariables()
LocalSubSystemConsensusALC.updateCouplingParameters_innerLoop()
CouplingParametersConsensusALC.set_Auxiliary_MappedResponse()
CouplingParametersConsensusALC.set_Auxiliary_CouplingVariable()
CouplingParametersConsensusALC.set_Auxiliary_SharedDesignVariable()
CouplingParametersConsensusALC.set_Auxiliary_TargetSharedDesignVariable()SubSystemBasis.evaluate_InnerLoopConvergenceIndicator()
Local_ConvergenceIndicator_Innerloop_Interface.evaluate()
Local_ConvergenceIndicator_Innerloop_DeWit.evaluate()
Centralized_ConvergenceIndicator_Innerloop_Interface.evaluate()
Centralized_ConvergenceIndicator_Innerloop_DeWit.evaluate()Coordinator.outerloop_iteration()
LocalSubSystemBasis.run_prepare_updateCouplingParameters_job()
LocalSubSystemConsensusALC.evaluate_Inconsistencies()
InConsistencySize.evaluate_Auxiliary_Minus_MappedResponse()
InConsistencySize.evaluate_Auxiliary_Minus_CouplingVariable()
InConsistencySize.evaluate_Auxiliary_Minus_SharedDesignVariable()
InConsistencySize.evaluate_Auxiliary_Minus_TargetSharedDesignVariable()LocalSubSystemConsensusALC.updateCouplingParameters_outerLoop()
UpdateCouplingParameterMethod_AugLagMultipliersAdaptiveWeights.update_CoordinationMultipliers()
LocalSubSystemConsensusALC.set_CoordinationMultipliers_Auxiliary_Minus_MappedResponse()
LocalSubSystemConsensusALC.set_CoordinationMultipliers_Auxiliary_Minus_CouplingVariable()
LocalSubSystemConsensusALC.set_CoordinationMultipliers_Auxiliary_Minus_SharedDesignVariable()
LocalSubSystemConsensusALC.set_CoordinationMultipliers_Auxiliary_Minus_TargetSharedDesignVariable()LocalSubSystemConsensusALC.updateCouplingParameters_outerLoop()
UpdateCouplingParameterMethod_AugLagMultipliersAdaptiveWeights.update_CoordinationWeights()
LocalSubSystemConsensusALC.set_CoordinationWeights_Auxiliary_Minus_MappedResponse()
LocalSubSystemConsensusALC.set_CoordinationWeights_Auxiliary_Minus_CouplingVariable()
LocalSubSystemConsensusALC.set_CoordinationWeights_Auxiliary_Minus_SharedDesignVariable()
LocalSubSystemConsensusALC.set_CoordinationWeights_Auxiliary_Minus_TargetSharedDesignVariable()Coordinator.outerloop_iteration()
SubSystemBasis.evaluate_OuterLoopConvergenceIndicator()
Local_ConvergenceIndicator_Outerloop_Interface.evaluate()
Local_ConvergenceIndicator_Outerloop_DeWit.evaluate()
Centralized_ConvergenceIndicator_Outerloop_Interface.evaluate()
Centralized_ConvergenceIndicator_Outerloop_DeWit.evaluate()
LocalSubSystemConsensusALC.evaluate_Inconsistencies()CouplingParametersConsensusALC.get_Auxiliary_MappedResponse()
CouplingParametersConsensusALC.get_Auxiliary_CouplingVariable()CouplingParametersConsensusALC.get_Multipliers_Auxiliary_Minus_MappedResponse()
CouplingParametersConsensusALC.get_Multipliers_Auxiliary_Minus_CouplingVariable()CouplingParameters and MiddleLevel¶
Algorithm Options / Hyperparameters¶
The Consensus ALC coordination method is selected and configured in the use case InputFile.py by assigning a Consensus_ALC instance to self._coordinationmethod. All algorithmic behaviour is wired through four constructor arguments:
self._coordinationmethod: CoordinationMethodInterface = Consensus_ALC(
convergence_indicator_innerloop=ConvergenceIndicator_Innerloop_DeWit(
tolerancetotalobjective=1000.0),
convergence_indicator_outerloop=ConvergenceIndicator_Outerloop_DeWit(
toleranceconsistency=1E-4),
updatecouplingparametermethod_outerloop=UpdateCouplingParameterMethod_AugLagMultipliersAdaptiveWeights(
beta=1.3,
gamma=0.25,
initialweight=0.01,
initialmultiplier=0.0),
iterationscheme=Parallel())
Like ALC, Consensus ALC relaxes constraints with a subgradient dual/penalty scheme, but it relaxes the consensus constraints \(c_c\) (introduced by the auxiliary variables \(y\)) instead of the coupling constraints \(c\). The four constructor arguments are therefore identical in role to ALC; the differences are internal to the primal inner loop (see the auxiliary-variable update below).
Convergence criteria¶
Consensus ALC uses a nested inner/outer loop (Algorithm 4 in Consensus ALC), so two convergence indicators are configured:
-
Inner loop —
convergence_indicator_innerloop, evaluated bySubSystemBasis.evaluate_InnerLoopConvergenceIndicator. Consensus ALC requiresConvergenceIndicator_Innerloop_DeWit, which converges on the relative change of the total objective, \(\text{error} = |v_f^{\text{new}} - v_f^{\text{old}}| / (1 + |v_f^{\text{new}}|) \le\)tolerancetotalobjective. A smallertolerancetotalobjectiveforces more inner FPI sweeps (each alternating the \(d\) and \(y\) updates) per outer step; a larger value (e.g.1000.0) terminates the inner loop earlier and shifts most of the work onto the outer dual and penalty updates. -
Outer loop —
convergence_indicator_outerloop, evaluated bySubSystemBasis.evaluate_OuterLoopConvergenceIndicator. Consensus ALC requiresConvergenceIndicator_Outerloop_DeWit, which terminates once all consensus inconsistencies \(c_c = \left(y - [{}^{i}_{j}H({}^{i}r);\, {}^{i}_{j}z],\ldots\right)\) and their step-to-step changes fall withintoleranceconsistency. A smallertoleranceconsistency(e.g.1E-4) enforces tighter consensus between coupled subsystems at the cost of more outer iterations.
Both indicators are validated in LocalSubSystemConsensusALC, which restricts Consensus ALC to the DeWit inner/outer indicators.
Update method (dual and penalty update)¶
updatecouplingparametermethod_outerloop implements the Consensus ALC dual and penalty update, applied by LocalSubSystemConsensusALC.updateCouplingParameters_outerLoop. Consensus ALC requires the adaptive-weight augmented-Lagrangian method UpdateCouplingParameterMethod_AugLagMultipliersAdaptiveWeights, which advances the multipliers by the subgradient step \(\lambda \leftarrow \lambda + 2\,s \circ s \circ c_c\) (update_CoordinationMultipliers) and adapts the penalty weights \(s\) (update_CoordinationWeights) — the same rule as ALC but evaluated on the consensus residual \(c_c\):
initialweight— the initial penalty weight \(s\) (recommended \(0 < s \le 0.1\), e.g.0.01). Largerinitialweightproduces larger multiplier steps and faster constraint enforcement, but risks oscillation/ill-conditioning; smaller values give gentler, more stable but slower consensus.initialmultiplier— the initial Lagrange multiplier \({}^{i}_{j}\lambda^{(0)}\) (recommended0.0).
Auxiliary (consensus) variable update¶
The consensus reformulation adds the auxiliary variables \(y\), which are optimized inside the inner loop alongside the \(d\) step. Because the \(y\) subproblem is an unconstrained convex QP (for \(s^{(k)} \neq 0\)), it has a closed-form solution that each subsystem evaluates locally in LocalSubSystemConsensusALC.update_AuxiliaryVariables (invoked via updateCouplingParameters_innerLoop), eliminating a dedicated controller at the cost of duplicated work but reduced communication. The resulting \(y\) values are stored per coupling in CouplingParametersConsensusALC. This step is not user-configurable; it is governed only by the current weights \(s\) and multipliers \(c\) or \(c_c\)">\(\lambda\).
Iteration scheme¶
iterationscheme controls how the inner-loop primal updates are scheduled by the IterationSchemeInterface. Consensus ALC has no dedicated controller — the \(d\) step is fully parallel and alternates with the local \(y\) update in an FPI, so the choice selects the fixed-point sweep:
Parallel— a Jacobi sweep: all subsystem problems are solved simultaneously from the previous iterate.SequentialForward/SequentialBackward— a Gauss–Seidel sweep: subsystems are solved one after another, each using the latest neighbour data (often faster convergence, no parallelism).
Penalty hyperparameters β, γ, s¶
The pseudocode "Require" block (Algorithm 4, lines 1–2) lists the penalty-adaption hyperparameters \(\beta\) and \(\gamma\), alongside the initial auxiliary variables \(y\), penalty weights \(s\) and multipliers \(c\) or \(c_c\)">\(\lambda\). \(\beta\) and \(\gamma\) are passed to the update method above and govern the penalty update \(s^{(k+1)} \leftarrow \beta\,s^{(k)}\) applied only when \(|c_c^{(k+1)}| > \gamma\,|c_c^{(k)}|\):
- \(\beta\) — the penalty-weight increase factor (must satisfy \(\beta > 1\), recommended \(\beta \le 3\), e.g.
1.3). A larger \(\beta\) grows the weights more aggressively when consensus stalls (stronger constraint enforcement, but risk of ill-conditioning and oscillation); a value closer to 1 grows them gently (more stable, slower consensus). - \(\gamma\) — the inconsistency-reduction threshold (must satisfy \(0 < \gamma < 1\), e.g.
0.25). The weights are only increased when the inconsistency fails to shrink below a factor \(\gamma\) of the previous step. A smaller \(\gamma\) demands a larger per-iteration reduction before the weights are held constant, so penalties grow more often; a value closer to 1 tolerates slow reduction and increases penalties rarely.
The corresponding weights \(s\), multipliers \(c\) or \(c_c\)">\(\lambda\) and auxiliary variables \(y\) are stored per coupling in CouplingParametersConsensusALC, while \(\beta\) and \(\gamma\) are held on the Consensus_ALC coordination method.