#πŸ”’ Scheduler Operator, Machine, and Products with Heapq

4 messages Β· Page 1 of 1 (latest)

mellow lark
#

Hello, I have a homework to handle scheduling related to machines, products, and operators. Currently everything is running well, but there is a new limitation where it turns out that machines can only be used by certain operators or operators can only use certain machines.

Currently I am using heapq to get the operator with the fastest start and end schedule and for machines, I am also using heapq to get machine data with the fastest start and end schedule.

Currently I call the fastest operator, then the fastest machine. But this time it has a limitation that the operator must use the appropriate machine so it can't be arbitrary.

The obstacle is, because currently I call the operator first and then the machine, the machine is not efficient because the first time it must use the machine with CODE 1 - N or: 1, 2, 3 ,4 ,5 ,6, ... n. Just retrieve operator data based on the machine code of the fastest operator, for example if Machine Code 1 is finished and machine code 2 is finished, then use the fastest available.

Automatically in the machine, the starting time and ending time are needed. How to make this machine restriction can be operated by which operator in an efficient and fast way?

In the machine data, the capacity is the length of time the machine operates. For example, the starting hour of the capacity is 7 while the capacity is 8. Then that means the capacity is 8 working hours, so 7 + 8 = 15. Then the machine ends at 15.

Code: https://paste.pythondiscord.com/KA3A

wooden craterBOT
#

@mellow lark

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

wooden craterBOT
#

@mellow lark

Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.