<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Bjorn,<br>
<br>
For using SOS type 1 when you could just use binary variables, the
best thing is to have the constraint in (with a binary slack
making it ==1) as well as the SOS.<br>
<br>
The clue is in the word "Ordered". So if you are modeling a
facility with 4 possible sizes 2, 5, 12, 30 then you would have
the binary slack first and then 4 variables. Originally you would
have referred to a reference row which would be the capacity row
but now you just give the 5 weights of 0,2,5,12,30. Then if say
the slack was 0.7 and the 30 variable was .3 the capacity is 9 and
the code would do two branches - one setting 0,2,5 to 0 the other
setting 12,30 variables to 0.<br>
<br>
So you get good control of branching. Obviously the benefit gets
greater the more variables are in the set.<br>
<br>
SOS type 2 are more interesting .....<br>
<br>
John Forrest <br>
On 01/01/18 16:19, Bjørn Sigurd Johansen (Spider Solutions AS)
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:HE1PR0801MB1260F92D8609184C310F06A0D9180@HE1PR0801MB1260.eurprd08.prod.outlook.com">
<meta http-equiv="Context-Type" content="text/html;
charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<div class="WordSection1">
<p class="MsoNormal">Dear All,</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Question: Is a SOS1 constraint handled more
efficiently (i.e. faster and/or better) than writing the
constraint in full the “normal” way, i.e. as follows:
</p>
<p class="MsoNormal">MyBinaryVariable1 + MyBinaryVariable2 + … +
MyBinaryVariableN <=
<b><span>1</span></b> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">Best regards,</p>
<p class="MsoNormal">Bjørn Sigurd<span></span></p>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span> </span></p>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Cbc mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cbc@list.coin-or.org">Cbc@list.coin-or.org</a>
<a class="moz-txt-link-freetext" href="https://list.coin-or.org/mailman/listinfo/cbc">https://list.coin-or.org/mailman/listinfo/cbc</a>
</pre>
</blockquote>
<p><br>
</p>
</body>
</html>