1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

unused timeWindow variables removed from Service and Shipment

This commit is contained in:
Michal Maciejewski 2017-10-26 20:13:37 +02:00
parent 3a5e42691b
commit 05f3f1e3e9
No known key found for this signature in database
GPG key ID: 015947E60A2AD77B
2 changed files with 3 additions and 12 deletions

View file

@ -72,8 +72,6 @@ public class Service extends AbstractJob {
protected double serviceTime;
protected TimeWindow timeWindow = TimeWindow.newInstance(0.0, Double.MAX_VALUE);
protected Capacity.Builder capacityBuilder = Capacity.Builder.newInstance();
protected Capacity capacity;
@ -98,7 +96,7 @@ public class Service extends AbstractJob {
Builder(String id){
this.id = id;
timeWindows = new TimeWindowsImpl();
timeWindows.add(timeWindow);
timeWindows.add(TimeWindow.newInstance(0.0, Double.MAX_VALUE));
}
/**
@ -176,7 +174,6 @@ public class Service extends AbstractJob {
public Builder<T> setTimeWindow(TimeWindow tw){
if(tw == null) throw new IllegalArgumentException("time-window arg must not be null");
this.timeWindow = tw;
this.timeWindows = new TimeWindowsImpl();
timeWindows.add(tw);
return this;

View file

@ -61,10 +61,6 @@ public class Shipment extends AbstractJob {
private double deliveryServiceTime = 0.0;
private TimeWindow deliveryTimeWindow = TimeWindow.newInstance(0.0, Double.MAX_VALUE);
private TimeWindow pickupTimeWindow = TimeWindow.newInstance(0.0, Double.MAX_VALUE);
private Capacity.Builder capacityBuilder = Capacity.Builder.newInstance();
private Capacity capacity;
@ -107,9 +103,9 @@ public class Shipment extends AbstractJob {
if (id == null) throw new IllegalArgumentException("id must not be null");
this.id = id;
pickupTimeWindows = new TimeWindowsImpl();
pickupTimeWindows.add(pickupTimeWindow);
pickupTimeWindows.add(TimeWindow.newInstance(0.0, Double.MAX_VALUE));
deliveryTimeWindows = new TimeWindowsImpl();
deliveryTimeWindows.add(deliveryTimeWindow);
deliveryTimeWindows.add(TimeWindow.newInstance(0.0, Double.MAX_VALUE));
}
/**
@ -169,7 +165,6 @@ public class Shipment extends AbstractJob {
*/
public Builder setPickupTimeWindow(TimeWindow timeWindow) {
if (timeWindow == null) throw new IllegalArgumentException("delivery time-window must not be null");
this.pickupTimeWindow = timeWindow;
this.pickupTimeWindows = new TimeWindowsImpl();
this.pickupTimeWindows.add(timeWindow);
return this;
@ -215,7 +210,6 @@ public class Shipment extends AbstractJob {
*/
public Builder setDeliveryTimeWindow(TimeWindow timeWindow) {
if (timeWindow == null) throw new IllegalArgumentException("delivery time-window must not be null");
this.deliveryTimeWindow = timeWindow;
this.deliveryTimeWindows = new TimeWindowsImpl();
this.deliveryTimeWindows.add(timeWindow);
return this;