fslaborg / flips

Fsharp LInear Programming System
https://flipslibrary.com/#/
MIT License
251 stars 32 forks source link

Fix bug in LinearExpression.Evaluate #161

Closed TysonMN closed 3 years ago

TysonMN commented 3 years ago

Fixes #153

I made two changes in order to keep the tests simple. First, I mades things in the Flips project with internal scope visible to the Flips.Tests project. Second, I weakened an argument type of the internal method LinearExpression.Evaluate.

It is unfortunate that these two new tests are essentially the same as the two tests above them. This is caused by the equivalently duplicate code between LinearExpression.Reduce and LinearExpression.Evaluate. I expect to remove that duplication one day, but not soon.