SOLVED

Excel Solver

%3CLINGO-SUB%20id%3D%22lingo-sub-1684263%22%20slang%3D%22en-US%22%3EExcel%20Solver%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1684263%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20guys%2C%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EI%20just%20joined%20this%20community%20and%20I%20am%20hoping%20to%20get%20some%20knowledge%20regarding%20Excel%20Solver%20-%20I%20have%20a%20specific%20problem%20that%20I%20am%20hoping%20someone%20can%20provide%20some%20useful%20insights.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20the%20scenario%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELet's%20say%20that%20I%20am%20in%20advertising%20and%20that%20I%20get%20an%20order%20of%20100%20000%20US.%20I%20can%20distribute%20that%20money%20however%20I%20want%20on%20ten%20different%20arenas%20where%20the%20add%20will%20show.%20All%20of%20these%20arenas%20have%20a%20different%20percentage%20regarding%20how%20much%20money%20they%20will%20get%20from%20showing%20the%20add%20(COGS%25)%2C%20and%20all%20of%20these%20arenas%20also%20have%20something%20called%20%22minimum%20guarantee%22%2C%20meaning%20that%20we%20have%20to%20pay%20them%20this%20amount%20if%20(Revenue%20*%20COGS%25)%20%26lt%3B%20Minimum%20Guarantee%20(please%20see%20the%20formulas%20in%20order%20to%20understand%20the%20problem%20better).%20If%20we%20choose%20to%20spend%200%20US%20on%20an%20arena%2C%20we%20still%20have%20to%20pay%20the%20minimum%20guarantee.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFirst%20of%20all%2C%20is%20this%20a%20%3CSTRONG%3ESimplex%20LP%3C%2FSTRONG%3E%20problem%20or%20is%20it%20%3CSTRONG%3EGRG%20Nonlinear%3C%2FSTRONG%3E%20or%20%3CSTRONG%3EEvolutionary%3C%2FSTRONG%3E%3F%3CBR%20%2F%3E%3CBR%20%2F%3ESecond%2C%20I%20have%20tried%20to%20set%20the%20changing%20variables%20to%20the%20percentage%20figures%20in%20column%20K%2C%20the%20constraint%20is%20of%20course%20that%20the%20sum%20of%20these%20percentages%20should%20equal%20to%20100%25.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThird%2C%20the%20objective%20is%20to%20maximize%20the%20gross%20profit%20in%20cell%20Q16.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20to%20run%20Solver%20(GRG%20Nonlinear)%20with%20%22Use%20Automatic%20Scaling%22%20ticked%20and%20then%20I%20ran%20it%20again%20having%20it%20unticked%20-%20I%20got%20different%20results%2C%20can%20someone%20explain%20whether%20it%20should%20be%20ticked%20or%20not%3F%3CBR%20%2F%3E%3CBR%20%2F%3EI%20also%20tried%20to%20change%20the%20changing%20variables%20to%20column%20L%2C%20instead%20of%20changing%20the%20percentages%20it%20should%20change%20the%20Revenue%20amount%20(I%20thought%20it%20would%20provide%20the%20same%20answer%20but%20it%20didn't)%2C%20with%20the%20constraint%20that%20the%20SUM%20of%20%22Revenue%22%20should%20be%20%3D%20100%20000%20US.%3CBR%20%2F%3E%3CBR%20%2F%3ELastly%2C%20could%20someone%20please%20explain%20to%20me%20how%20I%20find%20the%20optimal%20solution%20for%20this%20example%20if%20it%20is%20even%20possible%3F%3CBR%20%2F%3E%3CBR%20%2F%3EKind%20Regards%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERobin%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1684263%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1684816%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Solver%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1684816%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F798894%22%20target%3D%22_blank%22%3E%40Robin_Lindstrom%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1st%20of%20all%20your%20problem%20is%20non-linear%20hence%2C%20if%20is%20not%20convex%20there%20is%20no%20global%20solution.%20But%20since%20the%20number%20of%20decision%20variables%20is%2010%2C%20if%20you%20run%20GRG%20Non%20linear%20with%20%22Multistart%22%20option%20checked%20use%20a%20population%20of%20100%2C%26nbsp%3B%20you%20should%20get%20a%20solution%20which%20is%20near%20optimal.%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20than%20you%20can%20run%20Evolutionary%20to%20see%20if%20you%20might%20find%20a%20better%20point.%20Just%20remember%20to%20bound%20the%20percentages%20in%20the%20arenas%20between%200%20and%201%20(two%20additional%20constraints).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20noticed%20your%20problem%20seems%20to%20have%20an%20optimal%20solution%20of%2062%2C000.%20but%20you%20also%20have%20multiple%20optimal%20values%2C%20so%20there%20exist%20a%20number%20of%20values%20that%20gives%20the%20same%20optimal%20solution.%20Add%20extra%20constraints%20if%20you%20wish%20to%20get%20the%20most%20desired%20one.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehope%20this%20is%20useful%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1685099%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20Solver%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1685099%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F746148%22%20target%3D%22_blank%22%3E%40Ramiz_Assaf%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you%20so%20much%20for%20answering!%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20might%20be%20a%20stupid%20question%2C%20but%20how%20do%20you%20know%20if%20a%20problem%20is%20linear%20or%20non-linear%2C%20and%20what%20does%20convex%20mean%3F%20Also%2C%20I%20have%20no%20idea%20what%20%22multistart%22%20does%20and%20why%20you%20set%20the%20population%20to%20100%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3CBR%20%2F%3E%3CBR%20%2F%3EMy%20other%20question%20is%20this%2C%20instead%20of%20using%20the%20column%20K%20as%20changing%20variables%2C%20let's%20decide%20to%20use%20column%20L%20instead%20(100%20000%20should%20be%20divided%20between%20these%2010%20arenas%20instead%20of%20using%20percentages).%20Why%20does%20Solver%20come%20up%20with%20another%20solution%2C%20even%20though%20the%20objective%20is%20the%20same%20and%20the%20only%20change%20I%20have%20done%20is%20for%20it%20to%20use%20amounts%20instead%20of%20percentages.%20I%20do%20get%2062%20000%20when%20I%20run%20it%20by%20percentages%2C%20but%20if%20I%20switch%20I%20get%2054%20206%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20again%20for%20taking%20the%20time%20and%20sorry%20for%20my%20lack%20of%20knowledge%2C%20I%20have%20been%20trying%20to%20search%20for%20information%20regarding%20Solver%20and%20what%20everything%20means%2C%20I%20just%20can't%20seem%20to%20find%20this%20stuf.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20regards%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERobin%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi guys,


