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

Commit

Permalink
Merge remote-tracking branch 'origin/main' into kmt_create_HubHandlin…
Browse files Browse the repository at this point in the history
…gEvents
  • Loading branch information
kt86 committed Nov 16, 2023
2 parents 7823346 + a75a3fe commit 9010209
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ public void install() {
bind(LSPStrategyManager.class).toProvider(() -> {
LSPStrategyManager strategyManager = new LSPStrategyManagerImpl();
strategyManager.addStrategy(new GenericPlanStrategyImpl<>(new ExpBetaPlanSelector<>(new ScoringConfigGroup())), null, 1);
// strategyManager.addStrategy(new RoundRobinDistributionAllShipmentsStrategyFactory().createStrategy(), null, 1);
// strategyManager.addStrategy(new RandomDistributionAllShipmentsStrategyFactory().createStrategy(), null, 1);
// strategyManager.addStrategy(new RebalancingShipmentsStrategyFactory().createStrategy(), null, 1);
// strategyManager.addStrategy(new RandomShiftingStrategyFactory().createStrategy(), null, 1);
// strategyManager.addStrategy(new ProximityStrategyFactory(scenario.getNetwork()).createStrategy(), null, 1);
// strategyManager.addStrategy(RoundRobinDistributionAllShipmentsStrategyFactory.createStrategy(), null, 1);
// strategyManager.addStrategy(RandomDistributionAllShipmentsStrategyFactory.createStrategy(), null, 1);
// strategyManager.addStrategy(RebalancingStrategyFactory.createStrategy(), null, 1);
strategyManager.addStrategy(RandomShiftingStrategyFactory.createStrategy(), null, 1);
// strategyManager.addStrategy(ProximityStrategyFactory.createStrategy(scenario.getNetwork()), null, 1);
strategyManager.setMaxPlansPerAgent(5);
strategyManager.setPlanSelectorForRemoval(new LSPWorstPlanForRemovalSelector() );
return strategyManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@

final class RandomDistributionAllShipmentsStrategyFactory {

private RandomDistributionAllShipmentsStrategyFactory() { } // do not instantiate
private RandomDistributionAllShipmentsStrategyFactory() { } // class contains only static methods; do not instantiate

static GenericPlanStrategy<LSPPlan, LSP> createStrategy() {
// yyyy using factory method instead of constructor is a universally accepted approach. but should be static:
// Please refactor. Thanks! kai, nov'23

GenericPlanStrategyImpl<LSPPlan, LSP> strategy = new GenericPlanStrategyImpl<>(new ExpBetaPlanSelector<>(new ScoringConfigGroup()));
GenericPlanStrategyModule<LSPPlan> randomModule = new GenericPlanStrategyModule<>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class RandomShiftingStrategyFactory {
private RandomShiftingStrategyFactory() {} // class contains only static methods; do not instantiate.

static GenericPlanStrategy<LSPPlan, LSP> createStrategy() {
// yyyy using factory method instead of constructor is a universally accepted approach. but should be static.
// Please refactor. Thanks! kai, nov'23

GenericPlanStrategyImpl<LSPPlan, LSP> strategy = new GenericPlanStrategyImpl<>(new ExpBetaPlanSelector<>(new ScoringConfigGroup()));
GenericPlanStrategyModule<LSPPlan> randomModule = new GenericPlanStrategyModule<>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ class RebalancingStrategyFactory {
private RebalancingStrategyFactory() { } // class contains only static methods; do not instantiate

static GenericPlanStrategy<LSPPlan, LSP> createStrategy() {
// yyyy using factory method instead of constructor is a universally accepted approach. but should be static.
// Please refactor. Thanks! kai, nov'23


GenericPlanStrategyImpl<LSPPlan, LSP> strategy = new GenericPlanStrategyImpl<>(new ExpBetaPlanSelector<>(new ScoringConfigGroup()));
GenericPlanStrategyModule<LSPPlan> loadBalancingModule = new GenericPlanStrategyModule<>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

private RoundRobinDistributionAllShipmentsStrategyFactory() { } // class contains only static methods; do not instantiate

/*package-private*/ GenericPlanStrategy<LSPPlan, LSP> createStrategy() {
/*package-private*/ static GenericPlanStrategy<LSPPlan, LSP> createStrategy() {
GenericPlanStrategyImpl<LSPPlan, LSP> strategy = new GenericPlanStrategyImpl<>(new ExpBetaPlanSelector<>(new ScoringConfigGroup()));
GenericPlanStrategyModule<LSPPlan> roundRobinModule = new GenericPlanStrategyModule<>() {

Expand Down

0 comments on commit 9010209

Please sign in to comment.