Commit 754f660f authored by Sebastian Hörl's avatar Sebastian Hörl
Browse files

assign vehicle type for shared AVs

parent a80468d1
......@@ -3,6 +3,7 @@ package ch.ethz.matsim.projects.astra_2018_002.shared_av;
import java.net.URL;
import java.util.List;
import org.matsim.api.core.v01.Scenario;
import org.matsim.api.core.v01.TransportMode;
import org.matsim.api.core.v01.network.Network;
import org.matsim.api.core.v01.population.PopulationFactory;
......@@ -13,6 +14,7 @@ import org.matsim.core.router.RoutingModule;
import org.matsim.core.router.costcalculators.OnlyTimeDependentTravelDisutility;
import org.matsim.core.router.util.LeastCostPathCalculator;
import org.matsim.core.router.util.TravelTime;
import org.matsim.vehicles.VehicleType;
import com.google.inject.Key;
import com.google.inject.Provides;
......@@ -27,6 +29,7 @@ import ch.ethz.matsim.av.framework.AVModule;
import ch.ethz.matsim.av.framework.AVUtils;
import ch.ethz.matsim.av.routing.AVRouteFactory;
import ch.ethz.matsim.discrete_mode_choice.modules.AbstractDiscreteModeChoiceExtension;
import ch.ethz.matsim.projects.astra_2018_002.flow_efficiency.FlowEfficiencyConfigurator;
import ch.ethz.matsim.projects.astra_2018_002.shared_av.analysis.WaitingTimeListener;
import ch.ethz.matsim.projects.astra_2018_002.shared_av.routing.ASTRAAVRoutingModule;
import ch.ethz.matsim.projects.astra_2018_002.shared_av.service_area.ServiceArea;
......@@ -180,4 +183,11 @@ public class SharedAVModule extends AbstractDiscreteModeChoiceExtension {
OutputDirectoryHierarchy outputHierarchy) {
return new WaitingTimeListener(taxiWaitingTime, poolWaitingTime, waitingTimeZones, outputHierarchy);
}
@Provides
@Singleton
@Named(AVModule.AV_MODE)
public VehicleType provideVehicleType(Scenario scenario) {
return scenario.getVehicles().getVehicleTypes().get(FlowEfficiencyConfigurator.SHARED_AV_VEHICLE_TYPE_ID);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment