Topic
  • 2 replies
  • Latest Post - ‏2013-12-02T14:35:13Z by HowardGe
HowardGe
HowardGe
9 Posts

Pinned topic Both the two functions "cp.param.TimeLimit" and"cp.info.SolveTime" have some strange behavior

‏2013-12-02T14:16:39Z |

Hi guys,

Here i came across some strange things when i using OPL. i  set  TimeLimit to 1800s and  the cp engine run about 9mins then end automatically(see pic1).

When i decide to output the "SolveTime" on script log , the time outputed  is  back before the real solve time(see pic2).

FYI: my mode is nonlinear (nolinear objective with linear restraints)

Attachments

  • PhilippeLaborie
    PhilippeLaborie
    49 Posts

    Re: Both the two functions "cp.param.TimeLimit" and"cp.info.SolveTime" have some strange behavior

    ‏2013-12-02T14:31:54Z  

    Hello,

    You are probably running the search on multiple parallel workers (even if you did not change any search parameter, this is the default behavior: the search exploits the different cores of your machine). By default, the time is measured in terms of CPU time, this probably explains why the search stops earlier than expected. You can specify that your time limit is to be measured on elapsed time by using the following parameter: cp.param.TimeMode = "ElapsedTime".

    Philippe

  • HowardGe
    HowardGe
    9 Posts

    Re: Both the two functions "cp.param.TimeLimit" and"cp.info.SolveTime" have some strange behavior

    ‏2013-12-02T14:35:13Z  

    Hello,

    You are probably running the search on multiple parallel workers (even if you did not change any search parameter, this is the default behavior: the search exploits the different cores of your machine). By default, the time is measured in terms of CPU time, this probably explains why the search stops earlier than expected. You can specify that your time limit is to be measured on elapsed time by using the following parameter: cp.param.TimeMode = "ElapsedTime".

    Philippe

    Hi,Philippe

    Thanks very much. i used 4 workers ,so this makes sense.