ThomasLoke / stock_cutter

Solves the cutting stock problem using pattern-generation & the open-source CBC IP solver
MIT License
3 stars 4 forks source link

README for stock_cutter Author: Thomas Loke

//////////////////////////////////////////////////////////////////////////

1) Big picture

Howdy!! The purpose of this project is a simple one - given a .csv (comma-separated file, viewable in Excel or any plain text editor) that specifies a list of cutting stock problems, the program stock_cutter.exe produces a corresponding file -solution.csv, which outlines the solution (that is, the configuration that minimises wastage of stock material while supplying enough of each order as specified) to each of the cutting stock problems separately.

For the complete mathematical details, refer to Description.pdf.

//////////////////////////////////////////////////////////////////////////

2) Input *.csv file

This file specifies one or more cutting stock problems for the program to solve. Only the first two columns of the file are read. Each problem must follow the format shown (commas separate columns):

Length of stock material, <+ve integer value> Order width, Order quantity <+ve integer value less than length of stock material>, <+ve integer value> ... <+ve integer value less than length of stock material>, <+ve integer value> -,-

Refer to example.csv for a more concrete example of a two-problem input file.

//////////////////////////////////////////////////////////////////////////

3) stock_cutter program

The executable file requires you to input the name of the input .csv file without the file extension (e.g. example.csv is entered as: example). The input .csv file is required to be in the same directory as the executable file. Refer to section 5 for troubleshooting tips.

Once the program is done executing, it'll say so - then just type smth random and hit enter and it should close.

//////////////////////////////////////////////////////////////////////////

4) Output *-solution.csv file

This file reports all the relevant details regarding the solution to each of the cutting stock problems in the input file. Format is quite self-explainatory - see the example output file example-solution.csv for details.

//////////////////////////////////////////////////////////////////////////

5) Troubleshooting

//////////////////////////////////////////////////////////////////////////

6) Acknowledgements

Uses open-source linear programming libraries from http://www.coin-or.org/ - specifically CBC and its dependencies. Distributed under the Eclipse Public License.

Also thanks to internet for letting me rip off some text parsing functions.