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() );