Skip to content

static_env_soil

StaticEnvSoil

StaticEnvSoil()

Bases: StaticEnv[CableSoil, CircuitInSoilFromCableInputSchema, CircuitInSoilFromCableConstructionalInputSchema, CircuitInSoilFromCableIdInputSchema, CircuitInSoilFromCableSpecsInputSchema]

Class that builds a static environment for circuits in soil.

Source code in cable_thermal_model/environment/static_env_soil.py
40
41
42
43
def __init__(self):
    """Initialize the StaticEnvSoil instance."""
    super().__init__()
    self._measurement_point_registry = MeasurementPointRegistry()

add_measurement_point

add_measurement_point(x: float, y: float, ndigits: int = 3) -> MeasurementPointKey

Add a measurement point to the environment.

Parameters:

Name Type Description Default
x float

x-coordinate of the measurement point.

required
y float

y-coordinate of the measurement point.

required
ndigits int

Number of decimal places to round the coordinates for key generation.

3

Returns:

Name Type Description
MeasurementPointKey MeasurementPointKey

The identifier of the added measurement point.

Source code in cable_thermal_model/environment/static_env_soil.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
def add_measurement_point(self, x: float, y: float, ndigits: int = 3) -> MeasurementPointKey:
    """Add a measurement point to the environment.

    Args:
        x: x-coordinate of the measurement point.
        y: y-coordinate of the measurement point.

        ndigits: Number of decimal places to round the coordinates for key generation.

    Returns:
        MeasurementPointKey: The identifier of the added measurement point.

    """
    return self._measurement_point_registry.add_measurement_point(
        x=x,
        y=y,
        ndigits=ndigits,
    )