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

Adding lazy constraint not successful using GLPK #126

Closed
espenol opened this issue Jan 31, 2020 · 1 comment · Fixed by #127
Closed

Adding lazy constraint not successful using GLPK #126

espenol opened this issue Jan 31, 2020 · 1 comment · Fixed by #127

Comments

@espenol
Copy link

espenol commented Jan 31, 2020

I am trying to follow the example for solver callbacks using JuMP, but GLPK instead of Gurobi. See the example here . Specifically, the @lazyconstraint and addlazycallback are not defined when I follow the example but using GLPK.

I am unable to use solver callback in JuMP using GLPK solver and see that my tests do fail when I try to test the GLPK package. Output as below, where the MOI_callbacks.jl test does not succeed (among others). Will there be a fix to the tests soon?

Sorry if this issue is not related to your package, I am new to Julia and unable to infer the root cause of my issues. You may see here for more details on my problem.

(v1.3) pkg> test GLPK
   Testing GLPK
 Resolving package versions...
    Status `C:\Users\espenhs\AppData\Local\Temp\jl_fwAwpf\Manifest.toml`
  [6e4b80f9] BenchmarkTools v0.4.3
  [b99e7846] BinaryProvider v0.5.8
  [523fee87] CodecBzip2 v0.6.0
  [944b1d66] CodecZlib v0.6.0
  [60bf3e95] GLPK v0.12.1
  [cd3eb016] HTTP v0.8.8
  [83e8ac13] IniFile v0.5.0
  [682c06a0] JSON v0.21.0
  [7d188eb4] JSONSchema v0.2.0
  [b8f27783] MathOptInterface v0.9.9
  [739be429] MbedTLS v0.7.0
  [d8a4904e] MutableArithmetics v0.2.2
  [bac558e1] OrderedCollections v1.1.0
  [69de0a69] Parsers v0.3.10
  [3bb67fe8] TranscodingStreams v0.9.5
  [2a0f44e3] Base64  [`@stdlib/Base64`]
  [ade2ca70] Dates  [`@stdlib/Dates`]
  [8ba89e20] Distributed  [`@stdlib/Distributed`]
  [b77e0a4c] InteractiveUtils  [`@stdlib/InteractiveUtils`]
  [8f399da3] Libdl  [`@stdlib/Libdl`]
  [37e2e46d] LinearAlgebra  [`@stdlib/LinearAlgebra`]
  [56ddb016] Logging  [`@stdlib/Logging`]
  [d6f4376e] Markdown  [`@stdlib/Markdown`]
  [a63ad114] Mmap  [`@stdlib/Mmap`]
  [de0858da] Printf  [`@stdlib/Printf`]
  [9a3f8284] Random  [`@stdlib/Random`]
  [ea8e919c] SHA  [`@stdlib/SHA`]
  [9e88b42a] Serialization  [`@stdlib/Serialization`]
  [6462fe0b] Sockets  [`@stdlib/Sockets`]
  [2f01184e] SparseArrays  [`@stdlib/SparseArrays`]
  [10745b16] Statistics  [`@stdlib/Statistics`]
  [8dfed614] Test  [`@stdlib/Test`]
  [4ec0a83e] Unicode  [`@stdlib/Unicode`]
Test Summary: | Pass  Total
C API         |  163    163
MathOptInterface: Error During Test at C:\Users\espenhs\.julia\packages\GLPK\HjJiX\test\runtests.jl:20
  Got exception outside of a @test
  LoadError: ArgumentError: Package Random not found in current path:
  - Run `import Pkg; Pkg.add("Random")` to install the Random package.

  Stacktrace:
   [1] require(::Module, ::Symbol) at .\loading.jl:887
   [2] include at .\boot.jl:328 [inlined]
   [3] include_relative(::Module, ::String) at .\loading.jl:1105
   [4] include(::Module, ::String) at .\Base.jl:31
   [5] include(::String) at .\client.jl:424
   [6] top-level scope at C:\Users\espenhs\.julia\packages\GLPK\HjJiX\test\runtests.jl:22
   [7] top-level scope at D:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.3\Test\src\Test.jl:1107
   [8] top-level scope at C:\Users\espenhs\.julia\packages\GLPK\HjJiX\test\runtests.jl:21
   [9] include at .\boot.jl:328 [inlined]
   [10] include_relative(::Module, ::String) at .\loading.jl:1105
   [11] include(::Module, ::String) at .\Base.jl:31
   [12] include(::String) at .\client.jl:424
   [13] top-level scope at none:6
   [14] eval(::Module, ::Any) at .\boot.jl:330
   [15] exec_options(::Base.JLOptions) at .\client.jl:263
   [16] _start() at .\client.jl:460
  in expression starting at C:\Users\espenhs\.julia\packages\GLPK\HjJiX\test\MOI_callbacks.jl:1

Test Summary:             | Pass  Error  Broken  Total
MathOptInterface          | 1834      1       1   1836
  Unit Tests              |  782                   782
  Linear tests            |  511                   511
  Linear Conic tests      |  135                   135
  Integer Linear tests    |   75                    75
  ModelLike tests         |  246              1    247
  Parameter setting       |    4                     4
  Issue #79               |    2                     2
  Issue #70               |    6                     6
  Infeasible bounds       |    1                     1
  RawParameter            |   15                    15
  TimeLimitSec issue #110 |    4                     4
  RelativeGap             |    2                     2
  Extra name tests        |   15                    15
  Issue #102              |    2                     2
  Issue #116              |    3                     3
  Default parameters      |    4                     4
  Duplicate names         |   20                    20
  Duals with equal bounds |    2                     2
  PR #121                 |    3                     3
  Non-ascii names         |    2                     2
ERROR: LoadError: Some tests did not pass: 1834 passed, 0 failed, 1 errored, 1 broken.
in expression starting at C:\Users\espenhs\.julia\packages\GLPK\HjJiX\test\runtests.jl:20
ERROR: Package GLPK errored during testing
@odow
Copy link
Member

odow commented Jan 31, 2020

I see you got an answer on discourse re callbacks. It'll work on the next release of jump.

The test failure is an issue with our Project.toml configuration on Julia 1.3. It doesn't mean that the package is broken, it's just a coincidence that it's also in the callback file. I'll fix when I get into my office.

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

Successfully merging a pull request may close this issue.

2 participants