<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Dear Gerald,<div><br></div><div>Thank's for replaying.</div><div>I found where the problem comes out,</div><div>It wasn't from SCIP but some bad indexation of c++ map </div><div><span style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;">I used map to index the variables by their names to get their values</span></div><div><span style="font-size: 12pt;">for only binary variables using </span><span style="font-size: 12pt;"><b>SCIPvarGetName()</b> as index,</span></div><div>but after, i used char * (string of characters like <b>colvars["name_of_variable"]</b>) to get their value,</div><div>this doesn't work, pointer problem upon my guess.</div><div><br></div><div>Using <span style="font-size: 12pt;">SCIPvarIsBinary() or SCIPvarGetType() in such case return always 0</span></div><div><span style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;">Regards</span></div><div><span style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;">---</span></div><div><span style="font-size: 12pt;">Abdelkader Ouali</span></div><div><br></div><div><br></div><div><br><div><hr id="stopSpelling">Date: Wed, 2 Jul 2014 15:59:12 +0200<br>From: gamrath@zib.de<br>To: oualiaek@hotmail.fr; scip@zib.de<br>Subject: Re: [Scip] help in checking the type of transformed variables<br><br>
<div class="ecxmoz-cite-prefix">Dear Abdelkader,<br>
<br>
I undestand your confusion, because this sounds strange and I
don't see how this can happen.<br>
<br>
Do you call SCIPvarIsBinary(colVar) and SCIPvarGetType(colVar) at
the same place? The first thing the former one checks is whether
the vartype of the variable is binary (=0), in this case it should
return TRUE.<br>
<br>
Which SCIP version do you use? Did you compile SCIP in debug mode?
If not, please do so and try it again.<br>
<br>
Best,<br>
Gerald<br>
<br>
<br>
On 02.07.2014 12:01, Abdelkader Ouali wrote:<br>
</div>
<blockquote cite="mid:DUB129-W61AAF99C85098E024D92ADAB060@phx.gbl">
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}
.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}
--></style>
<div dir="ltr">
<pre style="line-height:21.30000114440918px;white-space:normal;color:rgb(68, 68, 68);background-color:rgb(255, 255, 255);">Dear List,</pre>
<pre style="line-height:21.30000114440918px;white-space:normal;color:rgb(68, 68, 68);background-color:rgb(255, 255, 255);">In pricing process, i want to check if a transformed variable has a binary</pre>
<pre style="line-height:21.30000114440918px;white-space:normal;color:rgb(68, 68, 68);background-color:rgb(255, 255, 255);">type, and logically it is so, but when i use SCIPvarIsBinary(colVar),</pre>
<pre style="line-height:21.30000114440918px;white-space:normal;color:rgb(68, 68, 68);background-color:rgb(255, 255, 255);">it returns false ! </pre>
<pre style="line-height:21.30000114440918px;white-space:normal;color:rgb(68, 68, 68);background-color:rgb(255, 255, 255);">I used SCIPvarGetType(colVar) to get the type of the variable, and it returns 0,</pre>
<pre style="line-height:21.30000114440918px;white-space:normal;color:rgb(68, 68, 68);background-color:rgb(255, 255, 255);">meaning that, the colVar is binary variable.</pre>
<pre style="line-height:21.30000114440918px;white-space:normal;color:rgb(68, 68, 68);background-color:rgb(255, 255, 255);">>From the solver messsage, it shows that all</pre>
<pre style="line-height:21.30000114440918px;white-space:normal;color:rgb(68, 68, 68);background-color:rgb(255, 255, 255);">problems (transformed/origin) contains only binary variables</pre>
<pre style="line-height:21.30000114440918px;white-space:normal;color:rgb(68, 68, 68);background-color:rgb(255, 255, 255);">Any explanations will be grateful</pre>
<pre style="line-height:21.30000114440918px;white-space:normal;color:rgb(68, 68, 68);background-color:rgb(255, 255, 255);"></pre>
<pre style="line-height:21.30000114440918px;white-space:normal;color:rgb(68, 68, 68);background-color:rgb(255, 255, 255);">Kind regards</pre>
<pre style="line-height:21.30000114440918px;white-space:normal;color:rgb(68, 68, 68);background-color:rgb(255, 255, 255);">---</pre>
<pre style="line-height:21.30000114440918px;white-space:normal;color:rgb(68, 68, 68);background-color:rgb(255, 255, 255);">Abdelkader Ouali</pre>
</div>
<br>
<fieldset class="ecxmimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
Scip mailing list
<a class="ecxmoz-txt-link-abbreviated" href="mailto:Scip@zib.de">Scip@zib.de</a>
<a class="ecxmoz-txt-link-freetext" href="http://listserv.zib.de/mailman/listinfo/scip" target="_blank">http://listserv.zib.de/mailman/listinfo/scip</a>
</pre>
</blockquote>
<br></div></div> </div></body>
</html>