Originally posted by: vahid_mlkr
Hi
I was wondering that after importing cplex to eclipse, does the following functions return the summations over all i and j of the arrays or not.
Let's say:
m =10; n=10; I = {1,..,10}; t={1,...,10} J = {1,..,10}; i in I and j in J
Considering Xi,j,t as the decision variable, Li,j as a Binary variable and C as a constant.
=======
//defining the decision variable
IloNumVar [][][] x = new IloNumVar[m][][];
for(int i=0; i<m; i++) {
x[i] = new IloNumVar[n][];
for(int j=0; j<n; j++) {
x[i][j] = cplex.boolVarArray(t);
}
}
//defining an expression, the value of a parameter called D
IloNumExpr D = cplex.numExpr();
for (int i = 0; i<m; i++){
for(int j=0; j<n; j++) {
for (int k = 0 ; k<t.length; t++){
D = cplex.prod(cplex.prod(x[i][j][tt], L[i][j]), c);
=========
Does this D retrieves the summation over all i and j OR is it just retrieving a single value over a single i and j at a time ?
What I mean is that does cplex.prod (since I have 3 parameters (decision variable, binary variable and constant, all to be multiplied to each other) does the same job as cplex.addTerm ?
=========
As best of my understanding cplex.addTerm is of course additive and does the summation over all i and j (if I have understood that correctly)
=========
And my 2nd question is if this ever considered as a linear or quadratic problem ?
Many thanks in advance
#DecisionOptimization#MathematicalProgramming-General