model_output_schemas
TemperatureResultSchema
Bases: DataFrameModel
Schema for temperature result DataFrame with MultiIndex columns.
Structure: - Index: datetime (time series) - Columns: MultiIndex with 3 levels: - Level 0: circuit_name (str) - Level 1: cable_position (CablePosition enum values) - Level 2: cable_layer (CableLayer enum values) - Values: temperature in degrees Celsius (float)
check_datetime_index
classmethod
check_datetime_index(df: DataFrame)
Ensure index is datetime-like.
Source code in cable_thermal_model/model/schemas/model_output_schemas.py
30 31 32 33 34 | |
check_multiindex_columns
classmethod
check_multiindex_columns(df: DataFrame)
Ensure columns are a MultiIndex with 3 levels.
Source code in cable_thermal_model/model/schemas/model_output_schemas.py
36 37 38 39 40 41 42 43 | |
check_circuit_names
classmethod
check_circuit_names(df: DataFrame) -> bool
Ensure circuit names are non-empty strings.
Source code in cable_thermal_model/model/schemas/model_output_schemas.py
46 47 48 49 50 51 52 53 54 | |
check_cable_positions
classmethod
check_cable_positions(df: DataFrame) -> bool
Ensure cable positions are valid CablePosition enum values.
Source code in cable_thermal_model/model/schemas/model_output_schemas.py
57 58 59 60 61 62 | |
check_cable_layers
classmethod
check_cable_layers(df: DataFrame) -> bool
Ensure cable layers are valid CableLayer enum values.
Source code in cable_thermal_model/model/schemas/model_output_schemas.py
65 66 67 68 69 70 | |
check_temperature_values
classmethod
check_temperature_values(df: DataFrame) -> bool
Ensure temperature values are floats.
Source code in cable_thermal_model/model/schemas/model_output_schemas.py
73 74 75 76 77 78 79 80 | |
ModelOutputSchema
Bases: BaseModel, Generic[StateT]
Schema for the output of the thermal cable model, containing the temperature results and the final state.