Project shop scheduling domain model

70 views
Skip to first unread message

David Li

unread,
Apr 30, 2022, 12:37:16 PMApr 30
to OptaPlanner development
Dear community friends,
I am evaluating if Optaplanner could cover a production scheduling requirement from a customer. By reading the Optaplanner documentation, it sounds roughly matchable.
To have a futher dive, I like to understand more about the business logic about how the project shop senario is built. I saw  domain model diagrams in the documentation for use cases like employee rostering, and they are quite intitutive to me, however there is no such a diagram for job shop scheduling case. 

Do you have a domain model diagram for project shop scheduling, or anywhere I could find one, or something similar as the diagram?

Thanks and Best Regards,
David

Radovan Synek

unread,
May 3, 2022, 3:37:41 AMMay 3
to optapla...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "OptaPlanner development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to optaplanner-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/optaplanner-dev/9b8b6199-fe41-44f3-abf4-a4a5e1286949n%40googlegroups.com.


--

Radovan Synek

Principal Software Engineer, Business Automation

Red Hat EMEA

Brno, Czech Republic

David Li

unread,
May 3, 2022, 4:35:38 AMMay 3
to OptaPlanner development
Thanks a lot, Madovan. I will look into the information provided.

Have a nice day.

David

David Li

unread,
May 8, 2022, 11:28:11 AMMay 8
to OptaPlanner development
Hi Madovan,
Regarding the Project Shop Scheduling case, I have got some idea about the domain model after reading the code, and have a feeling that 60-70% of the chances are Optaplanner will safisfy the requirements. Except that, I have 2 doubts remaining before moving ahead, and appreciate if you could give some guidence. Like below:

1) Schedule a supervisors.
    a. The factory has 49 machines. Because the regualtions, the machines are distributued into 11 workshops, instead of 1 single big workshop. 
    b. Each workshop has 3-5 machines, and can fullfill projects independently.
    c. For a specific workshop, there must be a supervisor staying in it, as song as the first machine starts working. This means his schedule starts as soon as  the first machine is turned on, and ends as soon as the last machine is turned off.
    d. The numbers of the supervisors are quite limited and often needed to be scheduled carefully. 
    e.  I am considering to include the schedule of of the supervisors into the project routing. This means, concurrently one single monitoring activity could be one of the jobs of multiple projects in a specific workshop.
    f. A supervisor is possiblly scheduled to various workshops to make a full utilization during a day.
Do you see a way on how to proceed?

2) Schedule the workers
    a. This workshop has over 300 workers, which are categorized by skills. The skills are related to jobs.
    b. I understand that the Project Job Shop example can filter the skills for projects.
    c. The workshop expects to include some rules in the workers' scheduling, like
        --No one should work for 3 consecutive days
        --Workers who have the same skills, should work as equally days as possible.
I haven' t seen such rules in the Project Shop Scheduling example. For sure these are very common in the Nurse Rostering example. Is it possible to combine these two   examples into one solver?

Again thanks for your help. Some directions will be more than good enough for me, I will do the home work afterwards.

Best Regards,
David

Osamu Kuniyasu

unread,
May 14, 2022, 5:58:05 AMMay 14
to OptaPlanner development
Hi David,

Let me ask some questions.

a) what is your whole time window? One week, a few weeks or months?

If it is long and number of workshops is big,... I would suggest into two phases optimization.
 like, phase-1) Decide when workshop start and end with limited NUMBER (not by name) of resources (supervisor, machine and workers).
phase-2) Assign supervisors and workers by name regarding consecutive days and workload balancing.

b) Should you care details that the 1st of three machines start and the third machine start(?) later?
      or, Can you consider it simpler such that three machines blocked that duration?

If it's second case, I would consider to apply the Project Job Scheduling with grouped resources (not by name) such as supervisor group, machine groups and workers groups. you can have grouping by machine categories, worker skill levels, and so on.

I used to apply existing model as possible, so it is one of just idea.

If the model size is not so big and you would like to consider details same time (in one phase),
You may need custom model and rules start with one of existing examples or from scratch.
As you said, you can mix some good flavors/idea of existing models and rules.

HTH,
Osamu Kuniyasu


2022年5月9日月曜日 0:28:11 UTC+9 liyita...@gmail.com:

David Li

unread,
May 14, 2022, 8:41:47 AMMay 14
to OptaPlanner development
Hi Osamu,
Greetings. 
Thanks for your help. Here are some more background information for the case. 
1. The customer manufactures cells for cancer treatment. The raw material is the blood from a patient. After a none stop manufacturing process of 11 days, the modified cells as the finished product, will be used to inject back to this patient.
2. They normally have a production capacity estimation meeting each month, to decide how roughly how many orders they can accept for the coming month.
3. Every time there is a new customer (patient), they need to tell the patient how soon the cells can be delivered for treatment. 
4. If timing is agreed by both, they will start the manufacturing for this order on the planned date. Hopefully deliver the cells back in 11 days.
5. They also have some none treatment orders, like making samples, training the doctors, which are normally scheduled with lower priorities than the treatment ones. These orders have the same or different manufacturing procedures, and also consume the resources of the machine and the labor.

