Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Operations Research Bin-packing Problem


From   [email protected]
To   [email protected]
Subject   st: Operations Research Bin-packing Problem
Date   16 Dec 2010 13:47:21 -0600

I am trying to develop an initial solution to a bin-packing problem using Stata.

I have 2 time blocks (different lengths) over a series of 5 days (10 total blocks). Various processes of differing lengths need to be scheduled into the time blocks depending on how much time remains available.

As far as I can tell I need to loop over observations one at a time completing all the calculations in one observation before moving forward. This is because scheduling in one observation changes the available time for all remaining observations.

In plain language:
1: schedule process in block if estimated process time < time available for block (initially first fit but in future some form of best fit) 2: do not schedule in additional blocks (or replace as some form of missing if the process is scheduled in a prior block) 3: reduce time available in block scheduled by estimated processing time for all remaining attempts to schedule a process

I can get it to run in such a fashion that:

1: all processes get scheduled in the first block on the first day because the time remaining in that block is not adjusted before the comparison between available time and estimated processing time occurs.

2: or the first observation works correctly, the available time is correctly carried forward to the second (and only the second) observation but the comparison and scheduling of additional processes does not occur.

If the code I have created thus far would be useful, I will post.

Thank you in advance for the assistance,
Christopher Dickerson
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index