MATSIM
TravelTimeData.java
Go to the documentation of this file.
1 /* *********************************************************************** *
2  * project: org.matsim.*
3  * TravelTimeRole.java
4  * *
5  * *********************************************************************** *
6  * *
7  * copyright : (C) 2007 by the members listed in the COPYING, *
8  * LICENSE and WARRANTY file. *
9  * email : info at matsim dot org *
10  * *
11  * *********************************************************************** *
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * See also COPYING, LICENSE and WARRANTY file *
18  * *
19  * *********************************************************************** */
20 
21 package org.matsim.core.trafficmonitoring;
22 
23 abstract class TravelTimeData {
24  // yyyy My (relative strong) intuition would be that the methods of this should accept time in seconds, and do the conversion to bins internally. Otherwise, we bind the
25  // information of TravelTimeData to uniform time slices forever. kai, feb'19
26 
27  private boolean needsConsolidation = true ;
28 
29  public abstract void resetTravelTimes();
30 
34 // public abstract void resetTravelTime( final int timeSlot ) ;
35 
36  abstract void addTravelTime(final int timeSlot, final double traveltime);
37 
41  abstract void setTravelTime( final int timeSlot, final double traveltime ) ;
42 
60  abstract double getTravelTime(final int timeSlot, final double now);
61 
62  void setNeedsConsolidation( boolean flag ) {
63  this.needsConsolidation = flag ;
64  }
65  boolean isNeedingConsolidation() {
66  return needsConsolidation ;
67  }
68 
69 }