diff --git a/contribs/drt/src/main/java/org/matsim/contrib/drt/sharingmetrics/SharingMetricsTracker.java b/contribs/drt/src/main/java/org/matsim/contrib/drt/sharingmetrics/SharingMetricsTracker.java index 47e8c415059..48a9524a0df 100644 --- a/contribs/drt/src/main/java/org/matsim/contrib/drt/sharingmetrics/SharingMetricsTracker.java +++ b/contribs/drt/src/main/java/org/matsim/contrib/drt/sharingmetrics/SharingMetricsTracker.java @@ -21,7 +21,7 @@ /** * @author nkuehnel / MOIA */ -public class SharingMetricsTracker implements DrtRequestSubmittedEventHandler, PassengerPickedUpEventHandler, PassengerDroppedOffEventHandler, MobsimBeforeCleanupListener { +public class SharingMetricsTracker implements DrtRequestSubmittedEventHandler, PassengerPickedUpEventHandler, PassengerDroppedOffEventHandler { private final static Logger logger = LogManager.getLogger(SharingMetricsTracker.class); @@ -122,7 +122,7 @@ public void handleEvent(PassengerPickedUpEvent event) { } @Override - public void notifyMobsimBeforeCleanup(MobsimBeforeCleanupEvent e) { + public void reset(int iteration) { occupancyByVehicle.clear(); segments.clear(); poolingRate.clear(); diff --git a/contribs/drt/src/test/java/org/matsim/contrib/drt/sharingmetrics/SharingFactorTest.java b/contribs/drt/src/test/java/org/matsim/contrib/drt/sharingmetrics/SharingFactorTest.java index 7a7acba2809..9601d9fa418 100644 --- a/contribs/drt/src/test/java/org/matsim/contrib/drt/sharingmetrics/SharingFactorTest.java +++ b/contribs/drt/src/test/java/org/matsim/contrib/drt/sharingmetrics/SharingFactorTest.java @@ -53,7 +53,7 @@ public void testDrtSharingFactorHandler() { } //clean up - sharingFactorTracker.notifyMobsimBeforeCleanup(null); + sharingFactorTracker.reset(0); { //two trips exactly after each other, no pooling @@ -82,7 +82,7 @@ public void testDrtSharingFactorHandler() { } //clean up - sharingFactorTracker.notifyMobsimBeforeCleanup(null); + sharingFactorTracker.reset(0); { //two trips overlap half of the time @@ -112,7 +112,7 @@ public void testDrtSharingFactorHandler() { //clean up - sharingFactorTracker.notifyMobsimBeforeCleanup(null); + sharingFactorTracker.reset(0); { // second trip (sharing factor = 2) happens completely within first trip (sharing factor = 1.2) @@ -142,7 +142,7 @@ public void testDrtSharingFactorHandler() { } //clean up - sharingFactorTracker.notifyMobsimBeforeCleanup(null); + sharingFactorTracker.reset(0); { // two persons share exact same trip but not part of a group @@ -174,7 +174,7 @@ public void testDrtSharingFactorHandler() { //clean up - sharingFactorTracker.notifyMobsimBeforeCleanup(null); + sharingFactorTracker.reset(0); { // two persons part of a group -> not pooled