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

FileFormats.LP: support quadratic functions #1973

Closed
odow opened this issue Aug 1, 2022 · 2 comments · Fixed by #1974
Closed

FileFormats.LP: support quadratic functions #1973

odow opened this issue Aug 1, 2022 · 2 comments · Fixed by #1974
Labels
Submodule: FileFormats About the FileFormats submodule Type: Enhancement
Milestone

Comments

@odow
Copy link
Member

odow commented Aug 1, 2022

Goes with #1972.

I took a read of the different docs:

CPLEX: https://www.ibm.com/docs/en/icos/12.9.0?topic=representation-quadratic-terms-in-lp-file-format
Gurobi: https://www.gurobi.com/documentation/9.5/refman/lp_format.html
Mosek: https://docs.mosek.com/latest/pythonfusion/lp-format.html

  • Quadratic terms are enclosed in [ ] / 2
  • CPLEX and Gurobi don't include the / 2 in constraints
  • We should support x * x and x^2, but when writing, always use ^
@odow odow added Type: Enhancement Submodule: FileFormats About the FileFormats submodule labels Aug 1, 2022
@odow odow added this to the v1.x milestone Aug 1, 2022
@matbesancon
Copy link
Contributor

We should support x * x and x^2, but when writing, always use ^

why this one? ScalarQuadraticTerm will store the two variables anyway, is x^2 easier for the writer?

@odow
Copy link
Member Author

odow commented Aug 1, 2022

Writing x^2 seems like the default for Gurobi and CPLEX. But they can read both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Submodule: FileFormats About the FileFormats submodule Type: Enhancement
Development

Successfully merging a pull request may close this issue.

2 participants