anofox-optimize
anofox-optimize — packing, assignment, waves, sequencing with changeovers, knapsack and assortment selection, scheduling and replenishment — solvers callable from SQL.
INSTALL anofox_optimize FROM 'https://get.erpl.io'; -- duckdb -unsignedLOAD anofox_optimize; LOAD anofox_visualization;Plot its results
Section titled “Plot its results”The solvers return a STRUCT of lists per instance. Unnest the plan into one row per item, and the decision views draw it:
| Output | Plotted by |
|---|---|
bin packing, waves (pack_*, wave_*) |
anofox_plot_assignment: items stacked per bin against the capacity |
| knapsack, assortment | anofox_plot_selection: picked items first |
sequencing (opt_sequence_by) |
anofox_plot_sequence: cumulative setup by position |
| scheduling | anofox_plot_schedule: a Gantt per resource, late tasks marked |
| objectives per algorithm | anofox_plot_summary |
anofox_plot(t) picks the macro from the table’s columns. The macros are aggregates: GROUP BY gives one SVG per group.
In the builder
Section titled “In the builder”- How do we plan a busy day at the distribution centre?
- Which line runs which order, with the least changeover?
- Which van serves which stop tomorrow?
- What should we order this week to sell the most?
With Claude Code
Section titled “With Claude Code”anofox-optimize ships a Claude Code plugin with five skills, one per stage: formulate, prepare the data, solve, evaluate, visualize. The visualize skill ends at anofox_plot(t) over the solver’s results, so the assistant’s last step is a chart from this extension, with no reshaping.
/plugin marketplace add DataZooDE/anofox-optimize/plugin install anofox-optimize@anofox-optimizeChecked in CI
Section titled “Checked in CI”Every producer of the extension’s latest build is plotted on every push (scripts/optimize_conformance.py): a SQL error, a missing SVG or a producer without a recipe fails the run. Reference →