We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 660f13d + b4f204d commit 69a6e29Copy full SHA for 69a6e29
docs/src/apireference.md
@@ -44,6 +44,23 @@ set
44
supports
45
```
46
47
+### Fallbacks
48
+
49
+The value of some attributes can be inferred from the value of other
50
+attributes. For instance, the value of [`ObjectiveValue`](@ref) can be computed
51
+using [`ObjectiveFunction`](@ref) and [`VariablePrimal`](@ref). When a solver
52
+gives access to the objective value, it is better to return this value but
53
+otherwise, [`Utilities.get_fallback`](@ref) can be used.
54
+```julia
55
+function MOI.get(optimizer::Optimizer, attr::MOI.ObjectiveValue)
56
+ return MOI.Utilities.get_fallback(optimizer, attr)
57
+end
58
+```
59
60
+```@docs
61
+Utilities.get_fallback
62
63
64
### Submit
65
66
Objects may be submitted to an optimizer using [`submit`](@ref).
0 commit comments