Bounded heterogeneous cutting-stock planning with inventory, kerf, auditable cut maps and explicit optimality status
moon new shop
cd shop
moon add 3smallpig/mooncutstock@0.1.0let p = @cutstock.problem(
[@cutstock.demand("beam", "wood", 40, 4)],
[@cutstock.stock("short", "wood", 85, 7, 1),
@cutstock.stock("long", "wood", 130, 12, -1)],
kerf=2, min_remnant=5,
).unwrap()
let s = @cutstock.solve(p).unwrap()
println(@cutstock.text_report(p, s).unwrap())moon run examples/procurement
moon run examples/rollover
moon run examples/scenarios
moon run cmd/mooncutstock -- demo
moon run cmd/mooncutstock -- help$inputJson = '{"schema":"mooncutstock.problem/1","demands":[{"id":"a","material":"wood","length":40,"quantity":2}],"stocks":[{"id":"s","material":"wood","length":100,"cost":8,"quantity":-1,"trim_start":0,"trim_end":0}],"kerf":2,"min_remnant":5}'
moon run cmd/mooncutstock -- solve-json $inputJson --format=text --patterns=50000 --nodes=200000| Status | Interpretation |
|---|---|
| Optimal | Complete pattern enumeration and complete bounded search; optimum proved within this model |
| FeasibleBudget | Audited feasible incumbent, but enumeration/search budget prevented proof |
| Infeasible | Complete enumeration/search proved no plan within this model |
| UnknownBudget | No incumbent and no proof; not evidence of infeasibility |
moon info && moon fmt
moon fmt --check
moon check --deny-warn
moon test --deny-warn
moon build --deny-warn
python scripts/audit.py
bash scripts/verify.sh wasm-gcfn kerf_scenarios(p : Problem, kerfs : Array[Int], limits? : Limits) -> Result[Array[KerfScenario], String]fn stock(id : String, material : String, length : Int, cost : Int, quantity : Int, trim_start? : Int, trim_end? : Int) -> StockInstall
Download zipBounded heterogeneous cutting-stock planning with inventory, kerf, auditable cut maps and explicit optimality status