Quantcast

How to do MINLP?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to do MINLP?

anon
Can anyone give me an example of MINLP in action using JuMP, including what solver you're using.

I've tried both KNITRO and CoinOptServices, for example:

using JuMP
using CoinOptServices

model = Model()
@variable(model, 0 <= n <= 5, Int)
@NLobjective(model, Max, exp(n))
solve(model, suppress_warnings=true)

println(getvalue(n))

But including the integer constraint in the @variable results in the error:

Error: LoadError: Solver does not support discrete variables

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to do MINLP?

Changhyun Kwon

You can use CouenneNLSolver() or BonminNLSolver() via AmplNLWriter.jl package.






On Nov 7, 2016, at 9:39 AM, anon <[hidden email]> wrote:

Can anyone give me an example of MINLP in action using JuMP, including what solver you're using.

I've tried both KNITRO and CoinOptServices, for example:

using JuMP
using CoinOptServices

model = Model()
@variable(model, 0 <= n <= 5, Int)
@NLobjective(model, Max, exp(n))
solve(model, suppress_warnings=true)

println(getvalue(n))

But including the integer constraint in the @variable results in the error:

Error: LoadError: Solver does not support discrete variables

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.

--



--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to do MINLP?

anon
@Changhyun Kwon 

Thanks! that did it.

On Monday, November 7, 2016 at 8:25:15 AM UTC-8, Changhyun Kwon wrote:

You can use CouenneNLSolver() or BonminNLSolver() via AmplNLWriter.jl package.






On Nov 7, 2016, at 9:39 AM, anon <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="YJ1YXKgMBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">esp...@...> wrote:

Can anyone give me an example of MINLP in action using JuMP, including what solver you're using.

I've tried both KNITRO and CoinOptServices, for example:

using JuMP
using CoinOptServices

model = Model()
@variable(model, 0 <= n <= 5, Int)
@NLobjective(model, Max, exp(n))
solve(model, suppress_warnings=true)

println(getvalue(n))

But including the integer constraint in the @variable results in the error:

Error: LoadError: Solver does not support discrete variables

--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="YJ1YXKgMBwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">julia-opt+...@googlegroups.com.
Visit this group at <a href="https://groups.google.com/group/julia-opt" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/julia-opt&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/julia-opt&#39;;return true;">https://groups.google.com/group/julia-opt.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--



--
You received this message because you are subscribed to the Google Groups "julia-opt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
Visit this group at https://groups.google.com/group/julia-opt.
For more options, visit https://groups.google.com/d/optout.
Loading...