+ Reply to Thread
Results 1 to 7 of 7

Excel Solver | Why does Simplex LP not work on this model?

  1. #1
    Registered User
    Join Date
    11-13-2021
    Location
    Lisbon
    MS-Off Ver
    Microsoft 365
    Posts
    4

    Question Excel Solver | Why does Simplex LP not work on this model?

    Hi community,

    first of all, I hope I post this under the right category and that there is someone who has experience with the excel solver function.

    Attached, you can find:
    (a) an assignment we have to do for a course in university
    (b) my solution, which should theoretically work (also checked with the professor, who says the modelling is correct)

    The problem:
    Despite the fact that everything seems to be modelled correctly, I can't run the solver with the linear SIMPLEX LP function, which is the only one that gives you the global optimum. However, others (whose models look pretty much the same) are able to use the SIMPLEX LP and the professor also said this is what she is aiming for.
    I have been re-modelling it several times, but it doesn't work for some reason. Is anyone in here able to help?
    Note: The mistake has to be somewhere in the demand constraint I believe.

    Thanks so much in advance for your time - it is appreciated!
    MauWi
    Attached Files Attached Files

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

    Re: Excel Solver | Why does Simplex LP not work on this model?

    First, in order to use the Simplex engine, all your equations must be linear. This means that you cannot multiply, for instance, a binary variable and a continuous/integer one (I haven't checked if this happens in your model)..

    Second, Simplex will not work with SUMIF, or any other IF function, as you can check here.

    Building a linear model may be hard, but don't give up.

    HTH,

    Francesco
    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.

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

    Re: Excel Solver | Why does Simplex LP not work on this model?

    I have checked your workbook, and didn't find any problem. There are a couple of SUMIFs that can be easily changed to simple sums. I have also simplified a little your setup.

    With your original data, OpenSolver can easily give you a solution. Playing with inputs (setting ZD.03 <= 1 instead of = 1, or relaxing the binary constraints) I got reasonable results. Yet, Solver still complained about the model being non linear, without a single hint about what's wrong: the linearity report highlights every constraint.

    After rebuilding the model with inputs/1000 (as given), Solver gladly reported the solution I'm attaching. I think it may have been a problem of scaling, but it's a wild guess. Anyhow, it's good practice keeping figures as small as you can.

    HTH,

    Francesco
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-13-2021
    Location
    Lisbon
    MS-Off Ver
    Microsoft 365
    Posts
    4

    Re: Excel Solver | Why does Simplex LP not work on this model?

    Hi Francesco,

    thank you so much for taking the time to look and improve the model.
    However, your solution does not take into account that the unsatisfied demand are turned into demands for other models, right? I think this is the tricky part.
    Or am I missing something?

    Best regards
    MauWi

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

    Re: Excel Solver | Why does Simplex LP not work on this model?

    Have you checked cells K23:K25? I haven't really improved your model, just rearranged the layout to be sure it was linear.

    If you divide by 1000 your inputs and change the SUMIFs, Solver works fine with your original workbook (and gives you the same solution, of course).

    HTH,

    Francesco

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

    Re: Excel Solver | Why does Simplex LP not work on this model?

    After some test, I confirm this is a problem of scaling, and it is a known "feature" as reported here.

    With the original workbook, Solver complains about the model being non linear not right at the start, but after 13 iterations. This behavior is connected only to Capacity and Initial demand data, changing the magnitude of other inputs has no effect.

    Rescaling inputs is the easiest solution, another one is setting a higher tolerance for constraint precision, such as 0.001.

    HTH,

    Francesco

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,879

    Re: Excel Solver | Why does Simplex LP not work on this model?

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note:this requirement is not optional. No help to be offered until the links are provided.)

    You have been advised of this on another forum. Please abide by forum rules
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. GRG solver finds solution, but Simplex and opensolver do not
    By rvhoorn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2021, 11:23 AM
  2. Replies: 7
    Last Post: 03-01-2021, 05:30 PM
  3. [SOLVED] Excel Solver: Simplex LP. Constraints are not respected
    By MathiasA in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-20-2020, 07:42 AM
  4. Excel Solver: Simplex LP. Constraints are not respected
    By MathiasA in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-18-2020, 03:23 AM
  5. Simplex LP Solver Problem
    By eggspress_7 in forum Excel General
    Replies: 6
    Last Post: 10-05-2017, 04:04 AM
  6. ABS() in Excel (Simplex) Solver (Dartboard problem)
    By gxkendall in forum Excel General
    Replies: 5
    Last Post: 04-21-2015, 08:37 PM
  7. minimum spanning tree in excel solver simplex method
    By Mireille916 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-17-2015, 12:50 PM

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