Originally posted by: Mathsg
Hi, i am having array with 4 index and declared it as a decesion variable. I am interested to extend the size of one index through sub problem but as for i know we cant add new column to an array. i am intersted to declare it as an tuple. can i do it? i have tried it for integer linear programing but it give me wrong solution
i.e., int dvar lemda[i][j][u][v];
Now i am intersted to declear it like
tuple Index {
int pp;
int qq;
int rr;
int ss;
}
{Index} indeces = ...;
dvar int gega[indeces];
but it give me wrong solution as it cant support the one constraint which is
forall (i in flows, u in nodes, v in nodes)
Const5:
sum(p in indeces)p.qq == k[i][u][v];
i am interested to write it like when i declare it as an array
forall ( i in flows, u in nodes, v in nodes)
Const5:
sum(j in routes)lemda[i][j][u][v]== k[i][u][v];
Kindly advice me. thank you
#DecisionOptimization#OPLusingCPLEXOptimizer