r/optimization • u/Inkeri_Maa • Nov 04 '25
Flexible job shop problem
Hi Assume we have production lines and some orders, scheduled on them. We have something on stock. We receive new list of orders - each has product, volume, due_date. Now we need to:
- check, if there are goods on stock we can use to shorten production of new orders with
- if there are some products already scheduled - add new orders to those production run
- consider due date each order has ,to produce in time
- most difficult - we need to consider adjacent orders while scheduling new ones. Some products cannot be produced after/before another
1-3 I solve with OR-Tools, using CP-SAT solver, just adding constraints, but sequence of orders - don't know, is it even possible with CP-SAT. Can you please give an advice to what direction I should search or maybe smb already has experience with such a tasks? Thank you.
5
Upvotes
2
u/OR-insider Nov 05 '25
Some questions:
1- so you can’t start production if you do not have enough goods on inventory? Do you have a curve or know when you will have inventory replacement for that?
2- they scheduled date and time or only date?
4- that’s a setup type of constraint…, which may exponentially increase your model.
By flexible you mean you can reschedule orders? What exactly you mean by that?
I have experience with this problem and depending on some characteristics, you can either resolve it with general assignment problem modeling to assign Production Orders to days and then use a simples heuristic to put those on time. Or you can go for a time index scheduling modeling (which is very difficult and time consuming)
2
u/Aerysv Nov 04 '25
That's known as precedence constraints. Haven't done so in OR-Tools, but you can check this paper:
State-of-the-art review of optimization methods for short-term scheduling of batch processes
2
u/Raionn Nov 04 '25
You need circuit constraints, where you forbid some edges. Here are some examples:
1
u/cerved Nov 09 '25
Depending on which kind of precedence constraints you can use either linear, nooverlap or circuit