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

Commit

Permalink
combine methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kt86 committed Aug 13, 2024
1 parent 4c440cc commit e5a4bcc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,7 @@ private static LogisticChain createTwoEchelonChain(Scenario scenario, String lsp
LSPResource distributionCarrierResource =
ResourceImplementationUtils.DistributionCarrierResourceBuilder.newInstance(
distributionCarrier, scenario.getNetwork())
.setDistributionScheduler(
// ResourceImplementationUtils.createDefaultDistributionCarrierSchedulerWithRoadPricing(RoadPricingUtils.getRoadPricingScheme(scenario)))
ResourceImplementationUtils.createDefaultDistributionCarrierScheduler(scenario))
.setDistributionScheduler(ResourceImplementationUtils.createDefaultDistributionCarrierScheduler(scenario))
.build();

LogisticChainElement distributionCarrierElement =
Expand Down Expand Up @@ -438,7 +436,6 @@ private static LogisticChain createDirectChain(Scenario scenario, String lspName
ResourceImplementationUtils.DistributionCarrierResourceBuilder.newInstance(
directCarrier, scenario.getNetwork())
.setDistributionScheduler(
// ResourceImplementationUtils.createDefaultDistributionCarrierSchedulerWithRoadPricing(RoadPricingUtils.getRoadPricingScheme(scenario)))
ResourceImplementationUtils.createDefaultDistributionCarrierScheduler(scenario))
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,33 +213,23 @@ public static void setCarrierType(Carrier carrier, CARRIER_TYPE carrierType) {
carrier.getAttributes().putAttribute(CARRIER_TYPE_ATTR, carrierType);
}

public static DistributionCarrierScheduler createDefaultDistributionCarrierScheduler(Scenario scenario) {
return new DistributionCarrierScheduler(scenario);
}

public static CollectionCarrierScheduler createDefaultCollectionCarrierScheduler(Scenario scenario) {
return new CollectionCarrierScheduler(scenario);
}

/**
* Utils method to create a DistributionCarrierScheduler with Roadpricing.
* Utils method to create a DistributionCarrierScheduler
* TODO: In the future, the scheduler should get the scenario via injection. This here is only a dirty workaround. KMT'Aug'24
*
* @param scenario the scenario
* @deprecated This is only a dirty workaround. KMT'Aug'24
*/
public static DistributionCarrierScheduler createDefaultDistributionCarrierSchedulerWithRoadPricing(Scenario scenario) {
public static DistributionCarrierScheduler createDefaultDistributionCarrierScheduler(Scenario scenario) {
return new DistributionCarrierScheduler(scenario);
}

/**
* Utils method to create a Collection CarrierScheduler with Roadpricing.
* Utils method to create a Collection CarrierScheduler
* TODO: In the future, the scheduler should get the scenario via injection. This here is only a dirty workaround. KMT'Aug'24
*
* @param scenario the scenario
* @deprecated This is only a dirty workaround. KMT'Aug'24
*/
public static CollectionCarrierScheduler createDefaultCollectionCarrierSchedulerWithRoadPricing(Scenario scenario) {
public static CollectionCarrierScheduler createDefaultCollectionCarrierScheduler(Scenario scenario) {
return new CollectionCarrierScheduler(scenario);
}

Expand Down

0 comments on commit e5a4bcc

Please sign in to comment.