Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential bug #98

Closed
Downsite opened this issue Oct 11, 2021 · 1 comment
Closed

Potential bug #98

Downsite opened this issue Oct 11, 2021 · 1 comment

Comments

@Downsite
Copy link

Downsite commented Oct 11, 2021

I have the following minimal problem that seems to be falsely declared as infeasible.

#Julia 1.6.2
using JuMP #v0.21.10
using EAGO #v0.6.1
solver = EAGO.Optimizer
model = Model(solver)
ny=2
@variable(model, -5<=y[1:ny]<=5)
@variable(model,-1000<=s<=1000)
@variable(model,-1000<=t<=1000)
@objective(model,Max,s)
@constraint(model,s<=t)
myeps=0.05
x_disc=[-0.7,0,0.2,0.7]
for x in x_disc
    a=@variable(model,[p=1:ny+1],lower_bound=0.0,upper_bound=1.0)
    #commenting this out causes the solver to return a solution
    #@constraint(model,[p = 1:ny], a[p]==0)
    @constraint(model,sum(a[i] for i=1:(ny+1))==1)      
    l=x^4-5x^2+4
    @constraint(model,a[ny+1]*(t-l)<=0)
    for j=1:ny
        @NLconstraint(model,a[j]*(myeps-(y[j]*x+0.5-(x^4-5x^2+4)))<=0.01)
    end    
     
end
optimize!(model)
println("Termination:",JuMP.termination_status(model))

I might have made a mistake, as I am quite new to using JuMP, but it seems like a potential bug to me.

@mewilhel
Copy link
Member

Resolved by v0.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants