Skip to content

← Back to subsystem

LocalSubSystemConsensusALC

Source: Distributed_Design_Optimizer/subsystem/LocalSubSystemConsensusALC.py

Consensus ALC local subsystem module.

This module provides the local subsystem implementation for the consensus-based Augmented Lagrangian Coordination method.

Classes

LocalSubSystemConsensusALC

Inherits from: LocalSubSystemBasis

Local subsystem for consensus-based ALC coordination.

Implements the local subsystem functionality for consensus-based Augmented Lagrangian Coordination.

Methods

init(self, id: str, level: int, neighborid: List[str], analysis: AnalysisInterface, localobjective: LocalObjectiveInterface, localconstraints: LocalConstraintsInterface, optimization: OptimizationInterface, local_convergenceindicator_innerloop: Local_ConvergenceIndicator_Innerloop_Interface, local_convergenceindicator_outerloop: Local_ConvergenceIndicator_Outerloop_Interface, updatecouplingparametermethod_outerloop: UpdateCouplingParameterMethodInterface) → None

📐 Pseudocode: Require hyperparameters γ, β and initial auxiliary variables/multipliers (Lines 1, 2) → Consensus Augmented Lagrangian Coordination

Create a new LocalSubSystemConsensusALC instance.

Args:

id: Identifier for the subsystem.
level: Level identifier for the subsystem in the hierarchy.
neighborid: List of identifiers for neighboring subsystems.
analysis: Analysis interface for subsystem evaluation.
localobjective: Local objective function class.
localconstraints: Local constraint functions class.
optimization: Optimization interface for solving local problems.
local_convergenceindicator_innerloop: Local convergence indicator for inner loop.
local_convergenceindicator_outerloop: Local convergence indicator for outer loop.
updatecouplingparametermethod_outerloop: Method for updating coupling parameters in outer loop.

validate_inputs(self) → None

Validate the components handed to this subsystem by the Consensus_ALC coordination method.

Validates that the outer-loop update coupling parameter method and the local inner/outer loop convergence indicators are compatible with Consensus_ALC.

Raises:

ValueError: If a provided component is not compatible with Consensus_ALC.

append_Controller(self) → None

Update local subsystems by appending controller.

mapToController(self) → None

Pass, since no controller in consensus ALC.

evaluate_Gradient_CoordinationObjective(self) → None

Evaluate the analytical gradient of the coordination objective.

Assumes the mapped responses Jacobian was evaluated already.

evaluate_Jacobian_CoordinationEqualityConstraints(self) → None

Evaluate the Jacobian of the coordination equality constraints.

Consensus ALC does not have coordination equality constraints, hence no-op.

evaluate_Jacobian_CoordinationInEqualityConstraints(self) → None

Evaluate the Jacobian of the coordination inequality constraints.

Consensus ALC does not have coordination inequality constraints, hence no-op.

evaluateCoordinationObjective(self) → None

📐 Pseudocode: Innerloop decentralized Primal Update optimization (Lines 7, 8) → Consensus Augmented Lagrangian Coordination

Evaluate the coordination objective.

evaluateCoordinationEqualityConstraint(self) → None

Evaluate the coordination equality constraint.

evaluateCoordinationInequalityConstraint(self) → None

Evaluate the coordination inequality constraint.

prepare_OptimizationProblem(self) → None

Prepare the optimization problem.

postprocess_Optimization(self) → None

Postprocess the optimization.

return_initialized_CouplingParameters(self) → List[CouplingParametersConsensusALC]

Return initialized coupling parameters.

Returns:

Initialized coupling parameters for each neighbor.

update_AuxiliaryVariables(self, coupling: CouplingParametersConsensusALC) → None

📐 Pseudocode: Auxiliary variable closed-form update (Lines 13, 14) → Consensus Augmented Lagrangian Coordination

Create initial and then update auxiliary variables using the update formula.

Uses the initial values defined in the input file.

Args:

coupling: Coupling parameters for a consensus ALC neighbor.

initializeCouplingParameters_before_CopyToMiddleLevel(self) → None

Initialize coupling parameters before copying communicated information.

