I faced the problem. Could someone please clarify it for me?

I have an LPP where the objective function is made of an expression.

For example,

There’s a variable s(N) which is calculated as,

s1(t+1) = s1(t)+x+y -------- (1<=t<=N) -----------(1)

s2(t+1) = s2(t)+x+y -------- (1<=t<=N) -----------(2)

Therefore s(t+1) needs to be an expression

But my objective function is

maximize (s1(N+1)+s2(N+1))------------------------(3)

This is made of expressions, not variables

So as these expressions are temporary, when I check results at the end of the calculation (after “cvx_end”), it’s

cvx_optval = 0

In other words, I need the expression holder to act also as a variable. But as it’s evident from above equations (1 and 2), s is not an independent variable. It depends on x,y. So actual variables are x,y.

It would be a great help if someone could explain how to solve this. Thank you very much