Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
This sounds like a variation on one of Dr. R. E.D. Woolsey's scheduling problems -- given a list of tasks requiring a constrained resource, what is an optimal schedule to get the most bang for the buck.

The original is set in terms of a machine-shop with five heavy drill-presses: build the proper order of the incoming work so as to keep the presses always busy during the shift (down-tune is to be minimized). But, the presses can not be run for more than seven hours per shift with out maintenance.

The approach (if memory serves) is:

  1. Sort the list in descending order of the amount of resource needed.
  2. Remove the first N items and assign them to the each of the N buckets.
  3. Iteration Loop:
    1. The top work-item is removed from the list, checked against the existing list of buckets, and added to the first bucket that can contain it, subject to the constraint.
    2. If the work-item won't fit any bucket in the current bucket set, then the item starts a new starts a new bucket.
  4. Repeat until the work-list is exhausted.
At the end of the process, you have a list of K buckets with M items in each bucket.

If K is greater than N, the number of servers (machines), then you a) have more work than you can handle and b) a measure of the value of having another server available.

For each bucket, the sum of the resource consumed by the M items gives you that amount of additional work you could perform before running out of gas (the 'head-room').

In addition to giving you an optimal schedule for your servers, this gives you ammunition when Management asks pointed questions. ("Do you really need so many servers?", "Do we have enough capacity?", "How many more servers will we need to add if we double the work load?", etc)

----
I Go Back to Sleep, Now.

OGB


In reply to Re: Bin packing problem variation repost (see[834245]) by Old_Gray_Bear
in thread Bin packing problem variation repost (see[834245]) by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2024-04-18 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found