Source code for ra2ce.analysis.losses.weighing_analysis.weighing_analysis_protocol
from typing import Any, Protocol, runtime_checkable
[docs]
@runtime_checkable
class WeighingAnalysisProtocol(Protocol):
edge_data: dict[str, Any]
[docs]
def get_current_value(self) -> float:
"""
Gets the current distance/time of the edge.
If the edge has no distance/time attribute, it is calculated and added to the edge.
Returns:
float: Current distance/time value.
"""