Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rolling stock, effort curve documentation #10441

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ pub struct EffortCurveConditions {
pub struct EffortCurve {
#[derivative(Hash(hash_with = "editoast_common::hash_float_slice::<3,_>"))]
#[schema(min_items = 2, example = json!([0.0, 2.958, 46.719]))]
/// Speeds in m/s. Must contains the same number of elements as `max_efforts`
speeds: Vec<f64>,
#[derivative(Hash(hash_with = "editoast_common::hash_float_slice::<3,_>"))]
#[schema(min_items = 2, example = json!([23500.0, 23200.0, 21200.0]))]
/// Max efforts in N. Must contains the same number of elements as `speeds`.
max_efforts: Vec<f64>,
}

Expand Down
2 changes: 2 additions & 0 deletions editoast/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6413,6 +6413,7 @@ components:
items:
type: number
format: double
description: Max efforts in N. Must contains the same number of elements as `speeds`.
example:
- 23500.0
- 23200.0
Expand All @@ -6423,6 +6424,7 @@ components:
items:
type: number
format: double
description: Speeds in m/s. Must contains the same number of elements as `max_efforts`
example:
- 0.0
- 2.958
Expand Down
2 changes: 2 additions & 0 deletions front/src/common/api/generatedEditoastApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3072,7 +3072,9 @@ export type EffortCurveConditions = {
power_restriction_code: string | null;
};
export type EffortCurve = {
/** Max efforts in N. Must contains the same number of elements as `speeds`. */
max_efforts: number[];
/** Speeds in m/s. Must contains the same number of elements as `max_efforts` */
speeds: number[];
};
export type ConditionalEffortCurve = {
Expand Down
Loading