Augmented Lagrangian Alternating Direction Inexact Newton (ALADIN) Pseudocode-to-Code Traceability¶
This page maps each step of the ALADIN 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.
LocalSubSystemALADIN.__init__()
LocalSubSystemALADIN.get_Nu()
LocalSubSystemALADIN.get_Sigma_i()
ControllerSubSystemALADIN.__init__()
LocalSubSystemALADIN.initializeCouplingParameters_before_CopyToMiddleLevel()
ControllerSubSystemALADIN.initializeCouplingParameters_before_CopyToMiddleLevel()SubSystemBasis.CopyFromMiddleLevel()
LocalController_MiddleLevelDataStorageALADIN.__init__()
ControllerCouplingParametersALADIN.get_Delta_D()
LocalToController_CouplingParametersALADIN.set_D_hat()
LocalSubSystemALADIN.updateCouplingParameters_innerLoop()Coordinator.innerloop_iteration()
IterationSchemeInterface.run_innerloop_jobs_multiprocessing()
SubSystemBasis.run_innerloop_job()
SubSystemBasis.run_IterativeOptimization()
LocalSubSystemALADIN.evaluateCoordinationObjective()
LocalSubSystemALADIN.prepare_OptimizationProblem()
LocalSubSystemBasis.evaluateTotalObjective()
LocalSubSystemBasis.evaluateTotalConstraint()
OptimizationInterface.callOptimizer()SubSystemBasis.CopyToMiddleLevel()
LocalSubSystemALADIN.mapToController()
LocalSubSystemALADIN.evaluateAllHessians()
LocalSubSystemALADIN.evaluate_Gradient_CoordinationObjective()
LocalSubSystemALADIN.evaluate_Jacobian_CoordinationEqualityConstraints()
LocalSubSystemALADIN.evaluate_Jacobian_CoordinationInEqualityConstraints()
LocalToController_MiddleLevelCouplingALADIN.set_Hessian_LocalConstraints_Lagrangian()
LocalToController_MiddleLevelCouplingALADIN.set_Gradient_LocalObjective()
LocalToController_MiddleLevelCouplingALADIN.set_Jacobian_LocalEqualityConstraints()SubSystemBasis.CopyFromMiddleLevel()
ControllerSubSystemALADIN.initializeCouplingParameters_after_CopyFromMiddleLevel()
ControllerCouplingParametersALADIN.get_Copy_LocalToLocalForController_CouplingParameters()
ControllerCouplingParametersALADIN.get_Copy_Hessian_LocalConstraints_Lagrangian()
ControllerCouplingParametersALADIN.get_Copy_Gradient_LocalObjective()
ControllerCouplingParametersALADIN.get_Copy_Jacobian_LocalEqualityConstraints()ControllerSubSystemALADIN.prepare_OptimizationProblem()
ControllerSubSystemALADIN.evaluateCoordinationObjective()
ControllerSubSystemALADIN.evaluateCoordinationEqualityConstraint()
ControllerSubSystemALADIN.evaluate_Jacobian_CoordinationEqualityConstraints()
ControllerSubSystemALADIN.postprocess_Optimization()
ControllerSubSystemALADIN.mapToCouplingParameters()
OptimizationInterface.callOptimizer()SubSystemBasis.CopyToMiddleLevel()
ControllerCouplingParametersALADIN.set_Delta_D()
ControllerToLocal_MiddleLevelCouplingALADIN.__init__()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()
LocalSubSystemALADIN.prepare_updateCouplingParameters()
ControllerSubSystemALADIN.prepare_updateCouplingParameters()
LocalToController_CouplingParametersALADIN.set_D_hat()
SubSystemBasis.CopyFromMiddleLevel()
SubSystemBasis.CopyToMiddleLevel()LocalSubSystemALADIN.updateCouplingParameters_outerLoop()
LocalSubSystemALADIN.set_CoordinationMultipliers_MappedResponse_Minus_CopyCouplingVariable()
LocalSubSystemALADIN.set_CoordinationMultipliers_CopyMappedResponse_Minus_CouplingVariable()
LocalSubSystemALADIN.set_CoordinationMultipliers_SharedDesignVariable_Minus_CopyTargetSharedDesignVariable()
LocalSubSystemALADIN.set_CoordinationMultipliers_CopySharedDesignVariable_Minus_TargetSharedDesignVariable()
ControllerSubSystemALADIN.updateCouplingParameters_outerLoop()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()
LocalSubSystemALADIN.evaluate_Inconsistencies()LocalToController_CouplingParametersALADIN.get_D_hat()
LocalToController_CouplingParametersALADIN.set_D_hat()LocalSubSystemALADIN.evaluateAllHessians()
LocalSubSystemALADIN.evaluate_Complete_Hessian_LocalObjective()
LocalSubSystemALADIN.get_HessianApproximation_LocalObjective()LocalSubSystemALADIN.evaluate_Gradient_CoordinationObjective()
LocalToController_MiddleLevelCouplingALADIN.get_Gradient_LocalObjective()
LocalToController_MiddleLevelCouplingALADIN.set_Gradient_LocalObjective()LocalSubSystemALADIN.evaluate_Jacobian_CoordinationEqualityConstraints()
LocalToController_MiddleLevelCouplingALADIN.get_Jacobian_LocalEqualityConstraints()
LocalToController_MiddleLevelCouplingALADIN.set_Jacobian_LocalEqualityConstraints()LocalSubSystemALADIN.evaluate_Jacobian_CoordinationInEqualityConstraints()
LocalToController_MiddleLevelCouplingALADIN.get_Jacobian_LocalInequalityConstraints()
LocalToController_MiddleLevelCouplingALADIN.set_Jacobian_LocalInequalityConstraints()CouplingParameters and MiddleLevel¶
Algorithm Options / Hyperparameters¶
The ALADIN coordination method is selected and configured in the use case InputFile.py by assigning an ALADIN instance to self._coordinationmethod. All algorithmic behaviour is wired through four constructor arguments:
self._coordinationmethod: CoordinationMethodInterface = ALADIN(
convergence_indicator_innerloop=ConvergenceIndicator_Innerloop_DeWit(
tolerancetotalobjective=1000.0),
convergence_indicator_outerloop=ConvergenceIndicator_Outerloop_DeWit(
toleranceconsistency=1E-4),
updatecouplingparametermethod_outerloop=UpdateCouplingParameterMethod_AugLagMultipliersFixedWeights(
initialweight=0.01,
initialmultiplier=0.0),
iterationscheme=ParallelLocal_SequentialController())
Convergence criteria¶
ALADIN uses a nested inner/outer loop (Algorithm 2 in ALADIN), so two convergence indicators are configured:
-
Inner loop —
convergence_indicator_innerloop, evaluated bySubSystemBasis.evaluate_InnerLoopConvergenceIndicator. The recommended choice isConvergenceIndicator_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 iterations (tighter local/controller QP resolution per outer step); a larger value (e.g.1000.0) lets the inner loop terminate quickly and shifts most of the work onto the outer dual updates. -
Outer loop —
convergence_indicator_outerloop, evaluated bySubSystemBasis.evaluate_OuterLoopConvergenceIndicator. The recommended choice isConvergenceIndicator_Outerloop_DeWit, which terminates once all coupling inconsistencies \(\left({}^{i}_{j}H({}^{i}r) - {}^{i}_{j}h,\; {}^{i}_{j}z - {}^{j}_{i}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.
An AlwaysConverged inner-loop indicator is also available when a single inner pass per outer iteration is desired.
Update method (dual update)¶
updatecouplingparametermethod_outerloop implements the ALADIN dual update (pseudocode lines 25–27). ALADIN requires the fixed-weight augmented-Lagrangian multiplier update UpdateCouplingParameterMethod_AugLagMultipliersFixedWeights, which updates each multiplier as \(\lambda \leftarrow \lambda + 2\,s^{2}\,c(\cdot)\) using the coupling inconsistency \(c(\cdot)\):
initialweight— the penalty scaling weight \(s\) (recommended \(0 < s \le 0.1\), e.g.0.01). Largerinitialweightproduces larger multiplier steps and faster constraint enforcement, but risks oscillation/divergence; smaller values give gentler, more stable but slower consensus. Unlike ALC's adaptive-weight methods, this weight stays fixed across outer iterations — a defining property of ALADIN.initialmultiplier— the initial Lagrange multiplier \({}^{i}_{j}\lambda^{(0)}\) (recommended0.0).
Iteration scheme¶
iterationscheme controls how the inner-loop jobs are scheduled by the IterationSchemeInterface. Because ALADIN's controller QP couples all subsystems and must run after the local NLPs, the appropriate choice is ParallelLocal_SequentialController: the local subsystem problems (pseudocode line 11) are solved in parallel, followed by the sequential controller QP (pseudocode line 18).
Proximal hyperparameters ν, Σⁱ, s¶
The pseudocode "Require" block (Algorithm 2, lines 1–3) lists the penalty parameter \(\nu\), the positive-definite proximal scaling matrix \({}^{i}\)\(\Sigma\), and the coupling scaling weights \({}^{i}_{j}\)\(s\):
- \(\nu\) and \({}^{i}\)\(\Sigma\) weight the proximal term \(\tfrac{\nu}{2}\lVert {}^{i}d - {}^{i}\hat{d}\rVert_{{}^{i}\Sigma}^{2}\) in the local subproblem (see
LocalSubSystemALADIN.evaluateCoordinationObjective, accessed viaget_Nu/set_Nuandget_Sigma_i/set_Sigma_i). A larger \(\nu\) or larger diagonal entries of \({}^{i}\)\(\Sigma\) keep each local iterate closer to the controller prediction \({}^{i}\hat{d}\) (stronger regularization, better consistency, slower local progress); smaller values give the local NLP more freedom. Currently \({}^{i}\)\(\Sigma\) is initialized to the identity matrix ininitializeCouplingParameters_before_CopyToMiddleLeveland \(\nu\) is set internally (not yet exposed through theInputFile). - \({}^{i}_{j}\)\(s\) are the coupling scaling weights carried in the coordination QP and shared with the controller; they coincide with the
initialweight\(s\) of the dual update above.