Skip to content

Commit

Permalink
Document is_parameter in the manual (besides api ref) (#3831)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquimg committed Sep 28, 2024
1 parent 1239fdc commit 5e2b47b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/src/manual/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,20 @@ julia> parameter_value.(p)
3.0
```

Use [`is_parameter`](@ref) and [`ParameterRef`](@ref) to check if the variable
is a parameter and to get the constraint that makes the variable a parameter.

```jldoctest nonlinear_parameters
julia> is_parameter(p[1])
true
julia> is_parameter(x)
false
julia> ParameterRef(p[2])
p[2] ∈ MathOptInterface.Parameter{Float64}(3.0)
```

### Limitations

Parameters are implemented as decision variables belonging to the [`Parameter`](@ref)
Expand Down

0 comments on commit 5e2b47b

Please sign in to comment.