-
Notifications
You must be signed in to change notification settings - Fork 62
Gap in JuMP v0.19 #230
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
Comments
Hi @angeloaliano, Welcome to CPLEX.jl!
The steps to get this resolved are
function LQOI.get_relative_mip_gap(model::Optimizer)
return get_rel_gap(model.inner)
end
Let me know if you get stuck on any steps (I haven't for example, tested that the function works because I don't have CPLEX). |
Dear colleague,
Thanks a lot by your help.
I made this steps. I have inserted the function
function LQOI.get_relative_mip_gap(model::Optimizer)
return get_rel_gap(model.inner)
end
in MOI_wrapper.jl in my computer. But, when you say to I removed the line
https://github.com/JuliaOpt/CPLEX.jl/blob/bb3f45c236fb0afb2fa2ed75c448e17b9a64a61e/test/MathOptInterface/MOI_wrapper.jl#L15
a new window is opened, and the line 15 it was in red color. I can not to remove it, because I don't have permission (in the pencil, say that I must to be a branch). Can you remove this line?
The other steps is OK, ie., I have changed the archive in
https://github.com/JuliaOpt/CPLEX.jl/blob/master/src/MOI_wrapper.jl
and I inserted
function LQOI.get_relative_mip_gap(model::Optimizer)
return get_rel_gap(model.inner)
end
and I saved.
Moreover, Can you give me the steps to insert the number of nodes reserched?
I thank a lot for your patience and availability.
Best regards,
* Remove this line
* Test that it works by runnning ] test CPLEX
* Open https://github.com/JuliaOpt/CPLEX.jl/blob/master/src/MOI_wrapper.jl
* Click the pencil "Edit this file" button
* Make the same change you made locally
* Follow the instructions to make a PR!
…---------------------------------------------------------------------
Angelo Aliano Filho
Departamento de Matemática - DAMAT-AP
UTFPR - Universidade Tecnológica Federal do Paraná
Apucarana, Paraná
Te.: (14) 99802 93 71
________________________________
De: Oscar Dowson <notifications@github.com>
Enviado: domingo, 31 de março de 2019 18:12
Para: JuliaOpt/CPLEX.jl
Cc: angeloaliano; Mention
Assunto: Re: [JuliaOpt/CPLEX.jl] Gap in JuMP v0.19 (#230)
Hi @angeloaliano<https://github.com/angeloaliano>,
Welcome to CPLEX.jl!
or to implement in CPLEX.jl in a new version?
The steps to get this resolved are
* Open a Julia REPL
* Run ] dev CPLEX
* Open ~/.julia/dev/CPLEX/src/MOI_wrapper.jl
* Add the following function to that file
function LQOI.get_relative_mip_gap(model::Optimizer)
return get_rel_gap(model.inner)
end
* Remove this line
https://github.com/JuliaOpt/CPLEX.jl/blob/bb3f45c236fb0afb2fa2ed75c448e17b9a64a61e/test/MathOptInterface/MOI_wrapper.jl#L15
* Test that it works by runnning ] test CPLEX
* Open https://github.com/JuliaOpt/CPLEX.jl/blob/master/src/MOI_wrapper.jl
* Click the pencil "Edit this file" button
* Make the same change you made locally
* Follow the instructions to make a PR!
Let me know if you get stuck on any steps (I haven't for example, tested that the function works because I don't have CPLEX).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#230 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Auphahlq4rgQXiZdsmP7-lVBfKAeI68Cks5vcSTXgaJpZM4cUi-E>.
|
You should remove it in the file: |
Dear,
I tried to perform the changes in the archives, as you see:
[cid:3d3e38e8-8cc2-422b-8979-f0f9717384a7]
[cid:3530d0e4-2a9e-4899-938d-00048f5ce4c2]
on my computer, in the ~\.julia\packages\CPLEX\mo9kV\src\MOI_wrapper and in ~\.julia\packages\CPLEX\mo9kV\test\MathOptInterface. But, when I run ] test CPLEX, a error message appears.
Also, I changed the archive in https://github.com/JuliaOpt/CPLEX.jl/blob/master/src/MOI_wrapper.jl, inserting the function
function LQOI.get_relative_mip_gap(model::Optimizer)
return get_rel_gap(model.inner)
end.
There is anything to I do yet?
Would you like to help me please?
…---------------------------------------------------------------------
Angelo Aliano Filho
Departamento de Matemática - DAMAT-AP
UTFPR - Universidade Tecnológica Federal do Paraná
Apucarana, Paraná
Te.: (14) 99802 93 71
________________________________
De: Oscar Dowson <notifications@github.com>
Enviado: domingo, 31 de março de 2019 18:12
Para: JuliaOpt/CPLEX.jl
Cc: angeloaliano; Mention
Assunto: Re: [JuliaOpt/CPLEX.jl] Gap in JuMP v0.19 (#230)
Hi @angeloaliano<https://github.com/angeloaliano>,
Welcome to CPLEX.jl!
or to implement in CPLEX.jl in a new version?
The steps to get this resolved are
* Open a Julia REPL
* Run ] dev CPLEX
* Open ~/.julia/dev/CPLEX/src/MOI_wrapper.jl
* Add the following function to that file
function LQOI.get_relative_mip_gap(model::Optimizer)
return get_rel_gap(model.inner)
end
* Remove this line
https://github.com/JuliaOpt/CPLEX.jl/blob/bb3f45c236fb0afb2fa2ed75c448e17b9a64a61e/test/MathOptInterface/MOI_wrapper.jl#L15
* Test that it works by runnning ] test CPLEX
* Open https://github.com/JuliaOpt/CPLEX.jl/blob/master/src/MOI_wrapper.jl
* Click the pencil "Edit this file" button
* Make the same change you made locally
* Follow the instructions to make a PR!
Let me know if you get stuck on any steps (I haven't for example, tested that the function works because I don't have CPLEX).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#230 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Auphahlq4rgQXiZdsmP7-lVBfKAeI68Cks5vcSTXgaJpZM4cUi-E>.
|
Unfortunately you can't attach files when replying via email. Please log-in to the Github web interface and re-post your reply. |
Dear, n the ~.julia\packages\CPLEX\mo9kV\src\MOI_wrapper and in ~.julia\packages\CPLEX\mo9kV\test\MathOptInterface. But, when I run ] test CPLEX, a error message appears. |
We cannot see the errors, can you scroll up and give a screenshot of the error messages ? Or just copy-paste them |
One problem (that is not your fault) is |
Dear all, test CPLEX
Testing CPLEX
Status `C:\Users\ANGELO~1\AppData\Local\Temp\jl_65AF.tmp\Manifest.toml`
[a076750e] CPLEX v0.4.4
[34da2185] Compat v2.1.0
[f8899e07] LinQuadOptInterface v0.6.0
[b8f27783] MathOptInterface v0.8.4
[fdba3010] MathProgBase v0.7.7
[2a0f44e3] Base64 [`@stdlib/Base64`]
[ade2ca70] Dates [`@stdlib/Dates`]
[8bb1440f] DelimitedFiles [`@stdlib/DelimitedFiles`]
[8ba89e20] Distributed [`@stdlib/Distributed`]
[b77e0a4c] InteractiveUtils [`@stdlib/InteractiveUtils`]
[76f85450] LibGit2 [`@stdlib/LibGit2`]
[8f399da3] Libdl [`@stdlib/Libdl`]
[37e2e46d] LinearAlgebra [`@stdlib/LinearAlgebra`]
[56ddb016] Logging [`@stdlib/Logging`]
[d6f4376e] Markdown [`@stdlib/Markdown`]
[a63ad114] Mmap [`@stdlib/Mmap`]
[44cfe95a] Pkg [`@stdlib/Pkg`]
[de0858da] Printf [`@stdlib/Printf`]
[3fa0cd96] REPL [`@stdlib/REPL`]
[9a3f8284] Random [`@stdlib/Random`]
[ea8e919c] SHA [`@stdlib/SHA`]
[9e88b42a] Serialization [`@stdlib/Serialization`]
[1a1011a3] SharedArrays [`@stdlib/SharedArrays`]
[6462fe0b] Sockets [`@stdlib/Sockets`]
[2f01184e] SparseArrays [`@stdlib/SparseArrays`]
[10745b16] Statistics [`@stdlib/Statistics`]
[8dfed614] Test [`@stdlib/Test`]
[cf7118a7] UUIDs [`@stdlib/UUIDs`]
[4ec0a83e] Unicode [`@stdlib/Unicode`]
Test Summary: | Pass Total
C_API | 32 32
┌ Warning: `Pkg.dir(pkgname, paths...)` is deprecated; instead, do `import MathProgBase; joinpath(dirname(pathof(MathProgBase)), "..", paths...)`.
└ @ Pkg.API C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.1\Pkg\src\API.jl:395
┌ Warning: Element type Int64 does not have an infinite value. Note that this may artifically introduce ranged (two-sided) constraints. To avoid this, consider casting the problem data to Float64.
└ @ MathProgBase.HighLevelInterface C:\Users\angeloaliano\.julia\packages\MathProgBase\rVlFR\src\HighLevelInterface\HighLevelInterface.jl:9
┌ Warning: Element type Int64 does not have an infinite value. Note that this may artifically introduce ranged (two-sided) constraints. To avoid this, consider casting the problem data to Float64.
└ @ MathProgBase.HighLevelInterface C:\Users\angeloaliano\.julia\packages\MathProgBase\rVlFR\src\HighLevelInterface\HighLevelInterface.jl:9
┌ Warning: Element type Int64 does not have an infinite value. Note that this may artifically introduce ranged (two-sided) constraints. To avoid this, consider casting the problem data to Float64.
└ @ MathProgBase.HighLevelInterface C:\Users\angeloaliano\.julia\packages\MathProgBase\rVlFR\src\HighLevelInterface\HighLevelInterface.jl:9
┌ Warning: Element type Int64 does not have an infinite value. Note that this may artifically introduce ranged (two-sided) constraints. To avoid this, consider casting the problem data to Float64.
└ @ MathProgBase.HighLevelInterface C:\Users\angeloaliano\.julia\packages\MathProgBase\rVlFR\src\HighLevelInterface\HighLevelInterface.jl:9
┌ Warning: Element type Int64 does not have an infinite value. Note that this may artifically introduce ranged (two-sided) constraints. To avoid this, consider casting the problem data to Float64.
└ @ MathProgBase.HighLevelInterface C:\Users\angeloaliano\.julia\packages\MathProgBase\rVlFR\src\HighLevelInterface\HighLevelInterface.jl:9
┌ Warning: Element type Int64 does not have an infinite value. Note that this may artifically introduce ranged (two-sided) constraints. To avoid this, consider casting the problem data to Float64.
└ @ MathProgBase.HighLevelInterface C:\Users\angeloaliano\.julia\packages\MathProgBase\rVlFR\src\HighLevelInterface\HighLevelInterface.jl:9
Test Summary: | Pass Total
MathProgBase | 217 217
Min IP with constant: Test Failed at C:\Users\angeloaliano\.julia\packages\MathOptInterface\C3lip\src\Test\UnitTests\solve.jl:22
Expression: MOI.get(model, MOI.ObjectiveBound()) <= 3.0
Evaluated: 4.0 <= 3.0
Stacktrace:
[1] solve_objbound_edge_cases(::CPLEX.Optimizer, ::MathOptInterface.Test.TestConfig) at C:\Users\angeloaliano\.julia\packages\MathOptInterface\C3lip\src\Test\UnitTests\solve.jl:22
[2] macro expansion at C:\Users\angeloaliano\.julia\packages\MathOptInterface\C3lip\src\Test\config.jl:53 [inlined]
[3] macro expansion at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.1\Test\src\Test.jl:1083 [inlined]
[4] unittest(::CPLEX.Optimizer, ::MathOptInterface.Test.TestConfig, ::Array{String,1}) at C:\Users\angeloaliano\.julia\packages\MathOptInterface\C3lip\src\Test\config.jl:53
Max IP with constant: Test Failed at C:\Users\angeloaliano\.julia\packages\MathOptInterface\C3lip\src\Test\UnitTests\solve.jl:41
Expression: MOI.get(model, MOI.ObjectiveBound()) >= 3.0
Evaluated: 2.0 >= 3.0
Stacktrace:
[1] macro expansion at C:\Users\angeloaliano\.julia\packages\MathOptInterface\C3lip\src\Test\UnitTests\solve.jl:41 [inlined]
[2] macro expansion at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.1\Test\src\Test.jl:1083 [inlined]
[3] solve_objbound_edge_cases(::CPLEX.Optimizer, ::MathOptInterface.Test.TestConfig) at C:\Users\angeloaliano\.julia\packages\MathOptInterface\C3lip\src\Test\UnitTests\solve.jl:27
Min LP with constant: Error During Test at C:\Users\angeloaliano\.julia\packages\MathOptInterface\C3lip\src\Test\UnitTests\solve.jl:59
Test threw exception
Expression: MOI.get(model, MOI.ObjectiveBound()) <= 2.0
MethodError: no method matching CPLEX.CplexError(::Ptr{Nothing}, ::Int32)
Closest candidates are:
CPLEX.CplexError(!Matched::CPLEX.Env, ::Integer) at C:\Users\angeloaliano\.julia\packages\CPLEX\mo9kV\src\cpx_env.jl:90
Stacktrace:
[1] get_best_bound(::CPLEX.Model) at C:\Users\angeloaliano\.julia\packages\CPLEX\mo9kV\src\cpx_callbacks.jl:5
[2] get_objective_bound(::CPLEX.Optimizer) at C:\Users\angeloaliano\.julia\packages\CPLEX\mo9kV\src\MOI_wrapper.jl:306
[3] get at C:\Users\angeloaliano\.julia\packages\LinQuadOptInterface\ZMx9f\src\solve.jl:240 [inlined]
[4] macro expansion at C:\Users\angeloaliano\.julia\packages\MathOptInterface\C3lip\src\Test\UnitTests\solve.jl:59 [inlined]
[5] macro expansion at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.1\Test\src\Test.jl:1083 [inlined]
[6] solve_objbound_edge_cases(::CPLEX.Optimizer, ::MathOptInterface.Test.TestConfig) at C:\Users\angeloaliano\.julia\packages\MathOptInterface\C3lip\src\Test\UnitTests\solve.jl:46
Max LP with constant: Error During Test at C:\Users\angeloaliano\.julia\packages\MathOptInterface\C3lip\src\Test\UnitTests\solve.jl:77
Test threw exception
Expression: MOI.get(model, MOI.ObjectiveBound()) >= 4.0
MethodError: no method matching CPLEX.CplexError(::Ptr{Nothing}, ::Int32)
Closest candidates are:
CPLEX.CplexError(!Matched::CPLEX.Env, ::Integer) at C:\Users\angeloaliano\.julia\packages\CPLEX\mo9kV\src\cpx_env.jl:90
Stacktrace:
[1] get_best_bound(::CPLEX.Model) at C:\Users\angeloaliano\.julia\packages\CPLEX\mo9kV\src\cpx_callbacks.jl:5
[2] get_objective_bound(::CPLEX.Optimizer) at C:\Users\angeloaliano\.julia\packages\CPLEX\mo9kV\src\MOI_wrapper.jl:306
[3] get at C:\Users\angeloaliano\.julia\packages\LinQuadOptInterface\ZMx9f\src\solve.jl:240 [inlined]
[4] macro expansion at C:\Users\angeloaliano\.julia\packages\MathOptInterface\C3lip\src\Test\UnitTests\solve.jl:77 [inlined]
[5] macro expansion at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.1\Test\src\Test.jl:1083 [inlined]
[6] solve_objbound_edge_cases(::CPLEX.Optimizer, ::MathOptInterface.Test.TestConfig) at C:\Users\angeloaliano\.julia\packages\MathOptInterface\C3lip\src\Test\UnitTests\solve.jl:64
Test Summary: | Pass Fail Error Total
MathOptInterface | 913 2 2 917
MOI_wrapper.jl | 913 2 2 917
Unit Tests | 330 2 2 334
solve_duplicate_terms_obj | 9 9
solve_with_lowerbound | 11 11
solve_blank_obj | 8 8
delete_variables | 4 4
min_sense | 3 3
add_variables | 3 3
solve_affine_greaterthan | 8 8
feasibility_sense | 3 3
add_variable | 3 3
solve_with_upperbound | 11 11
getvariable | 2 2
solve_singlevariable_obj | 9 9
solve_affine_equalto | 8 8
max_sense | 3 3
solve_duplicate_terms_vector_affine | 8 8
getconstraint | 7 7
get_objective_function | 5 5
solve_affine_lessthan | 8 8
solve_objbound_edge_cases | 20 2 2 24
Min IP with constant | 5 1 6
Max IP with constant | 5 1 6
Min LP with constant | 5 1 6
Max LP with constant | 5 1 6
solve_constant_obj | 9 9
solve_duplicate_terms_scalar_affine | 8 8
solve_affine_deletion_edge_cases | 24 24
variablenames | 5 5
solve_integer_edge_cases | 20 20
delete_variable | 4 4
solve_affine_interval | 8 8
solve_set_singlevariable_lessthan | 17 17
solve_coef_scalaraffine_lessthan | 16 16
solve_coef_scalar_objective | 8 8
solve_const_scalar_objective | 8 8
solve_transform_singlevariable_lessthan | 18 18
solve_multirow_vectoraffine_nonpos | 12 12
solve_const_vectoraffine_nonpos | 14 14
delete_variable_with_single_variable_obj | 9 9
solve_set_scalaraffine_lessthan | 17 17
Linear tests | 359 359
Integer Linear tests | 99 99
ModelLike tests | 115 115
Env | 10 10
ERROR: LoadError: Some tests did not pass: 913 passed, 2 failed, 2 errored, 0 broken.
in expression starting at C:\Users\angeloaliano\.julia\packages\CPLEX\mo9kV\test\runtests.jl:7
ERROR: Package CPLEX errored during testing |
Thank you Very Much!
Gap os working.
How can I obtain the number of nodes reserched in the tree?
Obter o Outlook para Android<https://aka.ms/ghei36>
…________________________________
From: Oscar Dowson <notifications@github.com>
Sent: Monday, April 1, 2019 12:24:37 PM
To: JuliaOpt/CPLEX.jl
Cc: angeloaliano; Mention
Subject: Re: [JuliaOpt/CPLEX.jl] Gap in JuMP v0.19 (#230)
One problem (that is not your fault) is linear10b. To fix, change line 29 to
"linear10", "linear10b", # requires interval
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#230 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AuphamDOJHBdacsF1sMt5ZDSX5zKmsAWks5vciS1gaJpZM4cUi-E>.
|
Hello,
When I try to obtain in the MIP the relative gap and number of nodes, it gave me error:
The error message is
However, I used the same code to retrieve ObjectiveBound() and CPU time it works. It seems like some of the attributes are not working. Could you give me some insight about why would this happen or to implement in CPLEX.jl in a new version?
Thank you.
The text was updated successfully, but these errors were encountered: