MATSIM
MyRoutingModule.java
Go to the documentation of this file.
1 /* *********************************************************************** *
2  * project: org.matsim.*
3  * *
4  * *********************************************************************** *
5  * *
6  * copyright : (C) 2013 by the members listed in the COPYING, *
7  * LICENSE and WARRANTY file. *
8  * email : info at matsim dot org *
9  * *
10  * *********************************************************************** *
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * See also COPYING, LICENSE and WARRANTY file *
17  * *
18  * *********************************************************************** */
19 
23 package tutorial.programming.example12PluggableTripRouter;
24 
25 import java.util.Collections;
26 import java.util.List;
27 
28 import javax.inject.Inject;
29 
35 import org.matsim.facilities.Facility;
36 
41 public class MyRoutingModule implements RoutingModule {
42 
43  private Object iterationData;
44 
45  @Inject
47  this.iterationData = observer.getIterationData();
48  }
49 
50  @Override
51  public List<? extends PlanElement> calcRoute(Facility fromFacility,
52  Facility toFacility, double departureTime, Person person) {
53  // calculate a route based on iterationData
54  System.out.println(iterationData);
55  return Collections.emptyList();
56  }
57 
58  @Override
61  }
62 
63 
64 }
List<?extends PlanElement > calcRoute(Facility fromFacility, Facility toFacility, double departureTime, Person person)