Git Product home page Git Product logo

2d-irregular-cutting-stock-algorithm's Introduction

2D Irregular Cutting Stock Algorithm · Build Status Language CMake

Table of Contents

  1. Description
  2. Installation
  3. Build
  4. Algorithm
  5. Credits
  6. License
  7. Conclusion

Description

In operations research, the cutting-stock problem is the problem of cutting standard-sized pieces of stock material, such as paper rolls or sheet metal, into pieces of specified sizes while minimizing material wasted. It is an optimization problem in mathematics that arises from applications in industry. In terms of computational complexity, the problem is an NP-hard problem reducible to the knapsack problem. The problem can be formulated as an integer linear programming problem.

Applications

  • Stock cutting in textile industry
  • Glass cutting in glass industry
  • Paper sheets cutting in paper industry

Installation

  • Install C compiler GNU version 7.3.0
  • Install sublime text 3
  • Install cmake if not installed.

Build os

  • Open terminal
  • Clone the repository by the following command

    git clone [repository url]

  • Open sublime text 3 and open project folder 2D-Irregular-Stock-Cutting-Algorithm
  • To build run the following commands

    $ mkdir build
    $ cd build
    $ cmake ..
    $ make

  • In order to run the tests

    $ make test

  • An executable file (run) will be created.
  • Run command $ ./run to execute the program.

Algorithm · Build Status

1 function merge(Item A, Item B):
2     
3     edge PQ = findLargestEdge(A)
4     edge RS = findLargestEdge(B)
5     
6     Item C_at_PR = place item B's point R at item A's point P
7     Item C_at_PS = place item B's point S at item A's point P
8     Item C_at_QR = place item B's point R at item A's point Q
10    Item C_at_QS = place item B's point S at item A's point Q
11.
12.   return best of C_at_PR, C_at_PS, C_at_QR, C_at_QS
1. function split(vector<Item> items, int left, int right):
2.     if left == right then return items[ left ]
3.     mid = (left + right) / 2
4.     Item A = split(items, left, mid)
5.     Item B = split(items, mid + 1, right)
6      Item C
7.     for r1 in rotations:
8.         D = rotate A in r1 degree
9.         for r2 in rotations:
10.            E = rotate B in r2 degree
11.            F = merge(D, E)
12.            if F is better than C, then C = F 
13.    return C

Credits

Ahmed Fardin
Head of Sustainability
Decorte Future Industries
Cambridge, United Kingdom
Masum Bhuiyan
B. Sc. in Computer Science
Jahangirnagar University
Dhaka, Bangladesh
Kamrul Hasan
B. Sc. in Computer Science
Jahangirnagar University
Dhaka, Bangladesh

Lincense license

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

Conclusion

Checkout the wiki for detail description of the project.

2d-irregular-cutting-stock-algorithm's People

Contributors

kmtusher97 avatar masumbhuiyan avatar shaun95 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.