rust-or / rust-lp-modeler

Lp modeler written in Rust
MIT License
96 stars 29 forks source link

Simplification of expression including constants is incorrect #30

Closed zappolowski closed 5 years ago

zappolowski commented 5 years ago

I encountered a problem when trying to use the constant part from split_constant_and_expr on expression containing constant values.

A simplified example:

expr1: a - 2
expr2: 1 - a

expr3: simplify(expr1 + expr2)

The correct simplification should yield for the constant part -1, but instead 1 is returned.