-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
WIP: SDP and Block structure #156
Conversation
We're going to run out of features to add to JuMP soon. |
Not a bad problem to have. |
|
||
SDPData() = SDPData(MatrixVar[], {}, {}, String[], MatrixConstraint[],PrimalConstraint[],DualConstraint[],MatrixFuncExpr(),{}) | ||
|
||
function SDPModel(;solver=MosekSolver()) |
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.
Is this permanent (having a separate constructor)? Or will it eventually just be like nonlinear models?
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.
No reason not to make it the same, I guess.
Very cool Joey, very very cool. Once you have an example in there I'll try and code up some of my own and can help with other aspects of it. |
Didn't get very far :(
|
then
|
OK fixed second one |
Thanks, I think I just broke the first by accident a few commits ago. |
*Putting macro hat on" |
OK, I was about to fix it, but I'll let you. Just need to escape I think |
Relatedly, some tests should be added to |
We should bump Mosek at some point too, those deprecation warnings on released version are a pain.
|
Ah I see the "real" function name doesn't have a |
Haha yeah, you caught me in the midst of some refactoring. |
No problem, will just change locally |
Hah maybe I should try later
EDIT:
seemed to work, actually solved it! |
Hahaha yeah, sorry, I've been pushing broken code today trying to get SDP bounds working properly. Should've branched on my branch... |
I'll let you know when things are fixed up later today. |
Alright, my contribution: the Goemans-Williamson algorithm for approximating MAXCUT. |
Very cool. I'm hoping to find a practical example that mixes in different forms of constraints (primal, dual, etc), but nothing has come to me yet... |
Would be nice to define
|
Yes, definitely need that |
Changing objective sense/function after solving once doesn't seem to work (although it looks like it should at glance, so not sure whats going on). I've committed another example anyway - it fails because of this though. |
That's very strange, the sense is definitely getting communicated through to Mosek. Any case, thanks for the other nice example! |
Just added an example, worked on the first try! |
Haha always a good sign, thanks! |
add missing field in Model constructor change behavior for x'*Q*x minor fixes work towards fixing tests
Given that this more than doubles the size of the JuMP source, would it make sense/be feasible to perhaps keep this in a separate package until Julia gets fast module loading? |
It would take a bit of work, but might be feasible. For instance, things like |
What stuff, specifically? If it's a relatively small chunk we can definitely merge it and put the bulk of the SDP code in a separate package. |
The norm stuff and |
Is it more than doubling startup time? |
Yeah, roughly. |
Interesting. If it was like, 4x startup time for 2x code I would have been hopeful that we could pull something off. Can we do a conditional include when someone wants to use SDP? It'd be ugly... but its an ugly situation. |
Without a mechanism to pass arguments to |
I was thinkng like
or something wacky like that that would maybe do
or whatever |
I rebased this locally and I have JuMP load time going from ~4 sec on master to ~5 sec on SDP. I think that seems reasonable to me, so maybe 0.6 (or immediately after 0.6 lands) is an acceptable target for this PR. |
Not bad at all. I'd prefer to merge this after 0.6. |
I agree. I think right after 0.6 would be ideal to try to work out as many kinks as possible before the next major release. |
I guess we can untag this for 0.7? |
Yep. |
🌟 sdp branch 1️⃣ gone but never forgotten 🌟 |
This pull request adds SDP functionality to JuMP. Primal, dual, and matrix constraints can be used in modeling. Currently only Mosek support is available, although that will change soon. Left remaining before a merge:
Macros forsetObjective
,addConstraint
I'm still not quite sure what functionality will be most useful in practice (for instance, converting Lyapanov equations seems like it would be quite handy), so this should probably be considered an experimental feature for a release cycle or two, at the very least.