Hello,
I have made a model in Optimization Studio 12.2 in order to solve it with the CP optimizer.
However the solution found does not satisfy one constraint and shows wrong objective value.
Specifically my model is something like this:
code
//some code
dvar boolean xu in Usersc in Cellsr in rbRange;
dvar boolean yc in Cellsk in plRange;
//some code
dexpr float Tu in Users = ..................
dexpr float OF = sum(u in Users) T[u];
maximize OF;
subject to {
forall(u in Users) {
T[u] >= u.demand; //demand is also float
forall(c in Cells, r in rbRange)
sum(u in Users) xu,c,r <= 1;
forall(c in Cells)
sum(k in plRange) yc,k == 1;
forall(c in Cells : c.type == 0)
yc,0 == 1;
}
//some code
[/code]
I have made also a postprocessing script in order to print the OF value. However the printed OF value is different than the shown objective (i.e. the cp.getObjValue()).
In addition, I print the T[u] for each user, and for many of them the constraint T[u] >= u.demand is not satisfied.
Can anyone help please ?
Topic

Re: Solution not satisfying constraints and wrong objective value
20121219T09:03:38ZThis is the accepted answer. This is the accepted answer.Hello,
This is surprising indeed. Maybe you should try to use a more recent version of CPLEX Optimization Studio (last version is 12.5). I know there has been some fixes/improvements around expressions A[x] where A is a floating point array.
Alternatively, if you can send us a complete model that shows the problem we could have a look.
Regards 
Re: Solution not satisfying constraints and wrong objective value
20121222T11:26:43ZThis is the accepted answer. This is the accepted answer. SystemAdmin
 20121219T09:03:38Z
Hello,
This is surprising indeed. Maybe you should try to use a more recent version of CPLEX Optimization Studio (last version is 12.5). I know there has been some fixes/improvements around expressions A[x] where A is a floating point array.
Alternatively, if you can send us a complete model that shows the problem we could have a look.
Regards
thank you for your answer. You were right. With version 12.5 my model runs without problems.