Skip to content

← Back to alc

CouplingParametersALC

Source: Distributed_Design_Optimizer/subsystem/couplingparameters/alc/CouplingParametersALC.py

Coupling parameters module.

This module provides coupling multiplier parameters for the Augmented Lagrangian Coordination method.

Classes

CouplingParametersALC

Inherits from: SubSysCouplingParametersBasis

Coupling multipliers and weights for augmented Lagrangian coordination.

Extends SubSysCouplingParametersBasis with both penalty weight vectors and Lagrange multiplier vectors for mapped-response/coupling-variable sides of the coupling circle and shared/target design variables.

Methods

init(self, id: str) → None

📐 Pseudocode: Require hyperparameters γ, β and initial coupling parameters (Lines 1, 2, 3) → Augmented Lagrangian Coordination

Initialize CouplingParametersALC.

Args:

id: Unique identifier for this coupling.

set_Weights_MappedResponse_Minus_CopyCouplingVariable(self, mappedresponse_minus_copycouplingvariable_in: List[float]) → None

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

Set the penalty weights for the mapped-response part of the coupling circle.

Args:

mappedresponse_minus_copycouplingvariable_in: Vector of penalty weights for mapped-response side.

get_Weights_MappedResponse_Minus_CopyCouplingVariable(self) → List[float] | None

Get the penalty weights for the mapped-response part of the coupling circle.

Returns:

Vector of penalty weights for mapped-response side, or None if not set.

set_Weights_CopyMappedResponse_Minus_CouplingVariable(self, copymappedresponse_minus_couplingvariable_in: List[float]) → None

Set the penalty weights for the coupling-variable part of the coupling circle.

Args:

copymappedresponse_minus_couplingvariable_in: Vector of penalty weights for coupling-variable side.

get_Weights_CopyMappedResponse_Minus_CouplingVariable(self) → List[float] | None

Get the penalty weights for the coupling-variable part of the coupling circle.

Returns:

Vector of penalty weights for coupling-variable side, or None if not set.

set_Weights_SharedDesignVariable_Minus_CopyTargetSharedDesignVariable(self, shareddesignvariable_minus_copytargetshareddesignvariable_in: List[float]) → None

Set the weights for coordination of consistency constraint between shared design variables.

Args:

shareddesignvariable_minus_copytargetshareddesignvariable_in: Vector of weights for shared design variables.

get_Weights_SharedDesignVariable_Minus_CopyTargetSharedDesignVariable(self) → List[float] | None

Get the weights for coordination of consistency constraints for shared design variables.

Returns:

Vector of weights for shared design variables, or None if not set.

set_Weights_CopySharedDesignVariable_Minus_TargetSharedDesignVariable(self, copyshareddesignvariable_minus_targetshareddesignvariable_in: List[float]) → None

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

Set the weights for coordination of consistency constraint between target design variables.

Args:

copyshareddesignvariable_minus_targetshareddesignvariable_in: Vector of weights for target design variables.

get_Weights_CopySharedDesignVariable_Minus_TargetSharedDesignVariable(self) → List[float] | None

Get the weights for coordination of consistency constraints for target design variables.

Returns:

Vector of weights for target design variables, or None if not set.

set_Multipliers_MappedResponse_Minus_CopyCouplingVariable(self, mappedresponse_minus_copycouplingvariable_in: List[float]) → None

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

Set the Lagrange multipliers for the mapped-response side of the coupling circle.

Args:

mappedresponse_minus_copycouplingvariable_in: Vector of Lagrange multipliers for mapped-response side.

get_Multipliers_MappedResponse_Minus_CopyCouplingVariable(self) → List[float] | None

Obtain the Lagrange multipliers from the mapped-response side of the coupling circle.

Returns:

Vector of Lagrange multipliers for mapped-response side, or None if not set.

set_Multipliers_CopyMappedResponse_Minus_CouplingVariable(self, copymappedresponse_minus_couplingvariable_in: List[float]) → None

Set the Lagrange multipliers for the coupling-variable side of the coupling circle.

Args:

copymappedresponse_minus_couplingvariable_in: Vector of Lagrange multipliers for coupling-variable side.

get_Multipliers_CopyMappedResponse_Minus_CouplingVariable(self) → List[float] | None

Obtain the Lagrange multipliers from the coupling-variable side of the coupling circle.

Returns:

Vector of Lagrange multipliers for coupling-variable side, or None if not set.

set_Multipliers_SharedDesignVariable_Minus_CopyTargetSharedDesignVariable(self, shareddesignvariable_minus_copytargetshareddesignvariable_in: List[float]) → None

Set the Lagrange multipliers for the shared design variables.

Args:

shareddesignvariable_minus_copytargetshareddesignvariable_in: Vector of multipliers for shared design variables.

get_Multipliers_SharedDesignVariable_Minus_CopyTargetSharedDesignVariable(self) → List[float] | None

Obtain the Lagrange multipliers from the shared design variables.

Returns:

Vector of multipliers for shared design variables, or None if not set.

set_Multipliers_CopySharedDesignVariable_Minus_TargetSharedDesignVariable(self, copyshareddesignvariable_minus_targetshareddesignvariable_in: List[float]) → None

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

Set the Lagrange multipliers for the target design variables.

Args:

copyshareddesignvariable_minus_targetshareddesignvariable_in: Vector of multipliers for target design variables.

get_Multipliers_CopySharedDesignVariable_Minus_TargetSharedDesignVariable(self) → List[float] | None

Obtain the Lagrange multipliers from the target design variables.

Returns:

Vector of multipliers for target design variables, or None if not set.

CopyFromMiddleLevelCoupling(self, middlelevelcouplingIn: MiddleLevelCouplingALC) → None

📐 Pseudocode: Copy from MiddleLevelCoupling into CouplingParameters (polymorphic) (Line 7) → SubSystemBasis.CopyFromMiddleLevel

Copy coupling data from a MiddleLevelCoupling object.

Args:

middlelevelcouplingIn: The MiddleLevelCoupling object to copy data from.

Raises:

ValueError: If middlelevelcouplingIn is not a MiddleLevelCoupling instance.

CopyToMiddleLevelCoupling(self, middlelevelcouplingIn: MiddleLevelCouplingALC) → None

📐 Pseudocode: Copy from CouplingParameters into MiddleLevelCoupling (polymorphic) (Line 8) → SubSystemBasis.CopyToMiddleLevel

Copy coupling data to a MiddleLevelCoupling object.

Args:

middlelevelcouplingIn: The MiddleLevelCoupling object to copy data to.

Raises:

ValueError: If middlelevelcouplingIn is not a MiddleLevelCoupling instance.

update_state(self, other_coupling: CouplingParametersALC) → None

Update the state of this CouplingParametersALC 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 list contents in-place rather than reassigning references. This is essential for maintaining object identity across the multiprocessing boundary.

Args:

other_coupling: The source CouplingParametersALC containing updated values
from parallel execution.