[Scip] Best solution not feasible

Gerald Gamrath gamrath at zib.de
Mon Mar 4 10:44:56 MET 2013


Hi Steve,

I had a look into scip.c, but I'm not sure what might have happened in
your case. But here are some things we can check:

1) Can you print out the transformed problem after the SCIPfreeSolve()
call via SCIPprintTransProblem() to check whether the priced-in
variables are still present?

2) How do you get the solution values of the variables in the solution?
In particular, how do you get the variables for whose values you ask? If
you use SCIPgetOrigVars(Data), this won't give you the priced-in
variables, on the other hand, SCIPgetVars(Data), should give you all
transformed variables, including priced-in ones. You should be able to
check via SCIPvarIsTransformedOrigvar() whether a transformed variable
belongs to some original variable or was priced in. What does the
solution look like when you print it using SCIPprintBestSol() (or
better, print all solution using SCIPprintSol() on each one)?

3) In SCIPfreeSolve(), the EXITSOL callback of all plugins are called,
could it be that you release some data there that you actually want to
keep (e.g., in your pricer or problem data)?

Best,
Gerald

On 04.03.2013 07:20, Stephen J Maher wrote:
> Hi all,
>
> I have been looking into this a little further to identify what is 
> happening. It appears that when SCIPfreeSolve() is called the 
> transformed variables in the stored solutions are freed. So when 
> SCIPgetBestSol() is called, only the original variables appear.
>
> At later iterations, if the transformed variables were still present, 
> then the solutions would be feasible. So the solutions are feasible, but 
> they just don't appear that they are. Unfortunately I don't know how to 
> extract the best solution with the transformed and original variables.
>
> Cheers,
>
> Steve
>
>
>
> On 28/02/13 12:09, Stephen J Maher wrote:
>> Hi all,
>>
>> I am having some difficulty with SCIP returning the best solution from
>> the SCIPgetBestSol() function that is not feasible for my problem. In
>> addition, I am also checking the solution using SCIPcheckSol(), which
>> indicates that it is feasible.
>>
>> My solution process involves solving an IP using branch-and-price. Once
>> the optimal solution is found, I call SCIPfreeSolve(), update
>> information in my pricer to generate alternative columns, and then call
>> SCIPsolve(). This is repeated until no further updates are required.
>> This solution process is followed because all feasible solutions to
>> problems solved in previous iterations are feasible to the current problem.
>>
>> The first iteration is solved as expected. The following iterations are
>> also solved as expected, and the primal and dual bounds are correct.
>> However, from the second iteration there are solutions, collected using
>> SCIPgetSols() and tested with SCIPcheckSol(), that are not feasible for
>> the problem. In the set of solutions extracted from SCIP, the optimal
>> solution (the solution that provided the primal bound) does appear. This
>> optimal solution is not set as the best solution.
>>
>> I am not too sure whether I am using the SCIPfreeSolve() function in the
>> correct way. All that I want to do is delete all the branch-and-bound
>> information and then solve again having retained a set of feasible
>> integer solutions.
>>
>> Thanks a lot for your help,
>>
>> Steve
>>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip



More information about the Scip mailing list