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
38 39 40 41 | |
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
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 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 145 146 | |