Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
dicke126@umn.edu |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Operations Research Bin-packing Problem |

Date |
22 Dec 2010 13:29:46 -0600 |

Happy Holidays Statalisters,

local obsno = 0 while `obsno' <= _N { local ++obsno foreach day of numlist 1/5 { foreach block of numlist 1/2 { replace RemainingDay`day'Block`block'=Day`day'Block`block' if logid==000001

local priorday=`day'-1 replace D`day'B`block'=.b if schedmins>RemainingDay`day'Block`block'

replace D`day'B2 =.f if D`day'B1==logid

} } }

Thank you, Christopher Dickerson PhD Student University of Minnesota On Dec 16 2010, dicke126@umn.edu wrote:

I am trying to develop an initial solution to a bin-packing problem usingStata.I have 2 time blocks (different lengths) over a series of 5 days (10 totalblocks). Various processes of differing lengths need to be scheduled intothe time blocks depending on how much time remains available.As far as I can tell I need to loop over observations one at a timecompleting all the calculations in one observation before moving forward.This is because scheduling in one observation changes the available timefor all remaining observations.In plain language:

block (initially first fit but in future some form of best fit)

if the process is scheduled in a prior block)3: reduce time available in block scheduled by estimated processing timefor all remaining attempts to schedule a processI can get it to run in such a fashion that:1: all processes get scheduled in the first block on the first day becausethe time remaining in that block is not adjusted before the comparisonbetween available time and estimated processing time occurs.2: or the first observation works correctly, the available time iscorrectly carried forward to the second (and only the second) observationbut 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/

* * 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/

**References**:**st: Operations Research Bin-packing Problem***From:*dicke126@umn.edu

- Prev by Date:
**st: All possible combinations of X "nodes+neighbor clusters" that sum to a given number range** - Next by Date:
**Re: st: how to automate sorting and how to automate extracting info from a sort** - Previous by thread:
**st: Operations Research Bin-packing Problem** - Next by thread:
**st: RE: Survival analysis - individual survival functions** - Index(es):