abstract_model
AbstractModel
AbstractModel(static_env: StaticEnvT)
Bases: ABC, Generic[ModelRunOptionsT, StateT, ScenarioModelT, StaticEnvT]
Abstract base class for thermal cable models.
Source code in cable_thermal_model/model/abstract_model.py
35 36 37 38 | |
run
run(scenario: DataFrame, initial_state: StateT | None = None, run_options: ModelRunOptionsT | dict | None = None) -> ModelOutputSchema[StateT]
Computes the temperature solutions for all cable objects in the model for the given scenario.
Notes
Be careful about changing default run option values. The following settings affect the temperature outcome and should only be changed if you understand the implications:
- temperature_dependent_electric_resistance
- ac_current
- soil_drying
- initial_state
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scenario
|
DataFrame
|
Scenario dataframe for this run. The dataframe is validated internally before execution. |
required |
initial_state
|
StateT | None
|
Heating information from a previous computation. |
None
|
run_options
|
ModelRunOptionsT | dict | None
|
Run options for this simulation run. If |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
ModelOutputSchema |
ModelOutputSchema[StateT]
|
Temperature solutions for all cables. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the provided initial state does not match the model environment. |
Source code in cable_thermal_model/model/abstract_model.py
61 62 63 64 65 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 94 95 96 97 98 99 100 101 102 | |