Create empty placeholders for coupling parameters, i.e. communicated quantities in the algorithms, Lagrange multipliers, penalty weights, ... The sizes are read by already initialized quantities from the inner loop iteration.

initializeCouplingParameters_after_CopyFromMiddleLevel(self) → None

📐 Pseudocode: Require hyperparameters γ, β and initial auxiliary variables/multipliers (Lines 1, 2) → Consensus Augmented Lagrangian Coordination

Initialize coupling parameters after copying communicated information.

Create empty placeholders for coupling parameters, i.e. communicated quantities in the algorithms, Lagrange multipliers, penalty weights, ... The sizes are read by already initialized quantities from the inner loop iteration.

initializeCouplingParameters_after_Second_CopyFromMiddleLevel(self) → None

Initialize coupling parameters after two communication rounds between subsystems.

prepare_updateCouplingParameters(self) → None

Prepare coupling parameters before update operations.

Consensus ALC does not have any outer loop preparations to update the coupling parameters.

updateCouplingParameters_innerLoop(self) → None

📐 Pseudocode: Auxiliary variable closed-form update (Lines 13, 14) → Consensus Augmented Lagrangian Coordination

Update auxiliary variables in inner loop directly after local subsystem updates -> See pseudocode.

updateCouplingParameters_outerLoop(self) → None

📐 Pseudocode: Dual Update (Lagrange multiplier update) (Line 22), Penalty Update (weight update) (Line 22) → Consensus Augmented Lagrangian Coordination

Update coupling parameters in the outer loop.

evaluate_Inconsistencies(self) → None

📐 Pseudocode: Compute consensus constraint residual (Lines 20, 21), Outerloop convergence and return (Lines 24, 25, 26, 27) → Consensus Augmented Lagrangian Coordination

Compute the difference between stored coupling and mapped variables.

Compares to the latest available data from a subsystem, including consensus constraint violations. Computes four + four inconsistency vectors. The first vector is the auxiliary-minus-mapped-response differences of the coupling circle. The second vector is the auxiliary-minus-coupling-variable differences of the coupling circle. The third and fourth are the difference between the shared design variable vector. Similarly, there are four vectors for the consensus constraints.

return_initialized_Inconsistencies(self) → List[InConsistencySize]

Return initialized inconsistencies.

Returns:

List of initialized InConsistencySize, one per coupling parameter.

set_AuxiliaryVariables_MappedResponse(self, neighborid: str, auxiliaryin: List[float]) → None

Set the auxiliary-minus-mapped-response auxiliary variables for a neighbor.

Args:

neighborid: Identifier of the neighboring subsystem.
auxiliaryin: Auxiliary variable values to set.

set_AuxiliaryVariables_CouplingVariable(self, neighborid: str, auxiliaryin: List[float]) → None

Set the auxiliary-minus-coupling-variable auxiliary variables for a neighbor.

Args:

neighborid: Identifier of the neighboring subsystem.
auxiliaryin: Auxiliary variable values to set.

set_AuxiliaryVariables_SharedDesignVariable(self, neighborid: str, auxiliaryin: List[float]) → None

Set the auxiliary-minus-shared-design-variable auxiliary variables for a neighbor.

Args:

neighborid: Identifier of the neighboring subsystem.
auxiliaryin: Auxiliary variable values to set.

set_AuxiliaryVariables_TargetSharedDesignVariable(self, neighborid: str, auxiliaryin: List[float]) → None

Set the auxiliary-minus-target-shared-design-variable auxiliary variables for a neighbor.

Args:

neighborid: Identifier of the neighboring subsystem.
auxiliaryin: Auxiliary variable values to set.

set_CoordinationMultipliers_Auxiliary_Minus_MappedResponse(self, neighborid: str, multipliersin: List[float]) → None

📐 Pseudocode: Dual Update (Lagrange multiplier update) (Line 22) → Consensus Augmented Lagrangian Coordination

Set the coordination multipliers for the auxiliary minus mapped response inconsistency of a neighbor.

Args:

neighborid: Identifier of the neighboring subsystem.
multipliersin: Auxiliary minus mapped response multiplier values to set.

