[SCIP] Copying SCIP with active pricers fails

Stefan Vigerske svigerske at gams.com
Tue Aug 8 16:39:32 CEST 2023


Hi,

since Ambros is currently unavailable, let me try to answer.
I think you should be fine if you just comment out the code that throws 
the exception in SCIP.
Ambros pushed for a fix, which is currently under review. I attach the 
patch here. All this is doing is to just circumvent the error that you got.

Stefan

On 08/08/2023 16:04, Alexander Helber wrote:
> Hi Ambros,
> 
> thank you for looking into it! I tried your suggestion, but i still 
> encountered two problems:
> 
> 1. Deactivating the pricer is not possible in the PROBLEM stage. My 
> workaround was to copy with pricing disabled and then include and 
> activate the pricer in the copied SCIP.
> 2. Due to me copying with pricing disabled, SCIP marked all copied 
> constraints to not be modifiable. This led the copy to be trivially 
> solvable in presolving. Solution here was to iterate through all my 
> original constraints and applying their modifiable tag to their copies.
> 
> So I think it would be very helpful to have a clean fix in a future 
> release :)
> 
> All the best,
> Alex
> 
> P.S: If anyone else stumbles upon the same problem and fixes it in a 
> similar way, don't forget to "SCIPcopyParamSettings" (or set them to 
> specific values for the copy) after including the pricer in the copy if 
> your pricer has parameters.
> 
> On 04.08.23 09:57, Ambros Gleixner wrote:
>> Hi Alex,
>>
>> Sorry for the longer wait.  You clearly identified a logical bug here.
>>
>> One workaround might be:
>> 1. deactivate your pricer in the sourcescip by SCIPdeactivatePricer()
>> 2. copy (with enablepricing=TRUE)
>> 3. activate your pricer again in the sourcescip
>> 4. find pricer in the targetscip and activate it
>>
>> Please let us know if that works or not.  We will look into fixing 
>> this cleanly in future versions.
>>
>> Best,
>> Ambros
>>
>>
>> Am 24.07.2023 um 11:57 schrieb Alexander Helber:
>>> Dear SCIP community,
>>>
>>> I am working on a branch-and-price approach for a specific problem 
>>> and wanted to add a simple heuristic which solves the same problem 
>>> with some variables fixed. I implemented the copying callbacks for my 
>>> problem data and pricer, but now face the problem that `SCIPcopy` 
>>> throws an exception due to the SCIP copy being in the wrong stage.
>>>
>>> The SCIP copy is a freshly created instance and therefore the INIT 
>>> stage, as expected by `SCIPcopy` (see `scip_copy:2888` in SCIP 
>>> 8.0.2). But then the pricers are added and activated (`set.c:911`), 
>>> which is only possible in the PROBLEM stage (`scip_pricer.c:380`). I 
>>> can not find a use of `SCIPcopy` with pricing enabled in the codebase 
>>> of the SCIP Optimization Suite, so it is unclear to me if I should do 
>>> something different here. I would greatly appreciate your help.
>>>
>>> All the best
>>> Alex
>>>
>>>
>>> _______________________________________________
>>> Scip mailing list
>>> Scip at zib.de
>>> https://listserv.zib.de/mailman/listinfo/scip
>> _______________________________________________
>> Scip mailing list
>> Scip at zib.de
>> https://listserv.zib.de/mailman/listinfo/scip
> 
> 
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3152.diff
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://listserv.zib.de/pipermail/scip/attachments/20230808/8467322f/attachment.bin>


More information about the Scip mailing list