<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Thanks for you help Marc. I replaced the pseudoboolean constraints by an equivalent set of and constraints and linear constraints, and all is well.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
James<br>
</div>
<div class="elementToProof">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
James Cussens</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Room MVB 3.26<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dept of Computer Science, University of Bristol</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Phone: +44 (0)117 455 8723<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<a href="https://jcussens.github.io/">https://jcussens.github.io/</a></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="font-size:11.5pt">Funded PhDs available in Bristol in the following areas: <a href="http://www.bristol.ac.uk/cdt/compass/" target="_blank" rel="noopener noreferrer"><span>Data Science</span></a>, <a href="http://www.bristol.ac.uk/cdt/interactive-ai/" target="_blank" rel="noopener noreferrer"><span>Interactive
AI</span></a>, <a href="http://www.bristol.ac.uk/cdt/cyber-security/" target="_blank" rel="noopener noreferrer"><span>Cyber Security</span></a> or <a href="http://www.bristol.ac.uk/cdt/digital-health/" target="_blank" rel="noopener noreferrer"><span>Digital
Health</span></a>. </span><br>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Scip <scip-bounces@zib.de> on behalf of Marc Pfetsch <pfetsch@mathematik.tu-darmstadt.de><br>
<b>Sent:</b> 25 July 2023 12:26<br>
<b>To:</b> scip@zib.de <scip@zib.de><br>
<b>Subject:</b> Re: [SCIP] pseudoboolean constraints</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText"><br>
<br>
Hi James,<br>
<br>
the pseudoboolean constraints had been added to take part in the <br>
Pseudo-Boolean Competitions, see, e.g., <br>
<a href="http://www.cril.univ-artois.fr/PB16/">http://www.cril.univ-artois.fr/PB16/</a> . They essentially only exist to
<br>
create other constraints and only some presolving is implemented.<br>
<br>
One Problem studied in the competitions includes soft constraints, i.e., <br>
the constraint does not necessarily have to be satisfied, but one wants <br>
to maximize the number of satisfied constraints. This is modeled using <br>
indicator variables, i.e., binary variables that determine whether the <br>
constraint is satisfied. If the constraints are linear this will create <br>
an indicator constraint (cons_indicator.h/c). For your particular <br>
problem it is probably easier if you create the corresponding <br>
constraints yourself instead of using Pseudo-Boolean constraints.<br>
<br>
In your problem, the variables x_i and y_i are probably binary, so this <br>
product is expressed by an AND constraint (the product is 1 if and only <br>
if both variables are 1).<br>
<br>
To solve your problem with separation, I suggest to set up the <br>
constraints directly and not use Pseudo-Boolean constraints.<br>
<br>
I hope that this answers you questions.<br>
<br>
Best<br>
<br>
Marc<br>
<br>
<br>
<br>
On 25/07/2023 11:21, James Cussens wrote:<br>
> Hi all,<br>
> <br>
> I would appreciate a bit more information on pseudoboolean constraints. <br>
> In particular, I don't understand these arguments in <br>
> SCIPcreateConsBasicPseudoboolean :<br>
> <br>
> indvar indicator variable if it's a soft constraint, or NULL<br>
> weight weight of the soft constraint, if it is one<br>
> issoftcons is this a soft constraint<br>
> intvar a artificial variable which was added only for the objective <br>
> function, if this variable is not NULL this constraint (without this <br>
> integer variable) describes the objective function<br>
> <br>
> I'm just relying on the doxygen documentation, perhaps this is explained <br>
> in more detail elsewhere. It may be that setting them to non-NULL values <br>
> might help me.<br>
> <br>
> For context, the pseudoboolean constraints I'm using are like this:<br>
> <br>
> z <= \sum_{i=1}^{n} [ x_i + y_i - 2*x_i*y_i ]<br>
> <br>
> and only check and propagate are set to TRUE when they are created. On <br>
> another matter, I see that 'and' variables are created for the x_i*y_i <br>
> products. I've noticed that the associated and constraint is being <br>
> separated even though it is being created from a constraint where <br>
> initial and separate are set to FALSE which does not seem right to me. I <br>
> certainly don't want the and relaxations in my LP since they don't help <br>
> with the dual bound. I guess one way round this is to explicitly create <br>
> non-separable and constraints myself and use <br>
> SCIPcreateConsPseudobooleanWithConss<br>
> <br>
> James<br>
> <br>
> James Cussens<br>
> Room MVB 3.26<br>
> Dept of Computer Science, University of Bristol<br>
> Phone: +44 (0)117 455 8723<br>
> <a href="https://jcussens.github.io/">https://jcussens.github.io/</a> <<a href="https://jcussens.github.io/">https://jcussens.github.io/</a>><br>
> Funded PhDs available in Bristol in the following areas: Data Science <br>
> <<a href="http://www.bristol.ac.uk/cdt/compass/">http://www.bristol.ac.uk/cdt/compass/</a>>, Interactive AI
<br>
> <<a href="http://www.bristol.ac.uk/cdt/interactive-ai/">http://www.bristol.ac.uk/cdt/interactive-ai/</a>>, Cyber Security
<br>
> <<a href="http://www.bristol.ac.uk/cdt/cyber-security/">http://www.bristol.ac.uk/cdt/cyber-security/</a>> or Digital Health
<br>
> <<a href="http://www.bristol.ac.uk/cdt/digital-health/">http://www.bristol.ac.uk/cdt/digital-health/</a>>.<br>
> <br>
> _______________________________________________<br>
> Scip mailing list<br>
> Scip@zib.de<br>
> <a href="https://listserv.zib.de/mailman/listinfo/scip">https://listserv.zib.de/mailman/listinfo/scip</a><br>
_______________________________________________<br>
Scip mailing list<br>
Scip@zib.de<br>
<a href="https://listserv.zib.de/mailman/listinfo/scip">https://listserv.zib.de/mailman/listinfo/scip</a><br>
</div>
</span></font></div>
</body>
</html>