a) what is your whole time window? One week, a few weeks or months?
---------------------------------------------------------------------------------
  • To me it seems they don' t have a planning time window. It is like a first come first serve process on treatment orders, except the none treatment orders are always with lower priorities (only accept orders when there is no enough treatment orders).
  • 2 stages approach is sth we are thinking, too. As to combine the constrains from 2 models (production sheduling and employee rostering), the compexity might be too complex to handle with.

Scheduling the machines seems easy. However, the complexity is the scheduling of the workers. 
1. A machine is exclusively for a project (11 days).  But there are various  workers to be scheduled for the 11 days on this machine,  and require different skills.
2. Most of the jobs consume a resource exclusively at the specific time point.
3. Superivsor jobs are shared between projects within a workshop during a specific time duration. Like I described before, as long as there is machine running in a workshop, the supervisor must be scheduled here. A supervisor can work in workshop A in the morning shit, and can work in workshop B in the afternnoon if there is no afternnon production in workshop A.

b) Should you care details that the 1st of three machines start and the third machine start(?) later?
      or, Can you consider it simpler such that three machines blocked that duration?
----------------------------------------------------------------------------------------
  • The time duration of the machine jobs are regulated, so can' t be manipulated. 
  • Blocking all machines in a workshop will cause unavailability to other orders, it seems not appliable.

Not sure if I have explained throughly. However it is always fun to find solutions to customer problems, especially knowing they are saving cancer patients.

Thanks again and have a nice day.

Regards
David

Osamu Kuniyasu

unread,
May 15, 2022, 2:07:47 AMMay 15
to OptaPlanner development

Hi David,

I would apply the Project Job Scheduling example (PJS) model.
I haven't look so much the Job Shop Scheduling example, so I may have a bit old info.

To apply the PJS model,
A Project is an oder for a patient, the production from blood to cells. A Job is a step of its production.
It seems there is a span between Jobs,
so PJS would be able to handle that.

It is continuous scheduling, as orders looks to come one by one.
But it would be better to use "preorder information" for good customer service of the available-to-promise and  work load balance.

Resource side, a resource is a named supervisor and a named worker. a job require a part of a supervisor time and a worker.
it seems machine is not a bottleneck. so machine resource is
grouped resource (not named machine).
I expect the Workers shift was decided before and it is input data for this solving.

The PJS example model require a set of resources for a job as an ExecutionModel before solving.
so, we need to prepare such ExecutionModes by
coupling a Supervisor and a Worker from available
Supervisors and Workers at that day/time.
such an ExecutionMode contains MachineGroup as well.
I used to use a drools rule engine for the preprocessing of the  optaplanner execution to create ExecutionModes.


HTH,
Osamu Kuniyasu

2022年5月14日土曜日 21:41:47 UTC+9 liyita...@gmail.com:

David Li

unread,
May 15, 2022, 9:37:22 AMMay 15
to OptaPlanner development
Thanks a lot for your quick feedback, Osamu.

Yes, you are right. Actually, there is a preorder process in place but managed by the commercial people. In addition, available-to-promise is also one of their requests, liike you said.

I have tried Execution Mode to cover the supervisor scheduling issue,  and it sounded workable so far. Except I wanted to limit the consumption of this supervisor within a specific workshop until no machine running there(only then he could be assigned to projects in another workshop. I don't see a way to do it with the execution mode function, my decision at the moment is to develop a simple recommendation function out of Optaplanner, to make sure any project must be assigned to a workshop before  it goes into the algorithm.

So far it looks quite promising. I am quite excited to go forward:).

Again thanks for your advice, it really helps.

Regards,
David

Osamu Kuniyasu

unread,
May 15, 2022, 9:13:19 PMMay 15
to OptaPlanner development
Hi David,

Glad to hear you think it will work.

I'd like to mention that an ExecutionMode is for a Job, not for a Project.
In other words, if a supervisor's assignment for one job is 50%,
the supervisor may simultaneously do similar work (50% assignment) on another project.
The supervisor's assignment is 100% only for the "overlapping period" of these two jobs.
This control is done by scoring.

Best Regards,
Osamu Kuniyasu

2022年5月15日日曜日 22:37:22 UTC+9 liyita...@gmail.com:

David Li

unread,
May 16, 2022, 6:45:44 AMMay 16
to OptaPlanner development
Haha, you saw my flaw. 
Yes, the overlapping and cross-project request is a problem. So far scoring is the only way to deal with it. Thanks for raising this up, we will work on it.

Have a nice day.

Regards
David
Reply all
Reply to author
Forward
0 new messages