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

Commit

Permalink
Merge pull request #280 from matsim-vsp/kmt_2echelon4Diss
Browse files Browse the repository at this point in the history
WIP: Example using the Roadpricing contrib
  • Loading branch information
kt86 authored Jul 31, 2024
2 parents ef89e70 + 609ceb9 commit 56484be
Show file tree
Hide file tree
Showing 7 changed files with 567 additions and 25 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<parent>
<groupId>org.matsim</groupId>
<artifactId>matsim-all</artifactId>
<!-- <version>2025.0-2024w29</version>-->
<version>2025.0-2024w31</version>
<version>2025.0-PR3386</version>
<!-- <version>2025.0-2024w31</version>-->
<!-- <version>2025.0-SNAPSHOT</version>-->
<relativePath/>
</parent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ final class ExampleGroceryDeliveryMultipleChains {
private static final Id<Link> HUB_LINK_ID = Id.createLinkId("91085");
private static final double TOLL_VALUE = 1000;
static final double HUBCOSTS_FIX = 100;
private static final List<String> TOLLED_LINKS = ExampleConstants.TOLLED_LINK_LIST_BERLIN;

private ExampleGroceryDeliveryMultipleChains() {}

Expand Down Expand Up @@ -88,7 +89,7 @@ public void install() {
new EventBasedCarrierScorer4MultipleChains();
carrierScorer.setToll(TOLL_VALUE);
carrierScorer.setTolledVehicleTypes( List.of("heavy40t"));
carrierScorer.setTolledLinks(ExampleConstants.TOLLED_LINK_LIST_BERLIN);
carrierScorer.setTolledLinks(TOLLED_LINKS);
bind(CarrierScoringFunctionFactory.class).toInstance(carrierScorer);
bind(LSPScorerFactory.class).toInstance(MyLSPScorer::new);
bind(CarrierStrategyManager.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,22 @@
final class ExampleTwoLspsGroceryDeliveryMultipleChains {

private static final Logger log = LogManager.getLogger(ExampleTwoLspsGroceryDeliveryMultipleChains.class);

private static final Id<Link> HUB_LINK_ID_NEUKOELLN = Id.createLinkId("91085");
private static final double TOLL_VALUE = 1000;
private static final double HUBCOSTS_FIX = 100;

private static final List<String> TOLLED_LINKS = ExampleConstants.TOLLED_LINK_LIST_BERLIN;
private static final List<String> TOLLED_VEHICLE_TYPES = List.of("heavy40t");
private static final double TOLL_VALUE = 1000;

private static final String CARRIER_PLAN_FILE = "https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/projects/freight/foodRetailing_wo_rangeConstraint/input/CarrierLEH_v2_withFleet_Shipment_OneTW_PickupTime_ICEVandBEV.xml";
private static final String VEHICLE_TYPE_FILE = "https://svn.vsp.tu-berlin.de/repos/public-svn/matsim/scenarios/countries/de/berlin/projects/freight/foodRetailing_wo_rangeConstraint/input/vehicleTypesBVWP100_DC_noTax.xml";
public static final String EDEKA_SUPERMARKT_TROCKEN = "edeka_SUPERMARKT_TROCKEN";
public static final String KAUFLAND_VERBRAUCHERMARKT_TROCKEN = "kaufland_VERBRAUCHERMARKT_TROCKEN";
private static final String EDEKA_SUPERMARKT_TROCKEN = "edeka_SUPERMARKT_TROCKEN";
private static final String KAUFLAND_VERBRAUCHERMARKT_TROCKEN = "kaufland_VERBRAUCHERMARKT_TROCKEN";

private static final String OUTPUT_DIRECTORY = "output/groceryDelivery_kmt_10";



private ExampleTwoLspsGroceryDeliveryMultipleChains() {}

Expand Down Expand Up @@ -134,8 +143,8 @@ public void install() {
final EventBasedCarrierScorer4MultipleChains carrierScorer =
new EventBasedCarrierScorer4MultipleChains();
carrierScorer.setToll(TOLL_VALUE);
carrierScorer.setTolledVehicleTypes( List.of("heavy40t"));
carrierScorer.setTolledLinks(ExampleConstants.TOLLED_LINK_LIST_BERLIN);
carrierScorer.setTolledVehicleTypes(TOLLED_VEHICLE_TYPES);
carrierScorer.setTolledLinks(TOLLED_LINKS);
bind(CarrierScoringFunctionFactory.class).toInstance(carrierScorer);
bind(LSPScorerFactory.class).toInstance(MyLSPScorer::new);
bind(CarrierStrategyManager.class)
Expand Down Expand Up @@ -181,7 +190,7 @@ private static Config prepareConfig(String[] args) {
}
ConfigUtils.applyCommandline(config, args);
} else {
config.controller().setOutputDirectory("output/groceryDelivery_kmt9_1it");
config.controller().setOutputDirectory(OUTPUT_DIRECTORY);
config.controller().setLastIteration(1);
}

Expand Down
Loading

0 comments on commit 56484be

Please sign in to comment.