+ Reply to Thread
Results 1 to 6 of 6

Calculating Optimum Combination

  1. #1
    Registered User
    Join Date
    07-01-2013
    Location
    Spaaaaaaaaaaaaaaaaaaaace!
    MS-Off Ver
    2010
    Posts
    7

    Calculating Optimum Combination

    I've been tasked with creating a tool which will find our most ideal schedule for available workforce.

    My workbook attached workbook includes:
    • ["Schedule"] sheet, wherein I can enter the number of employees STARTING at a given time of the day, rows at bottom reference how many employees are allowed that day and how many have been scheduled.
    • ["Payroll Capacity"]A sheet showing how many workers payroll can allow per each day of the week
    • ["Workload"] sheet shows amount of estimated work that will come in by hourly interval, and how long the average workpiece takes a worker to process(cell N5)
    • ["Results"] references (based on each potential start time) how many employees would be in the facility at a given hourly interval. Columns on this sheet calculate (employees in facility/(workpieces*time to process each)

    What I'm attempting:
    I need to figure out a set of scripts and\or formulas that can find every possible combination of start times on the ["Schedule"] sheet(without the total employee count["Schedule"][row 31] surpassing the allowed amount ["Schedule"][row 33]), and find which combination of start times will yield the highest On Time % on the ["Results"] sheet for each day. I've come to terms with the fact that I may need to calculate this one day at a time, and that's fine. I just can't figure out how to best calculate this info.

    I've included the workbook which contains sample data. I've tried a variety of permutation methods, even setting up tables and using a data reference that passes through Microsoft Query; but none of the methods I've found online actually work. Any time I write a script to calculate each possible combination(If I could just get a list of the possible combos, I could pretty easily run a script to validate the result of each combo, and then filter down to the top ten or twenty possibilities)... But Excel gives me errors indicating I don't have enough resources (I've researched apparently every possible fix known to man, and none of them seem to work -and I've got a pretty mean rig for this to run on, so resources shouldn't be an issue in my mind).

    If anyone can take a look and perhaps steer me in the right direction to resolve this, I would be very grateful. For reference, my work machine runs Office Pro 2010, and my home machine is Office Pro 2013. Both give me resource errors when trying permutation methods. I've included my sample data workbook for ease of understanding.

    Again, I REALLY appreciate any assistance on this... I'm not used to hitting a wall like this, usually a few quick google searches or small amount of forum perusing fixes any issue I'm having.

    WidgetsAssistance.xlsm

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Calculating Optimum Combination

    On the results sheet, should the % On Time for each Start Time be limited to <= 1 (100%) ?
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    07-01-2013
    Location
    Spaaaaaaaaaaaaaaaaaaaace!
    MS-Off Ver
    2010
    Posts
    7

    Re: Calculating Optimum Combination

    Good question! Originally I intended to cap that at 100%, but I decided not to. By letting the % go as high as it mathematically should, it provides an opportunity to see if certain schedules might actually provide an opportunity to process MORE than our workforce does currently (potentially allowing higher profit of course). I had the cap in originally, but it occurred to me that we may potentially run into multiple 100% scenarios depending on what the calculations come up with, and where our current ratio of labor force to work load is at any given time of year.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Calculating Optimum Combination

    I was able to get results using the Solver tool. Don't know if its what your looking for.
    Excel Solver

    The Results table and Schedule table have to be on the same sheet.

    Solver Parameters:
    Target Cell: Average On Time %
    Equal To: Max
    By Changing Cells: Allotted Employees Workers
    Subject to the Constraints:
    Allotted Employees Workers = integer
    Allotted Employees Workers >= 0
    Total Employees <= Allowed Employees
    % On Time <= 1 (optional)

  5. #5
    Registered User
    Join Date
    07-01-2013
    Location
    Spaaaaaaaaaaaaaaaaaaaace!
    MS-Off Ver
    2010
    Posts
    7

    Re: Calculating Optimum Combination

    I just plugged that in to the sample data sheet to see how it looks... And that is absolutely fantastic. THANK YOU!!!!

    Is there a way to get multiple solutions within a certain range? Or perhaps a list of 'top ten' highest solutions? This would potentially give us some very nice flexibility if possible.

    Again, THANK YOU THANK YOU THANK YOU!

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Calculating Optimum Combination

    Quote Originally Posted by eric.gwaltney View Post
    I just plugged that in to the sample data sheet to see how it looks... And that is absolutely fantastic. THANK YOU!!!!

    Is there a way to get multiple solutions within a certain range? Or perhaps a list of 'top ten' highest solutions? This would potentially give us some very nice flexibility if possible.

    Again, THANK YOU THANK YOU THANK YOU!
    You're welcome. Glad it worked.

    I'm not an expert with the Solver tool. I pretty much exhausted my total knowledge on the subject in the one post.

    Don't think there's a "built-in" way within the Solver tool to get multiple results. You probably could do it with a macro. Each result (Workers and Average on time) could be pasted to an output area. Then the next Solver would run with an added constraint to be less than the previous Average on time to get the top 10 results.

  7. #7
    Registered User
    Join Date
    07-01-2013
    Location
    Spaaaaaaaaaaaaaaaaaaaace!
    MS-Off Ver
    2010
    Posts
    7

    Re: Calculating Optimum Combination

    Very true. I could probably set varying result requests with recursion to make that happen. Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 02-20-2012, 07:11 PM
  2. Replies: 11
    Last Post: 06-28-2010, 11:44 PM
  3. Replies: 9
    Last Post: 01-31-2009, 08:52 AM
  4. Calculating Combination Totals
    By AmdyM in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2008, 04:10 AM
  5. calculating the best combination
    By censura in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-10-2007, 10:48 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1