Hi!
I would like to define opening hours for jobs.
I am running a 1 week planning with a batch of jobs.
I create vehicles for every day of the week with working hours set for the agents.
For example if I do a planning for 7 days with 3 agents, I will create 3x7 vehicles:
val vehicleBuilder = VehicleImpl.Builder .newInstance(agent.getVehicleName(day.toLocalDate())) .setEarliestStart(calculateDayWithHourMin(day, workdayStart)) .setLatestArrival(calculateDayWithHourMin(day, workdayEnd))
Services has earliest start dates and deadlines too. For example a job needs to be done by the end of the next week, but it can be done on any day of current week. So I define 1 week long time windows for the service:
serviceBuilder.setTimeWindow(
TimeWindow.newInstance(
coordinate.earliestVisitTimestamp?.toDouble() ?: 0.0,
(coordinate.latestVisitTimestamp ?: Long.MAX_VALUE).toDouble()
)
)
The problem is that I have to take opening hours into account aswell. Also every day has different opening hours for the same job/site. Like the site is open on Monday 8:00 - 16:00, Thuseday 9:00-17:00 etc…
Is there a way to do this? If not, can we do this with a single opening hour / job for every day?
Thanks in advance for your help!