lanl-ansi / Juniper.jl

A JuMP-based Nonlinear Integer Program Solver
https://lanl-ansi.github.io/Juniper.jl/stable/
MIT License
180 stars 22 forks source link

Initial solution in Juniper #120

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hello, Something strange happens with my program in Julia language, when I use the package "juniper.jl".

using JuMP, Ipopt, CPLEX, Juniper
m = Model(solver=juniper)
@variable(m, x, start = 0.0)
@variable(m, y, start = 0.0)
@NLobjective(m, Min, sin((1-5x))^2 + 100(cos(y-x^2))^2)
solve(m)
println("x = ", getvalue(x), " y = ", getvalue(y))

where, I set the initial guess to x = 0 and y = 0. The solution provided is

Obj: 7.434409052608867e-20
x = 0.828318530664551 y = -0.8846847385581247

I want to resolve this MINLP and change the starting point to optimize. However, when I change the starting point, the optimal solution obtained is the same. This not happen.

Can anybody help me or give a advise how can I set the initial guess in MINLP using this package? Best regards.

Wikunia commented 5 years ago

Hi @angeloaliano the starting point is not yet implemented in Juniper. It shouldn't be too hard to add this so I'll give it a go later.

ghost commented 5 years ago

Dear cooleague, Please, makes this when was possible. I amor conducing a research and I need to put the specific initial point to the algorithm. If this are not working, the final solution provided by the algorithm os top bad, mainly when the problem os not convex. When you finish, Tell me, so I update the package, please. I thank a lot you. Best regards.

Obter o Outlook para Androidhttps://aka.ms/ghei36


From: Ole Kröger notifications@github.com Sent: Monday, March 25, 2019 10:08:49 AM To: lanl-ansi/Juniper.jl Cc: angeloaliano; Mention Subject: Re: [lanl-ansi/Juniper.jl] Initial solution in Juniper (#120)

Hi @angeloalianohttps://github.com/angeloaliano the starting point is not yet implemented in Juniper. It shouldn't be too hard to add this so I'll give it a go later.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/lanl-ansi/Juniper.jl/issues/120#issuecomment-476188364, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AuphaiDEwtHTknPK7BofGH0OcQbDDMbzks5vaMphgaJpZM4cGz9m.

Wikunia commented 5 years ago

You can have a look at the new branch: https://github.com/lanl-ansi/Juniper.jl/tree/feature-start-value

It currently has a weird bug on travis, works fine on my laptop.

ghost commented 5 years ago

You already have been considered my demand and update the package? So, I need to call the command "using Juniper" or Pkg.add("Juniper")? Thank you very much for your attention!


Angelo Aliano Filho Departamento de Matemática - DAMAT-AP UTFPR - Universidade Tecnológica Federal do Paraná Apucarana, Paraná Te.: (14) 99802 93 71


De: Ole Kröger notifications@github.com Enviado: segunda-feira, 25 de março de 2019 10:49 Para: lanl-ansi/Juniper.jl Cc: angeloaliano; Mention Assunto: Re: [lanl-ansi/Juniper.jl] Initial solution in Juniper (#120)

You can have a look at the new branch: https://github.com/lanl-ansi/Juniper.jl/tree/feature-start-value

It currently has a weird bug on travis, works fine on my laptop.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/lanl-ansi/Juniper.jl/issues/120#issuecomment-476205039, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AuphavM0l8dfTdGO_4HNoPxTkxl8ryXrks5vaNPegaJpZM4cGz9m.

Wikunia commented 5 years ago

If everything works fine we will add this to the new version probably coming mid April. For now: Are you using Julia v1.0 or v1.1? Then I think you should be able to run ] add Juniper#feature-start-value If v0.6 I think you can go to the Juniper directory on your computer and fetch the latest version with git and the git checkout feature-start-value

ghost commented 5 years ago

Dear colleague, I have used the version version 0.7.0. If april on we have this feature working, wonderfull! Best regards,


Angelo Aliano Filho Departamento de Matemática - DAMAT-AP UTFPR - Universidade Tecnológica Federal do Paraná Apucarana, Paraná Te.: (14) 99802 93 71


De: Ole Kröger notifications@github.com Enviado: segunda-feira, 25 de março de 2019 11:14 Para: lanl-ansi/Juniper.jl Cc: angeloaliano; Mention Assunto: Re: [lanl-ansi/Juniper.jl] Initial solution in Juniper (#120)

If everything works fine we will add this to the new version probably coming mid April. For now: Are you using Julia v1.0 or v1.1? Then I think you should be able to run ] add Juniper#feature-start-value If v0.6 I think you can go to the Juniper directory on your computer and fetch the latest version with git and the git checkout feature-start-value

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/lanl-ansi/Juniper.jl/issues/120#issuecomment-476215414, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AuphaqszmoiV_tEmk5lXLhzf_Sf0onpwks5vaNnLgaJpZM4cGz9m.

Wikunia commented 5 years ago

The process for v0.7 should be like the one for v0.6

ghost commented 5 years ago

Dear Ole, I have made your instructions. I found the archive "model.jl" in my computer and changed the line where you defined the start point m.start_value = zeros(m.num_var). In the figure below, you can see that my start point is a vector of 2's. However, the final solution of my problem is the same. I forgot of anything? Sorry to trouble.

[cid:ab849b2b-cd18-496e-9de1-2a5a36b5882f]


Angelo Aliano Filho Departamento de Matemática - DAMAT-AP UTFPR - Universidade Tecnológica Federal do Paraná Apucarana, Paraná Te.: (14) 99802 93 71


De: Ole Kröger notifications@github.com Enviado: segunda-feira, 25 de março de 2019 11:21 Para: lanl-ansi/Juniper.jl Cc: angeloaliano; Mention Assunto: Re: [lanl-ansi/Juniper.jl] Initial solution in Juniper (#120)

The process for v0.7 should be like the one for v0.6

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/lanl-ansi/Juniper.jl/issues/120#issuecomment-476218356, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AuphahkEN0Ukc4OCQpkHBavOl-juU_LPks5vaNuDgaJpZM4cGz9m.

Wikunia commented 5 years ago

The important lines are: https://github.com/lanl-ansi/Juniper.jl/pull/121/files#diff-42d6c2fa623aadc8f4741321765b80e0R170 and https://github.com/lanl-ansi/Juniper.jl/pull/121/files#diff-42d6c2fa623aadc8f4741321765b80e0R227 but it would be best if you use ] add Juniper#feature-start-value I think this should work with v0.7 as well.

Wikunia commented 5 years ago

Merged to master and will be published as v0.2.6 soon