Skip to content

Commit

Permalink
editoast: add rolling stock, effort curve documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Amsallem <[email protected]>
  • Loading branch information
flomonster committed Jan 20, 2025
1 parent c4c4c58 commit f8c378f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editoast/editoast_schemas/src/rolling_stock/effort_curves.rs
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

0 comments on commit f8c378f

Please sign in to comment.