HI everyone, I have a piece of code that has been confusing me since more than one week. Actually I m trying to extract the values of 4D matix into a new one using cplex.getvalues as follows : X= NumMatrixMatrix(env,nbJ+1); for (i=0; i<=nbJ; i++) {X[i]=NumMatrixArray(env,nbS); for (s=0; s<nbS; s++) {X[i][s]= NumMatrix(env,nbJ+1); for(j=1; j<=nbJ+1; j++) {cplex.getValues(X[i][s][j], var_succ[i][s][j]); } } } NumMatrixMatrix is a type of 4D Matrix, NumMatrixArray is a type of 3D matrix and NumMatrix is type of 2D matrix. var_succ is a 4D matrix of binary decision variables. So after solving the problem I m trying to get the values into X. But the code is not working . Could anyone help me plz? |
Please do yourself and the readers of your question a favor - and put your code in <pre> or <code> tags ...this might boost your chances to get a meaningful answer by factor 2-5.
http://www.or-exchange.com/questions/3890/cplex-c-error-while-extracting-values This is probably your problem as well...(Hard to say from the code you posted)