Originally posted by: VKV7_Anulark_Naber
varCplex.TotBranchTime and varCplex.TotBranchDetTime do not appear anywhere else except in BranchCallback::main().
I measured the cpu time by the following codes in main():
cplex.setParam(IloCplex::ClockType, 1);
IloNum StartTime = cplex.getCplexTime();
IloNum StartDetTime = cplex.getDetTime();
loop:
++n;
solve();
varCplex.CPUTime[n] = cplex.getCplexTime() - StartTime;
varCplex.CPUDetTime[n] = cplex.getDetTime() - StartDetTime;
varCplex.TotCPUTime += varCplex.CPUTime[n]; //cumulative time since the strt
varCplex.TotCPUDetTime += varCplex.CPUDetTime[n];
conditions either to go back to loop or not.
n is the loop number.
TotalCPUTime is correct as 3600 is the time limit I set, and indeed cplex is terminated by this limit.
i do not want to use wallclock time, as there may be some other processes running in parallel or on the background which can also delay the elapsed time.
#CPLEXOptimizers#DecisionOptimization