Skip to content

fzsun/cutstock-gurobi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cutstock-gurobi

Cutting stock code for gurobi + python

This code solves the following cutting stock model:

Master problem:
    min     \sum_{p in P} x_p
    s.t.    \sum_{p in P} patterns_{ip} * x_p ≥ d_i, for i in I
            x_p ≥ 0 and integer, for p in P

Subproblem:
    min     1 - \sum_{i in I} price_i * use_i
    s.t.    \sum_{i in I} w_i * use_i ≤ W_roll
            use_i ≥ 0 and integer, for i in I

x_p: number of times pattern p is used
price_i: dual of constraint i in the master problem
use_i: number of item i's in a new pattern

cutstock_grb.py is the code file.

All other files (.log and .lp) are generated by cutstock_grb.py.

About

Cutting stock code for gurobi + python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages