<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">
<div id="divtagdefaultwrapper" style="" dir="ltr">
<p style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;">
<span style="font-size: 12pt;">Dear Geri, </span><br>
<br>
I hope you have gotten your answer by now, but if you haven't, I would like to give you some more tips. </p>
<p style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;">
</p>
<ol style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt; margin-bottom: 0px; margin-top: 0px;">
<li>Yes there are few ways to update the coefficient of variables in scip. </li></ol>
<ul style="margin-bottom: 0px; margin-top: 0px;">
<li><span style="font-size: 12pt;"> One is to add a number to the coefficient, "SCIP_CALL(SCIPaddVarObj(scip,var,value))"</span></li><li><span style="font-size: 12pt;"> Another is to replace the coefficient, "SCIP_CALL(SCIPchgVarObj(scip,var,new_weight))"</span></li></ul>
2. But I would like you to also be aware that SCIP has different stages and transferring problems and freeing those transforms is a big deal. Otherwise, even if you are able to change the weight once, you won't be able to do it again. </div>
<div id="divtagdefaultwrapper" style="" dir="ltr"><br>
</div>
<div id="divtagdefaultwrapper" style="" dir="ltr">Though it will depend on your code, here is one example. Let's say you're in a loop. The following step worked for me:</div>
<div id="divtagdefaultwrapper" style="" dir="ltr"><br>
</div>
<div id="divtagdefaultwrapper" style="" dir="ltr">for i=1,2,...</div>
<div id="divtagdefaultwrapper" style="" dir="ltr">      add a value to your coefficient</div>
<div id="divtagdefaultwrapper" style="" dir="ltr">      transform the problem</div>
<div id="divtagdefaultwrapper" style="" dir="ltr">      solve it</div>
<div id="divtagdefaultwrapper" style="" dir="ltr">      free the transform </div>
<div id="divtagdefaultwrapper" style="" dir="ltr">      transform the problem again before the start of the new loop</div>
<div id="divtagdefaultwrapper" style="" dir="ltr">      change the variable to the original if you want to</div>
<div id="divtagdefaultwrapper" style="" dir="ltr">      free the transform</div>
<div id="divtagdefaultwrapper" style="" dir="ltr"><br>
</div>
<div id="divtagdefaultwrapper" style="" dir="ltr">These is a bit complicated, but it just shows you that you can experiment on your code and that there is a way. </div>
<div id="divtagdefaultwrapper" style="" dir="ltr"><br>
</div>
<div id="divtagdefaultwrapper" style="" dir="ltr">Hope it was helpful, </div>
<div id="divtagdefaultwrapper" style="" dir="ltr"><br>
</div>
<div id="divtagdefaultwrapper" style="" dir="ltr">Best regards, </div>
<div id="divtagdefaultwrapper" style="" dir="ltr">Dawit</div>
<div id="divtagdefaultwrapper" style="" dir="ltr"><br>
<div style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;">
<div>
<hr style="display:inline-block; width:98%" tabindex="-1">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Scip <scip-bounces@zib.de> im Auftrag von Geri K <gkovacsds@gmail.com><br>
<b>Gesendet:</b> Mittwoch, 27. Oktober 2021 15:23<br>
<b>An:</b> scip@zib.de<br>
<b>Betreff:</b> [SCIP] Re-solving problems with constraint change?</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Dear All,<br>
is it possible with the SCIP C API to call solving again with changed<br>
constraint linear coefficients?<br>
So it would be probably faster than re-creating the whole problem.<br>
I would not change the constraint variables included, only their<br>
coefficients.<br>
I could not find an example or api documentation for this, is it possible<br>
and if yes, what calls are needed?<br>
Thank you,<br>
Geri<br>
_______________________________________________<br>
Scip mailing list<br>
Scip@zib.de<br>
<a href="https://listserv.zib.de/mailman/listinfo/scip" id="LPlnk906739" previewremoved="true">https://listserv.zib.de/mailman/listinfo/scip</a><br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>