Topic
  • 8 replies
  • Latest Post - ‏2013-06-03T14:30:51Z by sana_
sana_
sana_
5 Posts

Pinned topic Find the time spent to reach the best feasible solution

‏2013-05-22T15:27:32Z |

Hi,

as mentioned in the title, I try to find the time spent to reach the best feasible solution if my problem is not solved to optimality because of an out of memory exception.

 

I use IloCplex library with C++ language.

Thanks !

 

  • DanielJunglas
    DanielJunglas
    149 Posts
    ACCEPTED ANSWER

    Re: Find the time spent to reach the best feasible solution

    ‏2013-05-29T07:14:18Z  
    • PaulRubin
    • ‏2013-05-22T22:40:36Z

    Attach an incumbent callback. In the callback, record the time at which the callback is entered.

     

    Paul

    If you don't want to use an incumbent callback (it disables dynamic search) you can also parse the log file or use CPX_PARAM_INTSOLFILEPREFIX and check the timestamp of the created files.

  • PaulRubin
    PaulRubin
    58 Posts

    Re: Find the time spent to reach the best feasible solution

    ‏2013-05-22T22:40:36Z  

    Attach an incumbent callback. In the callback, record the time at which the callback is entered.

     

    Paul

  • sana_
    sana_
    5 Posts

    Re: Find the time spent to reach the best feasible solution

    ‏2013-05-23T16:06:19Z  
    • PaulRubin
    • ‏2013-05-22T22:40:36Z

    Attach an incumbent callback. In the callback, record the time at which the callback is entered.

     

    Paul

    Hi Paul,

    Can you explain to me how to use a callback ?

    Thanks a lot !

    Updated on 2013-05-23T16:06:31Z at 2013-05-23T16:06:31Z by sana_
  • PaulRubin
    PaulRubin
    58 Posts

    Re: Find the time spent to reach the best feasible solution

    ‏2013-05-25T21:21:33Z  
    • sana_
    • ‏2013-05-23T16:06:19Z

    Hi Paul,

    Can you explain to me how to use a callback ?

    Thanks a lot !

    It's described in detail in the user guide, and CPLEX ships with source code for several examples that involve callbacks.

    Paul

  • sana_
    sana_
    5 Posts

    Re: Find the time spent to reach the best feasible solution

    ‏2013-05-27T13:54:12Z  
    • PaulRubin
    • ‏2013-05-25T21:21:33Z

    It's described in detail in the user guide, and CPLEX ships with source code for several examples that involve callbacks.

    Paul

    Thanks !

  • DanielJunglas
    DanielJunglas
    149 Posts

    Re: Find the time spent to reach the best feasible solution

    ‏2013-05-29T07:14:18Z  
    • PaulRubin
    • ‏2013-05-22T22:40:36Z

    Attach an incumbent callback. In the callback, record the time at which the callback is entered.

     

    Paul

    If you don't want to use an incumbent callback (it disables dynamic search) you can also parse the log file or use CPX_PARAM_INTSOLFILEPREFIX and check the timestamp of the created files.

  • sana_
    sana_
    5 Posts

    Re: Find the time spent to reach the best feasible solution

    ‏2013-05-30T19:39:30Z  

    If you don't want to use an incumbent callback (it disables dynamic search) you can also parse the log file or use CPX_PARAM_INTSOLFILEPREFIX and check the timestamp of the created files.

    I'll try to do it. The problem that I must do it automatically since I must run 620 problem tests.

    I must also explore what is the dynamic search ...

    Thanks Mr. Daniel.

    Updated on 2013-05-30T19:39:56Z at 2013-05-30T19:39:56Z by sana_
  • DanielJunglas
    DanielJunglas
    149 Posts

    Re: Find the time spent to reach the best feasible solution

    ‏2013-05-31T08:31:46Z  
    • sana_
    • ‏2013-05-30T19:39:30Z

    I'll try to do it. The problem that I must do it automatically since I must run 620 problem tests.

    I must also explore what is the dynamic search ...

    Thanks Mr. Daniel.

    You can parse the log file from within your program. You just have to register a custom output stream via IloCplex::setOut() and then parse data as CPLEX writes data to this stream.

    If you use incumbent files then there are also functions to read the modification/creation time of a file from C++. So you can do this kind of stuff automatically from your program.

  • sana_
    sana_
    5 Posts

    Re: Find the time spent to reach the best feasible solution

    ‏2013-06-03T14:30:51Z  

    You can parse the log file from within your program. You just have to register a custom output stream via IloCplex::setOut() and then parse data as CPLEX writes data to this stream.

    If you use incumbent files then there are also functions to read the modification/creation time of a file from C++. So you can do this kind of stuff automatically from your program.

    Thanks Daniel :) I used incumbent files and C++ file functions to do it.