+ Reply to Thread
Results 1 to 4 of 4

Solver Issue - Long wait times and breaks the binary restriction when canceled

  1. #1
    Registered User
    Join Date
    08-30-2022
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    2

    Solver Issue - Long wait times and breaks the binary restriction when canceled

    Hello all,

    I'm having issues with solver and I'm not sure how to fix this. In summary I'm trying to select ~40 rows in Solver, adding a binary column to achieve a objective value of 944,242.15. Solver takes much longer than it really should, and when I cancel the calculation solver tries to use a non-binary or non-integer value. I've tried adding constraints to my binary such as <=1 and >= 0, replaced binary and used integer and cells <=1 and >=0 instead, and any other sort of combination together. I'm taking the sumproduct of the binary and its corresponding value to = 944,242.15 in F4, and also tried just taking the sum in F5 as the objective cell but nothing seems to work. The highlighted columns is the correct answer but solver cannot seem to find the answer in a efficient way and always breaks the constraints by making the binary variables a decimal.

    Is there anyone who might know a trick here to optimize solver? (Yes, Ignore integer constraints is unchecked with a integer optimality of 0%. Automatic Scaling does not seem to make a difference. I am using Simplex LP). There absolutely is an easy and correct answer but if someone can shed some light as to why solver is doing this, or have a cleaver way of helping optimize the constraints in a way that can be used beyond this example that would be great. The ultimate goal here is to create a VBA macro that uses solver to find a negative balance in our system and summing up invoices to remove the leg work of figuring out what a customer has paid for when they do not provide a remittance slip.

    Thank you in advance.
    Attached Files Attached Files

  2. #2
    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 Issue - Long wait times and breaks the binary restriction when canceled

    Can't see what the problem is but obvious the excel solver has a problem with these values. Also tried the other two flavors of excel solver GRG Nonlinear and Evolutionary engines but result were not as good as the simplex setup.

    Then I downloaded the freebie OpenSolver build by the University of Auckland NZ and did a run with the same solver setup.

    https://opensolver.org/installing-opensolver/

    Running this solver engine it found a solution at once. See sheet "OpenSolver".

    I have no idea why the excel solver can't find this solution, perhaps to many similar value

    Original order of values same result as Francesco OpenSolver find result at once.

    Alf
    Attached Files Attached Files
    Last edited by Alf; 08-30-2022 at 03:08 PM. Reason: Uploaded wrong file

  3. #3
    Registered User
    Join Date
    08-30-2022
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    2

    Re: Solver Issue - Long wait times and breaks the binary restriction when canceled

    Bumping to see any other solutions. Solver is bizarre sometimes.

    Thank you Alf for your response.

  4. #4
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    370

    Re: Solver Issue - Long wait times and breaks the binary restriction when canceled

    Quote Originally Posted by KWiggles View Post
    Bumping to see any other solutions. Solver is bizarre sometimes.
    It just has a very poor internal engine. However, your problem is nasty.

    I have run some test using OpenSolver, and found that:

    - with the original order, the solution is found immediately;
    - if we order values from biggest to smallest, OS needs 53 seconds;
    - from smallest to biggest, 67.

    So, even OS struggles with this seemingly innocent problem with only 38 binary vars. I have changed it slightly, seeking to minimize

    =SUMPRODUCT(B3:B40,C3:C40)-Sum_required

    with the extra condition that this value should always be >=0. I have also reduced tolerance.

    HTH,

    Francesco
    Attached Files Attached Files
    Aim high or don't even try.
    ---------------------------------
    If your question has been answered, don't forget to mark the thread as SOLVED.
    If you find an answer helpful, click on the star icon at the bottom of the post.

+ 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. Issue with Solver Binary Constraints
    By NougatBike in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 07-16-2018, 11:57 AM
  2. [SOLVED] Issue - Long wait times - Mordred
    By Vaibhav in forum Suggestions for Improvement
    Replies: 4
    Last Post: 03-16-2012, 07:41 AM
  3. Solver returns non binary answer in binary constrained cells
    By Tushar Mehta in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 09-07-2005, 12:05 AM
  4. [SOLVED] Solver returns non binary answer in binary constrained cells
    By Navy Student in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 PM
  5. [SOLVED] Solver returns non binary answer in binary constrained cells
    By Navy Student in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM
  6. Solver returns non binary answer in binary constrained cells
    By Navy Student in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  7. Solver returns non binary answer in binary constrained cells
    By Navy Student in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 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