<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Stefan.</p>
<p><br>
</p>
<p>Thanks for the insigths. Of course all my constraints are modifiable and it makes perfectly sense that SCIP has no chance to detect any structure for a modifiable constraint. I will use the type-specific method.</p>
<p><br>
</p>
<p>Regards</p>
<p>Christian</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Stefan Vigerske <svigerske@gams.com><br>
<b>Gesendet:</b> Mittwoch, 12. August 2020 10:44<br>
<b>An:</b> Franzen, Christian; scip@zib.de<br>
<b>Betreff:</b> Re: [SCIP] Upgrading of linear constraints to a "special" constraint handler?</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi,<br>
<br>
also constraints that are created via the C-API during problem creation <br>
stage are upgraded to SetPPC or Knapsack, if possible. The LP file <br>
reader and the SCIP shell also just use the C-API.<br>
The upgrade happens during presolve and only in the transformed problem <br>
(the internal problem representation that SCIP works on and feels free <br>
to modify) and only if constraint isn't marked as do-not-upgrade or <br>
modifiable. Maybe some other flags are relevant, too; if you use <br>
SCIPcreateConsBasicLinear, then flags should be set automatically such <br>
that upgrades should happen if the structure of the constraint allows.<br>
<br>
Using the type-specific methods has little performance advantage, since <br>
the structure detection and upgrade can be skipped. But those are quite <br>
cheap, too.<br>
But if your constraints are modifiable, but you know that your <br>
modifications will preserve the constraint type, my guess is that you <br>
should create them with the specialized type in the beginning, since <br>
otherwise the upgrade would be skipped (cons_linear doesn't know what <br>
modifications are planned).<br>
<br>
The specialized constraint handlers may also do propagation and presolve <br>
a bit faster. There might be more, others know that better.<br>
<br>
Stefan<br>
<br>
<br>
On 8/11/20 9:20 PM, Franzen, Christian wrote:<br>
> Hi SCIP-Team.<br>
> <br>
> <br>
> When solving a MIP using SCIP's console and just reading from an LP file, I see in the statistics that constraints are automatically detected to be of some special type like SetPPC or Knapsack. However, when using the C-API to create my problem and adding
constraints via SCIPcreateConsLinear() these constraints will not be automatically upgraded to SetPPC or Knapsack constraints. Is this by intention or do I miss something?<br>
> <br>
> <br>
> Would it be beneficial within a branch-and-price-and-cut solver to use the type specific create methods like SCIPcreateConsKnapsack() or SCIPcreateConsSetcover()? My understanding is that the type specific constraint handlers offer separation of cuts, but
that is something that can not be used within in a branch-and-price method. Are there any other benefits of the more specific constraints compared to the general linear constraints?<br>
> <br>
> <br>
> Regards<br>
> <br>
> Christian<br>
> <br>
> <br>
> _______________________________________________<br>
> Scip mailing list<br>
> Scip@zib.de<br>
> <a href="https://listserv.zib.de/mailman/listinfo/scip">https://listserv.zib.de/mailman/listinfo/scip</a><br>
> <br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>