Skip to content

Commit 332a3c7

Browse files
committed
Update
1 parent 82d85a0 commit 332a3c7

File tree

1 file changed

+76
-39
lines changed

1 file changed

+76
-39
lines changed

src/attributes.jl

Lines changed: 76 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,17 +1434,17 @@ result (for example, an optimal solution or an infeasibility certificate). Other
14341434
results will typically be alternate solutions that the solver found during the
14351435
search for the first result.
14361436
1437-
If a (local) optimal solution is available, that is, [`TerminationStatus`](@ref) is
1438-
`OPTIMAL` or `LOCALLY_SOLVED`, the first result must correspond to the (locally)
1439-
optimal solution. Other results may be alternative optimal solutions, or they
1440-
may be other suboptimal solutions; use [`ObjectiveValue`](@ref) to distinguish
1441-
between them.
1437+
If a (local) optimal solution is available, that is, [`TerminationStatus`](@ref)
1438+
is [`OPTIMAL`](@ref) or [`LOCALLY_SOLVED`](@Ref), the first result must
1439+
correspond to the (locally) optimal solution. Other results may be alternative
1440+
optimal solutions, or they may be other suboptimal solutions; use
1441+
[`ObjectiveValue`](@ref) to distinguish between them.
14421442
14431443
If a primal or dual infeasibility certificate is available, that is,
1444-
[`TerminationStatus`](@ref) is `INFEASIBLE` or `DUAL_INFEASIBLE` and the
1445-
corresponding [`PrimalStatus`](@ref) or [`DualStatus`](@ref) is
1446-
`INFEASIBILITY_CERTIFICATE`, then the first result must be a certificate. Other
1447-
results may be alternate certificates, or infeasible points.
1444+
[`TerminationStatus`](@ref) is [`INFEASIBLE`](@ref) or [`DUAL_INFEASIBLE`](@ref)
1445+
and the corresponding [`PrimalStatus`](@ref) or [`DualStatus`](@ref) is
1446+
[`INFEASIBILITY_CERTIFICATE`](@ref), then the first result must be a certificate.
1447+
Other results may be alternate certificates, or infeasible points.
14481448
"""
14491449
struct ResultCount <: AbstractModelAttribute end
14501450

@@ -1578,12 +1578,12 @@ is_set_by_optimize(::CallbackVariablePrimal) = true
15781578
15791579
## Notes
15801580
1581-
When queried as part of [`ConstraintBasisStatus`](@ref), `NONBASIC_AT_LOWER`
1582-
and `NONBASIC_AT_UPPER` should be returned only for constraints with the
1583-
[`Interval`](@ref) set. In this case, they are necessary to distinguish
1581+
When queried as part of [`ConstraintBasisStatus`](@ref), [`NONBASIC_AT_LOWER`](@ref)
1582+
and [`NONBASIC_AT_UPPER`](@ref) should be returned only for constraints with
1583+
the [`Interval`](@ref) set. In this case, they are necessary to distinguish
15841584
which side of the constraint is active. One-sided constraints (for example,
1585-
[`LessThan`](@ref) and [`GreaterThan`](@ref)) should use `NONBASIC` instead
1586-
of the `NONBASIC_AT_*` values.
1585+
[`LessThan`](@ref) and [`GreaterThan`](@ref)) should use [`NONBASIC`](@ref)
1586+
instead of the `NONBASIC_AT_*` values.
15871587
15881588
This restriction does not apply to [`VariableBasisStatus`](@ref), which
15891589
should return `NONBASIC_AT_*` regardless of whether the alternative bound
@@ -1614,7 +1614,7 @@ is_set_by_optimize(::CallbackVariablePrimal) = true
16141614
"""
16151615
VariableBasisStatus(result_index::Int = 1)
16161616
1617-
A variable attribute for the `BasisStatusCode` of a variable in result
1617+
A variable attribute for the [`BasisStatusCode`](@ref) of a variable in result
16181618
`result_index`, with respect to an available optimal solution basis.
16191619
16201620
If the solver does not have a basis status for the variable because the
@@ -1883,8 +1883,8 @@ end
18831883
"""
18841884
ConstraintFunction()
18851885
1886-
A constraint attribute for the `AbstractFunction` object used to define the
1887-
constraint.
1886+
A constraint attribute for the [`AbstractFunction`](@ref) object used to define
1887+
the constraint.
18881888
18891889
It is guaranteed to be equivalent but not necessarily identical to the function
18901890
provided by the user.
@@ -1928,7 +1928,7 @@ end
19281928
"""
19291929
ConstraintSet()
19301930
1931-
A constraint attribute for the `AbstractSet` object used to define the
1931+
A constraint attribute for the [`AbstractSet`](@ref) object used to define the
19321932
constraint.
19331933
"""
19341934
struct ConstraintSet <: AbstractConstraintAttribute end
@@ -1992,8 +1992,8 @@ end
19921992
"""
19931993
ConstraintConflictStatus()
19941994
1995-
A constraint attribute indicating whether the constraint participates
1996-
in the conflict. Its type is [`ConflictParticipationStatusCode`](@ref).
1995+
A constraint attribute to query the [`ConflictParticipationStatusCode`](@ref)
1996+
indicating whether the constraint participates in the conflict.
19971997
"""
19981998
struct ConstraintConflictStatus <: AbstractConstraintAttribute end
19991999

@@ -2132,7 +2132,7 @@ struct ListOfSupportedNonlinearOperators <: AbstractOptimizerAttribute end
21322132
problem is a conic optimization problem in which strong duality does not
21332133
hold).
21342134
2135-
To check if a primal feasible solution exists, set the objective sense to
2135+
To check if the primal is unbounded, set the objective sense to
21362136
[`FEASIBILITY_SENSE`](@ref) and re-solve the problem. If a primal feasible
21372137
point exists, the original problem is unbounded. If a primal feasible point
21382138
does not exist, the original problem is both primal and dual infeasible.
@@ -2287,8 +2287,8 @@ end
22872287
"""
22882288
TerminationStatus()
22892289
2290-
A model attribute for the `TerminationStatusCode` explaining why the optimizer
2291-
stopped.
2290+
A model attribute for the [`TerminationStatusCode`](@ref) explaining why the
2291+
optimizer stopped.
22922292
"""
22932293
struct TerminationStatus <: AbstractModelAttribute end
22942294

@@ -2308,44 +2308,79 @@ attribute_value_type(::RawStatusString) = String
23082308
"""
23092309
ResultStatusCode
23102310
2311-
An Enum of possible values for the [`PrimalStatus`](@ref) and [`DualStatus`](@ref)
2312-
attributes.
2311+
An Enum of possible values for the [`PrimalStatus`](@ref) and
2312+
[`DualStatus`](@ref) attributes.
23132313
23142314
The values indicate how to interpret the result vector.
23152315
""",
23162316
ResultStatusCode,
2317-
"the result vector is empty.",
2317+
"The result vector is empty.",
23182318
NO_SOLUTION,
2319-
"the result vector is a feasible point.",
2319+
"The result vector is a feasible point.",
23202320
FEASIBLE_POINT,
2321-
"the result vector is feasible if some constraint tolerances are relaxed.",
2321+
"The result vector is feasible if some constraint tolerances are relaxed.",
23222322
NEARLY_FEASIBLE_POINT,
2323-
"the result vector is an infeasible point.",
2323+
"The result vector is an infeasible point.",
23242324
INFEASIBLE_POINT,
2325-
"the result vector is an infeasibility certificate. If the `PrimalStatus` is `INFEASIBILITY_CERTIFICATE`, then the primal result vector is a certificate of dual infeasibility. If the `DualStatus` is `INFEASIBILITY_CERTIFICATE`, then the dual result vector is a proof of primal infeasibility.",
2325+
"""
2326+
The result vector is an infeasibility certificate.
2327+
2328+
If the [`PrimalStatus`](@ref) is `INFEASIBILITY_CERTIFICATE`, then the
2329+
primal result vector is a certificate of dual infeasibility.
2330+
2331+
If the [`DualStatus`](@ref) is `INFEASIBILITY_CERTIFICATE`, then the dual
2332+
result vector is a proof of primal infeasibility.
2333+
""",
23262334
INFEASIBILITY_CERTIFICATE,
2327-
"the result satisfies a relaxed criterion for a certificate of infeasibility.",
2335+
"""
2336+
The result satisfies a relaxed criterion for a certificate of infeasibility.
2337+
2338+
If the [`PrimalStatus`](@ref) is `NEARLY_INFEASIBILITY_CERTIFICATE`, then
2339+
the primal result vector is a certificate of dual infeasibility.
2340+
2341+
If the [`DualStatus`](@ref) is `NEARLY_INFEASIBILITY_CERTIFICATE`, then the
2342+
dual result vector is a proof of primal infeasibility.
2343+
""",
23282344
NEARLY_INFEASIBILITY_CERTIFICATE,
2329-
"the result vector is an ill-posed certificate; see [this article](https://arxiv.org/abs/1408.4685) for details. If the `PrimalStatus` is `REDUCTION_CERTIFICATE`, then the primal result vector is a proof that the dual problem is ill-posed. If the `DualStatus` is `REDUCTION_CERTIFICATE`, then the dual result vector is a proof that the primal is ill-posed.",
2345+
"""
2346+
The result vector is an ill-posed certificate; see [this article](https://arxiv.org/abs/1408.4685)
2347+
for details.
2348+
2349+
If the [`PrimalStatus`](@ref) is `REDUCTION_CERTIFICATE`, then the primal
2350+
result vector is a proof that the dual problem is ill-posed.
2351+
2352+
If the [`DualStatus`](@ref) is `REDUCTION_CERTIFICATE`, then the dual result
2353+
vector is a proof that the primal is ill-posed.
2354+
""",
23302355
REDUCTION_CERTIFICATE,
2331-
"the result satisfies a relaxed criterion for an ill-posed certificate.",
2356+
"""
2357+
The result satisfies a relaxed criterion for an ill-posed certificate.
2358+
""",
23322359
NEARLY_REDUCTION_CERTIFICATE,
2333-
"the result vector contains a solution with an unknown interpretation.",
2360+
"""
2361+
The result vector contains a solution with an unknown interpretation. Check
2362+
the solver log for more details.
2363+
""",
23342364
UNKNOWN_RESULT_STATUS,
2335-
"the result vector contains a solution with an interpretation not covered by one of the statuses defined above",
2365+
"""
2366+
The result vector contains a solution with an interpretation not covered by
2367+
one of the statuses defined above. Check the solver log for more details.
2368+
""",
23362369
OTHER_RESULT_STATUS,
23372370
)
23382371

23392372
"""
23402373
PrimalStatus(result_index::Int = 1)
23412374
23422375
A model attribute for the [`ResultStatusCode`](@ref) of the primal result
2343-
`result_index`. If `result_index` is omitted, it defaults to 1.
2376+
`result_index`.
2377+
2378+
If `result_index` is omitted, it defaults to 1.
23442379
23452380
See [`ResultCount`](@ref) for information on how the results are ordered.
23462381
23472382
If `result_index` is larger than the value of [`ResultCount`](@ref) then
2348-
`NO_SOLUTION` is returned.
2383+
[`NO_SOLUTION`](@ref) is returned.
23492384
"""
23502385
struct PrimalStatus <: AbstractModelAttribute
23512386
result_index::Int
@@ -2357,13 +2392,15 @@ attribute_value_type(::PrimalStatus) = ResultStatusCode
23572392
"""
23582393
DualStatus(result_index::Int = 1)
23592394
2360-
A model attribute for the `ResultStatusCode` of the dual result `result_index`.
2395+
A model attribute for the [`ResultStatusCode`](@ref) of the dual result
2396+
`result_index`.
2397+
23612398
If `result_index` is omitted, it defaults to 1.
23622399
23632400
See [`ResultCount`](@ref) for information on how the results are ordered.
23642401
23652402
If `result_index` is larger than the value of [`ResultCount`](@ref) then
2366-
`NO_SOLUTION` is returned.
2403+
[`NO_SOLUTION`](@ref) is returned.
23672404
"""
23682405
struct DualStatus <: AbstractModelAttribute
23692406
result_index::Int

0 commit comments

Comments
 (0)