[Scip] HOW TO USE SCIP_VARDATA
Gregor Hendel
hendel at zib.de
Sat Aug 2 13:42:15 CEST 2014
Hi Diego,
using C++, you can create customized variable data by subclassing
scip:ObjVardata from objvardata.h
<http://scip.zib.de/doc/html_devel/objvardata_8h_source.php>. Variables
which should use your variable data can be created by calling
SCIPcreateObjVar()
<http://scip.zib.de/doc/html_devel/objvardata_8h.php#a8c9be3e5b510487d59fdc065464e401b>
instead of SCIPcreateVar(). The VRP-example uses the latter method for
the priced variables because no custom variable data is necessary there.
In order to access your variable data later, you need use
SCIPgetObjVardata().
Hope that helps,
Gregor
Am 01.08.2014 13:42, schrieb dponce at us.es:
>
> Hello mailing list,
>
> 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.
>
> 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.
>
> I've tried using vardataCreate() structure in the binpacking example
> or class ObjVardata without success, in principle.
>
> I´m using VRP as template, so I'm writting in C++.
>
> I´m looking forward comments.
>
> Best.
>
> Diego Ponce.
>
>
>
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20140802/d91b08b9/attachment.html>
More information about the Scip
mailing list