+ Reply to Thread
Results 1 to 3 of 3

Solver Challenge

  1. #1
    Registered User
    Join Date
    07-23-2017
    Location
    Peoria, USA
    MS-Off Ver
    2016
    Posts
    55

    Solver Challenge

    This is a very simple solver related exercise, I am not sure why the result is not feasible. This should be feasible..

    I am trying to maximize options available under certain price (max price constraint) and min room available constraint.

    Please help what I am doing wrong here.

    Thanks,
    Prasenjit
    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
    373

    Re: Solver Challenge

    You are requiring that price is less than price_calc, and rooms is greater than min rooms. Let's take the first row with data, 2, and see what happens with different values for the binary var (in column D).

    If we set D2 to 1, the second constraint is satisfied (3>2), but the first isn't (78650<60000). And if we set D2=0, the first is satisfied but the second isn't. So...

    What you are really asking to Solver is: choose among the rows that satisfy both constraints, and maximize their sum. One way to express this problem is to check with a logical expression if one bin var can be chosen, for instance

    =--AND(A2<=F2,B2>=H2)

    and remove the other constraints, which are not needed anymore.

    HTH,

    Francesco
    Attached Files Attached Files
    Last edited by Hydraulics; 04-08-2023 at 03:58 PM.
    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
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Solver Challenge

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. SOLVER Error Message: excel solver objective cell contents must be a formula
    By bluevil in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-03-2022, 05:38 AM
  2. Replies: 5
    Last Post: 10-09-2020, 03:33 AM
  3. Replies: 2
    Last Post: 06-22-2020, 03:14 PM
  4. Extreme Challenge : Solver to optimize a perfect combination/blend of supplier
    By chris1089 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-07-2015, 03:23 PM
  5. Replies: 0
    Last Post: 07-20-2014, 12:45 PM
  6. Can't start Solver. Error message says Solver.xlam already open.
    By DaveHills in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 10-21-2012, 11:02 AM
  7. 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

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