static_env
StaticEnv
StaticEnv()
Bases: ABC, Generic[CableT, CircuitFromCableInputSchemaT, CircuitFromCableConstructionalInputSchemaT, CircuitFromCableIdInputSchemaT]
Class that builds a static environment.
Source code in cable_thermal_model/environment/static_env.py
63 64 65 66 67 68 69 70 71 72 | |
get_cables
Returns a dict of all cables in the static environment.
Source code in cable_thermal_model/environment/static_env.py
83 84 85 | |
get_number_of_cables
get_number_of_cables() -> int
Returns the total number of cables in the static environment.
Source code in cable_thermal_model/environment/static_env.py
87 88 89 | |
add_circuit_from_cable_id
add_circuit_from_cable_id(
circuit_input: CircuitFromCableIdInputSchemaT,
)
Adds the circuit to the environment based on a Cable Id.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
circuit_input
|
CircuitFromCableIdInputSchemaT
|
CircuitFromCableIdInputSchemaT containing the input parameters for the circuit. |
required |
Source code in cable_thermal_model/environment/static_env.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | |
add_circuit_from_cable_constructional_information
add_circuit_from_cable_constructional_information(
circuit_input: CircuitFromCableConstructionalInputSchemaT,
)
Adds the circuit to the environment based on a Cable Constructional Input Schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
circuit_input
|
CircuitFromCableConstructionalInputSchemaT
|
CircuitFromCableConstructionalInputSchemaT containing the input parameters for the circuit. |
required |
Source code in cable_thermal_model/environment/static_env.py
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |
add_circuit_from_cable
add_circuit_from_cable(
circuit_input: CircuitFromCableInputSchemaT,
)
Add a cable circuit consisting of one or three cables to the environment based on a given cable instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
circuit_input
|
CircuitFromCableInputSchemaT
|
CircuitInputSchemaT containing the input parameters for the circuit, including a cable instance. |
required |
Source code in cable_thermal_model/environment/static_env.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
get_circuit_type
staticmethod
get_circuit_type(cable: AbstractCable) -> CircuitType
Determines probable circuit type by number of conductors in the cable.
Source code in cable_thermal_model/environment/static_env.py
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 | |
get_cable
Gets the Cable-object corresponding to the cable_name from the environment.
Source code in cable_thermal_model/environment/static_env.py
388 389 390 | |
multiple_configurations_from_cable_id
staticmethod
multiple_configurations_from_cable_id(
multiple_configurations_from_cable_id: list[
CircuitConfigurationFromCableId
],
cable_source_file_path: Path,
) -> list[CircuitConfiguration]
Generates multiple circuit configurations based on a list of CircuitConfigurationFromCableId.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
multiple_configurations_from_cable_id
|
list[CircuitConfigurationFromCableId]
|
A list of CircuitConfigurationFromCableId, specifying the cable ids and lengths of the different configurations. |
required |
cable_source_file_path
|
Path
|
Name of the file containing the cable specifications. This file has to be located in the data directory and must either be an excel or csv file. |
required |
Returns:
| Type | Description |
|---|---|
list[CircuitConfiguration]
|
list[CircuitConfiguration]: A list of CircuitConfiguration objects that can be used in the multiple_configurations argument of add_circuit_from_cable or add_circuit_from_cable_id. |
Source code in cable_thermal_model/environment/static_env.py
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | |
multiple_configurations_from_cable_constructional_input
staticmethod
multiple_configurations_from_cable_constructional_input(
multiple_configurations_from_cable_constructional_input: list[
CircuitConfigurationFromCableConstructionalInputSchema
],
) -> list[CircuitConfiguration]
Generate multiple configurations from constructional input schemas.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
multiple_configurations_from_cable_constructional_input
|
list[CircuitConfigurationFromCableConstructionalInputSchema]
|
A list of CircuitConfigurationFromCableConstructionalInputSchema, specifying the cable constructional input schemas and lengths of the different configurations. |
required |
Returns:
| Type | Description |
|---|---|
list[CircuitConfiguration]
|
list[CircuitConfiguration]: A list of CircuitConfiguration objects that can be used in the multiple_configurations argument of add_circuit_from_cable or add_circuit_from_cable_id. |
Source code in cable_thermal_model/environment/static_env.py
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | |