Skip to content

Commit

Permalink
fix retrieval of sp specific disaggregated solution
Browse files Browse the repository at this point in the history
  • Loading branch information
laradicp committed Aug 10, 2021
1 parent 6178b56 commit bf440f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/MOIwrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -635,11 +635,13 @@ mutable struct ColumnInfo <: BD.AbstractColumnInfo
end

function BD.getsolutions(model::Coluna.Optimizer, k)
ip_primal_sol = model.disagg_result.ip_primal_sols[k]
ip_primal_sol = get_best_ip_primal_sol(model.disagg_result)
sp_columns_info = Vector{ColumnInfo}()
for (varid, val) in ip_primal_sol
if getduty(varid) <= MasterCol
push!(sp_columns_info, ColumnInfo(model, varid, val))
if model.annotations.ann_per_form[getoriginformuid(varid)].axis_index_value == k
push!(sp_columns_info, ColumnInfo(model, varid, val))
end
end
end
return sp_columns_info
Expand Down

0 comments on commit bf440f0

Please sign in to comment.