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

quadratic objective support #11

Closed
3 of 4 tasks
mlubin opened this issue Jun 8, 2013 · 9 comments
Closed
3 of 4 tasks

quadratic objective support #11

mlubin opened this issue Jun 8, 2013 · 9 comments

Comments

@mlubin
Copy link
Member

mlubin commented Jun 8, 2013

  • Complete operator overloads, e.g. AffExpr*Variable
  • Get rid of objIsQuad structure -- it really messes with type inference. Instead there should be separate quadratic and linear parts of the objective as members of Model. If there is a quadratic part, then m.affobj can point to the same object as m.quadobj.aff, for example.
  • Clean up and document using Gurobi for quadratic objectives, as added in 3db9f64. Alternatively (in the long term) push this into MathProgBase.
  • Macro support.
@IainNZ
Copy link
Collaborator

IainNZ commented Jun 8, 2013

On the 2nd point, do you mean we should just having a m.quadObj and m.affObj, and m.quadObj can be nothing?

@mlubin
Copy link
Member Author

mlubin commented Jun 8, 2013

m.quadObj should always be a QuadExpr (but it can have zero terms), and m.affObj should always be an AffExpr.

@IainNZ
Copy link
Collaborator

IainNZ commented Jun 9, 2013

Operator overloads are done, I think. Needs testing to ensure that though.
See notes in QuadExpr test with regards to the issue of Q being symmetric or lower triangular. I guess this can really just be done at the end, but maybe we should cram it into pretty printers. Very low priority.

@IainNZ
Copy link
Collaborator

IainNZ commented Jun 9, 2013

I also renamed some of the fields of QuadExpr to make it less verbose and camel-casey

@IainNZ
Copy link
Collaborator

IainNZ commented Jun 23, 2013

About to tackle point 2

@IainNZ
Copy link
Collaborator

IainNZ commented Jun 23, 2013

Ok, done, I think. Tests pass, but we don't have a quadratic objective test yet!
ba0ba53
Basically, removed objective and quadObj and isObjQuad and just have a single objective field that is a QuadExpr (and thus has an AffExpr in it). From then on was just a matter of replacing isQuadObjs with length checks on quadratic part of objective.

@IainNZ
Copy link
Collaborator

IainNZ commented Jun 23, 2013

Do you want to do point 3? I see you've started on it. If not, I'll do it.

@mlubin
Copy link
Member Author

mlubin commented Jun 24, 2013

Done. All that's left is macro support, but I'm not sure if I'll get to that in the short term.

@IainNZ
Copy link
Collaborator

IainNZ commented Jun 24, 2013

Future work then - I don't think its a priority

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants