Skip to content

Commit

Permalink
reorder variables
Browse files Browse the repository at this point in the history
  • Loading branch information
kt86 committed Dec 20, 2024
1 parent 91a19fb commit 701b615
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ public static Builder newInstance(Id<CarrierService> id, Id<Link> locationLinkId
}

private final Id<CarrierService> id;
private final Id<Link> locationLinkId;
private int demand = 0;

private double serviceTime = 0.0;
private final Id<Link> locationLinkId;
private TimeWindow timeWindow = TimeWindow.newInstance(0.0, Integer.MAX_VALUE);
private int demand = 0;
private double serviceTime = 0.0;

private Builder(Id<CarrierService> id, Id<Link> locationLinkId) {
super();
Expand Down Expand Up @@ -86,10 +86,12 @@ public Builder setCapacityDemand(int value) {


private final Id<CarrierService> id;
private final int demand;

private final Id<Link> locationId;
private final double serviceDuration;
private final TimeWindow timeWindow;
private final int demand;
private final double serviceDuration;

private final Attributes attributes = new AttributesImpl();

private CarrierService(Builder builder){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public static class Builder {
* @deprecated Please use Builder newInstance(Id<CarrierShipment> id, Id<Link> from, Id<Link> to, int size) instead.
* <p>
* Returns a new shipment builder.
*
* <p> The builder is init with the shipment's origin (from), destination (to) and with the shipment's size.
* The default-value for serviceTime is 0.0. The default-value for a timeWindow is [start=0.0, end=Double.maxValue()].
*
Expand All @@ -65,7 +64,6 @@ public static Builder newInstance(Id<Link> from, Id<Link> to, int size){

/**
* Returns a new shipment builder.
*
* <p> The builder is init with the shipment's origin (from), destination (to) and with the shipment's size.
* The default-value for serviceTime is 0.0. The default-value for a timeWindow is [start=0.0, end=Double.maxValue()].
*
Expand All @@ -80,12 +78,14 @@ public static Builder newInstance(Id<CarrierShipment> id, Id<Link> from, Id<Link
}

Id<CarrierShipment> id;
final Id<Link> from;
final Id<Link> to;
final int size;

final Id<Link> from;
TimeWindow pickTW = TimeWindow.newInstance(0.0, Integer.MAX_VALUE);
TimeWindow delTW = TimeWindow.newInstance(0.0, Integer.MAX_VALUE);
double pickServiceTime = 0.0;

final Id<Link> to;
TimeWindow delTW = TimeWindow.newInstance(0.0, Integer.MAX_VALUE);
double delServiceTime = 0.0;

/**
Expand Down Expand Up @@ -133,13 +133,16 @@ public CarrierShipment build(){
}

private final Id<CarrierShipment> id;
private final Id<Link> from;
private final Id<Link> to;
private final int demand;

private final Id<Link> from;
private final TimeWindow pickupTimeWindow;
private final TimeWindow deliveryTimeWindow;
private double pickupServiceTime;

private final Id<Link> to;
private final TimeWindow deliveryTimeWindow;
private double deliveryServiceTime;

private final Attributes attributes = new AttributesImpl();


Expand Down

0 comments on commit 701b615

Please sign in to comment.