[Scip] including a solution found by an heuristic

michael.winkler@zib.de michael.winkler at zib.de
Thu Jun 20 10:40:59 MEST 2013


Hi Alessia,

>> - adding #define SCIP_DEBUG to sol.c does not give any additional output

At least some output you should see, did you compile SCIP itself with the
correct OPT flag (e.g. OPT=dbg)

Additionally to what Ambros already said and if you still have no clue
what's going on, you can also try valgrind by calling "valgrind yourBinary
flags problem". This might show you invalid reads and writes or
uninitialized variables during the run. For this purpose you need to
compile in dbg mode(, or at least add "-g" flag to the OPTFLAGS).

Best, Michael

> Hi Alessia,
>
> this sounds strange and I also don't understand.  I can only recommend
> you to add more printf's to SCIPsolCheck() to trace down exactly where
> the feasible flag changes to FALSE.
>
> Ambros
>
>
>
> Am 19.06.2013 12:25, schrieb Alessia Violin:
>> Hello,
>>
>> yes, the solution is for the transformed problem, and with the function
>> SCIPgetSolTransObj(scip,sol) I get the correct value for the objective
>> function in the transformed space, or with SCIPgetSolOrigObj(scip,sol)
>> in the original space.
>>
>> I tried your suggestions:
>> - adding #define SCIP_DEBUG to sol.c does not give any additional output
>> - printing out the return of solOfInterest() in SCIPprimalTrySolFree()
>> gives me TRUE. Then I tried to add another printf to check the value
>> "feasible" after the call of SCIPsolCheck and I get FALSE, so I suppose
>> the problem is here, but I don't understand as I don't get any printing
>> of violating constraints/bounds etc and I checked that it's better than
>> the current one and feasible.
>>
>> Thanks again,
>>
>> best,
>>
>> Alessia
>>
>>
>>
>>
>> On 06/18/2013 05:37 PM, Ambros Gleixner wrote:
>>> Hi Alessia,
>>>
>>> I suppose the solution lives in the transformed problem, does it?
>>>
>>> Maybe you can get some additional information if you add
>>>
>>> #define SCIP_DEBUG
>>>
>>> at the very top of src/scip/sol.c and recompile.  If not, you could
>>> add a manual debug printf to SCIPprimalTrySolFree() in primal.c to see
>>> whether solOfInterest() returns TRUE.
>>>
>>> Ambros
>>>
>>>
>>>
>>> Am 18.06.2013 16:59, schrieb Alessia Violin:
>>>> Hello,
>>>>
>>>> I am trying to implement a simple heuristic into my branch-and-price,
>>>> and I am having some troubles when adding the new solution found with
>>>> the function SCIPtrySolFree(scip, &sol, TRUE, TRUE, TRUE, TRUE,
>>>> &success).
>>>>
>>>> The "success" parameter after this call is always false, even if I
>>>> don't
>>>> get any violation of constraints/bounds etc printed out. I also
>>>> manually
>>>> checked the solution found by the heuristic, and it's feasible, not
>>>> violating the branching constraints in the current node, and better
>>>> that
>>>> the current primal bound. So I don't know where/what to search more to
>>>> avoid this and to make scip using this new solution...
>>>>
>>>> If needed I can of course provide more details on my implementation.
>>>>
>>>> Thanks in advance for any help,
>>>>
>>>> best,
>>>>
>>>> Alessia
>>>>
>>>
>>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
>



More information about the Scip mailing list