Skip to content

Commit

Permalink
moved test case and added changelog (#196)
Browse files Browse the repository at this point in the history
* moved test case and added to changelog
* v0.6.4
  • Loading branch information
Wikunia authored Jul 24, 2020
1 parent 8276636 commit 5ab0874
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 21 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Juniper.jl Changelog

### Unregistered
### v0.6.4
- Use of `JUNIPER_RNG` for random numbers. Makes sure that `rand` outside of Juniper is unaffected.
- Option to set the random seed with the option `seed`.
- Bugfix: Generating the real nlp in the feasibility pump failed when there was no objective. [Issue #195](https://github.com/lanl-ansi/Juniper.jl/pull/195)

### 0.6.3
- Bugfix: `registered_functions` failed in feasibility pump [Issue #189](https://github.com/lanl-ansi/Juniper.jl/pull/189)
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "Juniper"
uuid = "2ddba703-00a4-53a7-87a5-e8b9971dde84"
authors = ["Ole Kröger <[email protected]>", "Kaarthik Sundar [email protected]"]
repo = "https://github.com/lanl-ansi/Juniper.jl.git"
version = "0.6.3"
version = "0.6.4"

[deps]
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Expand Down
19 changes: 0 additions & 19 deletions test/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1207,23 +1207,4 @@ end
@test JuMP.value(a_var) 1
end

@testset "Issue 195: FPump without objective" begin
ipopt_solver = JuMP.optimizer_with_attributes(Ipopt.Optimizer, "print_level" => 0, "sb" => "yes", "max_iter" => 50000)
cbc_solver = JuMP.optimizer_with_attributes(Cbc.Optimizer, "logLevel" => 0)
juniper_solver = JuMP.optimizer_with_attributes(Juniper.Optimizer,
"nl_solver" => ipopt_solver,
"mip_solver" => cbc_solver, "log_levels" => [])
m = Model(juniper_solver)
@variable(m, x[1:3], Int)
@variable(m, y)
@NLconstraint(m, x[1]*x[2]*x[3]*y >= 5)
optimize!(m)

for i=1:3
xval = JuMP.value(x[i])
@test isapprox(round(xval)-xval, 0; atol=sol_atol)
end
@test JuMP.objective_value(m) 0.0
end

end
23 changes: 23 additions & 0 deletions test/fpump.jl
Original file line number Diff line number Diff line change
Expand Up @@ -248,4 +248,27 @@ end
@test status == MOI.LOCALLY_SOLVED || status == MOI.TIME_LIMIT
end

@testset "FP: Issue 195: FPump without objective" begin
println("==================================")
println("FP: Issue 195: FPump without objective")
println("==================================")

ipopt_solver = JuMP.optimizer_with_attributes(Ipopt.Optimizer, "print_level" => 0, "sb" => "yes", "max_iter" => 50000)
cbc_solver = JuMP.optimizer_with_attributes(Cbc.Optimizer, "logLevel" => 0)
juniper_solver = JuMP.optimizer_with_attributes(Juniper.Optimizer,
"nl_solver" => ipopt_solver,
"mip_solver" => cbc_solver, "log_levels" => [])
m = Model(juniper_solver)
@variable(m, x[1:3], Int)
@variable(m, y)
@NLconstraint(m, x[1]*x[2]*x[3]*y >= 5)
optimize!(m)

for i=1:3
xval = JuMP.value(x[i])
@test isapprox(round(xval)-xval, 0; atol=sol_atol)
end
@test JuMP.objective_value(m) 0.0
end

end

0 comments on commit 5ab0874

Please sign in to comment.