David Smith is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
David Smith @emallson

A bit of fun procrastinating on my Rust CPLEX wrapper this morning. Rewrote my constraint macro to be recursive so that you can mix atoms and summations in the same expression. Before, if you wanted both you'd have to do:

let con = con!("foo": 0.0 >= sum &xs);
con.add_wvar(WeightedVariable::from_idx(y, 1.0));

Now, you can do:

con!("foo": 0.0 >= sum (&xs) + 1.0 y);

Unfortunately, still haven't figured out how to get rid of the extra parens...

· Web · 0 · 0