Skip to content

Commit d2a913b

Browse files
authored
Merge pull request #100 from atoptima/column_custom_data
Get custom data associated to a column in a disaggregated solution
2 parents 841c500 + 378c566 commit d2a913b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/soldisaggregation.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,10 @@ value(info::AbstractColumnInfo, x::JuMP.VariableRef) = value(info, x.index)
2929
value(info::AbstractColumnInfo, ::MOI.VariableIndex) = error(
3030
"value(::$(typeof(info)), ::MOI.VariableIndex) not defined."
3131
)
32+
33+
"""
34+
customdata(info)
35+
36+
Returns the custom data attached to the master column variable associated to `info`.
37+
"""
38+
customdata(info::AbstractColumnInfo) = error("customdata(::$(typeof(info))) not defined.")

test/soldisaggregation.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ function test_sol_disagg()
2121
@test_throws ErrorException(
2222
"value(::ColumnInfo) not defined."
2323
) BlockDecomposition.value(ColumnInfo())
24+
@test_throws ErrorException(
25+
"customdata(::ColumnInfo) not defined."
26+
) BlockDecomposition.customdata(ColumnInfo())
2427
@test_throws ErrorException(
2528
"value(::ColumnInfo, ::MOI.VariableIndex) not defined."
2629
) BlockDecomposition.value(ColumnInfo(), x)

0 commit comments

Comments
 (0)