Skip to content

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
paulheinr committed Jan 22, 2025
1 parent 3d3e30f commit 5512930
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,9 @@ void testChainedPtFareHandler() {
distanceBased2.setTransactionPartner(DISTANCE_BASED_TRANSACTION_PARTNER);
distanceBased2.setMinFare(7.0);

PtFareParams fareZoneBased1;
ptFareConfigGroup.addPtFareParameterSet(fareZoneBased1);

ptFareConfigGroup.addPtFareParameterSet(fareZoneBased);
ptFareConfigGroup.addParameterSet(distanceBased);
ptFareConfigGroup.addParameterSet(distanceBased2);
ptFareConfigGroup.addPtFareParameterSet(distanceBased);
ptFareConfigGroup.addPtFareParameterSet(distanceBased2);

ptFareConfigGroup.setUpperBoundFactor(2.0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ void testSamePriority_throws() {
PtFareConfigGroup ptFareConfigGroup = ConfigUtils.addOrGetModule(config, PtFareConfigGroup.class);
FareZoneBasedPtFareParams fareZoneBased = new FareZoneBasedPtFareParams();
fareZoneBased.setOrder(5);
ptFareConfigGroup.addParameterSet(fareZoneBased);
ptFareConfigGroup.addPtFareParameterSet(fareZoneBased);

DistanceBasedPtFareParams distanceBased = new DistanceBasedPtFareParams();
distanceBased.setOrder(5);
ptFareConfigGroup.addParameterSet(distanceBased);
ptFareConfigGroup.addPtFareParameterSet(distanceBased);

Assertions.assertThrows(IllegalArgumentException.class, () -> ptFareConfigGroup.checkConsistency(config));
}
Expand All @@ -34,11 +34,11 @@ void test_ok() {
PtFareConfigGroup ptFareConfigGroup = ConfigUtils.addOrGetModule(config, PtFareConfigGroup.class);
FareZoneBasedPtFareParams fareZoneBased = new FareZoneBasedPtFareParams();
fareZoneBased.setOrder(5);
ptFareConfigGroup.addParameterSet(fareZoneBased);
ptFareConfigGroup.addPtFareParameterSet(fareZoneBased);

DistanceBasedPtFareParams distanceBased = new DistanceBasedPtFareParams();
distanceBased.setOrder(10);
ptFareConfigGroup.addParameterSet(distanceBased);
ptFareConfigGroup.addPtFareParameterSet(distanceBased);

ptFareConfigGroup.checkConsistency(config);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void setUp() throws Exception {
distanceClassLongFareParams.setFareIntercept(1.0);
distanceClassLongFareParams.setFareSlope(0.01);

fare.addParameterSet(distanceFare);
fare.addPtFareParameterSet(distanceFare);

controler = MATSimApplication.prepare(TestScenario.class, config);
injector = controler.getInjector();
Expand Down

0 comments on commit 5512930

Please sign in to comment.