I'm trying to implement multiobjective decision optimization in CPLEX version 12.10 in the OPL IDE using the staticLexFull objective function. I have 12 decision expressions that I've included in an array of KPIs to be passed as the first argument to staticLexFull. Although I can't share the production code, in essence it looks like this:
dvar int a[1..10];
dvar int b[1..10];
dvar int c[1..25];
dvar int d[1..20];
dexpr float a_sum = sum(i in 1..10) a[i]*e[i] //e is a variable declared earlier
dexpr float b_sum = sum(i in 1..10) b[i]*f[i] //f declared earlier
dexpr float c_sum = sum(i in 1..25) c[i]*g[i]*h[i] //g & h declared earlier
dexpr float d_sum = sum(i in 1..20) d[i]*j[i] //j declared earlier
dexpr float kpis[1..4] = [a_sum, b_sum, c_sum, d_sum];
float weights[i in 1..4] = 1;
int priorities[1 in 1..4] = [1,2,3,3];
float abstol[i in 1..4] = 0.001;
float reltol[i in 1..4] = 0.001;
minimize staticLexFull(kpis, weights, priorities, abstol, reltol);
This is different from the available examples of staticLexFull for the Opl IDE; the examples provided show how to initialize the kpis array when each element of the array is dealing with the same decision variable, and so can be initialized generically, e.g.:
dvar int Life[Bord][Bord] in States;
dexpr float kpis[i in Bord1] = sum(i1 in Bord, j1 in Bord : i1 != i] Life[i1][j1];
When I try to run the above code I get an "OplRun process is not responding, you must relaunch the Run Configuration" error. I've then tried running directly with OplRun via the command prompt and get the error: "ERROR[GENERATE 209]: Invalid initialization expression for element "kpis"."
I don't know how I could initialize this array generically, which it seems is a requirement in order to run staticLexFull. This seems odd because it seems that most use cases would match mine, rather than the examples provided in the examples. Is there a way to utilize staticLexFull in the way I'm attempting to?
------------------------------
Theodore
------------------------------
#DecisionOptimization