Add bound queries for finite parameters and parameter functions - #443
dnguyen227 wants to merge 5 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #443 +/- ##
=======================================
Coverage 99.72% 99.72%
=======================================
Files 39 39
Lines 6830 6834 +4
=======================================
+ Hits 6811 6815 +4
Misses 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I am in favor of adding the queries for finite parameters, but I don't think adding a bound API for parameter functions is the right way to go. It doesn't have much use outside of the niche use case of InfiniteGDPs with Hull. Moreover, the parameter function object is central to a lot of other objects in InfiniteOpt. Is is not possible to make is so DP can handle |
It's possible. I've removed instance of it here. |
|
For parameter functions or perhaps at the |
Extend the standard JuMP bound API to finite parameters and parameter functions. Both are
AbstractVariableRefs and can appear anywhere a variable can, but the bound queries were not defined for them:All queries dispatch through
GeneralVariableRefas usual, sohas_lower_bound(...)works on the reference returned by the macro.copy_modelcarries the declared bounds over. Tests pendingThis PR fixes/implements the following bugs/features
has_lower_bound/lower_bound/has_upper_bound/upper_boundforFiniteParameterRefhas_*_bound/*_bound/set_*_bound/delete_*_boundforParameterFunctionRefcopy_modelnote about DP.jl: We talked about defaulting to Inf,-Inf, but for methods like Hull, an error will keep being thrown if a proper bound isn't given, so I've added the option here for the user to give a bound to a parameter function.
Fixes #441