lp_sum returns a deeply imbalanced expression tree of the form AddExpr(a, AddExpr(b, AddExpr(c, AddExpr(d)))), which then causes stack overflows when being processed by simplify (see https://github.com/jcavat/rust-lp-modeler/issues/37).
lp_sum could return a balanced tree of depth log2(n) (instead of n), which would be less likely to cause stack overflows during processing.
lp_sum returns a deeply imbalanced expression tree of the form
AddExpr(a, AddExpr(b, AddExpr(c, AddExpr(d))))
, which then causes stack overflows when being processed bysimplify
(see https://github.com/jcavat/rust-lp-modeler/issues/37).lp_sum could return a balanced tree of depth log2(n) (instead of n), which would be less likely to cause stack overflows during processing.