<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Nur Text Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.NurTextZchn
        {mso-style-name:"Nur Text Zchn";
        mso-style-priority:99;
        mso-style-link:"Nur Text";
        font-family:Consolas;}
span.nurtextzchn0
        {mso-style-name:nurtextzchn;
        font-family:"Calibri",sans-serif;}
span.E-MailFormatvorlage20
        {mso-style-type:personal-compose;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoPlainText"><span lang="EN-US">Dear Marc,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Thanks a lot, I do indeed think that your hints are very valuable and helped me to identify some basic misunderstandings on my side. Your suggestion that the segmentation fault problem may be due to some memory corruption
 caused elsewhere seems plausible and I will explore this venue. I also now understand that I always have to release all the variables which I create myself. I will go and chase my bug, and Valgrind might become my friend on the way.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Again, thanks a lot for the clarifying words!<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Stefan<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText">-----Ursprüngliche Nachricht-----<br>
Von: Scip [mailto:scip-bounces@zib.de] Im Auftrag von Marc Pfetsch<br>
Gesendet: Montag, 2. <span lang="EN-US">Mai 2022 19:40<br>
An: scip@zib.de<br>
Betreff: Re: [SCIP] Getting address of transformed variables<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Dear Stefan,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">I don't think that I can solve your problem, but I will try to give some hints.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> However, when I try to get the addresses of the transformed variables
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> like this<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> SCIPgetTransformedVar( _scip, p_dicbapsolver->_vars_usageLinks[<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> *(_d->link_it) ], &(p_dicbapsolver->_vars_usageLinks[ *(_d->link_it)
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> ])<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> which seems to be perfectly analogous, I get a segmentation fault.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Have you checked whether the problem lies in you data structures by using a debugger? It could also be that at some other place of you code memory is corrupted and the segmentation fault is only a secondary sign that
 some problem occurred. Under Linux you might want to run valgrind to check whether something strange happens.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> As a consequence, those auxiliary variables to enforce branching
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> decisions which I added initially to the master problem do not get
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> automatically released ,even though I set the “true” flag for this
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> option when I created the pricer in the first place (as well as for
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> the branching rule and the constraint handler, of course).<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">What do you mean by setting the option to "true"? I do not think that such an option exists. You need to release these variables by yourself in any case.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> So to get rid of<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> the warning, I release all those variables “manually” right before I
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> free the SCIP object itself, which works.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Yes, this should be the right way.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> Would it be better to add those auxiliary variables to the constraints
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> of the transformed master problem when the pricer is initialized (as
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> opposed to adding them intially to the “original” master problem
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> before the transformation takes place)? That should also work, I
<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">> think, even though I have not yet tried it.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">In principle, this should not make a difference, but there might be a bug somewhere.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Best<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Marc<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">_______________________________________________<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Scip mailing list<o:p></o:p></span></p>
<p class="MsoPlainText"><a href="mailto:Scip@zib.de"><span lang="EN-US" style="color:windowtext;text-decoration:none">Scip@zib.de</span></a><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoPlainText"><a href="https://listserv.zib.de/mailman/listinfo/scip" target="_BLANK??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????㣀䢱ú"><span lang="EN-US" style="color:windowtext;text-decoration:none">https://listserv.zib.de/mailman/listinfo/scip</span></a><span lang="EN-US"><o:p></o:p></span></p>
</div>
</body>
</html>