[Scip] Is there a SCIPconsSetData()?

Martin Bergner bergner at or.rwth-aachen.de
Thu Jan 27 17:44:13 MET 2011


Hi Gerald,

thanks for your reply.
> the difference between the two is, that the vardata is normally not used 
> by SCIP, and can thus be set or changed by the user as he wants. In 
> contrast to that, the consdata is used by the constraint handlers to 
> store data for a specific constraint of that type, e.g. the array of 
> variables and corresponding coefficients for a linear constraint. So 
> this data should be used only by the constraint handler itself.
Ok, I got that ;).

> If you want to store data for a constraint of a given constraint handler 
> that you did not implement and do not want to change, you can do 
> something like you suggested. However, I would suggest that you use two 
> arrays, one to store the constraint pointers and one to store the 
> corresponding data, because keeping this array in sync with SCIP's 
> constraint array seems to be a tough job. As an alternative, you could 
> use a hashmap (have a look at pub_misc.h for the needed methods).
Yes, I might do that for the reasons you mentioned.

Regards,
Martin




More information about the Scip mailing list