interfaces
IBalanceModel
IBalanceModel(
sagging_temperature: ndarray,
parameter: ndarray,
section_array: SectionArray,
cable_array: CableArray,
span_model: ISpan,
deformation_model: IDeformation,
cable_loads: CableLoads,
find_param_solver_type: Type[
IFindParamSolver
] = FindParamSolverForLoop,
)
Bases: IModelForSolver, ABC
Interface for balance models. Used by BalanceEngine to find insulator chain positions.
Source code in src/mechaphlowers/core/models/balance/interfaces.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
adjustment
abstractmethod
property
writable
adjustment: bool
Boolean indicating if the model is in adjustment mode or change of state mode.
attachment_altitude_after_solve
abstractmethod
property
attachment_altitude_after_solve: ndarray
Attachment altitude after considering chain displacement.
Format: [z0, z1, z2,...]
state_vector
abstractmethod
property
writable
state_vector: ndarray
Vector of state variables to be optimized.
chain_displacement
abstractmethod
chain_displacement() -> ndarray
Get the displacement vectors of the chains.
dxdydz and chain_displacement are the transpose of each other
Format: [[x0, y0, z0], [x1, y1, z1],...]
Source code in src/mechaphlowers/core/models/balance/interfaces.py
111 112 113 114 115 116 117 118 119 | |
dict_to_store
dict_to_store() -> dict
Returns a dictionary of values to store after each loop iteration. Used only for debugging purposes. Can stay empty.
Source code in src/mechaphlowers/core/models/balance/interfaces.py
56 57 58 59 60 | |
get_dxdydz
abstractmethod
get_dxdydz() -> ndarray
Get the dxdydz vector of the nodes.
dxdydz and chain_displacement are the transpose of each other
Format: [[x0, x1, x2,...], [y0, y1, y2,...], [z0, z1, z2,...]]
Source code in src/mechaphlowers/core/models/balance/interfaces.py
121 122 123 124 125 126 127 128 129 | |
objective_function
abstractmethod
objective_function() -> ndarray
Function to minimize that depends on state_vector.
Source code in src/mechaphlowers/core/models/balance/interfaces.py
46 47 48 49 | |
reset
abstractmethod
reset(
cable_array: CableArray,
span_model: ISpan,
deformation_model: IDeformation,
cable_loads: CableLoads,
full: bool = False,
) -> None
Reset the model references, optionally performing a full re-initialization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
CableArray
|
cable data |
required |
|
ISpan
|
span model |
required |
|
IDeformation
|
deformation model |
required |
|
CableLoads
|
cable loads |
required |
|
bool
|
if True, re-initialize all attributes; otherwise only update model references. |
False
|
Source code in src/mechaphlowers/core/models/balance/interfaces.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | |
update
abstractmethod
update() -> None
Update any variables of the model if necessary. Can stay empty.
Source code in src/mechaphlowers/core/models/balance/interfaces.py
51 52 53 54 | |
update_L_ref
abstractmethod
update_L_ref() -> ndarray
Update the reference length L_ref after an adjustment solve.
Source code in src/mechaphlowers/core/models/balance/interfaces.py
95 96 97 98 | |
update_nodes_span_model
abstractmethod
update_nodes_span_model() -> None
Update the span model of the nodes if loads are applied.
Source code in src/mechaphlowers/core/models/balance/interfaces.py
179 180 181 182 | |
vhl_under_chain
abstractmethod
vhl_under_chain() -> VhlResult
Get the VHL efforts under chain: without considering insulator_weight. Format: [[V0, H0, L0], [V1, H1, L1], ...] Default unit is daN
Source code in src/mechaphlowers/core/models/balance/interfaces.py
139 140 141 142 143 144 | |
vhl_under_chain_left
abstractmethod
vhl_under_chain_left() -> VhlResult
Get the VHL efforts under chain: without considering insulator_weight.
VHL at the left of the support.
Format: [[V0, H0, L0], [V1, H1, L1], ...] Default unit is daN
Source code in src/mechaphlowers/core/models/balance/interfaces.py
146 147 148 149 150 151 152 153 154 | |
vhl_under_chain_right
abstractmethod
vhl_under_chain_right() -> VhlResult
Get the VHL efforts under chain: without considering insulator_weight.
VHL at the right of the support.
Format: [[V0, H0, L0], [V1, H1, L1], ...] Default unit is daN
Source code in src/mechaphlowers/core/models/balance/interfaces.py
156 157 158 159 160 161 162 163 164 | |
vhl_under_console
abstractmethod
vhl_under_console() -> VhlResult
Get the VHL efforts under console: considering insulator_weight. Format: [[V0, H0, L0], [V1, H1, L1], ...] Default unit is daN
Source code in src/mechaphlowers/core/models/balance/interfaces.py
166 167 168 169 170 171 | |
IModelForSolver
Bases: ABC
Interface for models used by BalanceSolver. This interface defines the necessary methods and properties that a model in order to be compatible with BalanceSolver.
state_vector
abstractmethod
property
writable
state_vector: ndarray
Vector of state variables to be optimized.
dict_to_store
dict_to_store() -> dict
Returns a dictionary of values to store after each loop iteration. Used only for debugging purposes. Can stay empty.
Source code in src/mechaphlowers/core/models/balance/interfaces.py
56 57 58 59 60 | |
objective_function
abstractmethod
objective_function() -> ndarray
Function to minimize that depends on state_vector.
Source code in src/mechaphlowers/core/models/balance/interfaces.py
46 47 48 49 | |
update
abstractmethod
update() -> None
Update any variables of the model if necessary. Can stay empty.
Source code in src/mechaphlowers/core/models/balance/interfaces.py
51 52 53 54 | |