cvxgrp / qcml

A Python parser for generating Python/C/Matlab solver interfaces
Other
42 stars 9 forks source link

Tidy/1 #18

Closed chinasaur closed 11 years ago

chinasaur commented 11 years ago

Just trying to get main.py and README.md a little bit updated to what seems to be the new syntax. Not sure what the plan is in terms of the names of solvers, so only made minor changes cvxopt->python. Let me know if you want me to change README more to reflect, e.g. python, matlab, C?

See following pull request for adding Transpose, which is also needed to make main.py portfolio example work.

echu commented 11 years ago

Looks good, thanks for fixing this! And, yes, it should read "python", "C" and "matlab" now.

chinasaur commented 11 years ago

Cool, I can change things over to "python" "C" and "matlab" now. You're not worried that in the future there might be other solvers you'd want to target?

(I'll put the prettyprints back in too once I get that added.)

echu commented 11 years ago

Nope. It's really the "language" that you're targeting. The "solver" code is separate. So the generated code only produces two functions

prob2socp socp2prob

It won't actually generate solver code. So if you have a solver you want to use, this is independent of the solver (it only depends on the language).

Maybe something like

codegen(language="C", format="CSR") for compressed column format, etc. might be a useful thing to have....

On Mon, Aug 19, 2013 at 3:16 PM, Peter H. Li notifications@github.comwrote:

Cool, I can change things over to "python" "C" and "matlab" now. You're not worried that in the future there might be other solvers you'd want to target?

(I'll put the prettyprints back in too once I get that added.)

— Reply to this email directly or view it on GitHubhttps://github.com/cvxgrp/qcml/pull/18#issuecomment-22908873 .

chinasaur commented 11 years ago

But the different solvers tend to want different input formats, so then you would want prob2socp to stuff things differently?

echu commented 11 years ago

Yes; that's kind of what the second argument would handle. I'm not sure yet, since I don't know what other kinds of formats might be out there. They're all equivalent / related to each other, so it's possible to convert from one format to the other without much effort. For now, I think it's clearer if we just have the "language" as the argument and, in the README or comments, for instance, we would say that "python" targets CVXOPT matrices and a specific primal problem form. when other formats come along, it should be easy to add them. :)

On Mon, Aug 19, 2013 at 3:21 PM, Peter H. Li notifications@github.comwrote:

But the different solvers tend to want different input formats, so then you would want prob2socp to stuff things differently?

— Reply to this email directly or view it on GitHubhttps://github.com/cvxgrp/qcml/pull/18#issuecomment-22909153 .