Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
1 reply Latest Post - ‏2013-05-10T14:13:11Z by rdumeur
SystemAdmin
SystemAdmin
623 Posts
ACCEPTED ANSWER

Pinned topic How to detect proven solution in cp

‏2013-01-27T19:19:14Z |
Hi,
I'm trying to combine MIP and CP using opl. I have an algorithm and I want to stop it when CP found a proven optimal rather than terminated by fail limit or stg else.
CP shows if it is proven solution, but how can I represent it with opl?
E.g.
if(cp.param.provenoptimal(true)){

bla...
bla....
}
Does anyone know an opl parameter something like above?
  • rdumeur
    rdumeur
    63 Posts
    ACCEPTED ANSWER

    Re: How to detect proven solution in cp

    ‏2013-05-10T14:13:11Z  in response to SystemAdmin

    Hi,

    Sorry for the late answer. As you may have found by yourself, optimality is proven by letting the solver run without specifying any limit.

    That is if you invoke solve() on the solver, it will run until optimality is reached. If you use startNewSearch() and next(), you will possibly obtain multiple solutions until next() returns false. In which case, the latest obtained solution is optimal.

    I hope this helps,

    Cheers,