[SCIP] Delete variables before master problem is solved to optimality

Gerald Gamrath gamrath at zib.de
Tue Oct 15 21:03:25 CEST 2019


Hi Tobias,

when creating the variables, did you set them to be removable? There is 
a flag for this in SCIPcreateVar(); if you use SCIPcreateVarBasic(), you 
can use SCIPvarSetRemovable().

Then, those variables are removed from the LP if they were nonbasic for 
a certain number of LP solves, depending on the parameter 
"lp/colagelimit", which is usually set to 10. You could reduce that 
parameter to remove variables more often.

And yes, the cleanupcols(root) parameters only apply after each node, 
delvars(root) as well, but deletes the variables completely instead of 
removing them from the LP (but only variables that were marked to be 
deletable).

Best,
Gerald


On 10.10.19 17:10, Tobias Stengel wrote:
>
> Hello,
>
> I'm trying to solve a problem using column generation and solving the 
> master problem requires many pricing iterations leading to a large 
> number of generated variables.
>
> This slows the lp solver down significantly. According to the log file 
> the number of variables equals the number of columns so I assume Scip 
> did not drop any columns from the lp:
>
>
>  time | node  | left  |LP iter|LP it/n| mem |mdpt |frac |vars |cons 
> |cols |rows |cuts |confs|strbr| dualbound   | primalbound  |  gap
> r1207s|     1 |     0 |  2238k|     - | 156M|   0 |   0 | 10k|8380 |  
> 10k|8380 |   0 |   0 |   0 |      --      | 7.160129e+04 |    Inf
> r1208s|     1 |     0 |  2239k|     - | 157M|   0 |   0 | 10k|8380 |  
> 10k|8380 |   0 |   0 |   0 |      --      | 7.160121e+04 |    Inf
> r1209s|     1 |     0 |  2240k|     - | 157M|   0 |   0 | 10k|8380 |  
> 10k|8380 |   0 |   0 |   0 |      --      | 7.160044e+04 |    Inf
> r1211s|     1 |     0 |  2241k|     - | 157M|   0 |   0 | 10k|8380 |  
> 10k|8380 |   0 |   0 |   0 |      --      | 7.159907e+04 |    Inf
> r1212s|     1 |     0 |  2243k|     - | 157M|   0 |   0 | 10k|8380 |  
> 10k|8380 |   0 |   0 |   0 |      --      | 7.159789e+04 |    Inf
> r1213s|     1 |     0 |  2244k|     - | 157M|   0 |   0 | 10k|8380 |  
> 10k|8380 |   0 |   0 |   0 |      --      | 7.159727e+04 |    Inf
> r1214s|     1 |     0 |  2245k|     - | 157M|   0 |   0 | 10k|8380 |  
> 10k|8380 |   0 |   0 |   0 |      --      | 7.159654e+04 |    Inf
>
>
> (note that in this log snippet all integer variables are relaxed)
>
>
> As in an integer feasible solution only 20 of the priced variables can 
> take non-zero values I assume that most of the priced variables are 0.
>
>
> I read https://scip.zib.de/doc-6.0.2/html/FAQ.php#howtodeletevariables
>
> * SCIPvarMarkDeletable() is called for all priced variables
>
> *   SCIPsetBoolParam(scip, "lp/cleanupcols", TRUE);
>     SCIPsetBoolParam(scip, "lp/cleanupcolsroot", TRUE);
>     SCIPsetBoolParam(scip, "pricing/delvars", TRUE);
>     SCIPsetBoolParam(scip, "pricing/delvarsroot", TRUE);
>
>
> After a quick look into lp.c I got the impression that these parameter 
> only apply after a node was processed.
>
>
> Is there some mechanism to remove/delete columns within the pricing loop?
>
> Obviously one could stop Scip and start a new instance seeded with the 
> previously found variables (set Initial=FALSE). Or implement the 
> initial pricing loop yourself...
>
>
> Best regards,
>
>
> Tobias
>
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> https://listserv.zib.de/mailman/listinfo/scip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20191015/74ac0815/attachment.html>


More information about the Scip mailing list