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

test empty model solution and improve error msg #447

Merged
merged 3 commits into from
Feb 24, 2021
Merged

Conversation

laradicp
Copy link
Contributor

No description provided.

@laradicp laradicp linked an issue Feb 22, 2021 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Feb 22, 2021

Codecov Report

Merging #447 (b0b7271) into master (d5718d7) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #447      +/-   ##
==========================================
+ Coverage   80.55%   80.59%   +0.04%     
==========================================
  Files          50       50              
  Lines        4305     4304       -1     
==========================================
+ Hits         3468     3469       +1     
+ Misses        837      835       -2     
Impacted Files Coverage Δ
src/Algorithm/basic/solveipform.jl 92.30% <100.00%> (ø)
src/Algorithm/interface.jl 94.11% <100.00%> (+5.54%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d5718d7...4b3b820. Read the comment docs.

Copy link
Contributor

@guimarqu guimarqu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why coverage decreases...

test/issues_tests.jl Outdated Show resolved Hide resolved
)
model = BlockModel(coluna, direct_model = true)
optimize!(model)
@test JuMP.objective_value(model) == Inf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The objective value must be 0.

optimize!(model)
catch e
@test repr(e) == "ErrorException(\"Cannot apply run! for arguments Coluna.Algorithm.TreeSearchAlgorithm, Coluna.Algorithm.ModelData, Coluna.Algorithm.OptimizationInput{Coluna.MathProg.Formulation{Coluna.MathProg.Original},Coluna.MathProg.MinSense}.\")"
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can replace this block by @test_throws ExceptionError optimize!(model).

@guimarqu guimarqu merged commit fb8384f into master Feb 24, 2021
@guimarqu guimarqu deleted the empty_model branch February 24, 2021 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error msg when trying to solve an empty model
2 participants