Hello!
I've been trying to debug my CPLEX code but I am stuck :(
My objective function is too long, so I defined the following array and counterparts for each parameter combination for a, b and c:
float nbArray6[p in projects, q in max_activity, s in skills] = b[p][q][s]*b[p][q][s]*b[p][q][s];
float nbArray8[p in projects, q in max_activity, s in skills] = b[p][q][s] - c[p][q][s];
(My a,b and c values are being read from the data file)
For my objective function, I defined the following expression:
dexpr float ex1 = sum(p in projects, q in 1..q_p[p], t in (ES[p]..LS[p]), ns in 1..n_s_pq[p][q]) (nbArray9[p][q][s_q[p][q][ns]]*(2*b[p][q][s_q[p][q][ns]] + 3 * a[p][q][s_q[p][q][ns]]) - 3* nbArray12[p][q][s_q[p][q][ns]] - 4* nbArray10[p][q][s_q[p][q][ns]] + 5* nbArray6[p][q][s_q[p][q][ns]]* nbArray5[p][q][s_q[p][q][ns]]);
dexpr float ex2 = ... like ex1 with mathematical expressions
dexpr float ex3 = ... like with ex1 with mathematical expressions
dexpr float ex4 = ex1 + ex2 + ex3;
dexpr float ex5 = sum(p in projects, q in 1..q_p[p], t in (ES[p]..LS[p]), ns in 1..n_s_pq[p][q]) (3 * nbArray4[p][q][s_q[p][q][ns]]* nbArray8[p][q][s_q[p][q][ns]]* nbArray5[p][q][s_q[p][q][ns]]);
dexpr float ex6 = ex4 /ex5;
I am getting an error for "ex5" : CPLEX Cannot extract ex5.
Is it possible for me to show someone my code and get some help on that?
Thank you in advance and best regards!