Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
fix compile errors after updating MATSim
Browse files Browse the repository at this point in the history
  • Loading branch information
kt86 committed Aug 7, 2024
1 parent 5cdcf94 commit 39c406e
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

import org.matsim.api.core.v01.Scenario;
import org.matsim.api.core.v01.network.Network;
import org.matsim.contrib.roadpricing.RoadPricingScheme;
import org.matsim.freight.carriers.Carrier;
import org.matsim.freight.carriers.CarrierPlan;
import org.matsim.freight.carriers.CarriersUtils;
import org.matsim.freight.carriers.jsprit.MatsimJspritFactory;
import org.matsim.freight.carriers.jsprit.NetworkBasedTransportCosts;
import org.matsim.freight.carriers.jsprit.NetworkRouter;
import org.matsim.freight.carriers.jsprit.VehicleTypeDependentRoadPricingCalculator;

/**
* This class contains some code fragments, that are used in the different *CarrierScheduler
Expand Down Expand Up @@ -70,17 +70,18 @@ public static Carrier solveVrpWithJsprit(Carrier carrier, Network network) {
/**
* First try with tolls.
* Rest is the same as {@link #solveVrpWithJsprit(Carrier, Network)}.
* @param carrier Carrier for which the problem should be solved
* @param network the underlying network to create the network based transport costs
* @param roadPricingCalculator the road pricing calculator to calculate the tolls
* //TODO: Combine this method with the untolled version {@link #solveVrpWithJsprit(Carrier, Network)}.
* @param carrier Carrier for which the problem should be solved
* @param network the underlying network to create the network based transport costs
* @param roadPricingScheme (MATSim's) road pricing scheme from the roadpricing contrib
* @return Carrier with the solution of the VehicleRoutingProblem and the routed plan.
*/
public static Carrier solveVrpWithJspritWithToll(Carrier carrier, Network network, VehicleTypeDependentRoadPricingCalculator roadPricingCalculator) {
if (roadPricingCalculator != null) {
public static Carrier solveVrpWithJspritWithToll(Carrier carrier, Network network, RoadPricingScheme roadPricingScheme) {
if (roadPricingScheme != null) {
NetworkBasedTransportCosts netbasedTransportCosts =
NetworkBasedTransportCosts.Builder.newInstance(
network, ResourceImplementationUtils.getVehicleTypeCollection(carrier))
.setRoadPricingCalculator(roadPricingCalculator)
.setRoadPricingScheme(roadPricingScheme)
.build();

VehicleRoutingProblem vrp =
Expand Down

0 comments on commit 39c406e

Please sign in to comment.