Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document is_parameter in the manual (besides api ref) #3831

Merged
merged 1 commit into from
Sep 28, 2024
Merged
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
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably the . I'll take a look. Debugging the latex can be tricky.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, I used the same as the one from line 1275

```

### Limitations

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