Skip to content

← Back to postprocess

PerformanceMetrics

Source: Distributed_Design_Optimizer/postprocess/PerformanceMetrics.py

Performance metrics module.

This module provides functionality for computing performance metrics in distributed optimization problems.

Classes

PerformanceMetrics

Compute and store performance metrics for optimization convergence analysis.

Methods

init(self) → None

Initialize the PerformanceMetrics with default values.

compute_GlobalObjectiveValue(self, subsystems: List[SubSystemInterface]) → None

Compute the current scaled global objective function value of the entire problem.

Args:

subsystems: List of subsystems to compute the objective from.

compute_GlobalObjectiveValueUnscaled(self, subsystems: List[SubSystemInterface]) → None

Compute the current unscaled global objective function value of the entire problem.

Args:

subsystems: List of subsystems to compute the objective from.

compute_GlobalObjectiveValue_previousOuterLoop(self, subsystems: List[SubSystemInterface]) → None

Compute the scaled global objective value of the previous outer loop.

Args:

subsystems: List of subsystems to retrieve previous objective from.

compute_GlobalObjectiveValueUnscaled_previousOuterLoop(self, subsystems: List[SubSystemInterface]) → None

Compute the unscaled global objective value of the previous outer loop.

Args:

subsystems: List of subsystems to retrieve previous objective from.

compute_GlobalObjectiveValue_previousInnerLoop(self, subsystems: List[SubSystemInterface]) → None

Compute the scaled global objective value of the previous inner loop.

Args:

subsystems: List of subsystems to retrieve previous objective from.

compute_GlobalObjectiveValueUnscaled_previousInnerLoop(self, subsystems: List[SubSystemInterface]) → None

Compute the unscaled global objective value of the previous inner loop.

Args:

subsystems: List of subsystems to retrieve previous objective from.

store_GlobalDesignVariables(self, subsystems: List[SubSystemInterface]) → None

Store the vector of current scaled global design variable values for all subsystems.

Args:

subsystems: List of subsystems containing design variables.

store_GlobalDesignVariablesUnscaled(self, subsystems: List[SubSystemInterface]) → None

Store the vector of current unscaled global design variable values for all subsystems.

Args:

subsystems: List of subsystems containing design variables.

store_GlobalDesignVariables_previousOuterLoop(self, subsystems: List[SubSystemInterface]) → None

Store the vector of previous outer loop scaled global design variable values.

Args:

subsystems: List of subsystems containing previous design variables.

store_GlobalDesignVariablesUnscaled_previousOuterLoop(self, subsystems: List[SubSystemInterface]) → None

Store the vector of previous outer loop unscaled global design variable values.

Args:

subsystems: List of subsystems containing previous design variables.

store_GlobalDesignVariables_previousInnerLoop(self, subsystems: List[SubSystemInterface]) → None

Store the vector of previous inner loop scaled global design variable values.

Args:

subsystems: List of subsystems containing previous design variables.

store_GlobalDesignVariablesUnscaled_previousInnerLoop(self, subsystems: List[SubSystemInterface]) → None

Store the vector of previous inner loop unscaled global design variable values.

Args:

subsystems: List of subsystems containing previous design variables.

store_RefGlobalDesignVariables(self, subsystems: List[SubSystemInterface]) → None

Stores the Scaled Reference GlobalDesignVariables values vector for all the subsystems.

Args:

subsystems: List of subsystems containing subsystems.

store_RefGlobalDesignVariablesUnscaled(self, subsystems: List[SubSystemInterface]) → None

Stores the Reference GlobalDesignVariables values vector for all the subsystems.

Args:

subsystems: List of subsystems containing subsystems.

store_RefGlobalObjectiveValue(self, subsystems: List[SubSystemInterface]) → None

Stores the Scaled Reference Global Objective Function Value.

Args:

subsystems: List of subsystems containing subsystems.

store_RefGlobalObjectiveValueUnscaled(self, subsystems: List[SubSystemInterface]) → None

Stores the Unscaled Reference Global Objective Function Value.

Args:

subsystems: List of subsystems containing subsystems.

compute_SignedAbsDistanceFromReferenceGlobalObjectiveValue(self) → None

Compute the signed distance from the scaled reference global objective value.

compute_SignedAbsDistanceFromReferenceGlobalObjectiveValueUnscaled(self) → None

Compute the signed distance from the unscaled reference global objective value.

compute_AbsDistanceFromReferenceDesignVariables(self) → None

Compute the absolute distance from scaled reference design variables.

compute_AbsDistanceFromReferenceDesignVariables_Unscaled(self) → None

Compute the absolute distance from unscaled reference design variables.

compute_L2NormFromReferenceDesignVariables(self) → None

Compute the L2 norm from scaled reference design variables.

compute_L2NormFromReferenceDesignVariables_Unscaled(self) → None

Compute the L2 norm from unscaled reference design variables.

compute_RateofChange_GlobalObjectiveValue_Outerloop(self, convinnerloop: bool) → None

Compute the rate of change of scaled global objective function value for outer loop.

Args:

convinnerloop: Whether the inner loop has converged.

compute_RateofChange_GlobalObjectiveValueUnscaled_Outerloop(self, convinnerloop: bool) → None

Compute the rate of change of unscaled global objective function value for outer loop.

Args:

convinnerloop: Whether the inner loop has converged.

compute_RateofChange_GlobalObjectiveValue_Innerloop(self) → None

Compute the rate of change of scaled global objective function value for inner loop.

compute_RateofChange_GlobalObjectiveValueUnscaled_Innerloop(self) → None

