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 `^`
Activity
matbesancon commentedon Aug 1, 2022
why this one? ScalarQuadraticTerm will store the two variables anyway, is
x^2easier for the writer?odow commentedon Aug 1, 2022
Writing
x^2seems like the default for Gurobi and CPLEX. But they can read both.