Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8260097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:00:58+00:00 2026-06-08T03:00:58+00:00

Lets say we have multiple sizes of bins defined by Length x Width ,

  • 0

Lets say we have multiple sizes of bins defined by Length x Width , those could be called “raw material” sizes.

I need to cut certain amount of tables (rectangles, in guillotine form) out of that raw material so that the amount of raw material is minimized.

As the bins do not have the same size they should be somehow factored or prioritize to reflect their value – so a bigger bin is obviously “more expensive”.

I know this is a NP-Complete problem and I don’t expect a deterministic algorithm in a polynomial time.

I need an algorithm that solves the problem.

Any suggestions would be helpful!

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T03:01:00+00:00Added an answer on June 8, 2026 at 3:01 am

    Well, the basics are: You first need to define well a goodness function. Only after that your problem can be considered clearly stated. Let us call any layout of rectangles on your material plate an “Arrangement”. The goodnes function should map from the domain of Arrangements to the domain of real numbers, the bigger the better, let’s say. The function should be decreasing with the amount of material “wasted” in the given Arrangement, and increasing with the amount and value of the rectangles satisfied by the Arranegement. I repeat, you are the one who has to define that goodness function, that is, relative value of material and the value of the individual rectangles, which, as you say, fulfill the saying “the bigger the better”. You have to quantify it.

    Once you do this, a plethora of algorithms opens for you, the first being the random algorithm: You distribute a non-overlapping Arrangement or rectangles randomly on your sheet of material, evaluate its goodness and store it in the memory. After you do this sufficiently many times, you pick the best one. The improvement of this algorithm would be to try to pick already good arrangements and “nudge around” the rectangles a bit to gain space for one more small rectangle. That’s what Dylan might mean by using simulated annealing. And btw. don’t read that Wikipedia page on Simulated annealing, it will only mess up your head.


    Response to the comment:

    Nick, obviously, you have to use all kinds of bins from the very beginning. Let’s say you have the starting sheet of material defined (either as a bitmap, or by vectors). You’ll do the following:
    1. Randomly pick a point
    2. Randomly pick a rectangle type
    3. Randomly pick rotation
    4. If the rectangle doesn’t fit, go back to point 1.
    5. If the rectangle fits, place it on the material sheet and
    try placing a second rectangle by the same method.
    6. Then third, fourth etc., until you encounter too many failures and conclude that
    you hit a dead end.
    7. Calculate the goodness of the Resulting arrangement
    8. Go on to the next arrangment

    Now it occurs to me, that maybe your cutting machine only allows one orientation (2 axis
    with no tool rotation), so rotation of the rectangles does not have to be taken into account.
    In that case, you will randomly pick the point not just anywhere, but on the side of the material
    sheet or on the side of another rectangle already on the sheet and you will place the
    next rectangle to this point so that it has adjacent side with the side of the sheet
    or with another rectangle. In this case (no rotation) you can randomly pick a direction
    and shift the new rectangle in the chosen direction until it hits any perpendicular
    wall. That way, you’ll save computing work and create better arrangements from the get
    go. The last step is still computing the goodness function and picking the best.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say I have multiple commands like 5000 which updates some column and row
Lets say I have multiple DataGrids throughout my winform app and I want to
I have multiple tables in a MySQL database. Lets say they look like this:
I have FrameChangeAnimation class which takes multiple spritesheets and duration. So lets say I
Lets say I have multiple View controller classes using the same UIAlertView *alertView. *alertView's
Lets say that I have multiple functions that accomplish the same goal. An example
I am using EF with TPC and I have a multiple inheritance lets say
Let's say you have multiple directories that all exist on the same partition. Let's
Let's say I have a site with multiple links as follows: www.example.com/product/1 www.example.com/product/2 www.example.com/product/3
Let's say I have a static class with a static method. Multiple threads can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.