001/* 002 * *********************************************************************** * 003 * * project: org.matsim.* 004 * * MultiModalModule.java 005 * * * 006 * * *********************************************************************** * 007 * * * 008 * * copyright : (C) 2015 by the members listed in the COPYING, * 009 * * LICENSE and WARRANTY file. * 010 * * email : info at matsim dot org * 011 * * * 012 * * *********************************************************************** * 013 * * * 014 * * This program is free software; you can redistribute it and/or modify * 015 * * it under the terms of the GNU General Public License as published by * 016 * * the Free Software Foundation; either version 2 of the License, or * 017 * * (at your option) any later version. * 018 * * See also COPYING, LICENSE and WARRANTY file * 019 * * * 020 * * *********************************************************************** 021 */ 022 023package org.matsim.contrib.multimodal; 024 025import org.matsim.api.core.v01.Id; 026import org.matsim.api.core.v01.network.Link; 027import org.matsim.core.controler.AbstractModule; 028import org.matsim.core.controler.ControlerDefaultsModule; 029import org.matsim.core.router.util.TravelTime; 030 031import javax.inject.Provider; 032import java.util.Arrays; 033import java.util.Map; 034 035public class ControlerDefaultsWithMultiModalModule2 extends AbstractModule { 036 037 private MultiModalModule delegate = new MultiModalModule(); 038 039 @Override 040 public void install() { 041 install(AbstractModule.override(Arrays.<AbstractModule>asList(new ControlerDefaultsModule()), delegate)); 042 } 043 044 public void setLinkSlopes(Map<Id<Link>, Double> linkSlopes) { 045 this.delegate.setLinkSlopes(linkSlopes); 046 } 047 048 public void addAdditionalTravelTimeFactory(String mode, Provider<TravelTime> travelTimeFactory) { 049 this.delegate.addAdditionalTravelTimeFactory(mode, travelTimeFactory); 050 } 051 052 053}