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

Coefficients matrix does not return constraint when lhs empty #108

Closed
guimarqu opened this issue May 29, 2019 · 1 comment
Closed

Coefficients matrix does not return constraint when lhs empty #108

guimarqu opened this issue May 29, 2019 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@guimarqu
Copy link
Contributor

No description provided.

@guimarqu guimarqu added the bug Something isn't working label May 29, 2019
@vitornesello vitornesello added this to the v0.2 milestone May 31, 2019
@guimarqu guimarqu self-assigned this Sep 27, 2019
@guimarqu
Copy link
Contributor Author

using Coluna
variables = Dict{Int, String}(1 => "x_1", 2 => "x_2", 3 => "x_3", 10 => "y_1", 11 => "y_2")
constraints = Dict{Char, String}('a' => "constr_1", 'b' => "constr_2", 'c' => "constr_3" , 'e' => "bounds_1")
matrix['a', 1] = 2

Contraint a contains 1 coefficient

julia> matrix['a', :] 
Coluna.MembersVector{Int64,String,Float64}(Dict(10 => "y_1",2 => "x_2",3 => "x_3",11 => "y_2",1 => "x_1"), Dict(1 => 2.0))

Constraint b is empty.

julia> matrix['b', :]
Coluna.MembersVector{Int64,String,Float64}(Dict(10 => "y_1",2 => "x_2",3 => "x_3",11 => "y_2",1 => "x_1"), Dict{Int64,Float64}())

If you iterate over getrows(matrix), it only shows constraint a because MembersVector iterates over non-zero records.

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

No branches or pull requests

2 participants