[Scip] SCIP_ConsData in constraint handler using C++
Grit Claßen
classen at math2.rwth-aachen.de
Mon Jun 18 17:23:50 MEST 2012
Hello,
I am implementing a constraint handler for branching constraints in a
Branch-and-Price framework. To store some information on the
constraints, I would like to define a specific SCIP_ConsData. Following
the examples (bin packing or graph coloring), the SCIP_ConsData could be
defined like this:
struct SCIP_ConsData
{
int itemid1; /**< item id one */
int itemid2; /**< item id two */
CONSTYPE type; /**< stores whether the
items have to be in the SAME or DIFFER packing */
int npropagatedvars; /**< number of variables
that existed, the last time, the related node was
* propagated, used to
determine whether the constraint should be
* repropagated*/
int npropagations; /**< stores the number
propagations runs of this constraint */
unsigned int propagated:1; /**< is constraint
already propagated? */
SCIP_NODE* node; /**< the node in the
B&B-tree at which the cons is sticking */
};
However, as I am using C++ this overload of "typedef struct
SCIP_ConsData
SCIP_CONSDATA<http://scip.zib.de/doc/html_devel/type__cons_8h.html#ac55797a3c65d3ec89dd29921d953c36e>"
does not work, i.e., I cannot use SCIP_CONSDATA instead of SCIP_ConsData
when implementing the callback functions of the constraint handler. The
only way to handle constraint data, I can think of, is to use some maps
(e.g. constraint to constraint data etc.). Is there a less cumbersome way?
Thanks,
Grit
--
Dipl.-Comp.Math. Grit Claßen
UMIC Research Centre and Lehrstuhl II für Mathematik
RWTH Aachen University
52056 Aachen
Germany
phone: +49 241 80 20753 or +49 241 80 94999
http://www.math2.rwth-aachen.de
http://www.isek.rwth-aachen.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.zib.de/mailman/private/scip/attachments/20120618/0d7c6f9d/attachment.html
More information about the Scip
mailing list