mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
Merge pull request #384 from michalmac/master
unused timeWindow variables removed from Service and Shipment
This commit is contained in:
commit
6907a894fb
2 changed files with 3 additions and 12 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue