Skip to content

Commit aad9a97

Browse files
committed
osrd-schemas: fix name of default allowance for simulation to STANDARD
LINEAR is not matching editoast's API (only used in core AFAIK) Signed-off-by: Pierre-Etienne Bougué <[email protected]>
1 parent 770a507 commit aad9a97

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

python/osrd_schemas/osrd_schemas/train_schedule.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ class AllowanceValue(RootModel):
7373

7474
class AllowanceDistribution(str, Enum):
7575
"""This class defines the two distributions of allowances that can be applied to the standalone simulation.
76-
The first one is LINEAR, which means that an allowance is applied that will be the same for the whole simulation.
76+
The first one is STANDARD (linear), which means that an allowance is applied that will be the same for the whole simulation.
7777
The second one is based on the MARECO algorithm, which consists in distributing the allowance as economically
7878
as possible in terms of energy consumption.
7979
"""
8080

8181
mareco = "MARECO"
82-
linear = "LINEAR"
82+
standard = "STANDARD" # linear
8383

8484

8585
class RangeAllowance(BaseModel):

python/railjson_generator/railjson_generator/schema/simulation/train_schedule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def add_allowance(self, *args, engineering: bool = False, **kwargs):
4848
self.allowances.append(allowance)
4949

5050
def add_standard_single_value_allowance(
51-
self, value_type: str, value: float, distribution: str = "LINEAR"
51+
self, value_type: str, value: float, distribution: str = "STANDARD"
5252
):
5353
"""Add a standard allowance with a single value. For more information on allowances, see
5454
the documentation of the Allowance class in osrd_schemas."""

0 commit comments

Comments
 (0)