set_CoordinationMultipliers_Auxiliary_Minus_CouplingVariable(self, neighborid: str, multipliersin: List[float]) → None

📐 Pseudocode: Dual Update (Lagrange multiplier update) (Line 22) → Consensus Augmented Lagrangian Coordination

Set the coordination multipliers for the auxiliary minus coupling variable inconsistency of a neighbor.

Args:

neighborid: Identifier of the neighboring subsystem.
multipliersin: Auxiliary minus coupling variable multiplier values to set.

set_CoordinationMultipliers_Auxiliary_Minus_SharedDesignVariable(self, neighborid: str, multipliersin: List[float]) → None

📐 Pseudocode: Dual Update (Lagrange multiplier update) (Line 22) → Consensus Augmented Lagrangian Coordination

Set the coordination multipliers for the auxiliary minus shared design variable inconsistency of a neighbor.

Args:

neighborid: Identifier of the neighboring subsystem.
multipliersin: Auxiliary minus shared design variable multiplier values to set.

set_CoordinationMultipliers_Auxiliary_Minus_TargetSharedDesignVariable(self, neighborid: str, multipliersin: List[float]) → None

📐 Pseudocode: Dual Update (Lagrange multiplier update) (Line 22) → Consensus Augmented Lagrangian Coordination

Set the coordination multipliers for the auxiliary minus target shared design variable inconsistency of a neighbor.

Args:

neighborid: Identifier of the neighboring subsystem.
multipliersin: Auxiliary minus target shared design variable multiplier values to set.

set_CoordinationWeights_Auxiliary_Minus_MappedResponse(self, neighborid: str, penaltyweightsin: List[float]) → None

📐 Pseudocode: Penalty Update (weight update) (Line 22) → Consensus Augmented Lagrangian Coordination

Set the coordination weights for the auxiliary minus mapped response inconsistency of a neighbor.

Args:

neighborid: Identifier of the neighboring subsystem.
penaltyweightsin: Auxiliary minus mapped response penalty weight values to set.

set_CoordinationWeights_Auxiliary_Minus_CouplingVariable(self, neighborid: str, penaltyweightsin: List[float]) → None

📐 Pseudocode: Penalty Update (weight update) (Line 22) → Consensus Augmented Lagrangian Coordination

Set the coordination weights for the auxiliary minus coupling variable inconsistency of a neighbor.

Args:

neighborid: Identifier of the neighboring subsystem.
penaltyweightsin: Auxiliary minus coupling variable penalty weight values to set.

set_CoordinationWeights_Auxiliary_Minus_SharedDesignVariable(self, neighborid: str, penaltyweightsin: List[float]) → None

📐 Pseudocode: Penalty Update (weight update) (Line 22) → Consensus Augmented Lagrangian Coordination

Set the coordination weights for the auxiliary minus shared design variable inconsistency of a neighbor.

Args:

neighborid: Identifier of the neighboring subsystem.
penaltyweightsin: Auxiliary minus shared design variable penalty weight values to set.

set_CoordinationWeights_Auxiliary_Minus_TargetSharedDesignVariable(self, neighborid: str, penaltyweightsin: List[float]) → None

📐 Pseudocode: Penalty Update (weight update) (Line 22) → Consensus Augmented Lagrangian Coordination

Set the coordination weights for the auxiliary minus target shared design variable inconsistency of a neighbor.

Args:

neighborid: Identifier of the neighboring subsystem.
penaltyweightsin: Auxiliary minus target shared design variable penalty weight values to set.

update_state(self, other_subsystem: LocalSubSystemConsensusALC) → None

Update the state of this LocalSubSystemConsensusALC instance with values from another instance.

This method is necessary for multiprocessing. When subsystems are executed in parallel using multiprocessing.Pool, they are serialized and deserialized, creating new objects in separate memory spaces. After parallel execution completes, this method updates the original object's attribute values while preserving their memory addresses.

The update preserves memory addresses by modifying attribute contents in-place where possible, rather than reassigning references. This is essential for maintaining object identity across the multiprocessing boundary.

Args:

other_subsystem: The source LocalSubSystemConsensusALC containing updated values
from parallel execution.