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?

asked 24 Nov '11, 09:53

chaima23's gravatar image

chaima23
11
accept rate: 0%

retagged 26 Nov '11, 14:42

fbahr's gravatar image

fbahr ♦
4.6k716

1

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.

(24 Nov '11, 15:16) fbahr ♦

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)

(25 Nov '11, 02:25) Buxley
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×191
×30
×2

Asked: 24 Nov '11, 09:53

Seen: 2,317 times

Last updated: 26 Nov '11, 14:42

OR-Exchange! Your site for questions, answers, and announcements about operations research.