Skip to content

Commit 8ff24cb

Browse files
committed
Address comments
1 parent 9a40ed5 commit 8ff24cb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Utilities/results.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function dual_objective_value(model::MOI.ModelLike,
9595
S::Type{<:MOI.AbstractSet},
9696
T::Type,
9797
result_index::Integer)
98-
value = zero(T) # sum won't work if there are now constraints.
98+
value = zero(T) # sum won't work if there are no constraints.
9999
for ci in MOI.get(model, MOI.ListOfConstraintIndices{F, S}())
100100
value += dual_objective_value(model, ci, T, result_index)
101101
end
@@ -121,7 +121,8 @@ end
121121
get_fallback(model::MOI.ModelLike, ::MOI.DualObjectiveValue, T::Type)::T
122122
123123
Compute the dual objective value of type `T` using the `ConstraintDual` results
124-
and the `ConstraintFunction` and `ConstraintSet` values.
124+
and the `ConstraintFunction` and `ConstraintSet` values. Note that the nonlinear
125+
part of the model is ignored.
125126
"""
126127
function get_fallback(model::MOI.ModelLike, attr::MOI.DualObjectiveValue, T::Type)
127128
value = zero(T) # sum will not work if there are zero constraints

src/attributes.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ end
474474
DualObjectiveValue(result_index::Int=1)
475475
476476
A model attribute for the value of the objective function of the dual problem
477-
for the `resultindex`th dual result.
477+
for the `result_index`th dual result.
478478
"""
479479
struct DualObjectiveValue <: AbstractModelAttribute
480480
result_index::Int

0 commit comments

Comments
 (0)