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

Commit

Permalink
internal renaming. cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kt86 committed Nov 16, 2023
1 parent ff850d6 commit 34c20e6
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,16 @@
carrier.setSelectedPlan(plan);
}

private int tourIdindex = 1; //Have unique TourIds for the MainRun.
private int tourIdIndex = 1; //Have unique TourIds for the MainRun.
private CarrierPlan createPlan(Carrier carrier, List<LspShipmentWithTime> tuples) {

//TODO: Allgemein: Hier ist alles manuell zusammen gesetzt; es findet KEINE Tourenplanung statt!
NetworkBasedTransportCosts.Builder tpcostsBuilder = NetworkBasedTransportCosts.Builder.newInstance(resource.getNetwork(), ResourceImplementationUtils.getVehicleTypeCollection(resource.getCarrier()));
NetworkBasedTransportCosts netbasedTransportcosts = tpcostsBuilder.build();
Collection<ScheduledTour> tours = new ArrayList<>();

Tour.Builder tourBuilder = Tour.Builder.newInstance(Id.create(tourIdindex, Tour.class));
tourIdindex++;
Tour.Builder tourBuilder = Tour.Builder.newInstance(Id.create(tourIdIndex, Tour.class));
tourIdIndex++;
tourBuilder.scheduleStart(Id.create(resource.getStartLinkId(), Link.class));

double totalLoadingTime = 0;
Expand Down Expand Up @@ -209,8 +209,7 @@ private CarrierService convertToCarrierService(LspShipmentWithTime tuple) {
CarrierService.Builder builder = CarrierService.Builder.newInstance(serviceId, resource.getEndLinkId());
builder.setCapacityDemand(tuple.getShipment().getSize());
builder.setServiceDuration(tuple.getShipment().getDeliveryServiceTime());
CarrierService service = builder.build();
return service;
return builder.build();
}

@Override protected void updateShipments() {
Expand Down Expand Up @@ -258,7 +257,7 @@ private void addShipmentLoadElement(LspShipmentWithTime tuple, Tour tour, Tour.S
builder.setLinkId(tour.getStartLinkId());
builder.setCarrierService(serviceActivity.getService());
ShipmentPlanElement load = builder.build();
String idString = load.getResourceId() + "" + load.getLogisticChainElement().getId() + "" + load.getElementType();
String idString = load.getResourceId() + String.valueOf(load.getLogisticChainElement().getId()) + load.getElementType();
Id<ShipmentPlanElement> id = Id.create(idString, ShipmentPlanElement.class);
ShipmentUtils.getOrCreateShipmentPlan(super.lspPlan, tuple.getShipment().getId()).addPlanElement(id, load);
}
Expand All @@ -281,7 +280,7 @@ private void addShipmentTransportElement(LspShipmentWithTime tuple, Tour tour, T
builder.setToLinkId(tour.getEndLinkId());
builder.setCarrierService(serviceActivity.getService());
ShipmentPlanElement transport = builder.build();
String idString = transport.getResourceId() + "" + transport.getLogisticChainElement().getId() + "" + transport.getElementType();
String idString = transport.getResourceId() + String.valueOf(transport.getLogisticChainElement().getId()) + transport.getElementType();
Id<ShipmentPlanElement> id = Id.create(idString, ShipmentPlanElement.class);
ShipmentUtils.getOrCreateShipmentPlan(super.lspPlan, tuple.getShipment().getId()).addPlanElement(id, transport);
}
Expand All @@ -308,7 +307,7 @@ private void addShipmentUnloadElement(LspShipmentWithTime tuple, Tour tour, Tour
builder.setLinkId(tour.getEndLinkId());
builder.setCarrierService(serviceActivity.getService());
ShipmentPlanElement unload = builder.build();
String idString = unload.getResourceId() + "" + unload.getLogisticChainElement().getId() + "" + unload.getElementType();
String idString = unload.getResourceId() + String.valueOf(unload.getLogisticChainElement().getId()) + unload.getElementType();
Id<ShipmentPlanElement> id = Id.create(idString, ShipmentPlanElement.class);
ShipmentUtils.getOrCreateShipmentPlan(super.lspPlan, tuple.getShipment().getId()).addPlanElement(id, unload);
}
Expand Down

0 comments on commit 34c20e6

Please sign in to comment.