Originally posted by: Cplex
Hey guys!
I have a problem with the following model in CPLEX:
//Indizes
range I = 1..3;
range T = 1..2;
range Q = 1..5;
range K = 1..2;
//parameters
int c[I][T] =...;
int P =...;
int D =...;
int b[I][Q] =...;
int B[Q][T] =...;
int t[I][K] =...;
//decision variables
dvar boolean x[I][T];
//objective
dexpr int Kosten = sum(i in I,t in T) c[i][t]*x[i][t];
minimize Kosten;
//constraints
subject to{
forall(i in I)
sum(t in T) x[i][t] == 1;
forall(t in T)
sum(i in I) x[i][t] <= P;
forall(q in Q,t in T)
sum(i in I) b[i][q]*x[i][t] <= B[q][t];
forall(k in K,t in T)
sum(i in I) t[i][k]*x[i][t] <= D;
}
In the last constraint it says that t[i][k] is not an array type. I can't figure out the problem.
Any hints are highly appreciated.
Thanks in advance!
#DecisionOptimization#OPLusingCPLEXOptimizer