<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<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><span style="font-size: 14pt;">Dear SCIP community,</span><br>
</p>
<p></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US">Implementing a Branch&Price algorithm with SCIP using C++ (which works, finally), I stumbled over a strange problem. When I set up the master problem
 to later hand it over to the pricer, I not only create the (essentially empty) constraints of the master problem, but also some auxiliary (binary or integer) variables added to those constraints which I can later use to enforce branching decisions in constraint
 handlers. (I know that there are other ways to enforce branching decisions as well.)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US"><br>
</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US">When I then initialize my pricer, I obtain the addresses of the constraints of the transformed problem like this without difficulties:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;line-height:14.25pt;background:
white">
<span style="font-size:10.5pt;font-family:"Courier New";mso-fareast-font-family:
"Times New Roman";color:black;mso-fareast-language:DE"><br>
</span></p>
<p class="MsoNormal" style="margin-bottom:0cm;line-height:14.25pt;background:
white">
<span style="font-size:10.5pt;font-family:"Courier New";mso-fareast-font-family:
"Times New Roman";color:black;mso-fareast-language:DE">SCIPgetTransformedCons(_scip, p_dicbapsolver->_cons_usageLinks</span><span style="font-size:10.5pt;
font-family:"Courier New";mso-fareast-font-family:"Times New Roman";color:teal;
mso-fareast-language:DE">[</span><span style="font-size:10.5pt;font-family:
"Courier New";mso-fareast-font-family:"Times New Roman";color:black;mso-fareast-language:
DE">
</span><span style="font-size:10.5pt;font-family:"Courier New";mso-fareast-font-family:
"Times New Roman";color:teal;mso-fareast-language:DE">*</span><span style="font-size:10.5pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
color:black;mso-fareast-language:DE">(_d->link_it)
</span><span style="font-size:10.5pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
color:teal;mso-fareast-language:DE">]</span><span style="font-size:10.5pt;
font-family:"Courier New";mso-fareast-font-family:"Times New Roman";color:black;
mso-fareast-language:DE">,
 &p_dicbapsolver->_cons_usageLinks</span><span style="font-size:10.5pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
color:teal;mso-fareast-language:DE">[</span><span style="font-size:10.5pt;
font-family:"Courier New";mso-fareast-font-family:"Times New Roman";color:black;
mso-fareast-language:DE">
</span><span style="font-size:10.5pt;font-family:
"Courier New";mso-fareast-font-family:"Times New Roman";color:teal;mso-fareast-language:
DE">*</span><span style="font-size:10.5pt;font-family:"Courier New";mso-fareast-font-family:
"Times New Roman";color:black;mso-fareast-language:DE">(_d->link_it)
</span><span style="font-size:10.5pt;font-family:"Courier New";mso-fareast-font-family:"Times New Roman";
color:teal;mso-fareast-language:DE">]</span><span style="font-size:10.5pt;
font-family:"Courier New";mso-fareast-font-family:"Times New Roman";color:black;
mso-fareast-language:DE"><span style="mso-spacerun:yes">  
</span>)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US">However, when I try to get the addresses of the transformed variables like this<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:0cm;line-height:14.25pt;background:
white">
<span style="font-size:10.5pt;font-family:"Courier New";mso-fareast-font-family:
"Times New Roman";color:green;mso-fareast-language:DE"><br>
</span></p>
<p class="MsoNormal" style="margin-bottom:0cm;line-height:14.25pt;background:
white">
<span style="font-size:10.5pt;font-family:"Courier New";mso-fareast-font-family:
"Times New Roman";color:green;mso-fareast-language:DE">SCIPgetTransformedVar( _scip, p_dicbapsolver->_vars_usageLinks[ *(_d->link_it) ], &(p_dicbapsolver->_vars_usageLinks[ *(_d->link_it)
 ]<span style="mso-spacerun:yes">  </span>) </span><span style="font-size:10.5pt;
