Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d35c68f
asymmetry: introduce TrainrunSection asymmetric attributes
louisgreiner Aug 29, 2025
8de2152
asymmetry: display asymmetry on reticular
louisgreiner Aug 29, 2025
0ec87f1
asymmetry: enable filtering
louisgreiner Aug 29, 2025
15c7303
asymmetry: add asymmetry arrows
louisgreiner Aug 29, 2025
e9c74c5
asymmetry: enable asymmetric values update from trainrun-section-tab …
louisgreiner Aug 29, 2025
720ae26
asymmetry: move getTrainrunLeftAndRightTimeStructure outside of one-w…
louisgreiner Aug 29, 2025
53f2554
asymmetry: introduce symmetry selection dialog component
louisgreiner Aug 29, 2025
3f56e35
asymmetry: enable toggle component to be disabled
louisgreiner Aug 29, 2025
4aa4979
asymmetry: add symmetry toggle + enable to reset the symmetry on trai…
louisgreiner Aug 29, 2025
9ff8b15
asymmetry: add symmetry Trainrun toggle + enable to reset the symmetr…
louisgreiner Aug 29, 2025
95e15e2
asymmetry: add symmetry Trainrun toggle + enable to reset the symmetr…
louisgreiner Aug 29, 2025
347d09f
asymmetry: add symmetry TrainrunSection toggle + enable to reset the …
louisgreiner Aug 29, 2025
5fd0a32
code: missing formatting
louisgreiner Sep 19, 2025
9f687aa
asymmetry: fix asym filter buttons
louisgreiner Sep 24, 2025
59d077e
asymmetry: fix typo
louisgreiner Sep 24, 2025
3ce1ff7
asymmetry: fix symmetry filters
louisgreiner Sep 26, 2025
a2700b2
asymmetry: make symmetry buttons work for non-stop trainruns
louisgreiner Sep 26, 2025
46f7adf
asymmetry: enable quick asymmetry->symmetry when time structures are …
louisgreiner Sep 29, 2025
00abed7
asymmetry: fix perlenkette display for non-stop trainruns
louisgreiner Oct 1, 2025
45b52b0
asymmetry: propagate consecutive times for non-stops (to confirm)
louisgreiner Oct 1, 2025
00c3051
asymmetry: propagate times for non-stop trainruns + better locks use
louisgreiner Oct 1, 2025
b1ddddb
wip: fix backward travel time position
louisgreiner Oct 6, 2025
279c10e
wip: asymmetry: fix non-stop trainrun time update
louisgreiner Oct 15, 2025
69eb6f6
asymmetry: fix asymmetry arrow mouse up + direction arrow hover
louisgreiner Oct 16, 2025
4300eb9
asymmetry: refacto transition validator + display warning when times …
louisgreiner Oct 16, 2025
918fe1b
asymmetry: add warning on time propagation on non-stop trainrun when …
louisgreiner Oct 16, 2025
33a9cb1
asymmetry: enable backwardTravelTime editing on a non-symmetrical sec…
louisgreiner Oct 17, 2025
e34a7cd
asymmetry: reduce the size of asymmetry arrow
louisgreiner Oct 17, 2025
f9b3819
asymmetry: stop propagation on lock encounter
louisgreiner Oct 17, 2025
d4c6c03
asymmetry: getFirstNonStopTrainrunSection rename
louisgreiner Oct 17, 2025
a1818f5
asymmetry: fix time update on non-stop trainruns
louisgreiner Oct 19, 2025
db86219
asymmetry: get rid of left/right paradigm in setTimeStructureToTrainr…
louisgreiner Oct 19, 2025
1222ad4
asymmetry: fix transition validator tests + fix source/target nodes b…
louisgreiner Oct 21, 2025
7be775e
asymmetry: util getNonStopSectionsChain
louisgreiner Oct 23, 2025
e3a18f1
asymmetry: fix locks state in non-stop sections chain + remove legacy…
louisgreiner Oct 23, 2025
631f7f6
asymmetry: fix perlenkette edit mode + fix numberOfStops input field
louisgreiner Oct 23, 2025
a746c3f
asymmetry: fix perlenkette time update on non-stop trainruns
louisgreiner Oct 23, 2025
3be116f
asymmetry: todo refactor consecutive times
louisgreiner Oct 23, 2025
036919d
fix
louisgreiner Oct 24, 2025
f185a7f
files
louisgreiner Oct 24, 2025
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
2 changes: 2 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import {EditorSideViewComponent} from "./view/editor-side-view/editor-side-view.
import {StammdatenDialogComponent} from "./view/dialogs/stammdaten-dialog/stammdaten-dialog.component";
import {TrainrunAndSectionDialogComponent} from "./view/dialogs/trainrun-and-section-dialog/trainrun-and-section-dialog.component";
import {ConfirmationDialogComponent} from "./view/dialogs/confirmation-dialog/confirmation-dialog.component";
import {SymmetrySelectionDialogComponent} from "./view/dialogs/symmetry-selection-dialog/symmetry-selection-dialog.component";
import {FilterMainSideViewComponent} from "./view/filter-main-side-view/filter-main-side-view.component";
import {KnotenAuslastungViewComponent} from "./view/knoten-auslastung-view/knoten-auslastung-view.component";
import {environment} from "../environments/environment";
Expand Down Expand Up @@ -126,6 +127,7 @@ import {ToggleSwitchButtonComponent} from "./view/toggle-switch-button/toggle-sw
EditorSideViewComponent,
TrainrunAndSectionDialogComponent,
ConfirmationDialogComponent,
SymmetrySelectionDialogComponent,
FilterMainSideViewComponent,
KnotenAuslastungViewComponent,
ProjectsViewComponent,
Expand Down
8 changes: 7 additions & 1 deletion src/app/data-structures/business.data.structures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,14 @@ export interface TrainrunSectionDto {
targetNodeId: number; // reference to the node by Node.id
targetPortId: number; // reference to the node by Node.id

sourceSymmetry: boolean; // binds sourceDeparture and sourceArrival times
targetSymmetry: boolean; // binds targetDeparture and targetArrival times
sourceArrival: TimeLockDto; // declares the soruce arrival time
sourceDeparture: TimeLockDto; // declares the soruce departure time
targetArrival: TimeLockDto; // declares the target arrival time
targetDeparture: TimeLockDto; // declares the target departure time
travelTime: TimeLockDto; // declares the travel arrival time
travelTime: TimeLockDto; // declares the travel time (forward direction)
backwardTravelTime: TimeLockDto; // declares the travel time in the opposite direction

numberOfStops: number; // number of stops - not declared in detail (no node attached)

Expand Down Expand Up @@ -290,15 +293,18 @@ export interface FilterSettingDto {
filterNoteLabels: number[]; // labels to filter out (labels only of type - LabelRef: note)
filterTrainrunLabels: number[]; // labels to filter out (labels only of type - LabelRef: trainrun)
filterDirectionArrows: boolean; // flag for trainrun direction arrows (hide/show)
filterAsymmetryArrows: boolean; // flag for trainrun section asymmetry arrows (hide/show)
filterArrivalDepartureTime: boolean; // flag for arrival and departure time filtering (hide/show)
filterTravelTime: boolean; // flag for travel time filter (hide/show)
filterBackwardTravelTime: boolean; // flag for trainrun section backward travel times (hide/show)
filterTrainrunName: boolean; // flag for trainrun time filter (hide/show)
filterConnections: boolean; // flag for connections filtering (hide/show)
filterShowNonStopTime: boolean; // flag for non-stop time filtering (hide/show)
filterTrainrunCategory: TrainrunCategory[]; // list of category to filter out
filterTrainrunFrequency: TrainrunFrequency[]; // list of frequency to filter out
filterTrainrunTimeCategory: TrainrunTimeCategory[]; // list of time categroy to filter out
filterDirection: Direction[]; // list of trainrun direction to filter out
filterSymmetry: boolean[]; // list of trainrun symmetry values (true/false) to filter out
filterAllEmptyNodes: boolean; // flag to filter all empty nodes (hide/show)
filterAllNonStopNodes: boolean; // flag to filter all only non-stop nodes (hide/show)
filterNotes: boolean; // flag to filter notes (hide/show)
Expand Down
2 changes: 2 additions & 0 deletions src/app/data-structures/technical.data.structures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export enum TrainrunSectionText {
TargetDeparture,
TrainrunSectionName,
TrainrunSectionTravelTime,
TrainrunSectionBackwardTravelTime,
TrainrunSectionNumberOfStops,
}

Expand All @@ -38,6 +39,7 @@ export interface TrainrunSectionTextPositions {
[TrainrunSectionText.TargetDeparture]: PointDto;
[TrainrunSectionText.TrainrunSectionName]: PointDto;
[TrainrunSectionText.TrainrunSectionTravelTime]: PointDto;
[TrainrunSectionText.TrainrunSectionBackwardTravelTime]: PointDto;
[TrainrunSectionText.TrainrunSectionNumberOfStops]: PointDto;
}

Expand Down
22 changes: 20 additions & 2 deletions src/app/models/filterSettings.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,19 @@ export class FilterSetting {
public filterNodeLabels: number[];
public filterNoteLabels: number[];
public filterTrainrunLabels: number[];
public filterDirectionArrows;
public filterDirectionArrows: boolean;
public filterAsymmetryArrows: boolean;
public filterArrivalDepartureTime;
public filterTravelTime;
public filterBackwardTravelTime: boolean;
public filterTrainrunName;
public filterConnections;
public filterShowNonStopTime;
public filterTrainrunCategory: TrainrunCategory[];
public filterTrainrunFrequency: TrainrunFrequency[];
public filterTrainrunTimeCategory: TrainrunTimeCategory[];
public filterDirection: Direction[];
public filterSymmetry: boolean[];
public filterAllEmptyNodes;
public filterAllNonStopNodes;
public filterNotes;
Expand All @@ -44,16 +47,19 @@ export class FilterSetting {
filterNodeLabels,
filterNoteLabels,
filterTrainrunLabels,
filterDirectionArrows: filterDirectionArrows,
filterDirectionArrows,
filterAsymmetryArrows,
filterArrivalDepartureTime,
filterTravelTime,
filterBackwardTravelTime,
filterTrainrunName,
filterConnections,
filterShowNonStopTime,
filterTrainrunCategory,
filterTrainrunFrequency,
filterTrainrunTimeCategory,
filterDirection: filterDirection,
filterSymmetry: filterSymmetry,
filterAllEmptyNodes,
filterAllNonStopNodes,
filterNotes,
Expand All @@ -68,15 +74,18 @@ export class FilterSetting {
filterNoteLabels: [],
filterTrainrunLabels: [],
filterDirectionArrows: true,
filterAsymmetryArrows: true,
filterArrivalDepartureTime: true,
filterTravelTime: true,
filterBackwardTravelTime: true,
filterTrainrunName: true,
filterConnections: true,
filterShowNonStopTime: true,
filterTrainrunCategory: null,
filterTrainrunFrequency: null,
filterTrainrunTimeCategory: null,
filterDirection: null,
filterSymmetry: null,
filterAllEmptyNodes: false,
filterAllNonStopNodes: false,
filterNotes: false,
Expand All @@ -92,15 +101,18 @@ export class FilterSetting {
this.filterNoteLabels = filterNoteLabels;
this.filterTrainrunLabels = filterTrainrunLabels;
this.filterDirectionArrows = filterDirectionArrows;
this.filterAsymmetryArrows = filterAsymmetryArrows;
this.filterArrivalDepartureTime = filterArrivalDepartureTime;
this.filterTravelTime = filterTravelTime;
this.filterBackwardTravelTime = filterBackwardTravelTime;
this.filterTrainrunName = filterTrainrunName;
this.filterConnections = filterConnections;
this.filterShowNonStopTime = filterShowNonStopTime;
this.filterTrainrunCategory = filterTrainrunCategory;
this.filterTrainrunFrequency = filterTrainrunFrequency;
this.filterTrainrunTimeCategory = filterTrainrunTimeCategory;
this.filterDirection = filterDirection;
this.filterSymmetry = filterSymmetry;
this.filterAllEmptyNodes = filterAllEmptyNodes;
this.filterAllNonStopNodes = filterAllNonStopNodes;
this.filterNotes = filterNotes;
Expand Down Expand Up @@ -165,15 +177,18 @@ export class FilterSetting {
this.filterNoteLabels.length === 0 &&
this.filterTrainrunLabels.length === 0 &&
this.filterDirectionArrows === true &&
this.filterAsymmetryArrows === true &&
this.filterArrivalDepartureTime === true &&
this.filterTravelTime === true &&
this.filterBackwardTravelTime === true &&
this.filterTrainrunName === true &&
this.filterConnections === true &&
this.filterShowNonStopTime === true &&
this.filterTrainrunCategory.length === trainrunCategoriesLength &&
this.filterTrainrunFrequency.length === frainrunFrequenciesLength &&
this.filterTrainrunTimeCategory.length === trainrunTimeCategoryLength &&
this.filterDirection.length === Object.values(Direction).length &&
this.filterSymmetry.length === 2 &&
this.filterAllEmptyNodes === false &&
this.filterAllNonStopNodes === false &&
this.filterNotes === false &&
Expand All @@ -192,15 +207,18 @@ export class FilterSetting {
filterNoteLabels: this.filterNoteLabels,
filterTrainrunLabels: this.filterTrainrunLabels,
filterDirectionArrows: this.filterDirectionArrows,
filterAsymmetryArrows: this.filterAsymmetryArrows,
filterArrivalDepartureTime: this.filterArrivalDepartureTime,
filterTravelTime: this.filterTravelTime,
filterBackwardTravelTime: this.filterBackwardTravelTime,
filterTrainrunName: this.filterTrainrunName,
filterConnections: this.filterConnections,
filterShowNonStopTime: this.filterShowNonStopTime,
filterTrainrunCategory: this.filterTrainrunCategory,
filterTrainrunFrequency: this.filterTrainrunFrequency,
filterTrainrunTimeCategory: this.filterTrainrunTimeCategory,
filterDirection: this.filterDirection,
filterSymmetry: this.filterSymmetry,
filterAllEmptyNodes: this.filterAllEmptyNodes,
filterAllNonStopNodes: this.filterAllNonStopNodes,
filterNotes: this.filterNotes,
Expand Down
2 changes: 1 addition & 1 deletion src/app/models/trainrun.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class Trainrun {
frequencyId,
trainrunTimeCategoryId,
labelIds,
direction = Direction.ROUND_TRIP, // temporary, to allow migration of old trainruns
direction = Direction.ROUND_TRIP, // temporary, to allow migration of old trainruns from file
}: TrainrunDto = {
id: Trainrun.incrementId(),
name: Trainrun.DEFAULT_TRAINRUN_NAME,
Expand Down
13 changes: 13 additions & 0 deletions src/app/models/trainrunsection.model.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,13 @@ describe("TrainrunSection Model Test", () => {
ts.setSourceDepartureLock(false);
ts.setSourceArrivalLock(false);
ts.setTravelTimeLock(false);
ts.setBackwardTravelTimeLock(false);
expect(ts.getTargetDepartureLock()).toBe(false);
expect(ts.getTargetArrivalLock()).toBe(false);
expect(ts.getSourceDepartureLock()).toBe(false);
expect(ts.getSourceArrivalLock()).toBe(false);
expect(ts.getTravelTimeLock()).toBe(false);
expect(ts.getBackwardTravelTimeLock()).toBe(false);
});

it("set...lock - 1", () => {
Expand All @@ -174,11 +176,13 @@ describe("TrainrunSection Model Test", () => {
ts.setSourceArrivalLock(false);
ts.setTravelTimeLock(false);
ts.setTargetDepartureLock(true);
ts.setBackwardTravelTimeLock(false);
expect(ts.getTargetDepartureLock()).toBe(true);
expect(ts.getTargetArrivalLock()).toBe(false);
expect(ts.getSourceDepartureLock()).toBe(false);
expect(ts.getSourceArrivalLock()).toBe(false);
expect(ts.getTravelTimeLock()).toBe(false);
expect(ts.getBackwardTravelTimeLock()).toBe(false);
});

it("set...lock - 2", () => {
Expand All @@ -189,11 +193,13 @@ describe("TrainrunSection Model Test", () => {
ts.setSourceArrivalLock(false);
ts.setTravelTimeLock(false);
ts.setTargetArrivalLock(true);
ts.setBackwardTravelTimeLock(false);
expect(ts.getTargetDepartureLock()).toBe(false);
expect(ts.getTargetArrivalLock()).toBe(true);
expect(ts.getSourceDepartureLock()).toBe(false);
expect(ts.getSourceArrivalLock()).toBe(false);
expect(ts.getTravelTimeLock()).toBe(false);
expect(ts.getBackwardTravelTimeLock()).toBe(false);
});

it("set...lock - 3", () => {
Expand All @@ -203,12 +209,14 @@ describe("TrainrunSection Model Test", () => {
ts.setSourceDepartureLock(false);
ts.setSourceArrivalLock(false);
ts.setTravelTimeLock(false);
ts.setBackwardTravelTimeLock(false);
ts.setSourceDepartureLock(true);
expect(ts.getTargetDepartureLock()).toBe(false);
expect(ts.getTargetArrivalLock()).toBe(false);
expect(ts.getSourceDepartureLock()).toBe(true);
expect(ts.getSourceArrivalLock()).toBe(false);
expect(ts.getTravelTimeLock()).toBe(false);
expect(ts.getBackwardTravelTimeLock()).toBe(false);
});

it("set...lock - 4", () => {
Expand All @@ -219,11 +227,13 @@ describe("TrainrunSection Model Test", () => {
ts.setSourceArrivalLock(false);
ts.setTravelTimeLock(false);
ts.setSourceArrivalLock(true);
ts.setBackwardTravelTimeLock(false);
expect(ts.getTargetDepartureLock()).toBe(false);
expect(ts.getTargetArrivalLock()).toBe(false);
expect(ts.getSourceDepartureLock()).toBe(false);
expect(ts.getSourceArrivalLock()).toBe(true);
expect(ts.getTravelTimeLock()).toBe(false);
expect(ts.getBackwardTravelTimeLock()).toBe(false);
});

it("set...lock - 5", () => {
Expand All @@ -233,12 +243,15 @@ describe("TrainrunSection Model Test", () => {
ts.setSourceDepartureLock(false);
ts.setSourceArrivalLock(false);
ts.setTravelTimeLock(false);
ts.setBackwardTravelTimeLock(false);
ts.setTravelTimeLock(true);
ts.setBackwardTravelTimeLock(true);
expect(ts.getTargetDepartureLock()).toBe(false);
expect(ts.getTargetArrivalLock()).toBe(false);
expect(ts.getSourceDepartureLock()).toBe(false);
expect(ts.getSourceArrivalLock()).toBe(false);
expect(ts.getTravelTimeLock()).toBe(true);
expect(ts.getBackwardTravelTimeLock()).toBe(true);
});

it("select", () => {
Expand Down
Loading