Originally posted by: hgazula
Hello
I ran a cardinality constrained knapsack problem in CPLEX with CPX_PARAM_TILIM set to 3600 and
Case 1
CPX_PARAM_CLOCKTYPE = 1 and
begin = clock();
status = CPXmipopt(env, lp);
if (status) {
fprintf (stderr, "Failed to optimize MIP. \n");
goto TERMINATE;
}
end = clock();
difftime = ((double) (end - begin)) / CLOCKS_PER_SEC;
Case 2
CPX_PARAM_CLOCKTYPE = default
begin = time(NULL);
status = CPXmipopt(env, lp);
if (status) {
fprintf (stderr, "Failed to optimize MIP. \n");
goto TERMINATE;
}
end = time(NULL);
difftime = ((double) (end - begin));
The corresponding output file for each case is attached.
The code to calculate the time was written based on instruction provided elsewhere in the forum.
Now my question is when the time limits was set to 3600 in each case, why is the solution time in the log more than 3600?
Any insight into this is appreciated. Thank you very much.
#CPLEXOptimizers#DecisionOptimization