+ Reply to Thread
Results 1 to 17 of 17

How solver can take the Max value every time

Hybrid View

  1. #1
    Registered User
    Join Date
    01-22-2012
    Location
    treter
    MS-Off Ver
    Excel 2007
    Posts
    23

    Smile How solver can take the Max value every time

    Hi,*

    Please i need immidate support with excel, currntly I'm working to optimize production plant, but each line can produce each product at different rate, so I need excel to look for the line with highest product rate per hour and to assign the product first to that line then the remaining will be produced on the second highest line.
    Example:
    Grade. * * * * Line1. * * Line 2. * * Line3 * * * * * * * * * * * * * * * *
    X1. * * * * * * * * 25t/hr. * **20t/hr. * * *23t/hr
    X2. * * * * * * * * *20t/hr. * * 28t/hr. * * 21t/hr
    X3 * * * * * * * * * 21t/hr. * * 20t/hr. * * *29t/hr

    So I'd like excel ( solver problem (linear programing)) to make x1 in line 1 first then to select line 3 for the remaining quantity of x1, and so on.

    Simple example.xls

    This is part of big optimization problem but how to ask the solver or excel to take the highest production rate for each product per line

    Thanks
    Last edited by nlpman; 01-25-2012 at 12:33 PM. Reason: title change

  2. #2
    Registered User
    Join Date
    01-22-2012
    Location
    treter
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: How solver can take the Max value every time

    Experts, please waiting for you input.
    Last edited by nlpman; 01-23-2012 at 04:22 AM.

  3. #3
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: How solver can take the Max value every time

    assuming your data values are in cells b2:b4, this will show the rak order of each line in that row

    =CHOOSE(RANK(B2,$B2:$D2),"Line 1","line 2","Line 3")

    for example, copying this formula to three adjacent cells will return "Line 1 " in the first (most productive) "Line 3" in the second cell (third most productive) and "Line 2" in the third cell (thirs most productive) if the values in b2:b4 are 25, 20 and 23

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: How solver can take the Max value every time

    pl post a file with dummy data containing before and after information.

  5. #5
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: How solver can take the Max value every time

    assuming your data values are in cells b2:b4, this will show the rak order of each line in that row

    =CHOOSE(RANK(B2,$B2:$D2),"Line 1","line 2","Line 3")
    for example, copying this formula to three adjacent cells will return "Line 1 " in the first (most productive) "Line 3" in the second cell (third most productive) and "Line 2" in the third cell (thirs most productive) if the values in b2:b4 are 25, 20 and 23

    apologies for the double post, I've been having a few problems here
    Last edited by NickyC; 01-23-2012 at 05:58 AM. Reason: apology for double post

  6. #6
    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,784

    Re: How solver can take the Max value every time

    Hi

    Perhaps a binary "gate" may be of help? I'll upload an example so you can see for yourself if this could be of use to you.

    I'll also have a closer look at your model so I can understand your problem properly.

    Alf
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-22-2012
    Location
    treter
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: How solver can take the Max value every time

    D..........
    Last edited by nlpman; 01-24-2012 at 07:07 AM.

  8. #8
    Registered User
    Join Date
    01-22-2012
    Location
    treter
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: How solver can take the Max value every time

    Dears,

    thanks for the support. I'm very thankful for your care and welling to help and support without return. GBY.

  9. #9
    Registered User
    Join Date
    01-22-2012
    Location
    treter
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: How solver can take the Max value every time

    Thanks again,

    the whole idea is to utilize the lines for maximum production and to meet the yearly production plan, so each line has different capacity and cannot handel the whole production volume, so we have to use the second line when we reach to the max capacity of the first line.

    example, from the above example file, grade x1 will be produced on R1, and the remaining quantity for that period is to be produced on line R2, if it is free,. Please note that line R3 can not produce x1.

    finally, at te end of the production period I have to fulfil the prodction requirement of all the three product by utilizing the lines in good way.

    Regards,

    Nlpman

  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,784

    Re: How solver can take the Max value every time

    Hi nilpman

    Did you have a look at the workbook I uploaded? Is this of use to you?

    Alf

  11. #11
    Registered User
    Join Date
    01-22-2012
    Location
    treter
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: How solver can take the Max value every time

    Hi Alf,

    thankls for your follow up, I have posted more information that could help you to understand the issue better.

    Nlpman

  12. #12
    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,784

    Re: How solver can take the Max value every time

    Must say I can’t see your problem.

    If I clear range B6 to D8 and do a solver run I get this result:

    Grade production per year.
    x1 x2 x3
    R1 1265,4 934,6 0 2200
    R2 634,6 0 1665,4 2300
    R3 0 1065,4 1334,6 2400
    1900 2000 3000

    So Solver does produce most of product x1 on line R1, the balance (634,3) is then produced on line R2. Finally there is no production on line R3 of product x1 as this is one of the constraints.

    The driving force in this model (object function) is maximizing production of
    X1 + x2 + x3 and this is what solver has done.

    You got a production of 6900 (sum x1+x2+x3) and this is equal to the max capacity off your line system as given by the constraints 2200 for R1, 2300 for R2 and 2400 for R3.

    You then split the yearly production into 3 periods doing a bit of mathematical wizardry. That’s one way of trying to simulate time in the LP model I assume.

    Problem with LP models are that the concept of time does not exist so all components are available at the same time. This is seldom so in real life so it’s necessary to juggle numbers a bit in order to create a time effect.

    Alf
    Last edited by Alf; 01-24-2012 at 04:34 PM.

  13. #13
    Registered User
    Join Date
    01-22-2012
    Location
    treter
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: How solver can take the Max value every time

    Thanks Alf

    I think you did understand the problem now, so first let us focus on the overall yearly productio , as you said the solver selected on line and start the production and the remaining quantity was produce in the other line, BUT the solver did assume that all the lines are having the same production rate which is not, and this is the main problem, i need it to look for the higher production rate and start the production first on that line abd the remaining on the second highest line .
    So how can i ask solver or excel to do that and let us focus on the yearly production only.

    Thanks again.

    Nlpman

  14. #14
    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,784

    Re: How solver can take the Max value every time

    BUT the solver did assume that all the lines are having the same production rate which is not, and this is the main problem, i need it to look for the higher production rate and start the production first on that line abd the remaining on the second highest line .
    You could try to add a cost factor i.e. let the line with the highest production rate have the lowest cost factor. But there is no concept of time in Solver. All things happen at the same time. So if "line capacity" is the limiting factor does it matter which line gets used first as long as all are used to a 100 %?

    And if production volume is the limiting factor then if you have a cost factor as well Solver will utilize the "cheapest" line to a 100 % and take the balance from line 2 (second cheapest) or use line 1 and 2 to a 100 % taking the balance from line 3.

    Alf

  15. #15
    Registered User
    Join Date
    01-22-2012
    Location
    treter
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: How solver can take the Max value every time

    I did not get it, and here is more info.

    The issue is that, the solver did assume all the lines are having the same production rate. This is wrong assumption, if you look to the second table you will see that each line has better performance for one grade and lower for the other one. So i would like solver to start producing the grade X1 for example at line1 ( R1) because it has the highest production rate per hour for that grade , then the remaining quantity to be produced on the second line and so on.

    Regards,

  16. #16
    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,784

    Re: How solver can take the Max value every time

    I've added a cost matrix and this forces solver to run in the way I assume you whish.

    Alf
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    01-22-2012
    Location
    treter
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: How solver can take the Max value every time

    Alf, Nicky

    Many thanks for all of you , specially you Alf. I really appreciated all the effort and follow up. Thanks again.

    I think your last post did solve the problem. I will start to apply it and will see the result.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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