/** * Returns new instance of TimeWindow. * * @param start * @param end * @return TimeWindow * @throw IllegalArgumentException either if start or end < 0.0 or end < start */ public static TimeWindow newInstance(double start, double end) { return new TimeWindow(start, end); }
/** * Returns new instance of TimeWindow. * * @param start * @param end * @return TimeWindow * @throw IllegalArgumentException either if start or end < 0.0 or end < start */ public static TimeWindow newInstance(double start, double end) { return new TimeWindow(start, end); }
TimeWindow twObj = new TimeWindow(tw[0].getTotalMilliseconds(), tw[1].getTotalMilliseconds()); if (i == 0) { builder.setPickupTimeWindow(twObj);
private Service buildStop(ODLTableReadOnly table, int row, StopsTableDefn dfn, Service.Builder builder) { LatLong ll = dfn.latLong.getLatLong(table, row,false); Location location = Location.newInstance(locs.addLatLong(ll)); builder.setLocation(location); // validate and add quantities for (int q = 0; q < dfn.quantityIndices.length; q++) { builder.addSizeDimension(q, dfn.getQuantity(table, row, q)); } // validate and set service duration if (dfn.serviceDuration != -1) { builder.setServiceTime(dfn.getDuration(table, row).getTotalMilliseconds()); } // validate and set time window ODLTime[] tw = dfn.getTW(table, row); if (tw != null) { builder.setTimeWindow(new TimeWindow(tw[0].getTotalMilliseconds(), tw[1].getTotalMilliseconds())); } // add required skills for(String skill: getSkillsArray((String)table.getValueAt(row, dfn.requiredSkills))){ builder.addRequiredSkill(skill); } return builder.build(); }