[SCIP] Constraints user data

Besancon, Mathieu besancon at zib.de
Sun Nov 13 14:20:30 CET 2022


Hi Iain,


Unfortunately, the documentation for relaxation handlers is fairly sparse, but it follows the same patterns as the other plugins. You can define your own data structure that is passed with the callback in SCIPincludeRelax(Basic).


In your callback, you can get the structure that was passed with SCIPrelaxGetData(relaxator) and then use the data structure, modify it, etc.


Cheers,

Mathieu

________________________________
From: Iain Fullelove <fullelove.iain at gmail.com>
Sent: Sunday, November 13, 2022 12:32:02 PM
To: Besancon, Mathieu
Cc: scip at zib.de
Subject: Re: [SCIP] Constraints user data

Hi Mathieu,

Thanks for the advice, i'll have a go at storing the precedences in the data of the relaxation handler.
Are there any example bits of code for doing this?

Cheers,
Iain

On Fri, Nov 11, 2022 at 11:33 PM Besancon, Mathieu <besancon at zib.de<mailto:besancon at zib.de>> wrote:

Hi Iain,


The two options that seem straightforward would be to indeed define a new constraint handler with the precedence information or to store the precedence in the data of your relaxation handler. The latter seems to  be the least amount of modification to your current structure right?


Best,

Mathieu

________________________________
From: Scip <scip-bounces at zib.de<mailto:scip-bounces at zib.de>> on behalf of Iain Fullelove <fullelove.iain at gmail.com<mailto:fullelove.iain at gmail.com>>
Sent: Friday, November 11, 2022 2:15:01 PM
To: scip at zib.de<mailto:scip at zib.de>
Subject: [SCIP] Constraints user data

Hi,

I'm working on a problem that is basically solving a max-flow min-cut problem that has capacity constraints.
I currently use the function "SCIPvarSetData" to add my own user data to the decision variables but can't find an equivalent function for adding user data to constraints? Or would this require me to implement a full constraint handler?
The reason I was wanting to do this is because the majority of my constraints are precedence constraints between two nodes in the graph network, and I was wanting to mark these constraints as precedence constraints for the custom relaxation handler I added.

Thanks,
Iain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.zib.de/pipermail/scip/attachments/20221113/7ea84dc4/attachment.html>


More information about the Scip mailing list