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

Update variables.md explanation of parameters #3916

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

artkuo
Copy link
Contributor

@artkuo artkuo commented Jan 16, 2025

I was confused by this example at multiple levels. I didn't understand what "Parameters set" means, is there a whole set of parameters somewhere? I didn't understand Parameter(i) because i looks like an index, not a value. I didn't get how there can be x in SecondOrderCone and x in Parameter(i), same syntax but seemingly different concepts. The values are eventually revealed later on in example, but even then I was confused.

This change is to try to be more explicit about what's going on, in case others are as obtuse as I am. I hope something like this will be clearer.

I was confused by this example at multiple levels. I didn't understand what "Parameters set" means, is there a whole set of parameters somewhere? I didn't understand `Parameter(i)` because `i` looks like an index, not a value. I didn't get how there can be `x in SecondOrderCone` and `x in Parameter(i)`, same syntax but seemingly different concepts. The values are eventually revealed later on in example, but even then I was confused.

This change is to try to be more explicit about what's going on, in case others are as obtuse as I am. I hope something like this will be clearer.
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.58%. Comparing base (99cdc4c) to head (6a8df0d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3916   +/-   ##
=======================================
  Coverage   99.58%   99.58%           
=======================================
  Files          43       43           
  Lines        6059     6059           
=======================================
  Hits         6034     6034           
  Misses         25       25           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@artkuo
Copy link
Contributor Author

artkuo commented Jan 17, 2025

The build failed because it failed a test on builders_decomposition.jl. I don't think it's related to this pull request, which is just changing some non-executing text in a markdown file.

@odow
Copy link
Member

odow commented Jan 17, 2025

Hi @artkuo, thanks for opening the PR!

Don't worry about the failure. It is my fault: #3917

To answer some of your questions:

is there a whole set of parameters somewhere

JuMP uses "set" to mean the domains that constraint functions belong to.

If you have time, you might want to read https://arxiv.org/abs/2002.03447. Or you can take a look at https://jump.dev/JuMP.jl/stable/moi/manual/standard_form/

So SecondOrderCone() is the set https://jump.dev/JuMP.jl/stable/api/JuMP/#SecondOrderCone.

Parameter(value) is the singleton mathematical set {value}. See

https://jump.dev/JuMP.jl/stable/api/JuMP/#Parameter

which is really just a synonym for:

https://jump.dev/JuMP.jl/stable/moi/reference/standard_form/#MathOptInterface.Parameter

because i looks like an index, not a value

It's a value 😄

@odow
Copy link
Member

odow commented Jan 17, 2025

I made a change. Is that better?

@artkuo
Copy link
Contributor Author

artkuo commented Jan 17, 2025

Yes, that looks great! Sorry about my questions, they were meant to be rhetorical but were eventually resolved. I should have put that under "This change is..." I think your revision is very nice, thanks. The 2.0*i removes potential confusion between index and value.

@artkuo artkuo closed this Jan 17, 2025
@artkuo artkuo reopened this Jan 17, 2025
@artkuo
Copy link
Contributor Author

artkuo commented Jan 17, 2025

I'm was confused, I clicked "close with comment" thinking your revision would be merged. But it looks like that just killed the pull request. I'm leaving open in case you need to see that your revision still needs to be merged. Please close this if and when appropriate.

@odow
Copy link
Member

odow commented Jan 17, 2025

I'm was confused, I clicked "close with comment" thinking your revision would be merged.

I have the power to edit your PR directly 😄 When I merge it, it'll attribute you as the author.

docs/src/manual/variables.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants