-
Notifications
You must be signed in to change notification settings - Fork 21
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
Design Suggestion: Oracle Helper Fcns #26
Comments
This is very on my mind, and indeed #2 was me capturing that though. So we are definitely on the same page. I actually think its pretty exciting how the polyhedral specific part of PolyhedralOracle (apart from the setup) is realllly short. |
Ok, so that's what that meant. :) The original issue was a bit cryptic. :) A related worry that sparked this line of thought was that although unc_constraint.coeffs[1] (in my mind, coeffs are floats, but maybe i'm just old-fashioned.) For people new to JuMPer, this is definitely a weird gotchya. Not Vishal Gupta On Sun, Apr 20, 2014 at 11:33 PM, Iain Dunning notifications@github.comwrote:
|
Yeah so in the beginning:
then I made Finally, I changed recently the |
Fixed to my satisfaction for now, need to let whats there sit and see how it feels |
Neglecting constant terms and standalone uncertainties, a general linear uncertain constraint can be written this way:
\sum_{i=1}^d a_i( u ) x_i \leq b
for some affine functions a_i, or equivalently, by rearranging terms as
\sum_{i=1}^d l_i( x )^T u \leq b
for some different affine functions l_i. As far as I understand, the first representation is (roughly) how they're stored in FullAffExpr. The "roughly" part comes because you don't necessarily need to group together all the terms depending on x_i.
In the course of the polyhedral oracle (and the bertsimas sim oracle), there's some general boiler plate code that I think MOST oracles need to do, and could be factored out, namely
I suggest we factor out these functions into standalone helpers ( I can help! ) and then add one additional function which, given any uncertain constraint, converts it into a constraint in standard form (e.g. a less than or equal with all terms on lhs and all constants on rhs). In that way, we can write a templatized boilerplate (maybe even using parametric types?) user-defined oracles where all the user would need to implement is the solution to:
max_{u in U} u^T x^*
I can spell out more of what I'm thinking in person, but I'd like to get a conversation going on this... I really think it would limit how much users need to know about JuMPeR internals and simplify some of the steps in oracle creation.
The text was updated successfully, but these errors were encountered: