<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Diego<br>
<br>
Am 03.08.2014 10:24, schrieb <a class="moz-txt-link-abbreviated" href="mailto:dponce@us.es">dponce@us.es</a>:<br>
</div>
<blockquote cite="mid:1825a04a8f8975b97e8b592f3959125b@us.es"
type="cite">
<p>Hi Gregor,</p>
<p>I was trying it before but what I don't know is to create this
subclassing. All that I can get is that it compile and then I
get the message "<span>Segmentation fault (core dumped)</span>".
<br>
</p>
</blockquote>
Did you know you can compile SCIP in Debug-Mode by setting the flag
"OPT=dbg" when running make? Afterwards, you can use a debugger as
gdb to trace down where <br>
you access illegal adresses in the memory. <br>
<blockquote cite="mid:1825a04a8f8975b97e8b592f3959125b@us.es"
type="cite">
<p>I'm sorry because maybe it is not an SCP question but a C++
question.</p>
</blockquote>
It becomes a SCIP question again, once you have made sure that in
principle, your code should work, but you cannot integrate it
properly into the SCIP-framework, maybe because some concept is not
clear. Have you seen that objvardata has four virtual functions
which you may override in your subclass? The online documentation is
a bit short about them, but they are well documented in the source
code of objvardata.h/cpp.<br>
<blockquote cite="mid:1825a04a8f8975b97e8b592f3959125b@us.es"
type="cite">
<p>I do not understand yet in what case it is possible using
SCIP_VARDATA with SCIPcreateVar().</p>
</blockquote>
For this, which would be the C-approach again, you have the
Binpacking-example to look at. <br>
<br>
As an alternative to storing information in the var data, you can
also use HashMaps, which have the variables as keys and your custom
variable data as values. It is perfectly valid if your pricer
retrieves its information from a HashMap instead. The advantage of
this would be that you have an object whose life-cycle you can
totally control by yourself. <br>
<br>
As a last resort(!!!), you can also send me your code in a private
mail (not via the mailing list), and I can have a look if you are
missing an important concept.<br>
<br>
Kind regards,<br>
Gregor <br>
<blockquote cite="mid:1825a04a8f8975b97e8b592f3959125b@us.es"
type="cite">
<p>Thanks.</p>
<p>Diego.</p>
<p> </p>
<div> </div>
<p>El 02/08/2014 13:42, Gregor Hendel escribió:</p>
<blockquote type="cite" style="padding-left:5px;
border-left:#1010ff 2px solid; margin-left:5px"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div class="moz-cite-prefix">Hi Diego,<br>
<br>
using C++, you can create customized variable data by
subclassing scip:ObjVardata from <a moz-do-not-send="true"
href="http://scip.zib.de/doc/html_devel/objvardata_8h_source.php">objvardata.h</a>.
Variables which should use your variable data can be created
by calling <br>
<a moz-do-not-send="true"
href="http://scip.zib.de/doc/html_devel/objvardata_8h.php#a8c9be3e5b510487d59fdc065464e401b">SCIPcreateObjVar()</a>
instead of SCIPcreateVar(). The VRP-example uses the latter
method for the priced variables because no custom variable
data is necessary there.<br>
In order to access your variable data later, you need use
SCIPgetObjVardata().<br>
<br>
Hope that helps,<br>
Gregor<br>
<br>
Am 01.08.2014 13:42, schrieb <a moz-do-not-send="true"
class="moz-txt-link-abbreviated" href="mailto:dponce@us.es">dponce@us.es</a>:</div>
<blockquote type="cite" style="padding-left:5px;
border-left:#1010ff 2px solid; margin-left:5px">
<p>Hello mailing list,</p>
<p>I´m using SCIP for a branch-and-price problem. In my pricer
I need some data associated with variables fixed to zero in
order to avoid add them. So, in the binpacking example I saw
how get this variables by means of SCIPgetVars() and
SCIPvarGetUbLocal() functions. </p>
<p>The problem I have is that I'm not able to store the
information (a vector of pairs, its dimension and another
integer) in the SCIP_VARDATA variable. Then I guess I am
having the same problem for recover the information after
using SCIPvarGetData() from the SCIP_VARDATA variable.</p>
<p>I've tried using vardataCreate() structure in the
binpacking example or class ObjVardata without success, in
principle.</p>
<p>I´m using VRP as template, so I'm writting in C++.</p>
<p>I´m looking forward comments.</p>
<p>Best.</p>
<p>Diego Ponce.</p>
<div> </div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre>_______________________________________________
Scip mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Scip@zib.de">Scip@zib.de</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://listserv.zib.de/mailman/listinfo/scip">http://listserv.zib.de/mailman/listinfo/scip</a>
</pre>
</blockquote>
</blockquote>
</blockquote>
<br>
</body>
</html>