if(pickupLocationId != null){
builder.setPickupLocationId(pickupLocationId);
}
//pickup-coord
Coordinate pickupCoord = getCoord(shipmentConfig,"pickup.");
if(pickupCoord != null){
builder.setPickupCoord(pickupCoord);
if(pickupLocationId != null){
// vrpBuilder.addLocation(pickupLocationId,pickupCoord);
}
else{
// vrpBuilder.addLocation(pickupCoord.toString(),pickupCoord);
builder.setPickupLocationId(pickupCoord.toString());
}
}
//pickup-serviceTime
String pickupServiceTime = shipmentConfig.getString("pickup.duration");
if(pickupServiceTime != null) builder.setPickupServiceTime(Double.parseDouble(pickupServiceTime));
//pickup-tw
String pickupTWStart = shipmentConfig.getString("pickup.timeWindows.timeWindow(0).start");
String pickupTWEnd = shipmentConfig.getString("pickup.timeWindows.timeWindow(0).end");
if(pickupTWStart != null && pickupTWEnd != null){
TimeWindow pickupTW = TimeWindow.newInstance(Double.parseDouble(pickupTWStart), Double.parseDouble(pickupTWEnd));
builder.setPickupTimeWindow(pickupTW);
}
//delivery-locationId
String deliveryLocationId = shipmentConfig.getString("delivery.locationId");
if(deliveryLocationId != null){
builder.setDeliveryLocationId(deliveryLocationId);
}
//delivery-coord
Coordinate deliveryCoord = getCoord(shipmentConfig,"delivery.");
if(deliveryCoord != null){
builder.setDeliveryCoord(deliveryCoord);
if(deliveryLocationId != null){
// vrpBuilder.addLocation(deliveryLocationId,deliveryCoord);
}
else{
// vrpBuilder.addLocation(deliveryCoord.toString(),deliveryCoord);
builder.setDeliveryLocationId(deliveryCoord.toString());
}
}
//delivery-serviceTime
String deliveryServiceTime = shipmentConfig.getString("delivery.duration");