diff --git a/contribs/dvrp/src/main/java/org/matsim/contrib/zone/skims/TravelTimeMatrices.java b/contribs/dvrp/src/main/java/org/matsim/contrib/zone/skims/TravelTimeMatrices.java index 38e5709b173..792140c173d 100644 --- a/contribs/dvrp/src/main/java/org/matsim/contrib/zone/skims/TravelTimeMatrices.java +++ b/contribs/dvrp/src/main/java/org/matsim/contrib/zone/skims/TravelTimeMatrices.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package org.matsim.contrib.zone.skims; import java.util.ArrayList; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/RunSBBExtension.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/RunSBBExtension.java index dc0163d4b5a..9176cb181fc 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/RunSBBExtension.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/RunSBBExtension.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim; import ch.sbb.matsim.mobsim.qsim.SBBTransitModule; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/BeelineDistanceMatrix.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/BeelineDistanceMatrix.java index aaf9a280f9c..a665bff984d 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/BeelineDistanceMatrix.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/BeelineDistanceMatrix.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.analysis.skims; import java.util.Map; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/CalculateSkimMatrices.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/CalculateSkimMatrices.java index c3ec95d33aa..f4d8494dbed 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/CalculateSkimMatrices.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/CalculateSkimMatrices.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.analysis.skims; import ch.sbb.matsim.analysis.skims.NetworkSkimMatrices.NetworkIndicators; @@ -175,7 +190,7 @@ public static void main(String[] args) throws IOException { "", (line, route) -> route.getTransportMode().equals("train")); } - + skims.calculateAndWriteBeelineMatrix(); } diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/FloatMatrix.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/FloatMatrix.java index a8c79473186..9ed2b13025b 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/FloatMatrix.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/FloatMatrix.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.analysis.skims; import java.util.Arrays; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/FloatMatrixIO.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/FloatMatrixIO.java index bfb6ce901a4..936b3d68122 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/FloatMatrixIO.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/FloatMatrixIO.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.analysis.skims; import java.io.BufferedReader; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/MatricesToXY.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/MatricesToXY.java index 7d42ac60c4e..1facd37be1e 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/MatricesToXY.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/MatricesToXY.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.analysis.skims; import java.io.BufferedWriter; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/NetworkSkimMatrices.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/NetworkSkimMatrices.java index 6470e231043..afc16f51ec0 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/NetworkSkimMatrices.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/NetworkSkimMatrices.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.analysis.skims; import org.matsim.core.router.speedy.SpeedyGraph; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/PTSkimMatrices.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/PTSkimMatrices.java index 1916ddbd263..56121f8558a 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/PTSkimMatrices.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/PTSkimMatrices.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.analysis.skims; import ch.sbb.matsim.analysis.skims.RooftopUtils.ODConnection; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/RooftopUtils.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/RooftopUtils.java index f7937b6d763..809f4582a65 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/RooftopUtils.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/RooftopUtils.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.analysis.skims; import ch.sbb.matsim.routing.pt.raptor.SwissRailRaptorCore.TravelInfo; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/StreamingFacilities.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/StreamingFacilities.java index a2e9833d342..d75de1a5080 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/StreamingFacilities.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/analysis/skims/StreamingFacilities.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.analysis.skims; import org.matsim.api.core.v01.Id; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/config/SBBTransitConfigGroup.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/config/SBBTransitConfigGroup.java index 24abf75a992..f78b3caaf93 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/config/SBBTransitConfigGroup.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/config/SBBTransitConfigGroup.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.config; import java.util.HashSet; @@ -20,7 +35,7 @@ public class SBBTransitConfigGroup extends ReflectiveConfigGroup { static private final String PARAM_DETERMINISTIC_SERVICE_MODES = "deterministicServiceModes"; static private final String PARAM_CREATE_LINK_EVENTS_INTERVAL = "createLinkEventsInterval"; - private Set deterministicServiceModes = new HashSet<>(); + private final Set deterministicServiceModes = new HashSet<>(); private int createLinkEventsInterval = 0; public SBBTransitConfigGroup() { diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/SBBTransitModule.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/SBBTransitModule.java index 81fd1456970..8b43874f104 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/SBBTransitModule.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/SBBTransitModule.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.mobsim.qsim; import ch.sbb.matsim.config.SBBTransitConfigGroup; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBPassengerAccessEgress.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBPassengerAccessEgress.java index bb67c1ee09e..d7c0f0ffc9e 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBPassengerAccessEgress.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBPassengerAccessEgress.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.mobsim.qsim.pt; import java.util.ArrayList; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitDriverAgent.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitDriverAgent.java index 4b1ce4be675..7674797dd28 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitDriverAgent.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitDriverAgent.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.mobsim.qsim.pt; import java.util.LinkedList; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitDriverAgentFactory.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitDriverAgentFactory.java index 665e6f50e0c..bf4e3c6d719 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitDriverAgentFactory.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitDriverAgentFactory.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.mobsim.qsim.pt; import java.util.Set; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitEngineQSimModule.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitEngineQSimModule.java index 30753a4a576..c05b7852bab 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitEngineQSimModule.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitEngineQSimModule.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.mobsim.qsim.pt; import org.matsim.core.mobsim.qsim.AbstractQSimModule; diff --git a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitQSimEngine.java b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitQSimEngine.java index 643dfef1950..9e8ccf83ee6 100644 --- a/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitQSimEngine.java +++ b/contribs/sbb-extensions/src/main/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitQSimEngine.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.mobsim.qsim.pt; import ch.sbb.matsim.config.SBBTransitConfigGroup; diff --git a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/analysis/skims/FloatMatrixIOTest.java b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/analysis/skims/FloatMatrixIOTest.java index a3f0ff2e822..1eb96dd4e35 100644 --- a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/analysis/skims/FloatMatrixIOTest.java +++ b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/analysis/skims/FloatMatrixIOTest.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.analysis.skims; import java.io.ByteArrayInputStream; @@ -55,4 +70,4 @@ public void testIO() throws IOException { Assert.assertEquals(27.0f, matrix2.get("tres", "dos"), epsilon); Assert.assertEquals(64.0f, matrix2.get("tres", "tres"), epsilon); } -} \ No newline at end of file +} diff --git a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/analysis/skims/RooftopUtilsTest.java b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/analysis/skims/RooftopUtilsTest.java index 560ff62468c..7f42f0b8f0b 100644 --- a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/analysis/skims/RooftopUtilsTest.java +++ b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/analysis/skims/RooftopUtilsTest.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.analysis.skims; import ch.sbb.matsim.analysis.skims.RooftopUtils.ODConnection; @@ -410,4 +429,4 @@ public void testCalculationShares_singleDepartureLate() { Map shares = RooftopUtils.calcConnectionShares(connections, Time.parseTime("07:00:00"), Time.parseTime("08:00:00")); Assert.assertEquals(1.0, shares.get(c0), 1e-7); } -} \ No newline at end of file +} diff --git a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/config/SBBTransitConfigGroupTest.java b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/config/SBBTransitConfigGroupTest.java index 49e81b819a0..5624833ef10 100644 --- a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/config/SBBTransitConfigGroupTest.java +++ b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/config/SBBTransitConfigGroupTest.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.config; import java.io.ByteArrayInputStream; diff --git a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/SBBQSimModuleTest.java b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/SBBQSimModuleTest.java index f647d8449a1..cd3d30f3243 100644 --- a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/SBBQSimModuleTest.java +++ b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/SBBQSimModuleTest.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.mobsim.qsim; import ch.sbb.matsim.config.SBBTransitConfigGroup; @@ -83,4 +98,4 @@ QSimComponentsConfig provideQSimComponentsConfig() { Assert.assertTrue(config.getModules().get(SBBTransitConfigGroup.GROUP_NAME) instanceof SBBTransitConfigGroup); } -} \ No newline at end of file +} diff --git a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitQSimEngineIntegrationTest.java b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitQSimEngineIntegrationTest.java index ee97222a5a2..8dbf3583a19 100644 --- a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitQSimEngineIntegrationTest.java +++ b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitQSimEngineIntegrationTest.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.mobsim.qsim.pt; import ch.sbb.matsim.mobsim.qsim.SBBTransitModule; diff --git a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitQSimEngineTest.java b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitQSimEngineTest.java index a3c596481a3..d80dc5793d5 100644 --- a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitQSimEngineTest.java +++ b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/SBBTransitQSimEngineTest.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.mobsim.qsim.pt; import java.util.List; diff --git a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/TestFixture.java b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/TestFixture.java index 030d3cc43b8..5e497fe5165 100644 --- a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/TestFixture.java +++ b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/TestFixture.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.mobsim.qsim.pt; import ch.sbb.matsim.config.SBBTransitConfigGroup; diff --git a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/TestQSimModule.java b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/TestQSimModule.java index 14d2c36a06a..668b6662288 100644 --- a/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/TestQSimModule.java +++ b/contribs/sbb-extensions/src/test/java/ch/sbb/matsim/mobsim/qsim/pt/TestQSimModule.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.mobsim.qsim.pt; import com.google.inject.Provides; diff --git a/matsim/src/main/java/ch/sbb/matsim/RunSwissRailRaptorExample.java b/matsim/src/main/java/ch/sbb/matsim/RunSwissRailRaptorExample.java index 8d4cd0a7e36..ead8406f0c6 100644 --- a/matsim/src/main/java/ch/sbb/matsim/RunSwissRailRaptorExample.java +++ b/matsim/src/main/java/ch/sbb/matsim/RunSwissRailRaptorExample.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim; import ch.sbb.matsim.routing.pt.raptor.SwissRailRaptorModule; diff --git a/matsim/src/main/java/ch/sbb/matsim/config/SwissRailRaptorConfigGroup.java b/matsim/src/main/java/ch/sbb/matsim/config/SwissRailRaptorConfigGroup.java index f0e18a1e410..2473517c9d1 100644 --- a/matsim/src/main/java/ch/sbb/matsim/config/SwissRailRaptorConfigGroup.java +++ b/matsim/src/main/java/ch/sbb/matsim/config/SwissRailRaptorConfigGroup.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.config; import com.google.common.base.Verify; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/CapacityDependentInVehicleCostCalculator.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/CapacityDependentInVehicleCostCalculator.java index 5736b305ea6..00cc019b720 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/CapacityDependentInVehicleCostCalculator.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/CapacityDependentInVehicleCostCalculator.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import org.matsim.api.core.v01.population.Person; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/ConfigurableRaptorRouteSelector.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/ConfigurableRaptorRouteSelector.java index f3c75972829..80d3be07024 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/ConfigurableRaptorRouteSelector.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/ConfigurableRaptorRouteSelector.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import org.matsim.core.gbl.MatsimRandom; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorInVehicleCostCalculator.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorInVehicleCostCalculator.java index 17b6dfb50de..bb684485e41 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorInVehicleCostCalculator.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorInVehicleCostCalculator.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import org.matsim.api.core.v01.population.Person; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorIntermodalAccessEgress.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorIntermodalAccessEgress.java index 8908831b1bd..a900e79e945 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorIntermodalAccessEgress.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorIntermodalAccessEgress.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import java.util.List; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorParametersForPerson.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorParametersForPerson.java index a83e951789b..be18feaffa2 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorParametersForPerson.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorParametersForPerson.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import org.matsim.api.core.v01.population.Person; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorStopFinder.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorStopFinder.java index 6636713979c..ab7ee9948bb 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorStopFinder.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorStopFinder.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import java.util.ArrayList; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorTransferCostCalculator.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorTransferCostCalculator.java index 3e7578e0e81..5522400f8cb 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorTransferCostCalculator.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/DefaultRaptorTransferCostCalculator.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import java.util.function.Supplier; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/IndividualRaptorParametersForPerson.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/IndividualRaptorParametersForPerson.java index 26e95cb0a7b..58e4ff37fa0 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/IndividualRaptorParametersForPerson.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/IndividualRaptorParametersForPerson.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import ch.sbb.matsim.config.SwissRailRaptorConfigGroup; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/InitialStop.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/InitialStop.java index ab39246b16e..822c5a0cab6 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/InitialStop.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/InitialStop.java @@ -1,6 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2017. - */ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/LeastCostRaptorRouteSelector.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/LeastCostRaptorRouteSelector.java index 363d3bc2e6f..4af1ba1df93 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/LeastCostRaptorRouteSelector.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/LeastCostRaptorRouteSelector.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import java.util.List; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/OccupancyData.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/OccupancyData.java index 629f8476bfa..2de04efdcde 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/OccupancyData.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/OccupancyData.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import org.apache.logging.log4j.LogManager; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/OccupancyTracker.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/OccupancyTracker.java index b407efadd07..8051b09d842 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/OccupancyTracker.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/OccupancyTracker.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import ch.sbb.matsim.routing.pt.raptor.OccupancyData.DepartureData; @@ -226,10 +245,7 @@ public void next() { break; } if (!searchStart) { - this.hasNext = true; - if (this.nextFromStop.getStopFacility().getId().equals(alightingStopId)) { - this.hasNext = false; - } + this.hasNext = !this.nextFromStop.getStopFacility().getId().equals(alightingStopId); break; } this.nextFromStop = this.nextToStop; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorInVehicleCostCalculator.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorInVehicleCostCalculator.java index f23f8e918b8..cc34dcda6d7 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorInVehicleCostCalculator.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorInVehicleCostCalculator.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import org.matsim.api.core.v01.population.Person; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorIntermodalAccessEgress.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorIntermodalAccessEgress.java index 75142910a90..6630d6225df 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorIntermodalAccessEgress.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorIntermodalAccessEgress.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import org.matsim.api.core.v01.population.Person; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorParameters.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorParameters.java index aa8ce2abfeb..ba79214ff73 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorParameters.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorParameters.java @@ -1,6 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2017. - */ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; @@ -33,8 +49,8 @@ public class RaptorParameters { private double extensionRadius = 200.0; /** - * Factor with which direct walk generalized cost is multiplied before - * it is compared to the pt generalized cost. + * Factor with which direct walk generalized cost is multiplied before + * it is compared to the pt generalized cost. * Set to a very high value to reduce direct walk results. */ private double directWalkFactor = 1.0; @@ -75,7 +91,7 @@ public double getExtensionRadius() { public void setExtensionRadius(double extensionRadius) { this.extensionRadius = extensionRadius; } - + public double getDirectWalkFactor() { return this.directWalkFactor; } diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorParametersForPerson.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorParametersForPerson.java index cbff35ed095..b280c40e527 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorParametersForPerson.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorParametersForPerson.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import org.matsim.api.core.v01.population.Person; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorRoute.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorRoute.java index 1c7d3e510f4..ab4c991d99c 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorRoute.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorRoute.java @@ -1,6 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2017. - */ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; @@ -25,7 +41,7 @@ public class RaptorRoute { private double departureTime = Double.NaN; private double travelTime = 0; private int ptLegCount = 0; - private List editableParts = new ArrayList<>(); + private final List editableParts = new ArrayList<>(); final List parts = Collections.unmodifiableList(this.editableParts); RaptorRoute(Facility fromFacility, Facility toFacility, double totalCosts) { diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorRouteSelector.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorRouteSelector.java index 1d5ee7d7543..1ef288c03cc 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorRouteSelector.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorRouteSelector.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import java.util.List; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorStaticConfig.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorStaticConfig.java index 162ac694962..e80561feea5 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorStaticConfig.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorStaticConfig.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import ch.sbb.matsim.config.SwissRailRaptorConfigGroup; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorStopFinder.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorStopFinder.java index 78e42955fd8..e2ea7ef7edc 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorStopFinder.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorStopFinder.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import org.matsim.api.core.v01.population.Person; @@ -14,7 +33,7 @@ @FunctionalInterface public interface RaptorStopFinder { - public enum Direction { ACCESS, EGRESS } + enum Direction { ACCESS, EGRESS } List findStops(Facility fromFacility, Facility toFacility, Person person, double departureTime, Attributes routingAttributes, RaptorParameters parameters, SwissRailRaptorData data, Direction type); diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorTransferCostCalculator.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorTransferCostCalculator.java index 402a1c83b5a..1a114db0a61 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorTransferCostCalculator.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorTransferCostCalculator.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import java.util.function.Supplier; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorUtils.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorUtils.java index 5dbe0c60bd5..f653faaf627 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorUtils.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/RaptorUtils.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import java.util.ArrayList; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptor.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptor.java index 4686b88bdb7..2808064eb1f 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptor.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptor.java @@ -1,6 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2017. - */ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorCore.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorCore.java index fd7d0e5d0d6..c0cfeb893bc 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorCore.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorCore.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import ch.sbb.matsim.config.SwissRailRaptorConfigGroup; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorData.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorData.java index 1fdb7882f15..5abe7fb49e0 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorData.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorData.java @@ -1,6 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2017. - */ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; @@ -329,9 +345,7 @@ private static boolean isUsefulTransfer(RRouteStop fromRouteStop, RRouteStop toR // e.g. when starting at a single stop, users would expect that the stop facility // in the opposite direction could be reached within a minute or so by walk. But the algorithm // would find this if the transfers are missing. - if (couldHaveTransferredOneStopEarlierInOppositeDirection(fromRouteStop, toRouteStop, maxBeelineWalkConnectionDistance)) { - return false; - } + return !couldHaveTransferredOneStopEarlierInOppositeDirection(fromRouteStop, toRouteStop, maxBeelineWalkConnectionDistance); } // if we failed all other checks, it looks like this transfer is useful return true; @@ -542,18 +556,18 @@ public static final class RTransfer { this.transferDistance = (int) Math.ceil(transferDistance); } } - + /* - * synchronized in order to avoid that multiple quad trees for the very same stop filter attribute/value combination are prepared at the same time + * synchronized in order to avoid that multiple quad trees for the very same stop filter attribute/value combination are prepared at the same time */ public synchronized void prepareStopFilterQuadTreeIfNotExistent(String stopFilterAttribute, String stopFilterValue) { // if stopFilterAttribute/stopFilterValue combination exists // we do not have to do anything - Map> filteredQTs = + Map> filteredQTs = this.stopFilterAttribute2Value2StopsQT.computeIfAbsent(stopFilterAttribute, key -> new HashMap<>()); if (filteredQTs.containsKey(stopFilterValue)) return; - + Set stops = routeStopsPerStopFacility.keySet(); QuadTree stopsQTFiltered = new QuadTree<>(stopsQT.getMinEasting(), stopsQT.getMinNorthing(), stopsQT.getMaxEasting(), stopsQT.getMaxNorthing()); for (TransitStopFacility stopFacility : stops) { @@ -571,7 +585,7 @@ public synchronized void prepareStopFilterQuadTreeIfNotExistent(String stopFilte public class CachingTransferProvider implements Supplier { private RTransfer raptorTransfer = null; - private Transfer transfer = new Transfer(); + private final Transfer transfer = new Transfer(); public CachingTransferProvider() { } diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorFactory.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorFactory.java index ba79d4ff291..51c740ebb98 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorFactory.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorFactory.java @@ -1,6 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2017. - */ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorModule.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorModule.java index 350caf37441..9389dc5469a 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorModule.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorModule.java @@ -1,6 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2017. - */ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; @@ -29,7 +45,7 @@ public void install() { for (String mode : getConfig().transit().getTransitModes()) { addRoutingModuleBinding(mode).toProvider(SwissRailRaptorRoutingModuleProvider.class); } - + SwissRailRaptorConfigGroup srrConfig = ConfigUtils.addOrGetModule(getConfig(), SwissRailRaptorConfigGroup.class); if (srrConfig.isUseRangeQuery()) { @@ -37,7 +53,7 @@ public void install() { } else { bind(RaptorRouteSelector.class).to(LeastCostRaptorRouteSelector.class); // just a simple default in case it ever gets used. } - + switch (srrConfig.getScoringParameters()) { case Default: bind(RaptorParametersForPerson.class).to(DefaultRaptorParametersForPerson.class); @@ -54,7 +70,7 @@ public void install() { if (useCapacityConstraints) { addEventHandlerBinding().to(OccupancyTracker.class); } - + bind(RaptorIntermodalAccessEgress.class).to(DefaultRaptorIntermodalAccessEgress.class); bind(RaptorInVehicleCostCalculator.class).to(DefaultRaptorInVehicleCostCalculator.class); bind(RaptorTransferCostCalculator.class).to(DefaultRaptorTransferCostCalculator.class); diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorRoutingModule.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorRoutingModule.java index e9cf7f4961c..94c346b120b 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorRoutingModule.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorRoutingModule.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import java.util.ArrayList; diff --git a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorRoutingModuleProvider.java b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorRoutingModuleProvider.java index 5a9b5b45be9..c6c23184169 100644 --- a/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorRoutingModuleProvider.java +++ b/matsim/src/main/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorRoutingModuleProvider.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import com.google.inject.name.Named; @@ -31,7 +46,8 @@ public class SwissRailRaptorRoutingModuleProvider implements Provider getCustomAttributes() { + @Override + public Map getCustomAttributes() { throw new RuntimeException("not implemented"); } - public Id getLinkId() { + @Override + public Id getLinkId() { return this.linkId; } } diff --git a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/Fixture.java b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/Fixture.java index b098fd5b318..97bdc02747a 100644 --- a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/Fixture.java +++ b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/Fixture.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import java.util.ArrayList; @@ -85,7 +100,7 @@ public Fixture() { this.config = ConfigUtils.createConfig(); this.config.transit().setUseTransit(true); - + ScenarioBuilder scBuilder = new ScenarioBuilder(config) ; this.scenario = (MutableScenario) scBuilder.build() ; @@ -104,23 +119,23 @@ protected void init() { } protected void buildNetwork() { - this.nodes[0] = this.network.getFactory().createNode(Id.create("0", Node.class), new Coord((double) 0, (double) 5000)); - this.nodes[1] = this.network.getFactory().createNode(Id.create("1", Node.class), new Coord((double) 4000, (double) 5000)); - this.nodes[2] = this.network.getFactory().createNode(Id.create("2", Node.class), new Coord((double) 8000, (double) 5000)); - this.nodes[3] = this.network.getFactory().createNode(Id.create("3", Node.class), new Coord((double) 12000, (double) 5000)); - this.nodes[4] = this.network.getFactory().createNode(Id.create("4", Node.class), new Coord((double) 16000, (double) 5000)); - this.nodes[5] = this.network.getFactory().createNode(Id.create("5", Node.class), new Coord((double) 20000, (double) 5000)); - this.nodes[6] = this.network.getFactory().createNode(Id.create("6", Node.class), new Coord((double) 24000, (double) 5000)); - this.nodes[7] = this.network.getFactory().createNode(Id.create("7", Node.class), new Coord((double) 28000, (double) 5000)); - this.nodes[8] = this.network.getFactory().createNode(Id.create("8", Node.class), new Coord((double) 32000, (double) 5000)); - this.nodes[9] = this.network.getFactory().createNode(Id.create("9", Node.class), new Coord((double) 36000, (double) 5000)); - this.nodes[10] = this.network.getFactory().createNode(Id.create("10", Node.class), new Coord((double) 40000, (double) 5000)); - this.nodes[11] = this.network.getFactory().createNode(Id.create("11", Node.class), new Coord((double) 12000, (double) 5000)); - this.nodes[12] = this.network.getFactory().createNode(Id.create("12", Node.class), new Coord((double) 16000, (double) 10000)); - this.nodes[13] = this.network.getFactory().createNode(Id.create("13", Node.class), new Coord((double) 24000, (double) 10000)); - this.nodes[14] = this.network.getFactory().createNode(Id.create("14", Node.class), new Coord((double) 28000, (double) 5000)); - this.nodes[15] = this.network.getFactory().createNode(Id.create("15", Node.class), new Coord((double) 24000, (double) 0)); - this.nodes[16] = this.network.getFactory().createNode(Id.create("16", Node.class), new Coord((double) 16000, (double) 0)); + this.nodes[0] = this.network.getFactory().createNode(Id.create("0", Node.class), new Coord(0, 5000)); + this.nodes[1] = this.network.getFactory().createNode(Id.create("1", Node.class), new Coord(4000, 5000)); + this.nodes[2] = this.network.getFactory().createNode(Id.create("2", Node.class), new Coord(8000, 5000)); + this.nodes[3] = this.network.getFactory().createNode(Id.create("3", Node.class), new Coord(12000, 5000)); + this.nodes[4] = this.network.getFactory().createNode(Id.create("4", Node.class), new Coord(16000, 5000)); + this.nodes[5] = this.network.getFactory().createNode(Id.create("5", Node.class), new Coord(20000, 5000)); + this.nodes[6] = this.network.getFactory().createNode(Id.create("6", Node.class), new Coord(24000, 5000)); + this.nodes[7] = this.network.getFactory().createNode(Id.create("7", Node.class), new Coord(28000, 5000)); + this.nodes[8] = this.network.getFactory().createNode(Id.create("8", Node.class), new Coord(32000, 5000)); + this.nodes[9] = this.network.getFactory().createNode(Id.create("9", Node.class), new Coord(36000, 5000)); + this.nodes[10] = this.network.getFactory().createNode(Id.create("10", Node.class), new Coord(40000, 5000)); + this.nodes[11] = this.network.getFactory().createNode(Id.create("11", Node.class), new Coord(12000, 5000)); + this.nodes[12] = this.network.getFactory().createNode(Id.create("12", Node.class), new Coord(16000, 10000)); + this.nodes[13] = this.network.getFactory().createNode(Id.create("13", Node.class), new Coord(24000, 10000)); + this.nodes[14] = this.network.getFactory().createNode(Id.create("14", Node.class), new Coord(28000, 5000)); + this.nodes[15] = this.network.getFactory().createNode(Id.create("15", Node.class), new Coord(24000, 0)); + this.nodes[16] = this.network.getFactory().createNode(Id.create("16", Node.class), new Coord(16000, 0)); for (int i = 0; i < 17; i++) { this.network.addNode(this.nodes[i]); } @@ -167,30 +182,30 @@ protected void buildNetwork() { } protected void buildStops() { - this.stopFacilities[ 0] = this.builder.createTransitStopFacility(Id.create( "0", TransitStopFacility.class), new Coord((double) 4000, (double) 5002), true); - this.stopFacilities[ 1] = this.builder.createTransitStopFacility(Id.create( "1", TransitStopFacility.class), new Coord((double) 4000, (double) 4998), true); - this.stopFacilities[ 2] = this.builder.createTransitStopFacility(Id.create( "2", TransitStopFacility.class), new Coord((double) 8000, (double) 5002), true); - this.stopFacilities[ 3] = this.builder.createTransitStopFacility(Id.create( "3", TransitStopFacility.class), new Coord((double) 8000, (double) 4998), true); - this.stopFacilities[ 4] = this.builder.createTransitStopFacility(Id.create( "4", TransitStopFacility.class), new Coord((double) 12000, (double) 5002), true); - this.stopFacilities[ 5] = this.builder.createTransitStopFacility(Id.create( "5", TransitStopFacility.class), new Coord((double) 12000, (double) 4998), true); - this.stopFacilities[ 6] = this.builder.createTransitStopFacility(Id.create( "6", TransitStopFacility.class), new Coord((double) 16000, (double) 5002), true); - this.stopFacilities[ 7] = this.builder.createTransitStopFacility(Id.create( "7", TransitStopFacility.class), new Coord((double) 16000, (double) 4998), true); - this.stopFacilities[ 8] = this.builder.createTransitStopFacility(Id.create( "8", TransitStopFacility.class), new Coord((double) 20000, (double) 5002), true); - this.stopFacilities[ 9] = this.builder.createTransitStopFacility(Id.create( "9", TransitStopFacility.class), new Coord((double) 20000, (double) 4998), true); - this.stopFacilities[10] = this.builder.createTransitStopFacility(Id.create("10", TransitStopFacility.class), new Coord((double) 24000, (double) 5002), true); - this.stopFacilities[11] = this.builder.createTransitStopFacility(Id.create("11", TransitStopFacility.class), new Coord((double) 24000, (double) 4998), true); - this.stopFacilities[12] = this.builder.createTransitStopFacility(Id.create("12", TransitStopFacility.class), new Coord((double) 28000, (double) 5002), true); - this.stopFacilities[13] = this.builder.createTransitStopFacility(Id.create("13", TransitStopFacility.class), new Coord((double) 28000, (double) 4998), true); - this.stopFacilities[14] = this.builder.createTransitStopFacility(Id.create("14", TransitStopFacility.class), new Coord((double) 32000, (double) 5002), true); - this.stopFacilities[15] = this.builder.createTransitStopFacility(Id.create("15", TransitStopFacility.class), new Coord((double) 32000, (double) 4998), true); - this.stopFacilities[16] = this.builder.createTransitStopFacility(Id.create("16", TransitStopFacility.class), new Coord((double) 36000, (double) 5002), true); - this.stopFacilities[17] = this.builder.createTransitStopFacility(Id.create("17", TransitStopFacility.class), new Coord((double) 36000, (double) 4998), true); - this.stopFacilities[18] = this.builder.createTransitStopFacility(Id.create("18", TransitStopFacility.class), new Coord((double) 12000, (double) 5000), true); - this.stopFacilities[19] = this.builder.createTransitStopFacility(Id.create("19", TransitStopFacility.class), new Coord((double) 16000, (double) 10000), true); - this.stopFacilities[20] = this.builder.createTransitStopFacility(Id.create("20", TransitStopFacility.class), new Coord((double) 24000, (double) 10000), true); - this.stopFacilities[21] = this.builder.createTransitStopFacility(Id.create("21", TransitStopFacility.class), new Coord((double) 28000, (double) 5000), true); - this.stopFacilities[22] = this.builder.createTransitStopFacility(Id.create("22", TransitStopFacility.class), new Coord((double) 24000, (double) 0), true); - this.stopFacilities[23] = this.builder.createTransitStopFacility(Id.create("23", TransitStopFacility.class), new Coord((double) 16000, (double) 0), true); + this.stopFacilities[ 0] = this.builder.createTransitStopFacility(Id.create( "0", TransitStopFacility.class), new Coord(4000, 5002), true); + this.stopFacilities[ 1] = this.builder.createTransitStopFacility(Id.create( "1", TransitStopFacility.class), new Coord(4000, 4998), true); + this.stopFacilities[ 2] = this.builder.createTransitStopFacility(Id.create( "2", TransitStopFacility.class), new Coord(8000, 5002), true); + this.stopFacilities[ 3] = this.builder.createTransitStopFacility(Id.create( "3", TransitStopFacility.class), new Coord(8000, 4998), true); + this.stopFacilities[ 4] = this.builder.createTransitStopFacility(Id.create( "4", TransitStopFacility.class), new Coord(12000, 5002), true); + this.stopFacilities[ 5] = this.builder.createTransitStopFacility(Id.create( "5", TransitStopFacility.class), new Coord(12000, 4998), true); + this.stopFacilities[ 6] = this.builder.createTransitStopFacility(Id.create( "6", TransitStopFacility.class), new Coord(16000, 5002), true); + this.stopFacilities[ 7] = this.builder.createTransitStopFacility(Id.create( "7", TransitStopFacility.class), new Coord(16000, 4998), true); + this.stopFacilities[ 8] = this.builder.createTransitStopFacility(Id.create( "8", TransitStopFacility.class), new Coord(20000, 5002), true); + this.stopFacilities[ 9] = this.builder.createTransitStopFacility(Id.create( "9", TransitStopFacility.class), new Coord(20000, 4998), true); + this.stopFacilities[10] = this.builder.createTransitStopFacility(Id.create("10", TransitStopFacility.class), new Coord(24000, 5002), true); + this.stopFacilities[11] = this.builder.createTransitStopFacility(Id.create("11", TransitStopFacility.class), new Coord(24000, 4998), true); + this.stopFacilities[12] = this.builder.createTransitStopFacility(Id.create("12", TransitStopFacility.class), new Coord(28000, 5002), true); + this.stopFacilities[13] = this.builder.createTransitStopFacility(Id.create("13", TransitStopFacility.class), new Coord(28000, 4998), true); + this.stopFacilities[14] = this.builder.createTransitStopFacility(Id.create("14", TransitStopFacility.class), new Coord(32000, 5002), true); + this.stopFacilities[15] = this.builder.createTransitStopFacility(Id.create("15", TransitStopFacility.class), new Coord(32000, 4998), true); + this.stopFacilities[16] = this.builder.createTransitStopFacility(Id.create("16", TransitStopFacility.class), new Coord(36000, 5002), true); + this.stopFacilities[17] = this.builder.createTransitStopFacility(Id.create("17", TransitStopFacility.class), new Coord(36000, 4998), true); + this.stopFacilities[18] = this.builder.createTransitStopFacility(Id.create("18", TransitStopFacility.class), new Coord(12000, 5000), true); + this.stopFacilities[19] = this.builder.createTransitStopFacility(Id.create("19", TransitStopFacility.class), new Coord(16000, 10000), true); + this.stopFacilities[20] = this.builder.createTransitStopFacility(Id.create("20", TransitStopFacility.class), new Coord(24000, 10000), true); + this.stopFacilities[21] = this.builder.createTransitStopFacility(Id.create("21", TransitStopFacility.class), new Coord(28000, 5000), true); + this.stopFacilities[22] = this.builder.createTransitStopFacility(Id.create("22", TransitStopFacility.class), new Coord(24000, 0), true); + this.stopFacilities[23] = this.builder.createTransitStopFacility(Id.create("23", TransitStopFacility.class), new Coord(16000, 0), true); this.stopFacilities[ 0].setName("A"); this.stopFacilities[ 1].setName("A"); this.stopFacilities[ 2].setName("B"); @@ -445,14 +460,14 @@ protected void buildGreenLine() { route.addDeparture(this.builder.createDeparture(Id.create("g>18", Departure.class), 7.0*3600 + 51.0*60)); } } - + protected void addVehicles() { VehiclesFactory vf = transitVehicles.getFactory(); VehicleType trainType = vf.createVehicleType(Id.create("train", VehicleType.class)); trainType.getCapacity().setSeats(200); trainType.getCapacity().setStandingRoom(100); transitVehicles.addVehicleType(trainType); - + for (TransitLine line: schedule.getTransitLines().values()) { for (TransitRoute route: line.getRoutes().values()) { for (Departure dep: route.getDepartures().values()) { diff --git a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/IntermodalFixture.java b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/IntermodalFixture.java index 74a25a2ecee..495868e6991 100644 --- a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/IntermodalFixture.java +++ b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/IntermodalFixture.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import ch.sbb.matsim.config.SwissRailRaptorConfigGroup; diff --git a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/OccupancyTrackerTest.java b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/OccupancyTrackerTest.java index 734c40cd43f..4e9b916dde4 100644 --- a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/OccupancyTrackerTest.java +++ b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/OccupancyTrackerTest.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import ch.sbb.matsim.routing.pt.raptor.OccupancyData.DepartureData; @@ -114,7 +133,7 @@ public void testGetNextDeparture() { @Test public void testGetDepartureData() { Fixture f = new Fixture(); - + EventsManager events = EventsUtils.createEventsManager(); OccupancyData occData = new OccupancyData(); OccupancyTracker tracker = new OccupancyTracker(occData, f.scenario, new DefaultRaptorInVehicleCostCalculator(), events, new SubpopulationScoringParameters(f.scenario)); diff --git a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/RaptorStopFinderTest.java b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/RaptorStopFinderTest.java index ff34ae992b9..28914b2fee4 100644 --- a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/RaptorStopFinderTest.java +++ b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/RaptorStopFinderTest.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import ch.sbb.matsim.config.SwissRailRaptorConfigGroup; @@ -43,8 +62,8 @@ public class RaptorStopFinderTest { - private Facility fromFac = new FakeFacility(new Coord(0, 0), Id.create("AA", Link.class)); // stop A - private Facility toFac = new FakeFacility(new Coord(100000, 0), Id.create("XX", Link.class)); // stop X + private final Facility fromFac = new FakeFacility(new Coord(0, 0), Id.create("AA", Link.class)); // stop A + private final Facility toFac = new FakeFacility(new Coord(100000, 0), Id.create("XX", Link.class)); // stop X /** Empty Initial Search Radius @@ -56,10 +75,10 @@ public class RaptorStopFinderTest { * * This functionality is tested for the two RaptorStopFinders: 1) DefaultStopFinder and 2) RandomAccessEgressModeRaptorStopFinder * For each RaptorStopFinder there is one test where StopFilterAttributes are not used to exlclude stops, and one test - * where StopFilterAttributes are used. + * where StopFilterAttributes are used. */ - - + + @Test public void testDefaultStopFinder_EmptyInitialSearchRadius() { /* General Radius includes no stops. Search_Extension_Radius is 0 @@ -88,9 +107,9 @@ public void testDefaultStopFinder_EmptyInitialSearchRadius() { List legs = raptor.calcRoute(DefaultRoutingRequest.withoutAttributes(this.fromFac, this.toFac, 7 * 3600, f0.dummyPerson)); Assert.assertNull("The router should not find a route and return null, but did return something else.", legs); - + } - + /* General Radius includes stop B. Search_Extension_Radius is 0. Expected: Stop Finder will only find stop B. Lines C, D, and E are set to very fast, so as to check that only stop B is included. @@ -215,9 +234,9 @@ public void testDefaultStopFinder_EmptyInitialSearchRadius_StopFilterAttributes( SwissRailRaptor raptor = new SwissRailRaptor.Builder(data, f0.scenario.getConfig()).with(stopFinder).build(); List legs = raptor.calcRoute(DefaultRoutingRequest.withoutAttributes(this.fromFac, this.toFac, 7 * 3600, f0.dummyPerson)); - + Assert.assertNull("The router should not find a route and return null, but did return something else.", legs); - + } /* General Radius includes stop B. Search_Extension_Radius is 0. @@ -405,9 +424,9 @@ public void testRandomAccessEgressModeRaptorStopFinder_EmptyInitialSearchRadius( List legs = raptor.calcRoute(DefaultRoutingRequest.withoutAttributes(this.fromFac, this.toFac, 7 * 3600, f0.dummyPerson)); Assert.assertNull("The router should not find a route and return null, but did return something else.", legs); - + } - + /* General Radius includes stop B. Search_Extension_Radius is 0. Expected: Stop Finder will only find stop B. Lines C, D, and E are set to very fast, so as to check that only stop B is included. @@ -535,7 +554,7 @@ public void testRandomAccessEgressModeRaptorStopFinder_EmptyInitialSearchRadius_ List legs = raptor.calcRoute(DefaultRoutingRequest.withoutAttributes(this.fromFac, this.toFac, 7 * 3600, f0.dummyPerson)); Assert.assertNull("The router should not find a route and return null, but did return something else.", legs); - + } /* General Radius includes stop B. Search_Extension_Radius is 0. @@ -709,7 +728,7 @@ Initial_Search_Radius includes B (not "walkAccessible") * * This functionality is tested for the two RaptorStopFinders: 1) DefaultStopFinder and 2) RandomAccessEgressModeRaptorStopFinder * For each RaptorStopFinder there is one test where StopFilterAttributes are not used to exlclude stops, and one test - * where StopFilterAttributes are used. + * where StopFilterAttributes are used. */ @Test public void testDefaultStopFinder_HalfFullInitialSearchRadius() { @@ -1213,7 +1232,7 @@ public void testRandomAccessEgressModeRaptorStopFinder_HalfFullInitialSearchRadi * * This functionality is tested for the two RaptorStopFinders: 1) DefaultStopFinder and 2) RandomAccessEgressModeRaptorStopFinder * For each RaptorStopFinder there is one test where StopFilterAttributes are not used to exlclude stops, and one test - * where StopFilterAttributes are used. + * where StopFilterAttributes are used. */ @Test public void testDefaultStopFinder_FullInitialSearchRadius() { diff --git a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/RaptorUtilsTest.java b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/RaptorUtilsTest.java index 89fb2dd8a4c..2a6ee7b9abc 100644 --- a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/RaptorUtilsTest.java +++ b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/RaptorUtilsTest.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import ch.sbb.matsim.config.SwissRailRaptorConfigGroup; @@ -68,4 +83,4 @@ public void testConfigLoading() { Assert.assertTrue(raptorParams2.getConfig().isUseIntermodalAccessEgress()); Assert.assertFalse(raptorParams2.getConfig().isUseModeMappingForPassengers()); } -} \ No newline at end of file +} diff --git a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorCapacitiesTest.java b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorCapacitiesTest.java index 2a836468cb4..a986cb26763 100644 --- a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorCapacitiesTest.java +++ b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorCapacitiesTest.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import ch.sbb.matsim.config.SwissRailRaptorConfigGroup; diff --git a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorDataTest.java b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorDataTest.java index d00dae0f9f5..5a0a4711a2f 100644 --- a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorDataTest.java +++ b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorDataTest.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import org.junit.Assert; @@ -82,4 +97,4 @@ public void testTransfersFromSchedule() { Assert.assertEquals("number of transfers should have stayed the same.", data2.transfers.length, data4.transfers.length); } -} \ No newline at end of file +} diff --git a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorInVehicleCostTest.java b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorInVehicleCostTest.java index 3ee20ba0de2..76b098fa73f 100644 --- a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorInVehicleCostTest.java +++ b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorInVehicleCostTest.java @@ -1,3 +1,22 @@ +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import org.junit.Assert; diff --git a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorIntermodalTest.java b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorIntermodalTest.java index 15fcc06606c..9074f3dd51e 100644 --- a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorIntermodalTest.java +++ b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorIntermodalTest.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import ch.sbb.matsim.config.SwissRailRaptorConfigGroup; diff --git a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorModuleTest.java b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorModuleTest.java index c2a85b66d35..f276b6e2f57 100644 --- a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorModuleTest.java +++ b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorModuleTest.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import java.util.ArrayList; @@ -231,7 +246,7 @@ public void install() { // :-( :-( kai, mar'20) } - + /** * Test update of SwissRailRaptorData after TransitScheduleChangedEvent */ @@ -252,7 +267,7 @@ public void testTransitScheduleUpdate() { plan.addActivity(homeAct); plan.addLeg(pf.createLeg(TransportMode.pt)); plan.addActivity(pf.createActivityFromCoord("work", new Coord(24010, 10000))); - + // prepare scoring Config config = f.config; PlanCalcScoreConfigGroup.ActivityParams homeScoring = new PlanCalcScoreConfigGroup.ActivityParams("home"); @@ -288,12 +303,12 @@ public void install() { }); controler.run(); - + // test that swiss rail raptor was used TripRouter tripRouter = controler.getInjector().getInstance(TripRouter.class); RoutingModule module = tripRouter.getRoutingModule(TransportMode.pt); Assert.assertTrue(module instanceof SwissRailRaptorRoutingModule); - + // Check routed plan List planElements = p1.getSelectedPlan().getPlanElements(); for (PlanElement pe : planElements) { @@ -317,13 +332,13 @@ public void install() { Assert.assertEquals(TransportMode.walk, ((Leg) planElements.get(1)).getMode()); Assert.assertEquals(TransportMode.pt, ((Leg) planElements.get(3)).getMode()); Assert.assertEquals(TransportMode.walk, ((Leg) planElements.get(5)).getMode()); - + // Check route: should return one of the added lines although the removed green line would be faster Leg ptLeg = (Leg) planElements.get(3); TransitPassengerRoute ptRoute = (TransitPassengerRoute) ptLeg.getRoute(); - Assert.assertEquals(Id.create("AddedLine" + 1, TransitLine.class), ptRoute.getLineId()); + Assert.assertEquals(Id.create("AddedLine" + 1, TransitLine.class), ptRoute.getLineId()); } - + /** * Test individual scoring parameters for agents */ @@ -431,5 +446,5 @@ private void removeGreenLineAndStop(ControlerEvent event) { } } - + } diff --git a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorTest.java b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorTest.java index 6c728fe3d47..5acdfb6d520 100644 --- a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorTest.java +++ b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorTest.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import ch.sbb.matsim.config.SwissRailRaptorConfigGroup; diff --git a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorTreeTest.java b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorTreeTest.java index f1932f29f52..05ad518af21 100644 --- a/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorTreeTest.java +++ b/matsim/src/test/java/ch/sbb/matsim/routing/pt/raptor/SwissRailRaptorTreeTest.java @@ -1,7 +1,22 @@ -/* - * Copyright (C) Schweizerische Bundesbahnen SBB, 2018. - */ - +/* *********************************************************************** * + * project: org.matsim.* * + * + * * + * *********************************************************************** * + * * + * copyright : (C) 2023 by the members listed in the COPYING, * + * LICENSE and WARRANTY file. * + * email : info at matsim dot org * + * * + * *********************************************************************** * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * See also COPYING, LICENSE and WARRANTY file * + * * + * *********************************************************************** */ package ch.sbb.matsim.routing.pt.raptor; import ch.sbb.matsim.routing.pt.raptor.SwissRailRaptorCore.TravelInfo;