# IloExtractable 99 has not been extracted by IloAlgorithm

 0 I ran my program in Visual Studio 2010 with C++ calling cplex. An error said: IloExtractable 99 has not been extracted by IloAlgorithm 0097F848. I had no idea about this error. Could you help me? The codes are as follows. ////////////////////////////////////////////////////////////////////////// #include ILOSTLBEGIN int main(int argc, char** argv) { IloEnv env; try { const char* filename; //data input if(argc>1) filename = argv[1]; else filename = "C:\\Users\\Ximenes\\Desktop\\try1.txt"; ifstream f(filename, ios::in); if(!f) { cerr << "No such file: " << filename << endl; throw(1); } IloNum T; IloNumArray2 r(env); IloNumArray2 p1(env); IloNumArray2 p2(env); IloNumArray2 s(env); f>>T; f>>r; f>>p1; f>>p2; f>>s; cout << "T=" << T << endl; cout << "r=" << r << endl; cout << "p1=" << p1 << endl; cout << "p2=" << p2 << endl; cout << "s=" << s << endl; int N=r.getSize(); cout << "N=" << N << endl; for(int i=0;i

 1 It would not surprise me if this error occurs when you are attempting to print the solution to the problem. (You can pin that down in a debugger, or by using separate try-catch blocks for each code segment). Check to be sure that every variable whose value you are trying to print actually made it into either the objective or one of the constraints. If a variable is declared but never actually used, it is never extracted. answered 19 Aug '12, 16:16 Paul Rubin ♦♦ 14.6k●4●12 accept rate: 19% Hi, Paul, can you specify how to use separate try-catch blocks for each code segment to find the error? In my code, every variable I decleared has been used in constrains or objection. Thank you. (20 Aug '12, 02:47) Ximenes The first thing I would try is putting a try-catch around the line where you print out y[i][j]. In the catch block, print a message saying which values of i and j caused the exception. If it turns out that's not where the exception occurs (I'm betting it is), then split your code (perhaps into the chunks you already have separated by blank lines) and put each chunk inside its own try-catch block, rather than putting it all inside one try. Print a different message in each catch, so that you know which block suffered the exception. (20 Aug '12, 08:20) Paul Rubin ♦♦ 1 OOPS! Never mind. I just noticed that you never extracted the model. You have made no connection between 'model' and 'cplex', so when you call cplex.solve() it is solving an empty problem. Either declare cplex with IloCplex cplex(model) or add cplex.extract(model) before calling solve(). (20 Aug '12, 08:25) Paul Rubin ♦♦ Yes, I forgot to extract the model. How dare I make such a stupid mistake. Thank you so much, professor. You are so considerate and so helpful. Thank you! (20 Aug '12, 11:31) Ximenes Thank you very much, professor Paul. I got the same error and struggled with it for some days. finally, I found the mistake. some of the variables I declared didn't used in the constrains. Now, it is OK. Thank you! (24 May '13, 04:56) bairg
 toggle preview community wiki

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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