+ Reply to Thread
Results 1 to 4 of 4

Solver Problem: Only 100 Values To Check

  1. #1
    Registered User
    Join Date
    10-17-2017
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    1

    Solver Problem: Only 100 Values To Check

    Hi all,

    Keeping this brief: I am trying to run a Solver on a problem that maximises one cell by changing only 1 other variable cell - and one that must be an integer between 1 and 100. There are therefore literally only 100 different 'examples' to run - but Solver is either taking an incredibly long time to run it.

    It is quite a complicated model that it runs through (meaning the problem is not linear) but manually changing the variable (i.e. just typing in a number) takes much less than a second on hitting Enter, so my (naive) thinking was that the theoretical maximum time Excel could need to run every single one of the 100 possible solution is 100 seconds... sadly not.

    Presumably Solver is running all kinds of non-integer values in an attempt to hone-in on the optimum solution, rather than looking at the restraints and realising all it has to do is try 100 different answers.

    My question really is: am I missing something incredibly obvious, i.e. is there another tool other than Solver than I should be using to make Excel try values 1-100 in the variable cell to see which one returns the maximum value of the objective cell.

    If necessary I can create a much-simplified version of the worksheet to upload here, that removes all confidential info - but I realise such a version may (by being smaller) not have as big a problem... I have attached a screenshot of the Solver settings in case anyone can see something obvious here:

    Solver.PNG

    On Solver Method: Simplex LP does not work as the problem is not Linear; GRG Non-Linear returns the wrong answer (it always says whatever value is currently in R2 is the optimum answer, even when it isn't). Evolutionary is the one method that does work......... eventually.

    Any help gratefully received - many thanks in advance!

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Solver Problem: Only 100 Values To Check

    Hi there,

    Here's a knee-jerk response - a sort of do-it-yourself Solver which I'm unable to test without access to your workbook. Try it and see if it works for you.

    Insert the following code into a standard VBA CodeModule and run it:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your own requirements.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  3. #3
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Solver Problem: Only 100 Values To Check

    Perhaps something simpler would do as well?

    Please Login or Register  to view this content.
    This would put value from cell F104 to range M104:M204 and a formula like "=LARGE(M10:M204,1) would give you the highest number.

    Alf

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Solver Problem: Only 100 Values To Check

    I could see using a Data table for this instead of Solver: http://www.excel-easy.com/examples/data-tables.html
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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: 7
    Last Post: 12-31-2016, 12:29 PM
  2. Problem Using Solver with an optimization stock problem
    By Jagrubski in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-24-2013, 03:41 AM
  3. solver macro + simulation code + not updating solver values
    By sabinemaria in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2012, 11:37 AM
  4. Replies: 0
    Last Post: 07-12-2012, 12:47 PM
  5. [SOLVED] Excel SOLVER problem, claims it is solved but retains original values. Example given.
    By ad9051 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-25-2012, 04:18 PM
  6. Interesting Solver problem (Solver encounters an error)
    By MrShorty in forum Excel General
    Replies: 3
    Last Post: 12-22-2005, 06:55 PM
  7. Replies: 1
    Last Post: 09-25-2005, 11:05 PM

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