I just joined this community and I am hoping to get some knowledge regarding Excel Solver - I have a specific problem that I am hoping someone can provide some useful insights.

 

This is the scenario:

 

Let's say that I am in advertising and that I get an order of 100 000 US. I can distribute that money however I want on ten different arenas where the add will show. All of these arenas have a different percentage regarding how much money they will get from showing the add (COGS%), and all of these arenas also have something called "minimum guarantee", meaning that we have to pay them this amount if (Revenue * COGS%) < Minimum Guarantee (please see the formulas in order to understand the problem better). If we choose to spend 0 US on an arena, we still have to pay the minimum guarantee.

 

First of all, is this a Simplex LP problem or is it GRG Nonlinear or Evolutionary?

Second, I have tried to set the changing variables to the percentage figures in column K, the constraint is of course that the sum of these percentages should equal to 100%.

 

Third, the objective is to maximize the gross profit in cell Q16.

 

I tried to run Solver (GRG Nonlinear) with "Use Automatic Scaling" ticked and then I ran it again having it unticked - I got different results, can someone explain whether it should be ticked or not?

I also tried to change the changing variables to column L, instead of changing the percentages it should change the Revenue amount (I thought it would provide the same answer but it didn't), with the constraint that the SUM of "Revenue" should be = 100 000 US.

Lastly, could someone please explain to me how I find the optimal solution for this example if it is even possible?

Kind Regards,

 

Robin

 

 

9 Replies
Highlighted

@Robin_Lindstrom

 

1st of all your problem is non-linear hence, if is not convex there is no global solution. But since the number of decision variables is 10, if you run GRG Non linear with "Multistart" option checked use a population of 100,  you should get a solution which is near optimal. 

After than you can run Evolutionary to see if you might find a better point. Just remember to bound the percentages in the arenas between 0 and 1 (two additional constraints).

 

I noticed your problem seems to have an optimal solution of 62,000. but you also have multiple optimal values, so there exist a number of values that gives the same optimal solution. Add extra constraints if you wish to get the most desired one.

 

hope this is useful

 

Highlighted

Hi @Ramiz_Assaf 

Thank you so much for answering!

This might be a stupid question, but how do you know if a problem is linear or non-linear, and what does convex mean? Also, I have no idea what "multistart" does and why you set the population to 100

My other question is this, instead of using the column K as changing variables, let's decide to use column L instead (100 000 should be divided between these 10 arenas instead of using percentages). Why does Solver come up with another solution, even though the objective is the same and the only change I have done is for it to use amounts instead of percentages. I do get 62 000 when I run it by percentages, but if I switch I get 54 206?

Thanks again for taking the time and sorry for my lack of knowledge, I have been trying to search for information regarding Solver and what everything means, I just can't seem to find this stuf.

 

Kind regards,

 

Robin

 

 

Highlighted

@Robin_Lindstrom 

 

It is convex when it has one summit, and we know there is only one. 

For example we know that the highest summit on planet earth is mount Everest. Now if you visit some other plant, and you find a very high summit, can you be sure it is the highest summit?? The answer is no. Convex (actually Concave in the case of maximization) that you know that your planet has only one summit and if you find it, it is the highest point (does this make sense?)

 

Now, if your function is not convex, you need to visit every mountain you see. if you start from one area you will only see few mountains. Multistart lets you start in different locations so you will be seeing more mountains and evaluate their heights (most probably one of them will be the max) population 100 is just a number, you can play with it, the larger the number of variables you need a bigger number obviously.

 

Why your formula is not linear, because of the max function I guess. It is ok, to keep non linear functions since you have limited number of variables.

 

Your final point why you have many solutions. if you have limited constraints, there will be multiple points satisfying the optimal solution. if I ask you for two number making the number 4. you have many different answers all of them are correct. But if I say the two numbers should be different, the options decreases.. and so on.

 

hope this makes sense

Highlighted

@Ramiz_Assaf 

 

I yet again really appreciate your explanations, and it makes things a lot more clear.

 

I did however run into a problem. I have attached a new file with more arenas, some of them have a guarantee and most of them do not. I created this example for me to be able to by myself figure out what the optimum solution is, even before running solver. You can find the optimum allocation of revenue in column "I", this gives me a gross profit of 9 323 810:- and a Gross Margin of 42.38%.

 

However, I have tried running solver with so many different options ticked/unticked, but I never get to that number. However, if I run Solver multiple times (always saving the "new numbers" it spits out as input when I run Solver again) it eventually after 8-12 times gets pretty close, but not all the way

I would really appreciate if you could have I look and provide an answer, if possible, because using this in my organization, how can I ever be sure that I get the optimal solution? And also, do I really have tu run it multiple times in order to get "close enough" instead of changing the parameters in someway and get to the answer faster?

Lastly, if Excel is limited regarding this and Solver cannot "fix it" do you suggest any other program that can?

Once again, thank you so much for taking the time.

 

Br,

 

Robin

Highlighted
Best Response confirmed by Robin_Lindstrom (Occasional Contributor)
Solution

@Robin_Lindstrom 

 

Ok so now I understood your problem and the good news, it can be linearized 

remove the max(Revenue * CoGS, Minimum guarantee )  only revenue * CoGS

 

then add a new constraint 

revenue * CoGS >= minimum guarantee

 

it makes your problem linear and you will always get an global optimal solution.

I think you obtained your solution with correct thinking, trying to revenue more than the minimum guarantee then getting more revenue from areas with lower CoGS rate.

 

Hope this is useful

 

Finally, the problem is not with the software, if the problem is not convex or concave, no one can guarantee an optimal solution.

Highlighted

@Ramiz_Assaf 

 

Hi again!

I did exactly what you said, and that it awesome, it works! 

Does this mean I should run "Simplex LP" instead of "GRG Nonlinear" ? I tried both, both provided the same result so does it even matter?

Br,

 

Robin

Highlighted

@Robin_Lindstrom 

 

If it linear, use simplex, I am not sure if GRG will always give an optimal solution if the problem is linear. I have to read about that. But why to take chances, use Simplex.

 

Best of luck

Highlighted

@Ramiz_Assaf 

 

Thanks for all your help, legend!

I really learned a lot!

Best Regards,

 

Robin

Highlighted

@Robin_Lindstrom 

 

Thanks for the interesting problem