Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Question Regarding CPLEX Time Limit

    Posted 08/19/16 01:32 AM

    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


  • 2.  Re: Question Regarding CPLEX Time Limit

    Posted 08/19/16 02:58 AM

    Originally posted by: BoJensen


    The log files say 3603 and 3611, which I consider pretty close to your limit. CPLEX has a large amount of complex routines, constantly checking for current time (or deterministic time) would be too expensive. So typically time is checked periodically. It may happen that some modules take more time than expected and the maximum time limit is slightly overdue.


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Question Regarding CPLEX Time Limit

    Posted 08/19/16 09:51 AM

    Originally posted by: hgazula


    That makes sense. Thank you very much for the clarification.


    #CPLEXOptimizers
    #DecisionOptimization