Skip to content

Commit

Permalink
front: adapt origin, destination and vias weight
Browse files Browse the repository at this point in the history
Signed-off-by: Theo Macron <theo.macron0315@gmail.com>
  • Loading branch information
Akctarus committed Jan 7, 2025
1 parent fc93efe commit 2af9401
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion front/src/applications/operationalStudies/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type {

import type {
IncompatibleConstraints,
OperationalPoint,
PathProperties,
PathfindingResultSuccess,
ProjectPathTrainResult,
Expand Down Expand Up @@ -66,7 +67,7 @@ export type CichDictValue = {
chCode?: string;
};

export type OperationalPoint = NonNullable<PathProperties['operational_points']>[number];
// export type OperationalPoint = NonNullable<PathProperties['operational_points']>[number];

// Extraction of some required and non nullable properties from osrdEditoastApi's PathProperties type
export type ManageTrainSchedulePathProperties = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ const SimulationResults = ({
return null;
}

console.log(projectedOperationalPoints.map((op) => op.weight));

return (
<div className="simulation-results">
{/* SIMULATION : STICKY BAR */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';

import { upsertMapWaypointsInOperationalPoints } from 'applications/operationalStudies/helpers/upsertMapWaypointsInOperationalPoints';
import type { OperationalPoint } from 'applications/operationalStudies/types';
import { STDCM_TRAIN_ID } from 'applications/stdcm/consts';
import {
osrdEditoastApi,
type OperationalPoint,
type PathProperties,
type TrainScheduleResult,
} from 'common/api/osrdEditoastApi';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export type SuggestedOP = {
trackName: string;
trackNumber: number;
};
weight?: number;
};

export type Margin = {
Expand Down

0 comments on commit 2af9401

Please sign in to comment.