+ Reply to Thread
Results 1 to 5 of 5

Solver - Maximize objective but limiting the count of variable

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

    Solver - Maximize objective but limiting the count of variable

    Hello every one,

    I have an optimization problem which i need some help. I have to allocate bunch of Product into a container, so that I maximize the efficiency of the container (lower bound 95% - Upper Bound 105%). Other constraint include , i can put a maximum of 15 different product and minimum 20 of each product. I have modelled the problem in the attached sheet. How do i add the constraint that force solver to limit the number of SKU chosen <= 15. I am trying to avoid non linearity.

    I tried different cost function, but unable to find a right constraint modelling. Appreciate help
    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Solver - Maximize objective but limiting the count of variable

    I changed formula in column J to this
    Please Login or Register  to view this content.
    so the container allocation only shows when there is a selected SKU in column H. then ran it on a GRP non linear to get the attached result which gives a 105% utilisation
    Attached Files Attached Files
    Happy with my advice? Click on the * reputation button below

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

    Re: Solver - Maximize objective but limiting the count of variable

    The problem can be linearized, but Solver cannot handle it (too many constraints). There may be easier solutions, but I'm in a bit of a hurry now.

    If you switch to OpenSolver the best solution is 105% of container allocation with a cost of 1011800.

    HTH,

    Francesco

    EDIT: the formula in column D can be used to resize ranges, and then the problem is solvable with Solver. I'm updating the worksheet accordingly.
    Attached Files Attached Files
    Last edited by Hydraulics; 12-03-2021 at 05:30 AM.
    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.

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

    Re: Solver - Maximize objective but limiting the count of variable

    Quote Originally Posted by Crooza View Post
    I changed formula in column J to this
    Please Login or Register  to view this content.
    so the container allocation only shows when there is a selected SKU in column H. then ran it on a GRP non linear to get the attached result which gives a 105% utilisation
    Hello,

    Thank you so much. I understood the non linearity, but would prefer to transform it to a linear equation. Sometime the non linear equation gives absurd result. I dont know much math behind it, but screws up the work

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

    Re: Solver - Maximize objective but limiting the count of variable

    Quote Originally Posted by Hydraulics View Post
    The problem can be linearized, but Solver cannot handle it (too many constraints). There may be easier solutions, but I'm in a bit of a hurry now.

    If you switch to OpenSolver the best solution is 105% of container allocation with a cost of 1011800.

    HTH,

    Francesco

    EDIT: the formula in column D can be used to resize ranges, and then the problem is solvable with Solver. I'm updating the worksheet accordingly.

    Damn, you are a gem in linear programming. Thanks so much for the effort, and especially about the open solver. I tried linearizing it in excel solver from some google search, and found the exact issue. Open solver resolved it. Awesome. Thanks again.

+ 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. VBA/Solver Loop Help - Incremental Changes on Objective Value
    By stevoDE in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-17-2017, 01:03 PM
  2. Excel Solver: 2 Objective Functions (Minimization)
    By lb0389 in forum Excel General
    Replies: 1
    Last Post: 02-15-2017, 10:14 AM
  3. Solver - Objective Zero
    By skyxliner in forum Excel General
    Replies: 6
    Last Post: 12-18-2015, 02:59 PM
  4. Solver maximizing a UDF as Objective Function
    By gibsonj4 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-08-2015, 11:46 AM
  5. Excel Solver with multiple objective cells
    By hansaaa in forum Excel General
    Replies: 1
    Last Post: 07-21-2014, 03:20 PM
  6. [SOLVED] using solver to set objective to value of another cell
    By will.girling in forum Excel General
    Replies: 2
    Last Post: 11-26-2013, 10:00 AM
  7. Saving the final objective function value in solver
    By SJP22 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-21-2013, 10:47 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