[Scip] Adding variables in a heuristic

Gerald Gamrath gamrath at zib.de
Wed Jul 2 11:50:57 CEST 2014


Dear Jens,

you add the variable via SCIPaddPricedVar()? This adds the variable to 
the pricestore and should only be used by pricers. If your heuristic 
generates a variable, this variable needs to be added to the problem 
directly, it should not be filtered by the pricestore. Therefore, you 
need to use SCIPaddVar() in this case.

Best,
Gerald

On 02.07.2014 13:12, Jens Leoff wrote:
> Dear List,
>
> I am currently implementing a heuristic for some kind of cutting stock 
> problem. This heuristic rounds down the continuous variable value for 
> each pattern variable in the LP solution and then tries to regain 
> feasibility by adding appropriate patterns. Of course it can happen 
> that a needed pattern and its variable were not generated in a 
> previous pricing round. When I try to add the required variables in 
> the heuristic the pricestore will be non-empty and the following 
> assert fails
> src/scip/solve.c:1843: SCIPpriceLoop: Assertion 
> `SCIPpricestoreGetNVars(pricestore) == 0' failed.
> Is there a way to add new variables in a heuristic?
>
> Kind Regards
>
> Jens Leoff
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip



More information about the Scip mailing list