I am using GAMS with CPLEX as the solver. I want to get the exectution time of the solver (CPLEX time) as a parameter. I serached in the internet and found these two recommendations
Source: https://support.gams.com/gams:how_do_i_ ... me_in_gams
Code: Select all
Scalar tcomp, texec, telapsed1; 1tcomp = TimeComp; texec = TimeExec; telapsed1 = TimeElapsed; Display tcomp, texec, telapsed;
Source: https://support.gams.com/gams:what_is_t ... ution_time
Here you see the results of these parameters for a certain run:
Code: Select all
scalar starttime; starttime = jnow; (at the beginning of the code) scalar telapsed2; elapsed = (jnow - starttime)*24*3600; (at the end of the code)
Unfortunately none of them is the exectution time of the solver. Here you see the output by CPLEX:
Root node processing (before b&c):
Real time = 0.28 sec. (196.62 ticks)
Real time = 4.38 sec. (4347.31 ticks)
Total (root+branch&cut) = 4.66 sec. (4543.94 ticks)
MIP status(102): integer optimal, tolerance
Cplex Time: 4.66sec (det. 4543.95 ticks)
Fixing integer variables, and solving final LP...
CPXPARAM_WorkDir "C:\Users\wi9632\bwSyncAndShare\Graduiertenkolleg\Code\GAMS\Residential Area\225o\"
Tried aggregator 1 time.
LP Presolve eliminated 2732 rows and 2604 columns.
Aggregator did 1476 substitutions.
Reduced LP has 132 rows, 258 columns, and 388 nonzeros.
Presolve time = 0.00 sec. (2.89 ticks)
Initializing dual steep norms . . .
Iteration log . . .
Iteration: 1 Dual objective = 102089.890948
Fixed MIP status(1): optimal
Cplex Time: 0.02sec (det. 4.75 ticks)
Solution satisfies tolerances.
MIP Solution: 22173.860889 (26508 iterations, 3238 nodes)
Final Solve: 22173.860889 (32 iterations)
Best possible: 22174.082398
Absolute gap: 0.221510
Relative gap: 0.000010
What I basically want is to get the first CPLEX time of 4.66 seconds (it is market in the code). How can I get this? I tried it with both the CPU time and the normal time in the CPLEX option file, but in every case I do not get the CPLEX time.
Does anyone have a clue? I would really appreciate every comment.