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

Commit

Permalink
code style: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kt86 committed Jul 8, 2024
1 parent 1fc97d0 commit e3a979e
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public final void scheduleShipments(LSPPlan lspPlan, LSPResource resource, int b
presortIncomingShipments();
scheduleResource();
updateShipments();
switchHandeledShipments(bufferTime);
switchHandledShipments(bufferTime);
lspShipmentsWithTime.clear();
}

Expand Down Expand Up @@ -86,7 +86,7 @@ private final void presortIncomingShipments() {
lspShipmentsWithTime.sort(Comparator.comparingDouble(LspShipmentWithTime::getTime));
}

private final void switchHandeledShipments(int bufferTime) {
private void switchHandledShipments(int bufferTime) {
for (LspShipmentWithTime lspShipmentWithTime : lspShipmentsWithTime) {
var shipmentPlan =
ShipmentUtils.getOrCreateShipmentPlan(lspPlan, lspShipmentWithTime.getShipment().getId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ private static LSP createInitialLSP(Network network) {
collectionPlan.setInitialShipmentAssigner(assigner);
collectionPlan.addLogisticChain(collectionSolution);

// The exogenous list of Resoruces for the SolutuionScheduler is compiled and the Scheduler is
// The exogenous list of Resources for the SolutionScheduler is compiled and the Scheduler is
// added to the LSPBuilder
ArrayList<LSPResource> resourcesList = new ArrayList<>();
resourcesList.add(collectionResource);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ private static LSP createInitialLSP(Scenario scenario) {
resourcesList.add(distributionResource);

// SolutionScheduler forwardSolutionScheduler = LSPUtils.createForwardSolutionScheduler();
// //Ist der "nicht einfache" Scheduler. TODO braucht der keine RessourcenLsite oder ähnliches?
// //Ist der "nicht einfache" Scheduler. TODO braucht der keine RessourcenListe oder ähnliches?
// --> Offenbar ja, weil Null Pointer. argh!
// completeLSPBuilder.setSolutionScheduler(forwardSolutionScheduler);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ private static LSP createLSP(Scenario scenario) {
.setInitialShipmentAssigner(ResourceImplementationUtils.createSingleLogisticChainShipmentAssigner());
}

// Todo: Auch das ist wirr: Muss hier alle sommeln, damit man die dann im LSPBuilder dem
// Todo: Auch das ist wirr: Muss hier alle sammeln, damit man die dann im LSPBuilder dem
// SolutionScheduler mitgeben kann. Im Nachgang packt man dann aber erst den zweiten Plan dazu
// ... urgs KMT'Jul22
List<LSPPlan> lspPlans = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ private static LSP createLSP(Scenario scenario) {
.setInitialShipmentAssigner(ResourceImplementationUtils.createSingleLogisticChainShipmentAssigner());
}

// Todo: Auch das ist wirr: Muss hier alle sommeln, damit man die dann im LSPBuilder dem
// Todo: Auch das ist wirr: Muss hier alle sammeln, damit man die dann im LSPBuilder dem
// SolutionScheduler mitgeben kann. Im Nachgang packt man dann aber erst den zweiten Plan dazu
// ... urgs KMT'Jul22
List<LSPPlan> lspPlans = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private static LSP createLSPWithReplanner(Network network) {
LSPUtils.LSPBuilder.getInstance(Id.create("CollectionLSP", LSP.class));
collectionLSPBuilder.setInitialPlan(collectionPlan);

// The exogenous list of Resoruces for the SolutionScheduler is compiled and the Scheduler is
// The exogenous list of Resources for the SolutionScheduler is compiled and the Scheduler is
// added to the LSPBuilder
ArrayList<LSPResource> resourcesList = new ArrayList<>();
resourcesList.add(collectionResource);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private static LSP createLSPWithScorer(Network network) {
.setInitialShipmentAssigner(ResourceImplementationUtils.createSingleLogisticChainShipmentAssigner())
.addLogisticChain(logisticChain);

// The exogenous list of Resoruces for the SolutionScheduler is compiled and the Scheduler is
// The exogenous list of Resources for the SolutionScheduler is compiled and the Scheduler is
// added to the LSPBuilder

return LSPUtils.LSPBuilder.getInstance(Id.create("CollectionLSP", LSP.class))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private static LSP createInitialLSP(Network network) {
LSPUtils.LSPBuilder.getInstance(Id.create("CollectionLSP", LSP.class));
collectionLSPBuilder.setInitialPlan(collectionPlan);

// The exogenous list of Resoruces for the SolutuionScheduler is compiled and the Scheduler is
// The exogenous list of Resources for the SolutionScheduler is compiled and the Scheduler is
// added to the LSPBuilder
ArrayList<LSPResource> resourcesList = new ArrayList<>();
resourcesList.add(collectionResource);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ private static LSP createInitialLSP(Scenario scenario) {
LSPUtils.LSPBuilder.getInstance(Id.create("CollectionLSP", LSP.class));
completeLSPBuilder.setInitialPlan(completePlan);

// The exogenous list of Resoruces for the SolutionScheduler is compiled and the Scheduler is
// The exogenous list of Resources for the SolutionScheduler is compiled and the Scheduler is
// added to the LSPBuilder
ArrayList<LSPResource> resourcesList = new ArrayList<>();
resourcesList.add(collectionResource);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static LSP createLSPWithTracker(Scenario scenario) {
LSPUtils.LSPBuilder.getInstance(Id.create("CollectionLSP", LSP.class));
collectionLSPBuilder.setInitialPlan(collectionPlan);

// The exogenous list of Resoruces for the SolutionScheduler is compiled and the Scheduler is
// The exogenous list of Resources for the SolutionScheduler is compiled and the Scheduler is
// added to the LSPBuilder
ArrayList<LSPResource> resourcesList = new ArrayList<>();
resourcesList.add(collectionResource);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ public void handleEvent(CarrierTourStartEvent event) {

CarrierVehicle carrierVehicle = null;
/*
* This somehow a workaround, because the Vehicle can't get recieved from the (MATSim) allVehicle container.
* This somehow a workaround, because the Vehicle can't get received from the (MATSim) allVehicle container.
* At the TourStartEvent stage, the event.getVehicle is still not known ("null"), because it bases on ActivityEndEvent.
* And since it is the first ActEndEvent of the person, it never entered a vehicle before -.-
*
* My preferred apporach would have been something like
* My preferred approach would have been something like
* final Vehicle vehicle = allVehicles.getVehicles().get(event.getVehicleId());
* kmt sep'22
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected void initializeValues(LSPResource resource) {
protected void scheduleResource() {
int load = 0;
double cumulatedLoadingTime = 0;
double availiabilityTimeOfLastShipment = 0;
double availabilityTimeOfLastShipment = 0;
ArrayList<LspShipmentWithTime> copyOfAssignedShipments = new ArrayList<>(lspShipmentsWithTime);
ArrayList<LspShipmentWithTime> shipmentsInCurrentTour = new ArrayList<>();
List<CarrierPlan> scheduledPlans = new LinkedList<>();
Expand All @@ -110,7 +110,7 @@ protected void scheduleResource() {
Carrier auxiliaryCarrier =
CarrierSchedulerUtils.routeCarrier(
createAuxiliaryCarrier(
shipmentsInCurrentTour, availiabilityTimeOfLastShipment + cumulatedLoadingTime),
shipmentsInCurrentTour, availabilityTimeOfLastShipment + cumulatedLoadingTime),
resource.getNetwork());
scheduledPlans.add(auxiliaryCarrier.getSelectedPlan());
carrier.getServices().putAll(auxiliaryCarrier.getServices());
Expand All @@ -120,14 +120,14 @@ protected void scheduleResource() {
shipmentsInCurrentTour.add(tuple);
load = load + tuple.getShipment().getSize();
cumulatedLoadingTime = cumulatedLoadingTime + tuple.getShipment().getDeliveryServiceTime();
availiabilityTimeOfLastShipment = tuple.getTime();
availabilityTimeOfLastShipment = tuple.getTime();
}

if (!shipmentsInCurrentTour.isEmpty()) {
Carrier auxiliaryCarrier =
CarrierSchedulerUtils.routeCarrier(
createAuxiliaryCarrier(
shipmentsInCurrentTour, availiabilityTimeOfLastShipment + cumulatedLoadingTime),
shipmentsInCurrentTour, availabilityTimeOfLastShipment + cumulatedLoadingTime),
resource.getNetwork());
scheduledPlans.add(auxiliaryCarrier.getSelectedPlan());
carrier.getServices().putAll(auxiliaryCarrier.getServices());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class TransshipmentHubTourEndEventHandler
// to do the junit testing. kmt jun'23

//This class *should* also get merged into {@link LSPTourEndEventHandler}.
//Currently, this is not possible very easyily, because of missing injection (of the scenario.)
//Currently, this is not possible very easily, because of missing injection (of the scenario.)
//KMT, KN (Jan'24)

private final Scenario scenario;
Expand Down

0 comments on commit e3a979e

Please sign in to comment.