Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/src/apireference.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ ResultStatusCode

### Basis Status

The `BasisStatus` attribute of a variable or constraint describes its status with respect to a basis, if one is known.
The value of the attribute is of type `BasisStatusCode`.
The `BasisStatus` attribute of a constraint describes its status with respect to
a basis, if one is known. The value of the attribute is of type
`BasisStatusCode`.

```@docs
BasisStatusCode
Expand Down Expand Up @@ -165,7 +166,6 @@ Calls to `get` and `set` should include as an argument a single `VariableIndex`
VariableName
VariablePrimalStart
VariablePrimal
VariableBasisStatus
```

### Constraints
Expand Down
22 changes: 12 additions & 10 deletions src/attributes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -541,17 +541,10 @@ struct VariablePrimal <: AbstractVariableAttribute
end
VariablePrimal() = VariablePrimal(1)

"""
VariableBasisStatus()

A variable attribute for the `BasisStatusCode` of some variable, with respect to an available optimal solution basis.
"""
struct VariableBasisStatus <: AbstractVariableAttribute end

"""
BasisStatusCode

An Enum of possible values for the `VariableBasisStatus` and `ConstraintBasisStatus` attributes.
An Enum of possible values for the `ConstraintBasisStatus` attribute.
This explains the status of a given element with respect to an optimal solution basis.
Possible values are:
* `BASIC`: element is in the basis
Expand All @@ -560,6 +553,12 @@ Possible values are:
* `NONBASIC_AT_UPPER`: element is not in the basis and is at its upper bound
* `SUPER_BASIC`: element is not in the basis but is also not at one of its
bounds

Note: `NONBASIC_AT_LOWER` and `NONBASIC_AT_UPPER` should be used only for
constraints with the `Interval`. In this case cases they are necessary to
distinguish which side of the constraint. One-sided constraints (e.g.,
`LessThan` and `GreaterThan`) should use `NONBASIC` instead of the
`NONBASIC_AT_*` values.
"""
@enum(BasisStatusCode, BASIC, NONBASIC, NONBASIC_AT_LOWER, NONBASIC_AT_UPPER,
SUPER_BASIC)
Expand Down Expand Up @@ -637,7 +636,11 @@ ConstraintDual() = ConstraintDual(1)
"""
ConstraintBasisStatus()

A constraint attribute for the `BasisStatusCode` of some constraint, with respect to an available optimal solution basis.
A constraint attribute for the `BasisStatusCode` of some constraint, with
respect to an available optimal solution basis.

**For the basis status of a variable, query the corresponding `SingleVariable`
constraint that enforces the variable's bounds.**
"""
struct ConstraintBasisStatus <: AbstractConstraintAttribute end

Expand Down Expand Up @@ -877,7 +880,6 @@ function is_set_by_optimize(::Union{ObjectiveValue,
PrimalStatus,
DualStatus,
VariablePrimal,
VariableBasisStatus,
ConstraintPrimal,
ConstraintDual,
ConstraintBasisStatus})
Expand Down