+ Reply to Thread
Results 1 to 4 of 4

Macro to loop solver

  1. #1
    Registered User
    Join Date
    10-25-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro to loop solver

    Hi all,

    I've created an optimization macro that is designed to select a certain number (10 in this case) of control sites for each test site by minimizing a correlation variable between the selected control and test site. To give you some idea of how the problem looks, I've got a pool of around 1400 control sites going down column B, and several hundred test sites going across row 8, with binary variables starting in column C, row 9 and continuing down to row 1409 and across several hundred columns:

    Control Sites__Test Sites ----------->
    ______|______Binary Variables ----------->
    ______|____________|
    ______|____________|
    ______|____________|
    ______|____________|
    _____V___________V

    So for each column starting with C, there's a test site that needs 10 control sites selected from a pool of 1400--obviously a very large problem, so I've tried to automate the process by creating a solver loop:

    Please Login or Register  to view this content.
    Unfortunately the macro doesn't seem to be changing any variables and simply sits and thinks for several hours before telling me it's finished without actually having done anything. Since I'm a relative novice with macros, it may be something simple I'm leaving out, but any help would be greatly appreciated.
    Last edited by NMason; 10-25-2010 at 08:55 AM. Reason: Code tags required, Please read the Forum Rules

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Macro to loop solver

    Welcome to the forum.

    You have 1401 binary cells that you want Solver to evaluate to minimize the target cell -- that's ~ 10^420 combinations. Consider that if you packed protons like billiard balls into a cube the size of the universe, you'd only have about 10^123 of them.

    I think the few hours that Solver spends is just meditating on the unsolvable enormity.
    Last edited by shg; 10-25-2010 at 11:53 AM.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    10-25-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Macro to loop solver

    I'm using Frontline's risk solver platform, which is able to handle up to 8000 different variables on a convex lp problem like this one. Is there something about the binary nature of these variables that makes the problem unique? Seems to me the software should be able to handle 1400 variables if it's designed to handle much larger numbers, but perhaps I'm missing something.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Macro to loop solver

    With a changing cells as continuous variables, Solver can calculate the partial derivatives of their effect on the target cell in iterating to a solution. I expect with binary values and a non-linear problem, it's less closed-loop.

    What does Frontline say?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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