//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");
if(deliveryServiceTime != null) builder.setDeliveryServiceTime(Double.parseDouble(deliveryServiceTime));
//delivery-tw
String delTWStart = shipmentConfig.getString("delivery.timeWindows.timeWindow(0).start");
String delTWEnd = shipmentConfig.getString("delivery.timeWindows.timeWindow(0).end");
if(delTWStart != null && delTWEnd != null){
TimeWindow delTW = TimeWindow.newInstance(Double.parseDouble(delTWStart), Double.parseDouble(delTWEnd));
builder.setDeliveryTimeWindow(delTW);
}
//read skills
String skillString = shipmentConfig.getString("requiredSkills");