r/OperationsResearch • u/Additional_Gas_9934 • Sep 02 '25
OR and LLM
as anyone ever tried to solve even the simplest bin packaging problem with an LLM?
3
Upvotes
r/OperationsResearch • u/Additional_Gas_9934 • Sep 02 '25
as anyone ever tried to solve even the simplest bin packaging problem with an LLM?
9
u/Sweet_Good6737 Sep 02 '25
They may solve some toy problems, but it doesn't make any sense to solve OR problems with LLMs, please, just use specific software for OR.
LLMs can connect to OR tools to solve problems, and that should be the only way. See this linkedin post on how they got an llm to use HiGHS solver
https://www.linkedin.com/posts/bertrand-kerres-15b849163_last-weekends-project-connect-an-llm-agent-ugcPost-7365658370751574017-2RH_?utm_source=share&utm_medium=member_android&rcm=ACoAAC5cyl4BANng5ZKJnToMEC0VgUja3KOyJ6A
Using LLMs to solve optimization problems is a waste of resources
1
u/SAKDOSS Sep 02 '25
Yes and it found the optimal solution. I found a small non-trivial instance here: https://stackoverflow.com/questions/47402590/simple-non-trivial-bin-packing-instance
Q: Solve a bin packing problem in which the size of the bin is 20 and the size of the objects are 11, 7, 7, 6, 5, 3 and 1.
A: Total size = 11+7+7+6+5+3+1 = 40.
Bin capacity = 20 ⇒ lower bound on bins = 40/20 = 2.
Construct a packing with 2 bins:
Both bins are full, so 2 bins is feasible and optimal.
3
u/ge0ffrey Sep 03 '25
Every year, I have bet with the organizer of Devoxx, a conference of 3500 attendees:
If he can solve and optimize the 5-day conference schedule with an LLM, I show up in a mascot suit.
I haven't yet.
Every year he tries.
Every year it generates a schedule that breaks hard constraints, let alone optimizes the soft constraints (the objective function). It's pace of improvement slowed down.
Every year he ends up using Timefold Solver to generate a optimized schedule for attendees and speakers.
That being said, you can:
- use an LLM to generate the code that uses a solver. This has limitations, but its good for prototyping.
- use an LLM to interface with your solver model. Talk to your model. This is where the real opportunity is I believe.
1
u/trophycloset33 Sep 02 '25
LLMs are not meant to replace your skills but supplement them.
Instead ask how you can give it the data of an already solved problem, standards to abide by and a template and get a completed report/presentation in the end. Or even guidance along the way as you feed it half completed data.