-
Notifications
You must be signed in to change notification settings - Fork 21
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
Update for JuMP v0.16 #74
Conversation
Codecov Report
@@ Coverage Diff @@
## master #74 +/- ##
=========================================
- Coverage 84.33% 84.13% -0.2%
=========================================
Files 15 15
Lines 1334 1330 -4
=========================================
- Hits 1125 1119 -6
- Misses 209 211 +2
Continue to review full report at Codecov.
|
needs an upstream bugfix in jump-dev/JuMP.jl@2f2aacf555293ff7e47 59e22cefd7b10e6031696
it’s started to be a little dated
relies on the bugfix in JuliaOpt/MathProgBase.jl#160 see discussion in jump-dev/JuMP.jl#999 (comment)
@IainNZ sorry for the noise; this is now ready for review. |
test/uncsets_basic.jl
Outdated
@@ -191,7 +190,7 @@ print_with_color(:yellow, " MILP tests...\n") | |||
@objective(m, Max, 1.1*x[1] + x[2]) | |||
@constraint(m, u1*x[1] + 1*x[2] <= 2) | |||
@constraint(m, u2*x[1] + 1*x[2] <= 6) | |||
@test solve(m, prefer_cuts=cuts) == :Optimal | |||
@test solve(m, disable_cuts=cuts) == :Optimal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats going on here? Was this test not being run before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry my bad, it used to fail on travis (error message here: https://travis-ci.org/IainNZ/JuMPeR.jl/builds/216164410#L1304) when it was passing locally, and I was trying to understand the difference between prefer_cuts
and disable_cuts
, but forgot to switch back.
test/adp_inventory.jl
Outdated
end | ||
end | ||
|
||
@testset "Affine, manual" begin | ||
rm = RobustModel() | ||
rm = RobustModel(solver=GLPKSolverLP()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be solver=solver or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah my bad, it should
test/adp_inventory.jl
Outdated
@@ -13,7 +13,7 @@ | |||
# "Adjustable Robust Solutions of Uncertain Linear Programs" | |||
#----------------------------------------------------------------------- | |||
|
|||
using JuMP, JuMPeR | |||
using JuMP, JuMPeR, GLPKMathProgInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GLPK needed here?
test/adp_newsvendor.jl
Outdated
@@ -20,7 +20,7 @@ | |||
# D ∈ { ‖(D - μ)/σ‖₁ ≤ ⌊√N⌋, ‖(D - μ)/σ‖∞ ≤ 1 } | |||
#----------------------------------------------------------------------- | |||
|
|||
using JuMP, JuMPeR | |||
using JuMP, JuMPeR, GLPKMathProgInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GLPK needed here?
test/adp_newsvendor.jl
Outdated
@@ -56,7 +56,7 @@ print_with_color(:yellow, "Adaptive Newsvendor Model...\n") | |||
end | |||
|
|||
@testset "Static, manual" begin | |||
m = RobustModel() | |||
m = RobustModel(solver=GLPKSolverLP()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be =solver?
test/uncsets.jl
Outdated
@test_throws ErrorException JuMPeR.generate_reform(IncompleteSet(), RobustModel(), Int[]) | ||
@test_throws ErrorException JuMPeR.generate_cut(IncompleteSet(), RobustModel(), Int[]) | ||
@test_throws ErrorException JuMPeR.generate_scenario(IncompleteSet(), RobustModel(), Int[]) | ||
@test_throws ErrorException JuMPeR.setup_set(IncompleteSet(), RobustModel(solver=GLPKSolverLP()), Int[], false, nothing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be lp_solvers[0]
then it works with any solver?
Getting closer |
@test string(new_con) == "5 x[1] + x[2] + 4 x[3] + 11 x[4] $(JuMP.repl[:leq]) 10" It sometimes fails with string(new_con) = "4.999999999999986 x[1] + x[2] + 3.9999999999999805 x[3] + 10.999999999999947 x[4] ≤ 9.999999999999975" How do you feel about replacing it with a test like @test all(contains(string(new_con), "x[$i]") for i in 1:4)
@test contains(string(new_con), "$(JuMP.repl[:leq])") ? |
Also, isapprox(getvalue(F),44272.82749,atol=TOL) sometimes fails when getvalue(F) = 44272.823734690275 when using Ipopt. But passes with ECOS, Gurobi, Clp, and GLPK. Okay to relax the tolerance? |
and relax test on constraint expression printing
Yeah, still failing on Travis for the same (as yet unknown) reasons. |
@yeesian Are tests passing now ? Github says that all checks are passing. |
Yeah, I believe so. @IainNZ good to merge? |
Yeah if tests passing, go for it.
…On Thu, Oct 19, 2017 at 2:58 AM, Yeesian Ng ***@***.***> wrote:
Yeah, I believe so. @IainNZ <https://github.com/iainnz> good to merge?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#74 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAqRm6sL8kpKNLm5WHAYk5PcInjkx_pbks5stqzdgaJpZM4MmNSz>
.
--
*Iain Dunning, PhD*
http://iaindunning.com
|
it is correct, but the GLPK solver has been problematic on it. see * #74 (comment) and * 8327d3648b0aa59f5355 f9bd56b65e8dda6fa642 for workarounds in the past.
* update for julia 1.0 * update travis script * add LinearAlgebra to REQUIRE * some updates * more changes * add constructors * define constructor for numbers too * don't broadcast over norm expressions * revert to map * switch back to working version of GLPK * comment out flakey test for now it is correct, but the GLPK solver has been problematic on it. see * #74 (comment) and * 8327d3648b0aa59f5355 f9bd56b65e8dda6fa642 for workarounds in the past. * test on different versions of julia
Main changes:
@ShimShtern let us know if it fixes the problem(s) you've faced in https://discourse.julialang.org/t/issues-with-jumper/2794