From 7ef9ef8a2a5f7091916a6d1e0031b833f2a9551f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 22:37:42 +0000 Subject: [PATCH 1/2] Bump the java-dependencies group with 20 updates --- updated-dependencies: - dependency-name: org.matsim:matsim-all dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim:matsim dependency-type: direct:development dependency-group: java-dependencies - dependency-name: org.matsim:matsim-examples dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:minibus dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:otfvis dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:roadpricing dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:taxi dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:av dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:freight dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:vsp dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:dvrp dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:drt dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:drt-extensions dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:bicycle dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:osm dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:emissions dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:discrete_mode_choice dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:locationchoice dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:application dependency-type: direct:production dependency-group: java-dependencies - dependency-name: org.matsim.contrib:decongestion dependency-type: direct:production dependency-group: java-dependencies ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3b5fc417..b7563c0a 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ Therefore we need to use a fixed value here and then refer to the matsim version with ${project.parent.version} --> - 16.0-2024w12 + 16.0-2024w13 From 73a0a9d73c094ab9f58f9b15655387a6bae5f19b Mon Sep 17 00:00:00 2001 From: Kai Martins-Turner Date: Tue, 26 Mar 2024 11:06:48 +0100 Subject: [PATCH 2/2] Adapt to changes in matsim-libs#3165: "EventsFileComparator.Result" has been moved and renamed to "ComparisonResult" --- .../codeexamples/extensions/freight/RunFreightExample.java | 4 ++-- .../extensions/freight/RunFreightExampleTest.java | 5 +++-- .../freight/RunFreightWithIterationsExampleTest.java | 5 +++-- .../RunSimpleAdaptiveSignalExampleTest.java | 5 +++-- .../scoring/aaAddToScoring/RunAddToScoringExampleTest.java | 3 ++- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/matsim/codeexamples/extensions/freight/RunFreightExample.java b/src/main/java/org/matsim/codeexamples/extensions/freight/RunFreightExample.java index acc8bd91..c0bd15d5 100644 --- a/src/main/java/org/matsim/codeexamples/extensions/freight/RunFreightExample.java +++ b/src/main/java/org/matsim/codeexamples/extensions/freight/RunFreightExample.java @@ -49,11 +49,11 @@ public static void run( String[] args, boolean runWithOTFVis ) throws ExecutionE if ( args==null || args.length==0 || args[0]==null ){ config = ConfigUtils.loadConfig( IOUtils.extendUrl( ExamplesUtils.getTestScenarioURL( "freight-chessboard-9x9" ), "config.xml" ) ); config.plans().setInputFile( null ); // remove passenger input - config.controller().setOutputDirectory( "./output/freight" ); + config.controller().setOutputDirectory( "./output/freight_services" ); config.controller().setLastIteration( 0 ); // no iterations; for iterations see RunFreightWithIterationsExample. kai, jan'23 FreightCarriersConfigGroup freightConfigGroup = ConfigUtils.addOrGetModule( config, FreightCarriersConfigGroup.class ); - freightConfigGroup.setCarriersFile("singleCarrierFiveActivitiesWithoutRoutes_Shipments.xml"); + freightConfigGroup.setCarriersFile("singleCarrierFiveActivitiesWithoutRoutes.xml"); freightConfigGroup.setCarriersVehicleTypesFile( "vehicleTypes.xml" ); } else { config = ConfigUtils.loadConfig( args, new FreightCarriersConfigGroup() ); diff --git a/src/test/java/org/matsim/codeexamples/extensions/freight/RunFreightExampleTest.java b/src/test/java/org/matsim/codeexamples/extensions/freight/RunFreightExampleTest.java index 5a160f82..93729a98 100644 --- a/src/test/java/org/matsim/codeexamples/extensions/freight/RunFreightExampleTest.java +++ b/src/test/java/org/matsim/codeexamples/extensions/freight/RunFreightExampleTest.java @@ -12,6 +12,7 @@ import org.matsim.core.utils.io.IOUtils; import org.matsim.examples.ExamplesUtils; import org.matsim.testcases.MatsimTestUtils; +import org.matsim.utils.eventsfilecomparison.ComparisonResult; import org.matsim.utils.eventsfilecomparison.EventsFileComparator; public class RunFreightExampleTest{ @@ -42,8 +43,8 @@ void testMain(){ { String expected = utils.getInputDirectory() + "/output_events.xml.gz"; String actual = utils.getOutputDirectory() + "/output_events.xml.gz"; - EventsFileComparator.Result result = EventsUtils.compareEventsFiles( expected, actual ); - Assertions.assertEquals( EventsFileComparator.Result.FILES_ARE_EQUAL, result ); + ComparisonResult result = EventsUtils.compareEventsFiles( expected, actual ); + Assertions.assertEquals( ComparisonResult.FILES_ARE_EQUAL, result ); } } catch( Exception ee ){ diff --git a/src/test/java/org/matsim/codeexamples/extensions/freight/RunFreightWithIterationsExampleTest.java b/src/test/java/org/matsim/codeexamples/extensions/freight/RunFreightWithIterationsExampleTest.java index 1ed44451..9a3e5f15 100644 --- a/src/test/java/org/matsim/codeexamples/extensions/freight/RunFreightWithIterationsExampleTest.java +++ b/src/test/java/org/matsim/codeexamples/extensions/freight/RunFreightWithIterationsExampleTest.java @@ -12,6 +12,7 @@ import org.matsim.core.utils.io.IOUtils; import org.matsim.examples.ExamplesUtils; import org.matsim.testcases.MatsimTestUtils; +import org.matsim.utils.eventsfilecomparison.ComparisonResult; import org.matsim.utils.eventsfilecomparison.EventsFileComparator; import java.net.URL; @@ -44,8 +45,8 @@ void testMain(){ { String expected = utils.getInputDirectory() + "/output_events.xml.gz"; String actual = utils.getOutputDirectory() + "/output_events.xml.gz"; - EventsFileComparator.Result result = EventsUtils.compareEventsFiles( expected, actual ); - Assertions.assertEquals( EventsFileComparator.Result.FILES_ARE_EQUAL, result ); + ComparisonResult result = EventsUtils.compareEventsFiles( expected, actual ); + Assertions.assertEquals( ComparisonResult.FILES_ARE_EQUAL, result ); } } catch( Exception ee ){ diff --git a/src/test/java/org/matsim/codeexamples/programming/simpleadaptivesignalengine/RunSimpleAdaptiveSignalExampleTest.java b/src/test/java/org/matsim/codeexamples/programming/simpleadaptivesignalengine/RunSimpleAdaptiveSignalExampleTest.java index 03b73367..09664e14 100644 --- a/src/test/java/org/matsim/codeexamples/programming/simpleadaptivesignalengine/RunSimpleAdaptiveSignalExampleTest.java +++ b/src/test/java/org/matsim/codeexamples/programming/simpleadaptivesignalengine/RunSimpleAdaptiveSignalExampleTest.java @@ -26,6 +26,7 @@ import org.matsim.codeexamples.mobsim.simpleAdaptiveSignalEngine.RunSimpleAdaptiveSignalExample; import org.matsim.testcases.MatsimTestUtils; +import org.matsim.utils.eventsfilecomparison.ComparisonResult; import org.matsim.utils.eventsfilecomparison.EventsFileComparator; /** @@ -44,8 +45,8 @@ void testRunSimpleAdaptiveSignalExample(){ // compare event files final String expected = testUtils.getClassInputDirectory() + "output_events.xml.gz"; final String actual = testUtils.getOutputDirectory() + "output_events.xml.gz"; - - EventsFileComparator.Result result = EventsFileComparator.compare(expected, actual); + + ComparisonResult result = EventsFileComparator.compare(expected, actual); System.out.println("result of events file comparison=" + result.name() ) ; // Assert.assertEquals("different event files", diff --git a/src/test/java/org/matsim/codeexamples/scoring/aaAddToScoring/RunAddToScoringExampleTest.java b/src/test/java/org/matsim/codeexamples/scoring/aaAddToScoring/RunAddToScoringExampleTest.java index c33f5009..251a5f98 100644 --- a/src/test/java/org/matsim/codeexamples/scoring/aaAddToScoring/RunAddToScoringExampleTest.java +++ b/src/test/java/org/matsim/codeexamples/scoring/aaAddToScoring/RunAddToScoringExampleTest.java @@ -14,6 +14,7 @@ import org.matsim.core.utils.io.IOUtils; import org.matsim.examples.ExamplesUtils; import org.matsim.testcases.MatsimTestUtils; +import org.matsim.utils.eventsfilecomparison.ComparisonResult; import org.matsim.utils.eventsfilecomparison.EventsFileComparator; import static org.junit.jupiter.api.Assertions.fail; @@ -34,7 +35,7 @@ void testMain(){ String expected = utils.getInputDirectory() + "/output_events.xml.gz" ; String actual = utils.getOutputDirectory() + "/output_events.xml.gz" ; var result = EventsUtils.compareEventsFiles( expected, actual ); - Assertions.assertEquals( EventsFileComparator.Result.FILES_ARE_EQUAL, result); + Assertions.assertEquals( ComparisonResult.FILES_ARE_EQUAL, result); } { final Population expected = PopulationUtils.createPopulation( ConfigUtils.createConfig() );