Hi Mark,
Thanks for replying. My actual objective function is (exp(0.5087x) + exp(0.50875y)) which i need to maximize. So, a and b are parameters (i.e. a = 0.5087 and b = 0.50875). I need to find the optimal values of my variables x and y that maximize my objective function. In other words, my optimization problem is formulated as
maximize (exp(0.5087x) + exp(0.50875y))
subject to
0 <= x <= 3
0 <= y <= 3
x + y <= 3
Everything I wrote above after note that, applies to your problem. It is a concave optimization problem (minimizing concave objective subject to convex constraints), so CVX can not be used on it.
That said, it’s easy to see by inspection that the optimal x=0, y=3 (put “everything” on the exponential with the larger coefficient).
Thank you Mark.
You are right. The values of x and y are 0 and 3 when i try the same problem using the sequential quadratic programming (sqp) algorithm in Matlab. However, when i use the same values for a and b (i.e. a = 0.5087 and b = 0.5087), i get x = 1.5 and y = 1.5. Hence my objective function returns 4.2896, which is less than the value of 5.6 that i would have obtained when x = 0 and y = 3 or vice versa. My intuition was that even though the values of a and b are the same, the optimization tool should only care about finding the values that would maximize the objective function rather than performing just an equal allocation (i.e. x = 1.5 and y = 1.5) . So, i was wondering if CVX would give me a different result (e.g. x = 0 and y = 3).
CVX won’t give you any result. It will reject the problem.
When a = b, any combination of x and y each in [0,3] and adding to 3 will give you the same optimal objective, and are all globally optimal. As to MATLAB sqp (FMINCON?), it is only obligated to give you a local optimum, which it turns out happens to be globally optimal.
Thank you Mark, for this valuable input. Yes, i was talking about “FMINCON”.
I am sorry to bother you again… I have now picked a concave objective function as follows
maximize (-2* exp(-1.7 * x) - 3*exp(-1.2 * y) + 10)
subject to
0 <= x <= 3
0 <= y <= 3
x + y <= 3
Will this run in CVX? If yes, could you please help me code this problem in CVX. Once i know how to program this, i should be able to extend the function to account for more variables.