Hi, everybody, I would like to ask you guys a little question. I have three maximization problems, they are Q1, Q2 and Q3, respectively, as you can see below:
For Q1, I want to find the optimal p2 to maximize the first expression, i.e., p2*(a - b*p2) - (w2*(a - b*p2) - (v2*((a - b*p2))^2)/ 2)) , the same for Q2 and Q3. In fact, it is easy to get the results for them respectively. However, my final purpose is going to find the global optimality, which means I have to compare the first expressions of the three problems. Therefore, I tried to use command Max[Q1, Q2, Q3], the result is odd. So there are two important questions: Firstly, how to pick up the optimal value of the first expressions from Q1, Q2 and Q3; secondly, which comand can be used to solve this problem of comparison since “Max” doesn’t work at all. Thank you very much in advance.
I think the main reason is that the command “Max” only works for numerial value instead of expressions which contains parameters. Anyway, thank you, Frank. Any other guys can give me some good suggestion? thank you!
Thank you, Frank. It sounds reasonable. Ok, may be it is too difficult to solve this problem, so I want to make it simpler and try to solve it with your method.
the result shows that the command ‘Max’ didn’t find out the global optimal value from the three local optimal values. It just list the results of the three progamming problems. Of course, there is a problem with Q2 this time. I find it is diffulct to find out a group of values for a , b, and other parameters to satisfy all three problems.
Thank you for your patience, Frank. You helped me a lot. In order to answer your question clearly, I uploaed several images to explain it, because it is not very convenient to type mathematical expressions here. I am looking forward to your reply. Thank you.
I don’t think that’s the main problem. Furthermore, I cann’t add your constraint to my model, because they could be decimal numbers. Frank, as an expert of mathematica, could you give me any other suggestion? Thank you!
The function Maximize has the pattern Maximize[ {obj, cons}, vars ]. I think what you are trying to do is
Maximize[ {Max[ {obj1, cons1}, {obj2, cons2}, {obj3, cons3}], vars], which doesn’t match the pattern.
That’s why I suggested reformulating the problem with Integer variables.
This sort of approach is quite common in optimization. There is a whole book
of “tricks” in optimization “Model Buildng in Mathematical Programming” by H. Paul Williams, which describes
approaches of this sort.
As to the integer variables, I wasn’t suggesting that you convert your real variables to integer variables.
I suggest you add integer (actually binary) variables to the problem to convert it to a form that Maximize can handle.
The binary variables would handle the 3 different cases.