Open Midnighter opened 6 years ago
Sympy does automatic expansions for certain types of nested expressions, e.g. coef * (var1 - var2)
. Symengine does not appear to do this at all, instead expressions are structured exactly as they are formulated. The problem can be easily fixed by uncommenting line 466 in optlang.interface. However this will have a negative impact on general performance. At the very least it should only be done when optlang._USING_SYMENGINE
is true - since symengine is so fast it may actually not have a huge effect there.
@Midnighter If you have some cobrapy benchmarks, can you maybe check how this would impact performance with symengine?
I will gather some stats.
For future reference: With symengine installed the constraints added by the following function are evaluated to be quadratic, raising an error, without symengine they work perfectly. A sample error message: