Originally posted by: skyskyhuanghuang
Hi,everyone:
I encountered a problem. When defining the decision variables, I wrote the following form
//using CP;
int M=2;
float H[1..M][1..M]=...;
float B0=...;
float n0=...;
dvar float+ PVariety[1..M];
maximize
PVariety[1]*H[1][1]*H[1][1]/
(n0+H[2][2]*H[2][2]*PVariety[2]);
subject to
{
forall(i in 1..M)
0<=PVariety[i]<=0.251;
sum(i in 1..M)PVariety[i]<=0.502;
}
But it's wrong, how do I define the float decision variable?
#DecisionOptimization#OPLusingCPLEXOptimizer