Hello Eugeniu,
You mention that "machines can process one job at a time (the alternative machine interval) but a worker can work (supervise) multiple machines." If I well understand a job can be processed on several machines and requires a worker. This worker can be the same if the job is processed on machine m1 or m2 for instance.
If I well understood, there are "machine's availability" and "worker's availability".
Why it is important to synchronize calendars?
Let us consider a task (job J) that requires the resource R1 (machine M1) and a resource R2 (worker W1).
Calendars are expressed in days.
Suppose there is a break on machine M1 (maintenance) between day 7 and day 8 (Sunday and Monday).
Suppose the worker W1 doesn't work on weekend (Saturday and Sunday) between day 6 and day 7.
If the processing time of the job J is equal to 5 days, then J [1: 3 -- (5)7 --> 10] is a solution.
Unfortunately, this is not a solution because on day 6 the machine M1 is available but not the worker W1 and on day 8 the worker W1 is available but not the machine M1.
From what you've written, I think you have a pool of workers with the same availability. In this case you should just use pulse and not use step_at_start and step_at_end.
------------------------------
Thierry Sola
------------------------------
Original Message:
Sent: Tue February 27, 2024 09:13 AM
From: Eugeniu Grigoras
Subject: Scheduling with machines and workers calendars
Hi Thierry,
Thanks a lot but this is not the case as a machines can process one job at a time (the alternative machine interval) but a worker can work (supervise) multiple machines. It's like the money example in the scheduling_tuto but that example does not work for me. Money is a non-renewable resource and workers are renewable resource, so if i follow the scheduling_tuto with money example and use money_cumul -= step_at_start to decrease the money value (in my case available workers) it works, but i can't return the worker using money_cumul += step_at_end as the job intervals might overflow machine unavailability and end in a different workers turns. I know it is a difficult problem even in the literature where this is named as RCPSP (Resource constrained project scheduling problem) or DRCSP (Dual resource constrained scheduling problem).
------------------------------
Eugeniu Grigoras
Original Message:
Sent: Tue February 27, 2024 08:32 AM
From: Thierry Sola
Subject: Scheduling with machines and workers calendars
Hello,
For each worker and each possible machine, you must define a specific calendar that takes into account breaks from both calendars (each time period of this new calendar corresponds to an available time period for the worker and the machine).
Then, you must use intensity functions for each alternative (worker, machine). Use the following functions: forbid_start and forbid_end, to forbid an interval variable from starting or ending during specified time periods (breaks).
Within the distribution, in the CPLEX_Studio221\python\examples\cp\visu directory, the "house_building_calendar.py" example uses an intensity function to model worker availability over time.
------------------------------
Thierry Sola
Original Message:
Sent: Thu February 22, 2024 05:24 AM
From: Eugeniu Grigoras
Subject: Scheduling with machines and workers calendars
Hi all,
This is my first time seeking help online, so please be patient if this isn't the correct format.
I'm working with the IBM CP Decision Optimization along with Docplex.
I've developed a functioning model for scheduling tasks on machines, incorporating optional alternative intervals for each task on the machines where the task can be executed. These task_machine optional intervals include an intensity parameter subject to the machine's availability, with specific periods during which the task is forbidden to start or end.
Additionally, I've established constraints for the total number of workers allowed. Since tasks are executed by machines, and a worker can operate multiple machines, I've managed this with the sum pulse of all task_operator_usage percentage, which has proven to be effective.
However, I'm encountering difficulties in modeling workers' availability over time. I've attempted various methods, but using pulse/step_at_start/step_at_end doesn't suit my needs, as operations may extend into non-working periods for machines. I need a way to ensure at any given time that the number of workers does not exceed the limit within a specified interval, based on an array of tuples like (start, end, workers). For every operation, I have a dictionary indicating the percentage of a worker's supervision required.
Any guidance on how to model this aspect of worker availability effectively would be greatly appreciated.
TL;DR;
Is there a way to model workers availability over time when intervals are preemptive due to already existing machines calendars?
I found this discussions but don't understand how:
https://community.ibm.com/community/user/ai-datascience/discussion/renewables#bma067e0c4-3284-4040-98e2-f8b0ce8849a7
https://community.ibm.com/community/user/ai-datascience/discussion/splitting-up-tasks-using-cp-optimizer#bm72f091e1-6591-4e4e-8546-ec4748397b89
------------------------------
Eugeniu Grigoras
------------------------------