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

Something wrong with running JuMP #2298

Closed
duyanran opened this issue Jul 30, 2020 · 5 comments
Closed

Something wrong with running JuMP #2298

duyanran opened this issue Jul 30, 2020 · 5 comments

Comments

@duyanran
Copy link

duyanran commented Jul 30, 2020

    model = Model(GLPK.Optimizer)

when i run code above

MethodError: no method matching Model(::Type{GLPK.Optimizer})

it told me something wrong, really dont known whats wrong , need some help , thanks!

@duyanran duyanran reopened this Jul 30, 2020
@duyanran duyanran changed the title Something wrong with Something wrong with running JuMP Jul 30, 2020
@odow
Copy link
Member

odow commented Jul 30, 2020

See this question: https://discourse.julialang.org/t/getting-methoderror-no-method-matching-model-when-initializing-models-on-jump/43647

You have an outdated version of JuMP.

p.s. in future, please ask questions like this on this on the Discourse forum.

@duyanran
Copy link
Author

duyanran commented Aug 2, 2020

(@v1.3) pkg> add JuMP@0.21.0
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package JuMP [4076af6c]:
 JuMP [4076af6c] log:
 ├─possible versions are: [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.3] or uninstalled
 ├─restricted to versions 0.21.0 by an explicit requirement, leaving only versions 0.21.0
 └─restricted by compatibility requirements with Pavito [cd433a01] to versions: 0.18.3-0.18.6 — no versions left
   └─Pavito [cd433a01] log:
     ├─possible versions are: [0.1.1-0.1.2, 0.2.0] or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions [0.1.1-0.1.2, 0.2.0]

Thanks for your reply ,but seemingly it doesnt work for me ,i tried this as follows, but still wont work

   Updating `C:\Users\duyanran\.juliapro\JuliaPro_v1.3.1-2\environments\v1.3\Project.toml`
  [2f354839] - Pajarito v0.7.0
   Updating `C:\Users\duyanran\.juliapro\JuliaPro_v1.3.1-2\environments\v1.3\Manifest.toml`
  [2f354839] - Pajarito v0.7.0

(@v1.3) pkg> rm JuMP
   Updating `C:\Users\duyanran\.juliapro\JuliaPro_v1.3.1-2\environments\v1.3\Project.toml`
  [4076af6c] - JuMP v0.18.6
   Updating `C:\Users\duyanran\.juliapro\JuliaPro_v1.3.1-2\environments\v1.3\Manifest.toml`
 [no changes]

(@v1.3) pkg> add JuMP@0.21
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package JuMP [4076af6c]:
 JuMP [4076af6c] log:
 ├─possible versions are: [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.3] or uninstalled
 ├─restricted to versions 0.21 by an explicit requirement, leaving only versions 0.21.0-0.21.3      
 └─restricted by compatibility requirements with Pavito [cd433a01] to versions: 0.18.3-0.18.6 — no versions left
   └─Pavito [cd433a01] log:
     ├─possible versions are: [0.1.1-0.1.2, 0.2.0] or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions [0.1.1-0.1.2, 0.2.0]

(@v1.3) pkg> add JuMP@0.21.0
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package JuMP [4076af6c]:
 JuMP [4076af6c] log:
 ├─possible versions are: [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.3] or uninstalled
 ├─restricted to versions 0.21.0 by an explicit requirement, leaving only versions 0.21.0
 └─restricted by compatibility requirements with Pavito [cd433a01] to versions: 0.18.3-0.18.6 — no versions left
   └─Pavito [cd433a01] log:
     ├─possible versions are: [0.1.1-0.1.2, 0.2.0] or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions [0.1.1-0.1.2, 0.2.0]

(@v1.3) pkg> add Pavito
  Resolving package versions...
   Updating `C:\Users\duyanran\.juliapro\JuliaPro_v1.3.1-2\environments\v1.3\Project.toml`
 [no changes]
   Updating `C:\Users\duyanran\.juliapro\JuliaPro_v1.3.1-2\environments\v1.3\Manifest.toml`
 [no changes]

(@v1.3) pkg> add JuMP@0.21.0
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package JuMP [4076af6c]:
 JuMP [4076af6c] log:
 ├─possible versions are: [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.3] or uninstalled
 ├─restricted to versions 0.21.0 by an explicit requirement, leaving only versions 0.21.0
 └─restricted by compatibility requirements with Pavito [cd433a01] to versions: 0.18.3-0.18.6 — no versions left
   └─Pavito [cd433a01] log:
     ├─possible versions are: [0.1.1-0.1.2, 0.2.0] or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions [0.1.1-0.1.2, 0.2.0]

(@v1.3) pkg> add Pavito@0.2.0
  Resolving package versions...
   Updating `C:\Users\duyanran\.juliapro\JuliaPro_v1.3.1-2\environments\v1.3\Project.toml`
 [no changes]
   Updating `C:\Users\duyanran\.juliapro\JuliaPro_v1.3.1-2\environments\v1.3\Manifest.toml`
 [no changes]

(@v1.3) pkg> add JuMP@0.21.0
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package JuMP [4076af6c]:
 JuMP [4076af6c] log:
 ├─possible versions are: [0.18.3-0.18.6, 0.19.0-0.19.2, 0.20.0-0.20.1, 0.21.0-0.21.3] or uninstalled
 ├─restricted to versions 0.21.0 by an explicit requirement, leaving only versions 0.21.0
 └─restricted by compatibility requirements with Pavito [cd433a01] to versions: 0.18.3-0.18.6 — no versions left
   └─Pavito [cd433a01] log:
     ├─possible versions are: [0.1.1-0.1.2, 0.2.0] or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions [0.1.1-0.1.2, 0.2.0]

(@v1.3) pkg> add JuMP
  Resolving package versions...
   Updating `C:\Users\duyanran\.juliapro\JuliaPro_v1.3.1-2\environments\v1.3\Project.toml`
  [4076af6c] + JuMP v0.18.6
   Updating `C:\Users\duyanran\.juliapro\JuliaPro_v1.3.1-2\environments\v1.3\Manifest.toml`
 [no changes]

and you can see JuMP version is still v0.18.6
did i do something wrong ? any suggestion? thank you !

@odow
Copy link
Member

odow commented Aug 2, 2020

Per the error message, JuMP 0.21 is not compatible with Pavito (although it should be soon).

For now, just remove Pavito ] rm Pavito then ] add JuMP.

@odow
Copy link
Member

odow commented Aug 4, 2020

Closing because this is not a bug in JuMP. Please post on the Discourse forum if you still have troubles after removing Pavito: https://discourse.julialang.org/c/domain/opt/13

@odow odow closed this as completed Aug 4, 2020
@duyanran
Copy link
Author

duyanran commented Aug 5, 2020

it worked !!thank u!!!

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

No branches or pull requests

2 participants