rust-or / rust-lp-modeler

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

Improve lp_sum #66

Closed lovasoa closed 3 years ago

lovasoa commented 3 years ago

Fixes #65 Fixes #41

Helps with #37

lovasoa commented 3 years ago

Oh, I should have closed that. I opened that to work around the fact that processing the tree was recursive and failed on deep trees. Now that we have flat trees, it isn't needed so much. Plus, I think simplify actively breaks the balanced tree: https://github.com/jcavat/rust-lp-modeler/blob/master/src/dsl/variables.rs#L825

The real problem is that there is no way to represent a sum of more than two elements internally.

jcavat commented 3 years ago

yes, that's true. Maybe #67 is still relevant after all. That could be resolved by a different representation disscussed here: https://github.com/jcavat/rust-lp-modeler/issues/37#issuecomment-544128668. But as you said, it is more ambitious.

lovasoa commented 3 years ago

Yes #67 is still totally relevant. For medium or large problems, rust-lp-modeler takes much longer to create the problem than it takes to actually solve it !

I am working on https://github.com/jcavat/rust-lp-modeler/issues/37#issuecomment-544128668 , but as a separate crate, as I want to be able to make the right design decisions without worrying about backwards compatibility. I'll let you know when I have something to show.