From 7e99eab3426a92502c606d190a496a55c9e37581 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Thu, 9 Sep 2021 22:39:04 +0200 Subject: [PATCH 01/20] Fixes #1600 --- src/attributes.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/attributes.jl b/src/attributes.jl index 7a1118d72f..92289f151b 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -1190,6 +1190,10 @@ struct VariablePrimalStart <: AbstractVariableAttribute end A variable attribute for the assignment to some primal variable's value in result `result_index`. If `result_index` is omitted, it is 1 by default. + +If the solver does not have a primal value for the variable (for instance, +because of an infeasibility or because there is no solution with the +requested `result_index`), the result is undefined. See [`ResultCount`](@ref) for information on how the results are ordered. """ From 3fd0edcaaff462facffcf13d8f7cece448d23ae8 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 02:46:54 +0200 Subject: [PATCH 02/20] Mention PrimalStatus. --- src/attributes.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/attributes.jl b/src/attributes.jl index 92289f151b..2740c5bb9e 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -1193,7 +1193,8 @@ result `result_index`. If `result_index` is omitted, it is 1 by default. If the solver does not have a primal value for the variable (for instance, because of an infeasibility or because there is no solution with the -requested `result_index`), the result is undefined. +requested `result_index`), the result is undefined. Users should first check +[`PrimalStatus`](@ref) before accessing the `VariablePrimal` attribute. See [`ResultCount`](@ref) for information on how the results are ordered. """ From b3e5adc4a5f47faa873b022641ffdc78e096c69f Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 02:49:18 +0200 Subject: [PATCH 03/20] ConstraintPrimal. --- src/attributes.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/attributes.jl b/src/attributes.jl index 2740c5bb9e..cc3588cbdf 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -1190,7 +1190,7 @@ struct VariablePrimalStart <: AbstractVariableAttribute end A variable attribute for the assignment to some primal variable's value in result `result_index`. If `result_index` is omitted, it is 1 by default. - + If the solver does not have a primal value for the variable (for instance, because of an infeasibility or because there is no solution with the requested `result_index`), the result is undefined. Users should first check @@ -1358,6 +1358,11 @@ These solvers may return the value of `s` for `ConstraintPrimal`, rather than `b - Ax`. (Although these are constrained by an equality constraint, due to numerical tolerances they may not be identical.) +If the solver does not have a primal value for the constraint (for instance, +because of an infeasibility or because there is no solution with the +requested `result_index`), the result is undefined. Users should first check +[`PrimalStatus`](@ref) before accessing the `ConstraintPrimal` attribute. + If `result_index` is omitted, it is 1 by default. See [`ResultCount`](@ref) for information on how the results are ordered. """ From 7cc58a466edb851330d7571e8647e98566c9f939 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 02:50:46 +0200 Subject: [PATCH 04/20] VariableBasisStatus --- src/attributes.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/attributes.jl b/src/attributes.jl index cc3588cbdf..a6adbde30a 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -1257,6 +1257,11 @@ Possible values are: A variable attribute for the `BasisStatusCode` of a variable in result `result_index`, with respect to an available optimal solution basis. + +If the solver does not have a basis status for the variable (for instance, +because of an infeasibility or because there is no solution with the +requested `result_index`), the result is undefined. Users should first check +[`PrimalStatus`](@ref) before accessing the `ConstraintPrimal` attribute. """ struct VariableBasisStatus <: AbstractVariableAttribute result_index::Int From 270ab79f773c02c70368ad8ff334ee5cd1d1195c Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 02:51:32 +0200 Subject: [PATCH 05/20] VariableBasisStatus: remark on order of solution. Present on all other attributes, save this one. --- src/attributes.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/attributes.jl b/src/attributes.jl index a6adbde30a..689af8da35 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -1262,6 +1262,8 @@ If the solver does not have a basis status for the variable (for instance, because of an infeasibility or because there is no solution with the requested `result_index`), the result is undefined. Users should first check [`PrimalStatus`](@ref) before accessing the `ConstraintPrimal` attribute. + +See [`ResultCount`](@ref) for information on how the results are ordered. """ struct VariableBasisStatus <: AbstractVariableAttribute result_index::Int From 5d2bf887cf0d836d419e4d074cd404a12fe326be Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 02:52:23 +0200 Subject: [PATCH 06/20] DualObjectiveValue --- src/attributes.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/attributes.jl b/src/attributes.jl index 689af8da35..dea7bc68a4 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -1017,6 +1017,11 @@ end A model attribute for the value of the objective function of the dual problem for the `result_index`th dual result. +If the solver does not have a dual value for the objective (for instance, +because of an infeasibility or because there is no solution with the +requested `result_index`), the result is undefined. Users should first check +[`DualStatus`](@ref) before accessing the `DualObjectiveValue` attribute. + See [`ResultCount`](@ref) for information on how the results are ordered. """ struct DualObjectiveValue <: AbstractModelAttribute From da052b45733da827b62b9df123c8a1cf8d50cf48 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 02:53:28 +0200 Subject: [PATCH 07/20] ObjectiveValue --- src/attributes.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/attributes.jl b/src/attributes.jl index dea7bc68a4..aaec693676 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -1004,6 +1004,11 @@ attribute_value_type(::ObjectiveFunctionType) = Type{<:AbstractFunction} A model attribute for the objective value of the primal solution `result_index`. +If the solver does not have a primal value for the objective (for instance, +because of an infeasibility or because there is no solution with the +requested `result_index`), the result is undefined. Users should first check +[`PrimalStatus`](@ref) before accessing the `ObjectiveValue` attribute. + See [`ResultCount`](@ref) for information on how the results are ordered. """ struct ObjectiveValue <: AbstractModelAttribute From c1b9195f3d4ea9880c1e53ba415c2aee87f81665 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 02:54:02 +0200 Subject: [PATCH 08/20] VariableBasisStatus: typo --- src/attributes.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/attributes.jl b/src/attributes.jl index aaec693676..99b2b7951e 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -1271,7 +1271,7 @@ A variable attribute for the `BasisStatusCode` of a variable in result If the solver does not have a basis status for the variable (for instance, because of an infeasibility or because there is no solution with the requested `result_index`), the result is undefined. Users should first check -[`PrimalStatus`](@ref) before accessing the `ConstraintPrimal` attribute. +[`PrimalStatus`](@ref) before accessing the `VariableBasisStatus` attribute. See [`ResultCount`](@ref) for information on how the results are ordered. """ From 7d6433e4f122059dbca3460dca411f1ff312d9bd Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 02:55:08 +0200 Subject: [PATCH 09/20] ConstraintBasisStatus --- src/attributes.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/attributes.jl b/src/attributes.jl index 99b2b7951e..3acc25a34f 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -1410,6 +1410,11 @@ A constraint attribute for the `BasisStatusCode` of some constraint in result See [`ResultCount`](@ref) for information on how the results are ordered. +If the solver does not have a basis status for the constraint (for instance, +because of an infeasibility or because there is no solution with the +requested `result_index`), the result is undefined. Users should first check +[`PrimalStatus`](@ref) before accessing the `ConstraintBasisStatus` attribute. + ## Notes For the basis status of a variable, query [`VariableBasisStatus`](@ref). From a8a191591495c0e07f074b066ce2dbbaf1aba2b7 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 02:56:00 +0200 Subject: [PATCH 10/20] ConstraintDual --- src/attributes.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/attributes.jl b/src/attributes.jl index 3acc25a34f..70b5b342d3 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -1394,6 +1394,11 @@ end A constraint attribute for the assignment to some constraint's dual value(s) in result `result_index`. If `result_index` is omitted, it is 1 by default. +If the solver does not have a dual value for the constraint (for instance, +because of an infeasibility or because there is no solution with the +requested `result_index`), the result is undefined. Users should first check +[`DualStatus`](@ref) before accessing the `ConstraintDual` attribute. + See [`ResultCount`](@ref) for information on how the results are ordered. """ struct ConstraintDual <: AbstractConstraintAttribute From 2aea08fb41e3aff5a094b6ea6e82c30956db25ee Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 14:38:20 +0200 Subject: [PATCH 11/20] Documentation for ResultIndexBoundsError --- src/attributes.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/attributes.jl b/src/attributes.jl index 70b5b342d3..4188dcd19e 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -138,6 +138,17 @@ SubmitNotAllowed(sub::AbstractSubmittable) = SubmitNotAllowed(sub, "") operation_name(err::SubmitNotAllowed) = "Submitting $(err.sub)" message(err::SubmitNotAllowed) = err.message +""" + struct ResultIndexBoundsError{AttrType} <: Exception + attr::AttrType + result_count::Int + end + +An error indicating that the requested attribute `attr` could not be retrieved, +because the solver returned too few results compared to what was requested. +For instance, the user tries to retrieve `VariablePrimal(2)` when only one +solution is available, or when the model is infeasible and has no solution. +""" struct ResultIndexBoundsError{AttrType} <: Exception attr::AttrType result_count::Int From 5551326efc068af88455b7057ecf32d966248449 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 14:39:32 +0200 Subject: [PATCH 12/20] Missing `@ref` --- docs/src/reference/errors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/reference/errors.md b/docs/src/reference/errors.md index 06ef7bee03..7d13cee9c0 100644 --- a/docs/src/reference/errors.md +++ b/docs/src/reference/errors.md @@ -71,7 +71,7 @@ UnsupportedSubmittable SubmitNotAllowed ``` -Note that setting the [`ConstraintFunction`](@ref) of a [`VariableIndex`] +Note that setting the [`ConstraintFunction`](@ref) of a [`VariableIndex`](@ref) constraint is not allowed: ```@docs SettingVariableIndexNotAllowed From 03758ce66419f666319f1c364e144fc28eb6083a Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 14:40:40 +0200 Subject: [PATCH 13/20] Add ResultIndexBoundsError to docs. --- docs/src/reference/errors.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/src/reference/errors.md b/docs/src/reference/errors.md index 7d13cee9c0..2dbb0c7da3 100644 --- a/docs/src/reference/errors.md +++ b/docs/src/reference/errors.md @@ -22,6 +22,12 @@ be thrown: InvalidIndex ``` +When an invalid result index is used to retrieve an attribute, a +[`ResultIndexBoundsError`](@ref) should be thrown: +```@docs +ResultIndexBoundsError +``` + As discussed in [JuMP mapping](@ref), for scalar constraint with a nonzero function constant, a [`ScalarFunctionConstantNotZero`](@ref) exception may be thrown: From 499b7e1d2450d8a13a642e048d87169220d1d4e4 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 14:57:45 +0200 Subject: [PATCH 14/20] Add docs for check_result_index_bounds --- src/attributes.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/attributes.jl b/src/attributes.jl index 4188dcd19e..4890748c80 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -154,6 +154,14 @@ struct ResultIndexBoundsError{AttrType} <: Exception result_count::Int end +""" + check_result_index_bounds(model::ModelLike, attr) + +This function checks whether enough results are available in the `model` for +the requested `attr`, using its `result_index` member variable. If the model +does not have sufficient results to answer the query, it throws a +[`ResultIndexBoundsError`](@ref). +""" function check_result_index_bounds(model::ModelLike, attr) result_count = get(model, ResultCount()) if !(1 <= attr.result_index <= result_count) From f4bf41dfac599e401fd3cdcab1a86e85a42ff090 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 14:58:21 +0200 Subject: [PATCH 15/20] Update errors.md --- docs/src/reference/errors.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/reference/errors.md b/docs/src/reference/errors.md index 2dbb0c7da3..17e6b388c5 100644 --- a/docs/src/reference/errors.md +++ b/docs/src/reference/errors.md @@ -26,6 +26,7 @@ When an invalid result index is used to retrieve an attribute, a [`ResultIndexBoundsError`](@ref) should be thrown: ```@docs ResultIndexBoundsError +check_result_index_bounds ``` As discussed in [JuMP mapping](@ref), for scalar constraint with a nonzero From 53a794bcfb59aaee57b1e66635f312becb0afb2b Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 15:03:55 +0200 Subject: [PATCH 16/20] Update attributes.jl --- src/attributes.jl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/attributes.jl b/src/attributes.jl index 4890748c80..42b8343c1b 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -1023,10 +1023,13 @@ attribute_value_type(::ObjectiveFunctionType) = Type{<:AbstractFunction} A model attribute for the objective value of the primal solution `result_index`. -If the solver does not have a primal value for the objective (for instance, -because of an infeasibility or because there is no solution with the -requested `result_index`), the result is undefined. Users should first check -[`PrimalStatus`](@ref) before accessing the `ObjectiveValue` attribute. +If the solver does not have a primal value for the objective because the +`result_index` is beyond the available solutions (whose number is indicated by +the [`ResultCount`](@ref) attribute), getting this attribute must throw a +[`ResultIndexBoundsError`](@ref). Otherwise, if the result is unavailable for +another reason (for instance, only a dual solution is available), the result is +undefined. Users should first check [`PrimalStatus`](@ref) before accessing the +`ObjectiveValue` attribute. See [`ResultCount`](@ref) for information on how the results are ordered. """ From ca58c820d6005e0867946fc77c3dcdd2b19f71f0 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Fri, 10 Sep 2021 20:59:00 +0200 Subject: [PATCH 17/20] Update attributes.jl --- src/attributes.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/attributes.jl b/src/attributes.jl index 42b8343c1b..418e440b23 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -158,7 +158,7 @@ end check_result_index_bounds(model::ModelLike, attr) This function checks whether enough results are available in the `model` for -the requested `attr`, using its `result_index` member variable. If the model +the requested `attr`, using its `result_index` field. If the model does not have sufficient results to answer the query, it throws a [`ResultIndexBoundsError`](@ref). """ From 4c542156118293ff03ba05bf90de23dedc0630b9 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Sat, 11 Sep 2021 20:56:28 +0200 Subject: [PATCH 18/20] Update the message for the other attributes. --- src/attributes.jl | 57 ++++++++++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/src/attributes.jl b/src/attributes.jl index 418e440b23..d65ceb6649 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -1044,10 +1044,13 @@ end A model attribute for the value of the objective function of the dual problem for the `result_index`th dual result. -If the solver does not have a dual value for the objective (for instance, -because of an infeasibility or because there is no solution with the -requested `result_index`), the result is undefined. Users should first check -[`DualStatus`](@ref) before accessing the `DualObjectiveValue` attribute. +If the solver does not have a dual value for the objective because the +`result_index` is beyond the available solutions (whose number is indicated by +the [`ResultCount`](@ref) attribute), getting this attribute must throw a +[`ResultIndexBoundsError`](@ref). Otherwise, if the result is unavailable for +another reason (for instance, only a primal solution is available), the result is +undefined. Users should first check [`DualStatus`](@ref) before accessing the +`DualObjectiveValue` attribute. See [`ResultCount`](@ref) for information on how the results are ordered. """ @@ -1223,10 +1226,13 @@ struct VariablePrimalStart <: AbstractVariableAttribute end A variable attribute for the assignment to some primal variable's value in result `result_index`. If `result_index` is omitted, it is 1 by default. -If the solver does not have a primal value for the variable (for instance, -because of an infeasibility or because there is no solution with the -requested `result_index`), the result is undefined. Users should first check -[`PrimalStatus`](@ref) before accessing the `VariablePrimal` attribute. +If the solver does not have a primal value for the variable because the +`result_index` is beyond the available solutions (whose number is indicated by +the [`ResultCount`](@ref) attribute), getting this attribute must throw a +[`ResultIndexBoundsError`](@ref). Otherwise, if the result is unavailable for +another reason (for instance, only a dual solution is available), the result is +undefined. Users should first check [`PrimalStatus`](@ref) before accessing the +`VariablePrimal` attribute. See [`ResultCount`](@ref) for information on how the results are ordered. """ @@ -1290,10 +1296,13 @@ Possible values are: A variable attribute for the `BasisStatusCode` of a variable in result `result_index`, with respect to an available optimal solution basis. -If the solver does not have a basis status for the variable (for instance, -because of an infeasibility or because there is no solution with the -requested `result_index`), the result is undefined. Users should first check -[`PrimalStatus`](@ref) before accessing the `VariableBasisStatus` attribute. +If the solver does not have a basis statue for the variable because the +`result_index` is beyond the available solutions (whose number is indicated by +the [`ResultCount`](@ref) attribute), getting this attribute must throw a +[`ResultIndexBoundsError`](@ref). Otherwise, if the result is unavailable for +another reason (for instance, only a dual solution is available), the result is +undefined. Users should first check [`PrimalStatus`](@ref) before accessing the +`VariableBasisStatus` attribute. See [`ResultCount`](@ref) for information on how the results are ordered. """ @@ -1416,10 +1425,13 @@ end A constraint attribute for the assignment to some constraint's dual value(s) in result `result_index`. If `result_index` is omitted, it is 1 by default. -If the solver does not have a dual value for the constraint (for instance, -because of an infeasibility or because there is no solution with the -requested `result_index`), the result is undefined. Users should first check -[`DualStatus`](@ref) before accessing the `ConstraintDual` attribute. +If the solver does not have a dual value for the variable because the +`result_index` is beyond the available solutions (whose number is indicated by +the [`ResultCount`](@ref) attribute), getting this attribute must throw a +[`ResultIndexBoundsError`](@ref). Otherwise, if the result is unavailable for +another reason (for instance, only a primal solution is available), the result is +undefined. Users should first check [`DualStatus`](@ref) before accessing the +`ConstraintDual` attribute. See [`ResultCount`](@ref) for information on how the results are ordered. """ @@ -1435,12 +1447,15 @@ A constraint attribute for the `BasisStatusCode` of some constraint in result `result_index`, with respect to an available optimal solution basis. If `result_index` is omitted, it is 1 by default. -See [`ResultCount`](@ref) for information on how the results are ordered. +If the solver does not have a basis statue for the constraint because the +`result_index` is beyond the available solutions (whose number is indicated by +the [`ResultCount`](@ref) attribute), getting this attribute must throw a +[`ResultIndexBoundsError`](@ref). Otherwise, if the result is unavailable for +another reason (for instance, only a dual solution is available), the result is +undefined. Users should first check [`PrimalStatus`](@ref) before accessing the +`ConstraintBasisStatus` attribute. -If the solver does not have a basis status for the constraint (for instance, -because of an infeasibility or because there is no solution with the -requested `result_index`), the result is undefined. Users should first check -[`PrimalStatus`](@ref) before accessing the `ConstraintBasisStatus` attribute. +See [`ResultCount`](@ref) for information on how the results are ordered. ## Notes From e715feb6cd01f229b9e350e1313d86f9c24a6a43 Mon Sep 17 00:00:00 2001 From: Thibaut Cuvelier Date: Sat, 11 Sep 2021 20:58:12 +0200 Subject: [PATCH 19/20] Missing. --- src/attributes.jl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/attributes.jl b/src/attributes.jl index d65ceb6649..a4ab8dfff4 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -1406,10 +1406,13 @@ These solvers may return the value of `s` for `ConstraintPrimal`, rather than `b - Ax`. (Although these are constrained by an equality constraint, due to numerical tolerances they may not be identical.) -If the solver does not have a primal value for the constraint (for instance, -because of an infeasibility or because there is no solution with the -requested `result_index`), the result is undefined. Users should first check -[`PrimalStatus`](@ref) before accessing the `ConstraintPrimal` attribute. +If the solver does not have a primal value for the constraint because the +`result_index` is beyond the available solutions (whose number is indicated by +the [`ResultCount`](@ref) attribute), getting this attribute must throw a +[`ResultIndexBoundsError`](@ref). Otherwise, if the result is unavailable for +another reason (for instance, only a dual solution is available), the result is +undefined. Users should first check [`PrimalStatus`](@ref) before accessing the +`ConstraintPrimal` attribute. If `result_index` is omitted, it is 1 by default. See [`ResultCount`](@ref) for information on how the results are ordered. From f5c7b553d688fdc10661f3ae0d5a42a3c7d66ef5 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Sun, 12 Sep 2021 10:45:16 +1200 Subject: [PATCH 20/20] Update src/attributes.jl --- src/attributes.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/attributes.jl b/src/attributes.jl index a4ab8dfff4..9ddfdf470d 100644 --- a/src/attributes.jl +++ b/src/attributes.jl @@ -148,6 +148,8 @@ An error indicating that the requested attribute `attr` could not be retrieved, because the solver returned too few results compared to what was requested. For instance, the user tries to retrieve `VariablePrimal(2)` when only one solution is available, or when the model is infeasible and has no solution. + +See also: [`check_result_index_bounds`](@ref). """ struct ResultIndexBoundsError{AttrType} <: Exception attr::AttrType