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?
Does anyone know an opl parameter something like above?
Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Pinned topic How to detect proven solution in cp
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-01-30T06:27:18Z at 2013-01-30T06:27:18Z by SystemAdmin
rdumeur 270002SSEV63 Posts
Re: How to detect proven solution in cp2013-01-28T16:29:39ZThis is the accepted answer. This is the accepted answer.Dear RQT0_burcu_caglar_gencosman,
You can use
to access the search status obtained after solve. It returns an integer value
whose semantic is provided in the C++ documentation:
This web page may help you:
searching in the C++ refman yelds
... This information represents the number of constraints generated from the constraints aggregated by presolve. FailStatus = 11 This information gives the fail status of the invoking IloCP instance. After a call to IloCP::solve or IloCP::next, you can interrogate the fail status, which can be one of the following values: IloCP::SearchHasNotFailed indicates that the search has not failed. IloCP::SearchHasFailedNormally indicates that the search has failed because it has searched the entire search space. IloCP::SearchStoppedByLimit indicates that the search was stopped by a limit, such as a time limit (see IloCP::TimeLimit) or a fail limit (see IloCP::FailLimit). IloCP::SearchStoppedByLabel indicates that the search was stopped via a fail label which did not exist on any choice point (advanced use). IloCP::SearchStoppedByExit indicates that the search was exited using IloCP::exitSearch. IloCP::SearchStoppedByAbort indicates that the search was stopped by calling IloCP::abortSearch IloCP::UnknownFailureStatus indicates that the search failed for some other reason. ...
rdumeur 270002SSEV63 Posts
Re: How to detect proven solution in cp2013-01-28T16:37:51ZThis is the accepted answer. This is the accepted answer.
- rdumeur 270002SSEV
property is an integer whose value can be found by looking at definition of the C++ IloCP::ParameterValue enum:
.. SearchHasNotFailed = 12 SearchHasFailedNormally = 13 SearchStoppedByLimit = 14 SearchStoppedByLabel = 15 SearchStoppedByExit = 16 SearchStoppedByAbort = 17 SearchStoppedByException = 18 UnknownFailureStatus = 19 ...