Defining Working Hour Constraints for Machine Scheduling in Google OR-Tools

200 views
Skip to first unread message

KR Prasath

unread,
Oct 6, 2023, 11:00:43 PM10/6/23
to or-tools-discuss
Hello everyone,

I'm currently working on a project using Google OR-Tools for machine scheduling, and I need help defining a constraint related to working hours for machines. Specifically, I want to ensure that tasks are scheduled within the working hours of a machine and account for cases where a task might span across multiple working days.

Here's the scenario:

Machine working hours are from 8 am to 5 pm.
Let's say I have a task that starts at 4 pm and has a duration of 2 hours.
I want to ensure that 1 hour of this task is completed on the same day (between 4 pm and 5 pm) and the remaining 1 hour is completed on the following day, starting at 8 am and ending at 9 am, before starting the next task.
Could someone guide me on how to define this constraint using Google OR-Tools? I'm particularly interested in how to handle tasks that span across working days and ensure that they are correctly scheduled within the machine's working hours.

Any help or suggestions would be greatly appreciated! Thank you

KR Prasath

unread,
Oct 7, 2023, 8:37:11 AM10/7/23
to or-tools-discuss
.

Alberto Manzini

unread,
Oct 8, 2023, 5:17:45 AM10/8/23
to or-tools-discuss
Consider time only on machines working times and then postprocess results.

KR Prasath

unread,
Oct 8, 2023, 7:50:21 AM10/8/23
to or-tools-discuss
Reply all
Reply to author
Forward
0 new messages