<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p><br>
</p>
Thanks Matthias.
<div><br>
</div>
<div>Is  there  a similar way to add operators on variables in the objective function.</div>
<div><br>
</div>
<div>For example, 
<blockquote type="cite" style="font-family: Calibri, Arial, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif;">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;"><span style="font-size: 12pt;"> model.<span>setObjective(</span>quicksum(exp(x[i]) for i in I), "minimize")</span></div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;"><span style="font-size: 12pt;"><br>
</span></div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;"><span style="font-size: 12pt;"><br>
</span></div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;"><span style="font-size: 12pt;">Thanks a lot.</span></div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;"><span style="font-size: 12pt;"><br>
</span></div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;"><span style="font-size: 12pt;">Regards</span></div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;"><span style="font-size: 12pt;"> </span><br>
</div>
</div>
</blockquote>
</div>
<div><br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Matthias Miltenberger <miltenberger@zib.de><br>
<b>Sent:</b> Friday, April 7, 2017 4:40 PM<br>
<b>To:</b> sakib mondal; scip@zib.de<br>
<b>Subject:</b> Re: [SCIP] How to add operators on variables in a constraint</font>
<div> </div>
</div>
<div>Dear Sakib,<br>
<br>
this constraint type is currently not yet supported by PySCIPOpt. You would need to write a new Conshdlr class that implements `exp()`. This might be a good starting point:
<a class="moz-txt-link-freetext" href="https://github.com/SCIP-Interfaces/PySCIPOpt/blob/master/tests/test_tsp.py" id="LPlnk161841" previewremoved="true">
https://github.com/SCIP-Interfaces/PySCIPOpt/blob/master/tests/test_tsp.py</a>
<div id="LPBorder_GT_14918249846350.3450514540129406" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_14918249846300.964478034654978" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="ImageCell_14918249846320.6850721257252397" colspan="1" style="width: 250px; position: relative; display: table-cell; padding-right: 20px;">
<div id="LPImageContainer_14918249846320.1718298711486166" style="background-color: rgb(255, 255, 255); height: 160px; position: relative; margin: auto; display: table; width: 160px;">
<a id="LPImageAnchor_14918249846320.737368374205075" href="https://github.com/SCIP-Interfaces/PySCIPOpt/blob/master/tests/test_tsp.py" target="_blank" style="display: table-cell; text-align: center;"><img aria-label="Preview image with link selected. Double-tap to open the link." id="LPThumbnailImageID_14918249846330.6212091933272259" width="160" height="160" style="display: inline-block; max-width: 250px; max-height: 250px; height: 160px; width: 160px; border-width: 0px; vertical-align: bottom;" src="https://avatars3.githubusercontent.com/u/19473229?v=3&s=400"></a></div>
</td>
<td id="TextCell_14918249846330.7359953951806284" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_14918249846330.26491908864826996"></div>
<div id="LPTitle_14918249846330.44681025584971956" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14918249846340.058365477091355755" href="https://github.com/SCIP-Interfaces/PySCIPOpt/blob/master/tests/test_tsp.py" target="_blank" style="text-decoration: none;">SCIP-Interfaces/PySCIPOpt</a></div>
<div id="LPMetadata_14918249846340.699695891457218" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols, sans-serif; font-size: 14px; line-height: 14px;">
github.com</div>
<div id="LPDescription_14918249846350.42429776117090556" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
PySCIPOpt - Python interface for the SCIP Optimization Suite</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
<br>
all the best<br>
Matthias<br>
<br>
<div class="moz-cite-prefix">On 07.04.2017 17:15, sakib mondal wrote:<br>
</div>
<blockquote type="cite">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi,</p>
<div style="color:rgb(0,0,0)">
<div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Arial,Helvetica,sans-serif">
<p><br>
</p>
<p>I am trying to use scip solver where one of the constraints need exponentiation of a variable.  For example,</p>
<p><br>
</p>
<div><br>
</div>
<div><span style="font-size:12pt">        model.addCons(quicksum(exp(x[i]) for i in I) <span>==1, name="constraint")</span></span><br>
</div>
<div><br>
</div>
<div>Wondering what would be possible ways to add this.</div>
<div><br>
</div>
<div>I tried searching for such examples, but could not find any.</div>
<div><br>
</div>
<div>Would appreciate any help. I am using pyscipopt.</div>
<div><br>
</div>
<div>Regards</div>
<div>Sakib</div>
<div><br>
</div>
<br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre>_______________________________________________
Scip mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Scip@zib.de">Scip@zib.de</a>
<a class="moz-txt-link-freetext" href="https://listserv.zib.de/mailman/listinfo/scip">https://listserv.zib.de/mailman/listinfo/scip</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
\__________________

Matthias Miltenberger
Zuse Institute Berlin
Takustr. 7, 14195 Berlin
<a class="moz-txt-link-abbreviated" href="http://www.zib.de/miltenberger">www.zib.de/miltenberger</a>
<a class="moz-txt-link-abbreviated" href="mailto:miltenberger@zib.de">miltenberger@zib.de</a>
+49 (30) 841 85-245</pre>
</div>
</div>
</div>
</div>
</body>
</html>