MATSIM
ScoringFunctionAdapter.java
Go to the documentation of this file.
1 
2 /* *********************************************************************** *
3  * project: org.matsim.*
4  * ScoringFunctionAdapter.java
5  * *
6  * *********************************************************************** *
7  * *
8  * copyright : (C) 2019 by the members listed in the COPYING, *
9  * LICENSE and WARRANTY file. *
10  * email : info at matsim dot org *
11  * *
12  * *********************************************************************** *
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * See also COPYING, LICENSE and WARRANTY file *
19  * *
20  * *********************************************************************** */
21 
22 package org.matsim.deprecated.scoring;
23 
27 
37 @Deprecated
38 public abstract class ScoringFunctionAdapter implements ScoringFunction {
39 
40  public final void handleActivity(Activity activity) {
41  if (activity.getStartTime().isDefined()) {
42  startActivity(activity.getStartTime().seconds(), activity);
43  }
44  if (activity.getEndTime().isDefined()) {
45  endActivity(activity.getEndTime().seconds(), activity);
46  }
47  }
48 
49  public final void handleLeg(Leg leg) {
50  startLeg(leg.getDepartureTime().seconds(), leg);
52  }
53 
61  public abstract void startActivity(final double time, final Activity act);
62 
72  public abstract void endActivity(final double time, Activity activity);
73 
81  public abstract void startLeg(final double time, final Leg leg);
82 
88  public abstract void endLeg(final double time);
89 
90 }
abstract void endActivity(final double time, Activity activity)
abstract void startActivity(final double time, final Activity act)
abstract void startLeg(final double time, final Leg leg)