Compute the rate of change of unscaled global objective function value for inner loop.

compute_LogRateofChange_GlobaObjectiveValue_Outerloop(self, convinnerloop: bool) → None

Compute the log rate of change of scaled global objective function value for outer loop.

Args:

convinnerloop: Whether the inner loop has converged.

compute_LogRateofChange_GlobaObjectiveValueUnscaled_Outerloop(self, convinnerloop: bool) → None

Compute the log rate of change of unscaled global objective function value for outer loop.

Args:

convinnerloop: Whether the inner loop has converged.

compute_LogRateofChange_GlobaObjectiveValue_Innerloop(self) → None

Compute the log rate of change of scaled global objective function value for inner loop.

compute_LogRateofChange_GlobaObjectiveValueUnscaled_Innerloop(self) → None

Compute the log rate of change of unscaled global objective function value for inner loop.

compute_RateofChangeConvergence_GlobalObjectiveValue_Outerloop(self, convinnerloop: bool) → None

Compute the rate of change convergence for scaled global objective value in outer loop.

Args:

convinnerloop: Whether the inner loop has converged.

compute_RateofChangeConvergence_GlobalObjectiveValueUnscaled_Outerloop(self, convinnerloop: bool) → None

Compute the rate of change convergence for unscaled global objective value in outer loop.

Args:

convinnerloop: Whether the inner loop has converged.

compute_RateofChangeConvergence_GlobalObjectiveValue_Innerloop(self) → None

Compute the rate of change convergence for scaled global objective value in inner loop.

compute_RateofChangeConvergence_GlobalObjectiveValueUnscaled_Innerloop(self) → None

Compute the rate of change convergence for unscaled global objective value in inner loop.

compute_RelativeRateofChange_GlobalDesignVariables_Outerloop(self) → None

Compute the relative rate of change of scaled global design variables for outer loop.

compute_RelativeRateofChange_GlobalDesignVariablesUnscaled_Outerloop(self) → None

Compute the relative rate of change of unscaled global design variables for outer loop.

compute_RelativeRateofChange_GlobalDesignVariables_Innerloop(self) → None

Compute the relative rate of change of scaled global design variables for inner loop.

compute_RelativeRateofChange_GlobalDesignVariablesUnscaled_Innerloop(self) → None

Compute the relative rate of change of unscaled global design variables for inner loop.

compute_RelativeRateofChangeGlobalDesignVariables_Norm(self) → None

Compute the L2 Norm of the relative change of scaled GlobalDesignVariables with respect to scaled Reference variables.

compute_RelativeRateofChangeGlobalDesignVariablesUnscaled_Norm(self) → None

Compute the L2 Norm of the relative change of Unscaled GlobalDesignVariables with respect to Unscaled Reference variables.

compute_DistanceFromReferenceGlobalOptimaUnscaled(self) → None

Compute distance from reference global optima using the already-stored unscaled global objective.

compute_DistanceFromReferenceSubsystemOptimaUnscaled(self, subsystems: List[SubSystemInterface]) → None

Compute distance from reference optima for each subsystem.

Args:

subsystems: List of subsystems containing objective values.

initialize_ReferenceValues(self, subsystems: List[SubSystemInterface]) → None

Initializes and stores reference values.

Args:

subsystems: List of subsystems containing subsystems.

update(self, convinnerloop: bool, subsystems: List[SubSystemInterface]) → None

Updates the metrics for the current iteration.

Args:

convinnerloop: Flag indicating inner loop convergence.
subsystems: List of subsystems containing subsystems.

get_GlobalObjectiveFunctionValue(self) → float | None

Return the global objective function value.

Returns:

The global objective function value, or None if not yet computed.

get_GlobalObjectiveFunctionValueUnscaled(self) → float | None

Return the unscaled global objective function value.

Returns:

The unscaled global objective function value, or None if not yet computed.

get_ReferenceGlobalObjectiveValue(self) → float | None

Return the reference global objective value.

Returns:

The reference global objective value, or None if not yet computed.

get_ReferenceGlobalObjectiveValueUnscaled(self) → float | None

Return the unscaled reference global objective value.

Returns:

The unscaled reference global objective value, or None if not yet computed.

get_SignedDistanceFromReferenceGlobalObjectiveValue(self) → float | None

Return the signed distance from the scaled reference global objective value.

Returns:

Signed distance from reference, or None if not computed.

get_SignedDistanceFromReferenceGlobalObjectiveValueUnscaled(self) → float | None

Return the signed distance from the unscaled reference global objective value.

Returns:

Signed distance from unscaled reference, or None if not computed.

get_L2NormFromReferenceDesignVariables(self) → float | None

Return the L2 norm distance from scaled reference design variables.

Returns:

L2 norm distance, or None if not computed.

get_L2NormFromReferenceDesignVariablesUnscaled(self) → float | None

Return the L2 norm distance from unscaled reference design variables.

Returns:

L2 norm distance from unscaled reference, or None if not computed.

get_DistanceFromReferenceGlobalOptimaUnscaled(self) → float | None

Return the distance from unscaled reference global optima.

Returns:

Distance from unscaled reference global optima, or None if not computed.

get_DistanceFromReferenceSubsystemOptimaUnscaled(self) → List[float] | None

Return the distance from reference optima for each subsystem.

Returns:

List of distances per subsystem, or None if not computed.

print_end_of_innerloop_iteration(self) → None

Print current global objective value at end of innerloop iteration.

print_termination_summary(self) → None

Print performance metrics summary at the end of the optimization run.