# time larger than fixed!!

 0 hello. i have this in the main : #define N 23 start-time=clock(); readData(c); // just read a matrix of integer size N (in this case matrix 23*23) lp (c,d); // resolve it by cplex with a time limit cplex command 1h 30 final-time=clock(); time = (final_time -start-time) *0.001; printf("\n CPU = %f sec\n\n", time);  the problem shows: D efault row names c1, c2 ... being created. solution status is Feasible obj. value: 5557 gap : 1.1697 CPU = 10800.494141 sec  why the time is so large? did the main() spend another 1 h just to read a matrix size 23*23 !!!!!! asked 04 Dec '15, 04:22 fathese 19●1●9 accept rate: 0% Are you measuring CPU time or wall clock time? See here . (04 Dec '15, 06:47) Sune i just made in cplex instructions: cplex.setParam ( IloCplex :: TiLim ,5400) ; and i didn't fix any clocktime and the time return by the main fonction the program is 10800 sec and not by cplex as it was mentionned in the code. aren't they both cpu time? (04 Dec '15, 07:36) fathese You should compute the CPU time for each segment of your code separately (one for reading data and one for solving the problem). You could do the same for different parts of your lp() method (model construction, solving, etc.) to make sure it is written correctly. This way you could make sure that if there is a problem with CPLEX CPU time and where the problem is. Are you solving a LP model or a MIP one? (05 Dec '15, 12:42) Ehsan ♦ i have check the cpu time and they were correct and logic for each step i think this is a problem in setting 1 or multithread (07 Dec '15, 08:13) fathese

 1 You could also try the official CPLEX forum at https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000002059 answered 04 Dec '15, 07:56 Erling_MOSEK 616●1●4 accept rate: 3%
 0 i check the c time and the cplex time and i found that cplex is responsable for this time but what is the cause  cplex.setParam ( IloCplex :: TiLim ,5400) ; cplex.solve(); if ( !cplex.solve() ) { env.error() << "Failed to optimize LP." << endl; throw(-1); } env.out() << "solution status is " << cplex.getStatus() << endl; env.out() << "obj. value: "<< cplex.getObjValue() << endl; } catch (IloException& ex) { cerr << "Error1: " << ex << endl; } catch (...) { cerr << "Error2" << endl; } env.end(); if i write:cplex gettime it return a time much longer than fixed by tilim (5 hours or plus!!) what indicate time fixed by cplex tilim ? what did cplex do at that time??  answered 08 Dec '15, 02:58 fathese 19●1●9 accept rate: 0%
 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