+ Reply to Thread
Results 1 to 10 of 10

Issue with Solver

  1. #1
    Registered User
    Join Date
    02-14-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Issue with Solver

    Dear all,

    I will try to describe the issue that i have with Solver:

    I have random amounts in 2 scenarios and I am trying to find a particular target amount, which is a sum of count (x) of amounts from 2 lists – with 16 and 24 amounts

    Now, the solver is working just fine with the 16 amounts, but when trying with 24 amounts, it is not able to find the particular amount I am looking for, but is finding a slightly different result with tolerance and I am searching for this very amount. I am using GRG Nonlinear method without automatic scaling. The variable cell is SUMPRODUCT function of 2 arrays, the first one with the amounts, the other one is "0"

    attached is the file with both scenarios

    Any help will be greatly appreciated and hope I have explained myself well.
    thanks
    Attached Files Attached Files

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Issue with Solver

    Can you explain exactly what you are doing and what you expect. I have looked at your worksheet and can't figure out what you are wanting Solver to deliver.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Issue with Solver

    what is the solution? are there actually x amounts that total -916234.3 or you are just hoping there are?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Issue with Solver

    Look at the two formula cells on the sheet and then look at the Solver setup and you will understand what OP is trying to achieve.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Issue with Solver

    i have run the solver but it cant find a solution for the 24 rows so maybe there isnt one!
    then again it may be a precision thing with all those -ve numbers so there wont be a match im not sure how the tolerance thing works in solver
    Attached Images Attached Images
    Last edited by martindwilson; 02-14-2014 at 06:08 PM.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Issue with Solver

    Is this what you want? I can't get the constraints to work with it though.
    Attached Files Attached Files
    Last edited by newdoverman; 02-14-2014 at 06:32 PM.

  7. #7
    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: Issue with Solver

    but it cant find a solution for the 24 rows so maybe there isnt one!
    According to the OP

    to find a particular target amount, which is a sum of count (x) of amounts from 2 lists – with 16 and 24 amounts
    I would assume there is.

    Is this what you want? I can't get the constraints to work with it though.
    Check Solver -> Options -> "All Methods" if box "Ignore Integer Constraints" is ticked untick it and try again.

    My "best" result after sorting values smales to largest and setting "Integer Otimality %" to 0 was -916235.59 (see png file). Tested going from 5 % to 0 % on "Integer Optimlity %" but same result each time.

    Problem may be to complex for Solver?

    Alf
    Attached Images Attached Images

  8. #8
    Registered User
    Join Date
    02-14-2014
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Issue with Solver

    Thank you all guys for the efforts!

    yes, there are x amounts that total both the target amounts for the respective scenarios, that's true. Unfortunately I have to find those particular amounts and it seems solver is not working properly with a bigger number of amounts - I have tried various scenarios with over 20 amounts and could not find the solution to none of them. Sometimes it takes too much time and with the 16 amount scenario it takes a minute, so it is very odd for me. Attached is the solved 16 amount scenario so you can get a better picture of what exactly I am trying to find.

    thanks
    Attached Files Attached Files

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Issue with Solver

    I set up and ran Solver using all your parameters and this is my result. I'm not sure that it will ever work out but will try a few more times.
    Attached Files Attached Files

  10. #10
    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: Issue with Solver

    Probably a bit late but yes there is a solution as the OP said (see Solver_Solution.png)

    Alf
    Attached Images Attached Images

+ 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. Having an issue with Solver
    By jrgraha in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-11-2013, 04:51 PM
  2. please help me out with this SOLVER issue
    By reiswaffeln in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-28-2013, 06:24 AM
  3. VBA issue with Solver
    By saxa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2010, 02:14 PM
  4. Solver Issue
    By dashingdude in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-30-2008, 10:28 AM
  5. Solver issue
    By JimGrange in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-03-2008, 11:40 AM

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