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
60 61 62 63 64 65 66 67 68 69 | |
get_cables
Returns a dict of all cables in the static environment.
Source code in cable_thermal_model/environment/static_env.py
80 81 82 | |
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
84 85 86 | |
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
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | |
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
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
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
146 147 148 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 | |
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
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | |
get_cable
Gets the Cable-object corresponding to the cable_name from the environment.
Source code in cable_thermal_model/environment/static_env.py
385 386 387 | |
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
389 390 391 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 | |
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
427 428 429 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 | |