Problem statement: Meet the demand which can be met across 2 facilities each having multiple machines where several components are made. The objective is to find the optimal solution to meet the demand with the lowest utilization of machines.
- Demand is total and can be met by loading on either facility.
- Facility A has to be loaded and only when it is completely utilized, then we load facility B.
- Each machine can make one or more components on it (until its available hours are exhausted).
- Not all machines make all components.
- Each machine has a "run-time" which is the time to produce 1 unit of a component. The lower run-time the better.
Different components take different time to produce on a machine. We choose the machine which takes the least run-time to produce.
Each machine has a total "Available-hours" for an entire month which is total runtime available for that machine.
This "available-hours" constraint is hard.
Demand for one component cannot be split across different machines.
Given this information, we need to:
- Pick the machine (which can make a component) with the lowest run time first.
- See if demand is met by choosing that machine to produce that component or not. (check the available hours of a machine, subtract available hours with the total time to meet demand. the remaining time is now the updated available hours for that machine). the total time to meet demand is simply run-time $\times$ demand for that component.
- Repeat 1 & 2 for all components.
- If a demand is so high that a machine gets completely utilized, then choose the next best machine where a component can be made(machine with 2nd lowest run-time).
- All demand should be met(not exceeded) for all components.
- Try to see that machines should be optimally utilized overall.
- Evaluation metric to compare results between 2 runs are:
- % demand met
- % utilization overall variance between utilization across machines
I have tried using Google's OR-TOOLS package but the solution never converges. Maybe the model is not right (based on this answer on Stack Overflow.) For machines where a component cannot be made, I have used a really large number (10000000) as part of cost.
Using any other package/approach is fine as long as the solution can scale for large data-sets.
I realize this is a special case of bin-packing problem where the bin sizes vary and also not all bins allow all items to be kept. Any help is appreciated.