Giter Club home page Giter Club logo

stock_cutter's Introduction

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

- Oh noes! The program has missing libraries (.dll files)! What do??
-> You'll need to install the "Microsoft Visual C++ Redistributable Packages for Visual Studio 2015" - available from https://support.microsoft.com/en-us/kb/2977003

- Oh noes! The program can't open the input or output file! What do??
-> Check to make sure the input file is in the same directory as the program.
-> Check to make sure that the input and output files are not open in any other application before running the program.

- Oh noes! The program is still running after so many minutes! What do??
-> The runtime of the program still hasn't been properly measured yet. It is highly dependant on the ratio (Length of stock material) / (Smallest order width) - if this is too high, the runtime will be inflated (with no guarantee of finding a solution in a reasonable amount of time). However when the ratio is not unreasonably high, then it should be able to find a solution faster than you can say 'quack'!

- Oh noes! The program seems to crash when reading the input *.csv file! What do??
-> Check the formatting of your input *.csv file - and make sure you remember the '-' separators after each cutting stock problem!

- Oh noes! Woe is me - troubles beset me in life! What do??
-> Cast all your cares on Jesus, for His yoke is easy and His burden light.

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

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.

stock_cutter's People

Contributors

thomasloke avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.