-
Notifications
You must be signed in to change notification settings - Fork 5
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
[deprecation] Remove fix in favor of set_value #76
Conversation
Codecov Report
@@ Coverage Diff @@
## master #76 +/- ##
==========================================
+ Coverage 72.06% 77.01% +4.94%
==========================================
Files 8 8
Lines 469 435 -34
==========================================
- Hits 338 335 -3
+ Misses 131 100 -31
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set value is ok!
Not sure about the rest.
@@ -115,44 +74,3 @@ function parameter_by_name(model::Model, name::String) | |||
end | |||
return nothing | |||
end | |||
|
|||
JuMP.has_lower_bound(p::ParameterRef) = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the errors for missing methods very clear about what the user should do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will throw a method error. This is not defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't define has_lower_bound
on nonlinear parameters, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
julia> has_lower_bound(p)
ERROR: MethodError: no method matching has_lower_bound(::ParameterRef)
Closest candidates are:
has_lower_bound(::VariableRef) at /Users/oscar/.julia/packages/JuMP/y5vgk/src/variables.jl:352
Stacktrace:
[1] top-level scope at REPL[9]:1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, well ok. Lets got for it and think more if people get confused at some point.
Looks like my merge didn't work. Let me try again. |
JuMP's Nonlinear parameters use
set_value
andvalue
: https://jump.dev/JuMP.jl/stable/nlp/#Nonlinear-ParametersWe should follow that.