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

Improve error msg when trying to solve an empty model #424

Closed
guimarqu opened this issue Dec 20, 2020 · 0 comments · Fixed by #447
Closed

Improve error msg when trying to solve an empty model #424

guimarqu opened this issue Dec 20, 2020 · 0 comments · Fixed by #447
Assignees
Labels
bug Something isn't working good first issue

Comments

@guimarqu
Copy link
Contributor

Describe the bug

Coluna
Version 0.3.3 - https://github.com/atoptima/Coluna.jl
┌ Warning: No initial primal bound and no cost for global artificial variables.
│ Cost of global artificial variables set to 100000.0
└ @ Coluna ~/.julia/packages/Coluna/JfyZY/src/optimize.jl:20
┌ Warning: No initial primal bound and no cost for local artificial variables.
│ Cost of local artificial variables set to 10000.0
└ @ Coluna ~/.julia/packages/Coluna/JfyZY/src/optimize.jl:33
ERROR: LoadError: MethodError: no method matching getroot(::Nothing)
Closest candidates are:
  getroot(::BlockDecomposition.Tree) at /Users/guimarqu/.julia/packages/BlockDecomposition/OYIcC/src/tree.jl:18
Stacktrace:
 [1] reformulate!(::Coluna.MathProg.Problem, ::Coluna.Annotations) at /Users/guimarqu/.julia/packages/Coluna/JfyZY/src/decomposition.jl:460
 [2] optimize!(::Coluna.MathProg.Problem, ::Coluna.Annotations, ::Coluna.Params) at /Users/guimarqu/.julia/packages/Coluna/JfyZY/src/optimize.jl:54
 [3] optimize!(::Coluna.Optimizer) at /Users/guimarqu/.julia/packages/Coluna/JfyZY/src/MOIwrapper.jl:82
 [4] optimize!(::Model, ::Nothing; bridge_constraints::Bool, ignore_optimize_hook::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/guimarqu/.julia/packages/JuMP/qhoVb/src/optimizer_interface.jl:130
 [5] optimize!(::Model) at /Users/guimarqu/.julia/packages/BlockDecomposition/OYIcC/src/BlockDecomposition.jl:51
 [6] optimize!(::Model, ::Nothing; bridge_constraints::Bool, ignore_optimize_hook::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/guimarqu/.julia/packages/JuMP/qhoVb/src/optimizer_interface.jl:120
 [7] optimize! at /Users/guimarqu/.julia/packages/JuMP/qhoVb/src/optimizer_interface.jl:106 [inlined] (repeats 2 times)

To Reproduce
Try to optimize! an empty BlockModel

Expected behavior
A warning saying that the model is empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants