<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);">
Dear Pietro,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you. I was afraid that this might be the case.  <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Can couenne calculate gamma and beta functions? If so, I can define binomial probabilities in terms of these functions.<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks,
<div>Ravi</div>
<br>
</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> Pietro Belotti <pbelotti@gmx.com><br>
<b>Sent:</b> Thursday, June 24, 2021 3:31 PM<br>
<b>To:</b> Ravi Varadhan <ravi.varadhan@jhu.edu><br>
<b>Cc:</b> couenne@list.coin-or.org <couenne@list.coin-or.org><br>
<b>Subject:</b> Re: [Couenne] Couenne error - integer programming with binomial probabilities</font>
<div> </div>
</div>
<div>
<p><strong><br>
</strong><strong><span style="background:red; color:white; font-family:"Times New Roman",serif; font-size:12pt">      External Email - Use Caution      </span></strong></p>
<p><strong><span style="background:red; color:white; font-family:"Times New Roman",serif; font-size:12pt"><br>
</span></strong></p>
<p><strong><span style="background:red; color:white; font-family:"Times New Roman",serif; font-size:12pt"><br>
</span></strong></p>
<div>
<div style="font-family:Verdana; font-size:12.0px">
<div>Hi Ravi,</div>
<div> </div>
<div>note that the mailing list will be soon discontinued; issues and discussions should be posted on the Couenne Github page:</div>
<div> </div>
<div>https://github.com/coin-or/Couenne/</div>
<div> </div>
<div>
<div>About your question: Couenne can only solve MINLP that are factorable, i.e. all expressions can be composed from a finite set of operators and these must be known: +, -, *, /, ^, log, sin, etc. Your functions gsl_cdf_binomial_P and gsl_cdf_binomial_Q are
 called from within a .dll and Couenne doesn't know their expression. Couenne needs these functions to be explicitly written in the constraints, therefore you'd have to drop the amplgsl.dll dependency and write these binomial cdf in closed form, or at least
 provide a good-enough approximation via a factorable expression.</div>
<div> </div>
<div>Hope it helps. Regards,</div>
<div>Pietro</div>
<div> 
<div name="x_quote" style="margin:10px 5px 5px 10px; padding:10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap:break-word">
<div style="margin:0 0 10px 0"><b>Sent:</b> Thursday, June 24, 2021 at 8:43 PM<br>
<b>From:</b> "Ravi Varadhan" <ravi.varadhan@jhu.edu><br>
<b>To:</b> "couenne@list.coin-or.org" <couenne@list.coin-or.org><br>
<b>Subject:</b> [Couenne] Couenne error - integer programming with binomial probabilities</div>
<div name="x_quoted-content">
<div>
<div style="font-family:Calibri ,Arial ,Helvetica ,sans-serif; font-size:12.0pt; color:rgb(0,0,0)">
<span>Hi,</span>
<div>I am trying to solve a simple integer programming problem that involves binomial probabilities.  I have loaded the gsl DLL for binomial probability calculations.  I am calling couenne through AMPL (I am using AMPLE IDE on windows).  Here is my model (.mod)
 file:</div>
<div> </div>
<div>reset;<br>
option solver couenne;<br>
option randseed 1234;<br>
<br>
load amplgsl.dll;<br>
<br>
var r >= 0 integer;<br>
var n >= 0 integer;<br>
<br>
function gsl_cdf_binomial_P;<br>
function gsl_cdf_binomial_Q;<br>
<br>
param p0 := 0.2;<br>
param p1 := 0.4;<br>
param alpha := 0.05;<br>
param beta := 0.1;<br>
<br>
  minimize obj:  n;<br>
  subject to c1: gsl_cdf_binomial_Q(r,p0,n) <= alpha;<br>
  subject to c2: gsl_cdf_binomial_P(r,p1,n) <= beta;<br>
  subject to s1: n - r >= 0;<br>
 <br>
solve;<br>
display r, n;</div>
<div> </div>
<div>When I run this, I get the following error message:</div>
<div> </div>
<div>Couenne 0.5.7 -- an Open-Source solver for Mixed Integer Nonlinear Optimization<br>
Mailing list: <a href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2F&data=04%7C01%7Cravi.varadhan%40jhu.edu%7C986ff52d89984e84a2af08d93746ba6f%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637601599906412201%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=gdyFI4yGaP2yEv2sOKFn%2BCrTrnZPjAkhvfKgeJUTAtw%3D&reserved=0" originalsrc="https://groups.google.com/" shash="IqthfUZkgjUy1+7L4vcnTGwAABjA8H7m/7IpTuD6UHrHjAUi3pm+bx39Dq9DKX/tm1GOQ6xWUI/r4sfx0tz1vVTfut84HHRWY0IE2+TJi97gINNCjsFH2PCq6EdL31hwHCYJ+9d0daReTlVAemL3b7CfGhE/2q4Jg3YLwkKx1Fg=" target="_blank">
cou...@list.coin-or.org</a><br>
Instructions: <a href="https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.coin-or.org%2FCouenne&data=04%7C01%7Cravi.varadhan%40jhu.edu%7C986ff52d89984e84a2af08d93746ba6f%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637601599906412201%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=JPX0XbdNjN9I5J%2B570FqefULrvT9x29ZSMTdQQgGtuA%3D&reserved=0" originalsrc="http://www.coin-or.org/Couenne" shash="bU5QdjPh/56w6QmZ5JB34NVoJsO+4xutvh6NXHnkjY5VF7NW+4gLOhiYz9xytDLkxJBzhHHmkDcaJist1dE9QMWIomFF+NXQJMKZuISSTOp1rLlRO+i43XWNxgG1oN8FHXy/aVGWsc99ySFFRO8vk5fwiFuiQMq8cbEuyD9vz+Q=" target="_blank">
http://www.coin-or.org/Couenne</a><br>
couenne:<br>
ANALYSIS TEST: *** Error: function call not implemented<br>
exit value 18446744073709551615<br>
<BREAK></div>
<div> </div>
<div>I would appreciate any help as to what the problem is and how to address it.</div>
<div> </div>
<div>Thank you,</div>
<span>Ravi</span></div>
_______________________________________________ Couenne mailing list Couenne@list.coin-or.org
<a href="https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist.coin-or.org%2Fmailman%2Flistinfo%2Fcouenne&data=04%7C01%7Cravi.varadhan%40jhu.edu%7C986ff52d89984e84a2af08d93746ba6f%7C9fa4f438b1e6473b803f86f8aedf0dec%7C0%7C0%7C637601599906412201%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=0O3TxwAjcB4fj9JYzFncSPJahV2Eg1a6sGQq5gCpOXI%3D&reserved=0" originalsrc="https://list.coin-or.org/mailman/listinfo/couenne" shash="u+DfhbeorjEM/N0AtgpvUlvtWLjl+XAJoXHYVDF8nIS4n9HJyR8Ea+KUawp/kestpVDeOSbErGsl6rz6m+qckzymH1i0lMwCKGYm/VIcpFmKzLEtEDCQj4CXE1IHGc1mQhQx/dNuGK6HS5aA/HUHDWG+s4niWM7+krvw1NFXB0g=" target="_blank">
https://list.coin-or.org/mailman/listinfo/couenne</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>