font-family:"Courier New";mso-fareast-font-family:"Times New Roman";color:black;
mso-fareast-language:DE"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US">which seems to be perfectly analogous, I get a segmentation fault. </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US"><br>
</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US">As a consequence, those auxiliary variables to enforce branching decisions which I added initially to the master problem do not get automatically released
 ,even though I set the “true” flag for this option when I created the pricer in the first place (as well as for the branching rule and the constraint handler, of course). So to get rid of the warning, I release all those variables “manually” right before I
 free the SCIP object itself, which works.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US"><br>
</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US">So now I am wondering why this is? Is it because I impose lower and upper bounds on those auxiliary variables that SCIP cannot determine transformed variables,
 which is why I have to release them on my own? Or is there some other reason why I can get the addresses of the transformed constraints, but not the addresses of the transformed variables contained in those constraints?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US">Would it be better to add those auxiliary variables to the constraints of the transformed master problem when the pricer is initialized (as opposed to
 adding them intially to the “original” master problem before the transformation takes place)? That should also work, I think, even though I have not yet tried it.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US">I would be very grateful for a hint why trying to get the transformed variables (or rather, their addresses) fails for my problem.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US">Kind regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US">Stefan Helber<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:14.0pt;line-height:107%;
mso-ansi-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:14.0pt;line-height:107%"><o:p> </o:p></span></p>
<br>
<p></p>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; 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;">
<p></p>
<p class="x_MsoNormal"><span lang="DE" style="font-size:12pt; font-family:"Times New Roman",serif,serif,"EmojiFont"">********************************************************</span></p>
<p class="x_MsoNormal"><span lang="DE" style="font-size:12pt; font-family:"Times New Roman",serif,serif,"EmojiFont"">Prof. Dr. Stefan Helber</span></p>
<p class="x_MsoNormal"><span lang="DE" style="font-size:12pt; font-family:"Times New Roman",serif,serif,"EmojiFont"">Institut für Produktionswirtschaft</span></p>
<p class="x_MsoNormal"><span lang="DE" style="font-size:12pt; font-family:"Times New Roman",serif,serif,"EmojiFont"">Wirtschaftswissenschaftliche Fakultät</span></p>
<p class="x_MsoNormal"><span lang="DE" style="font-size:12pt; font-family:"Times New Roman",serif,serif,"EmojiFont"">Leibniz Universität Hannover</span></p>
<p class="x_MsoNormal"><span lang="DE" style="font-size:12pt; font-family:"Times New Roman",serif,serif,"EmojiFont"">Königsworther Platz 1</span></p>
<p class="x_MsoNormal"><span lang="DE" style="font-size:12pt; font-family:"Times New Roman",serif,serif,"EmojiFont"">D-30167 Hannover</span></p>
<p class="x_MsoNormal"><span lang="DE" style="font-size:12pt; font-family:"Times New Roman",serif,serif,"EmojiFont""><a href="mailto:stefan.helber@prod.uni-hannover.de" target="_blank" rel="noopener noreferrer" id="LPNoLP"><span style="color:blue">stefan.helber@prod.uni-hannover.de</span></a></span></p>
<p class="x_MsoNormal"><span lang="DE" style="font-size:12pt; font-family:"Times New Roman",serif,serif,"EmojiFont""><a href="http://www.prod.uni-hannover.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><span style="color:blue">http://www.prod.uni-hannover.de/</span></a></span></p>
<p class="x_MsoNormal"><span lang="DE" style="font-size:12pt; font-family:"Times New Roman",serif,serif,"EmojiFont"">Tel. ++49 511 7625650</span></p>
<p class="x_MsoNormal"><span lang="DE" style="font-size:12pt; font-family:"Times New Roman",serif,serif,"EmojiFont"">Fax. ++49 511 7624863</span></p>
<span lang="DE" style="font-size:12pt; font-family:"Times New Roman",serif,serif,"EmojiFont"">*********************************************************</span><br>
<p></p>
</div>
</div>
</div>
</body>
</html>