Cookbook¶
Working examples solving real problems with solvOR.
Routing & Combinatorial¶
- Traveling Salesman - Find the shortest tour visiting all cities
- Knapsack Problem - Select items to maximize value within weight limit
- Bin Packing - Pack items into minimum bins
Puzzles & Games¶
- Sudoku Solver - Solve 9x9 Sudoku using constraint programming
- N-Queens - Place N queens on a board with no conflicts
- Magic Square - Numbers 1-N² with equal row/column/diagonal sums
- Pentomino Tiling - Tile a rectangle with pentomino pieces
- Graph Coloring - Color nodes so no adjacent nodes share a color
Scheduling & Allocation¶
- Resource Allocation - Optimal task assignment with MILP
- Assignment Problem - Match workers to tasks optimally
- Nurse Scheduling - Shift scheduling with SAT
- Job Shop Scheduling - Multi-machine job scheduling
Networks & Routing¶
- Shortest Path Grid - Navigate a maze or grid
- Max Flow Network - Find maximum throughput
- Currency Arbitrage - Detect arbitrage with Bellman-Ford
Linear Programming¶
- Diet Problem - Minimum cost nutrition (LP classic)
- Production Planning - Maximize profit with resource constraints
- Portfolio Optimization - Asset allocation with LP
Tips¶
- Start Simple - Run the basic example first
- Understand the Encoding - How is the problem represented?
- Check Status - Always verify
result.statusbefore using the solution