[Couenne] Round function with Couenne package

Pietro Belotti petr.7b6 at gmail.com
Sun Aug 27 09:03:50 EDT 2017


(Same as the reply on the AMPL forum as well)

Suppose we want the variable t[i] to be equal to the ceiling of a variable
x[i]. The ceiling function is indeed not implemented in Couenne, but it
suffices to declare t[i] as integer and then add the two constraints

eps + t[i] >= x[i]
eps + t[i] - 1 <= x[i]

where eps is a small-enough constant, say 1e-5. A nonzero eps allows for
unicity of t[i] (in case x[i] is itself integer), although x[i] 3.000009
will result in t[i] = 3. There are simpler implementations in case you only
require t[i] >= ceil (x[i]) or t[i] <= ceil (x[i]).

Hope this helps,
Pietro

On Sat, Aug 26, 2017 at 6:04 AM, Mahmut Tutam <mtutam at email.uark.edu> wrote:

> Hello,
>
> I am using Couenne open source software with AMPL to solve my
> nonlinear-integer optimization problem. I do not know how to tell AMPL to
> round a function depending on the variable. For example, the following
> function is one of the constraints in my optimization problem such as n is
> variable; and a and nk are parameters. t[i] = round((i * a * n) / (a * (nk
> + 1));. I know I can use ceil function with CPLEX, but CPLEX can not solve
> a nonlinear-integer optimization problem. If I use ceil function in
> Couenne, it says ceil is not implemented. Would you please share me if
> there is a way to deal with this problem? or should I use another software
> package to solve my problem?
>
> Sincerely,
> Mahmut
>
> _______________________________________________
> Couenne mailing list
> Couenne at list.coin-or.org
> https://urldefense.proofpoint.com/v2/url?u=https-3A__list.
> coin-2Dor.org_mailman_listinfo_couenne&d=DwICAg&c=Ngd-
> ta5yRYsqeUsEDgxhcqsYYY1Xs5ogLxWPA_2Wlc4&r=ZxcvfrgBj_
> XEFq5Ymi2c2hQYsUUIXtcIIzgczKPIqFs&m=huEdtoj8_
> Y6lfJ525ilFczVVisSofx8mFp8na4mJ0Ik&s=jdAYHadXWuuKKFJac-
> imwBwLAcLDSxI1LlKd5t7dckc&e=
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/couenne/attachments/20170827/6e4be65f/attachment.html>


More information about the Couenne mailing list