emadehsan / csp

Algorithm for Cutting Stock Problem using Google OR-Tools. Link to the tool:
https://emadehsan.com/csp/
MIT License
129 stars 38 forks source link

Same problem, two different answers #14

Closed ssteinerx closed 1 year ago

ssteinerx commented 2 years ago

I put in two problems, cut 4 18x36 pieces, or 4 36x18 pieces from a 48x96 sheet.

The program comes up with a different solution depending on the order of the dimensions on the pieces.

The graphics on the wrong one (Cut 1 below)are also wrong whereas the one on the correct answer (Cut 2 below) also is correct.

Swapping the dimensions of the sheet produces two different looking answers but, since the orientation of the sheet, and the outline of the remainder are not shown on the solution, it's hard telling whether the two answers are eqivalent.

Cut 1 -- wrong Cut 2 -- right

emadehsan commented 2 years ago

Hi @ssteinerx ,

Thank you for creating the issue. This repository has code only for 1D Cutting Stock Problem. Even though 2D CSP is available on website, it is an incorrect and incomplete implementation. That's why I didn't made the code public.

I didn't get the time to complete work on 2D version and as things stand right now, there is little hope that I would work on it anytime soon.

521bibi commented 2 years ago

@emadehsan I understand that the 2d you are talking about is not perfect, but the functions are enough for me to learn and use. Could you open source the 2d solution for me to learn. I need it very much Sincerely thank you for sharing

emadehsan commented 2 years ago

@521bibi I have added you to the private repository with code. Please check your inbox

521bibi commented 2 years ago

@521bibi I have added you to the private repository with code. Please check your inbox

I see, thank you sincerely

ssteinerx commented 2 years ago

@emadehsan I would be interested in the 2d code as well and may have some time. Please add me as well.

emadehsan commented 2 years ago

@ssteinerx done.

devourersouls commented 1 year ago

@emadehsan Сould you give me access too? Very interesting to see the code. Thank you!

emadehsan commented 1 year ago

@devourersouls done.

George-2022-7 commented 1 year ago

Could you open source the 2d solution for me to learn. I need it very much? Very interesting to see the code. Thank you very much!

emadehsan commented 1 year ago

@George-2022-7 I've to make a few edits before making it public. For the time being, I'm adding you to that private repo

George-2022-7 commented 1 year ago

Thank you so much!!!!

emadehsan commented 1 year ago

I have added the code for 2-Dimensional CSP to this repository.