Skip to content

Conversation

@frapac
Copy link
Contributor

@frapac frapac commented Sep 8, 2021

All tests are passing, except this one:

MOI.copy_to(MOI.Bridges.Constraint.Scalarize{Float64}(model), form)
MOI.set(model, MOI.VariableName(), MOI.VariableIndex.(1:2), var_names)
MOI.set(model, MOI.ConstraintName(), MOI.ConstraintIndex{MOI.ScalarAffineFunction{Float64}, MOI.EqualTo{Float64}}.(1:2), con_names)
MOI.set(model, MOI.ConstraintName(), MOI.ConstraintIndex{MOI.VariableIndex, MOI.GreaterThan{Float64}}.(1:2), vcon_names)
MOIT.util_test_models_equal(model, expected, var_names, [con_names; vcon_names])

The problem is that VariableIndex does not support ConstraintName (whereas previously, SingleVariable does). Not sure what exactly to do about that.

@codecov
Copy link

codecov bot commented Sep 8, 2021

Codecov Report

Merging #28 (7c26c3e) into master (4652d04) will increase coverage by 0.68%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
+ Coverage   85.80%   86.48%   +0.68%     
==========================================
  Files           5        5              
  Lines         317      333      +16     
==========================================
+ Hits          272      288      +16     
  Misses         45       45              
Impacted Files Coverage Δ
src/conic_form.jl 77.77% <100.00%> (+0.69%) ⬆️
src/matrix_input.jl 98.82% <100.00%> (+0.07%) ⬆️
src/sparse_matrix.jl 100.00% <100.00%> (ø)
src/MatrixOptInterface.jl 87.50% <0.00%> (-0.50%) ⬇️
src/change_form.jl 78.16% <0.00%> (+1.05%) ⬆️

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 4652d04...7c26c3e. Read the comment docs.

@blegat
Copy link
Member

blegat commented Sep 8, 2021

Remove

MOI.set(model, MOI.ConstraintName(), MOI.ConstraintIndex{MOI.VariableIndex, MOI.GreaterThan{Float64}}.(1:2), vcon_names)

and do

MOIT.util_test_models_equal(model, expected, var_names, con_names)

We dropped names for VariableIndex constraints.

@frapac
Copy link
Contributor Author

frapac commented Sep 8, 2021

Indeed, that solves the issue. Thanks for the pointer!

@blegat blegat merged commit 21e8c35 into jump-dev:master Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants