Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Time unit

    Posted 02/17/12 10:42 PM

    Originally posted by: UMQX_Olfat_ELMahi


    Hello

    i am trying to get the time opl need to find each solution for my model in (C++) so i used

    opl.getCP().ElapsedTime but it gives me with all solutions 34

    and when i tried to get the total time needed to solve the problem i used :
    opl.getCP().SolveTime but it gives me 1001 with all solutions

    knowing that the model run in opl and fid a solution ( according to the side timer) in 00:01:55:16

    and the timer for each of the two solution is :

    610.55s
    653.48s

    can some-one help me explaining these numbers

    Thanks
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 2.  Re: Time unit

    Posted 02/20/12 11:31 AM

    Originally posted by: rdumeur


    Hi,

    This is indeed very strange and I'd like more information.
    What version of CPLEX studio do you use?
    Could you please provide the script & model that you use to get these results, I'd like to reproduce the symptoms that you have.
    Thank you in advance.

    Renaud
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 3.  Re: Time unit

    Posted 02/20/12 01:08 PM

    Originally posted by: UMQX_Olfat_ELMahi


    Hi Renaud,

    i am using cplex Version: 12.3.
    and visual studio 2008.

    i tried to upload the files but it did not work can you send me some mail to send them to ??

    thanks
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 4.  Re: Time unit

    Posted 02/21/12 06:05 AM

    Originally posted by: rdumeur


    Dear UMQX_Olfat_ELMahi ,

    Please just post the code where you get and print the time information.
    The problem might be there.

    Cheers,
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 5.  Re: Time unit

    Posted 02/21/12 12:50 PM

    Originally posted by: UMQX_Olfat_ELMahi


    sure
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 6.  Re: Time unit

    Posted 02/22/12 04:25 AM

    Originally posted by: rdumeur


    Hello,

    Accessing informations about the state of the solver can be achieved by passing the info identifier (in your case MemoryUsage and ElapsedTime) to IloCP::getInfo(...). Right now, your code prints the integer value of the info identifier (which is naturally a constant).
    So if you need to access the elapsed time, please use:
    
    cp.getInfo(IloCP::ElapsedTime)
    

    I hope this helps.

    Cheers,
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 7.  Re: Time unit

    Posted 05/23/12 01:57 PM

    Originally posted by: UMQX_Olfat_ELMahi


    Hello

    using : cp.getInfo(IloCP::ElapsedTime)

    gives me the following errors:
    /userdata/users/olibr/CPOPL_Parallel/CPOPL_MulProc/MyOpl.cpp: In function âint main(int, char**)â:
    /userdata/users/olibr/CPOPL_Parallel/CPOPL_MulProc/MyOpl.cpp:118: error: no matching function for call to âIloCP::getInfo(IloCP::ParameterValues)â
    /poly/tools/ILOG-IBM/CPLEX_Studio_Academic124/opl/include/ilcp/cp.h:1137: note: candidates are: IloInt IloCP::getInfo(IloCP::IntInfo) const
    /poly/tools/ILOG-IBM/CPLEX_Studio_Academic124/opl/include/ilcp/cp.h:1142: note: IloNum IloCP::getInfo(IloCP::NumInfo) const
    /poly/tools/ILOG-IBM/CPLEX_Studio_Academic124/opl/include/ilcp/cp.h:1146: note: IloNum IloCP::getInfo(const char*) const
    make: *** http://MyOpl.o Error 1

    can you help ?
    Thanks
    #DecisionOptimization
    #OPLusingCPOptimizer


  • 8.  Re: Time unit

    Posted 05/25/12 05:57 AM

    Originally posted by: rdumeur


    Dear UMQX_Olfat_ELMahi,

    This error is due to the fact that you use a CPO parameter enum value instead of an info value.
    Indeed,
    
    IloCP::ElapsedTime
    
    is one possible value of the
    
    IloCP::TimeMode
    
    parameter. What you should use is
    
    cp.getInfo(IloCP::SolveTime)
    
    .

    Cordially,
    Renaud
    #DecisionOptimization
    #OPLusingCPOptimizer