<div dir="ltr"><div><div>Hi Mahmut,<br><br></div>you can use binary variables to define a conditional expression.<br>Assuming you have three functions f1, f2, f3 all depending on x, define three binaries b1,b2,b3. Suppose these functions are defined for -M<=x<=l, l<=x<=u, u<=x<=M respectively, where M is a large number.<br>Then you need to ensure b1=1 if and only if x<=l, b2=1 if and only if l<=x<=u, and b3=1 if and only if x>=u.This can be done with linear constraints.</div><div>The resulting expression will be b1*f1(x) + b2*f2(x) + b2*f3(x).<br></div><div><div><div><div class="gmail_extra"><br></div><div class="gmail_extra">Pietro<br><br></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 6, 2018 at 3:47 PM, Mahmut Tutam <span dir="ltr"><<a href="mailto:mtutam@email.uark.edu" target="_blank">mtutam@email.uark.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hello,<br><br></div>I am using couenne to solve my research project. The objective function is a piecewise nonlinear function and conditions of the objective function depend on variables. If conditions depended on paramaters, I could be able to solve this problem because AMPL has already posted some examples for piecewise linear functions. Does anyone have any idea how to solve my problem by using couenne? Below is my objective function having variables W1, W2 and W3.<br><br><img src="cid:ii_jefttd160_161fbfd6b38f842c" style="margin-right:0px" width="1254" height="185"><br><br><br></div>Sincerely,<br></div>Mahmut<br></div>
</blockquote></div><br></div></div></div></div></div>