rust-or / rust-lp-modeler

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

Add a "constraint" macro #63

Closed lovasoa closed 3 years ago

lovasoa commented 3 years ago

This new macro allows more readable constraint specifications.

before

    problem += (500*a + 1200*b + 1500*c).le(10000);

after

    problem += constraint!(500*a + 1200*b + 1500*c <= 10000);
jcavat commented 3 years ago

Hi @lovasoa, so good. Is it still possible to use the first version ?

lovasoa commented 3 years ago

Yes, I didn't remove anything. This is a backwards-compatible change

lovasoa commented 3 years ago

Thanks for merging !