Coverage for o2/models/timetable/gateway_branching_probability.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.6.12, created at 2025-05-16 11:18 +0000

1from dataclasses import dataclass 

2 

3from dataclass_wizard import JSONWizard 

4 

5 

6@dataclass(frozen=True) 

7class Probability(JSONWizard): 

8 """Probability of taking a specific path at a gateway.""" 

9 

10 path_id: str 

11 value: float 

12 

13 

14@dataclass(frozen=True) 

15class GatewayBranchingProbability(JSONWizard): 

16 """Collection of probabilities for paths from a gateway.""" 

17 

18 gateway_id: str 

19 probabilities: list[Probability]