Inspiration
I was actually participating in a Hackathon whose theme was helping SME's using AI, i was not able to participate in that Hackathon for personal reasons but for this i spoke to a owner of Garment Factory (whom i had met in a startup event, he came here to get more info on robotics training, because some company had contacted him to get his workers wear camera for collecting training data for robotics)
I spoke to him and he said 2 major problems
1) Firstly, he wanted a way to optimize his planning, since currently they send a person hourly to calculate throughput of each person who is stitching and reallocate resource and change the plan
2) Secondly he said they contract with large corporations and hence they have to adhere to layouts that comply with standards enforced by larger corporations and hence they are looking to maximize space usage by repurposing and restructuring the layout, currently this also he does it manually, so asked if this also could be optimized
These both ideas are related and i realized that these are basically optimization problems, and i realized that a lot of optimization problems are NP-Hard and are solved using solvers and heuristics but the main bottleneck itself is people's accessibility to these tools and hence this hackathon's idea Making Solver Based Optimization Accessible using AI
What it does
Currently the hackathon MVP is simplified and will explain that, but the aim is much broader and larger
In Current MVP, the factory data is fixed,
1) you can give it one order (here order means you can tell which item to make and how many of what sizes, Ex : 300M, 500L sized Navy Blue Polos) 2) you can also give some constraints over markers, fabrics, piles etc.. (currently a symbolic language is built, basically LLM will take natural language and give a structured output which basically allows to express a lot of constraints, a better flexible way is to allow LLM's to code constraints, but for now, for hackathon this is a better approach).
It now uses solver and gives the optimal plan it can find under 5 seconds (5 sec output for MVP, in real world need to think depending on the industry and use case) . Here in the plan is it will tell each lay required with what pieces and how many and how many piles, Once we know the lays we can then use that info to ask CAD nesting software to make layout as to how to place which piece
The objective here is fixed that is minimizing cost (again limited for hackathon purposes)
It also shows a Audit Trail, Verification Trail to show the given constraints are satisifed
How we built it
Regarding Building it used codex for coding, main decisions were coming up with the symbolic language like thing, allowing user to give fair enough constraints but while maintaining a fixed structure for the LLM to output.
Bottom-left 2D strip packing :
Used this for estimating usage of fabric within a marker length (not the best algo, but just used it for hackathon purposes)
Dual Agent Architecture,
1) Formulation agent : takes natural language and outputs the structure that expresses list of constraints and 2) Critic Agent : verifies the formulation against the factory data and already existing constraints and see if it makes sense .
Deterministic Validation
We also have deterministic validator from the deterministic formulation we can then check if it makes any sense
Challenges we ran into
Main challenge was to come to a middle ground of what and how much to implement , balancing the hackathon duration and complexity of what we build, Codex here helped come to a middle ground of a symbolic language to represent good enough constraints
Accomplishments that we're proud of
Happy to get to speak to someone from industry and understand and the real problem and see a way to use LLM's to solve problems related to increasing efficiency in a different domain apart from Software
What we learned
For Situation with High stakes there are ways to cover most cases and still be fairly low risk and deterministic, (i was initally tending towards more flexible but less deterministic / less auditable way using LLMs to directly code, but there seems to ways to use LLM but still have some verifiable / auditable layer )
What's next for WeaveOpt-Making Solver Based Optimization Accessible to SMEs
Need to understand problem in more detail, integrate with ERP systems and allow for more flexible objective and constraints, and refine it until we are really adding value and increasing their throughput
Moonshot is to make a generic enough layer / architecture that we can quickly get this into a lot of domains just with a few changes
Built With
- cp-sat
- docker
- fastpi
- next.js
- openrouter
- or-tools
Log in or sign up for Devpost to join the conversation.