[Cbc] Dynamically setting decision variables, bounds, constraints and objective function at runtime

David Coote dccoote at outlook.com
Fri Dec 6 21:54:38 EST 2019


For a base case optimisation I can set decision variables, bounds, constraints and objective function in the code that calls CBC and call this code at runtime. If I want to implement another usecase with new decision variable B with associated bounds, constraints etc I can hardcode this into a separate piece of code building on the original optimisation usecase code. If I want to add decision variable C I can do the same so now I have three pieces of code; one for each usecase.

This goes combinatorial quickly which makes maintenance difficult.

I could have code that implements all decision variables etc with values set at runtime so they don't affect the optimisation for usecases where particular decision variables are not required. Depending on whether CBC detects that these constraints etc don't affect the objective function this may not affect optimisation speed. But this will take up memory space which is relevant for the larger optimisations I'm building even on platforms with lashings of RAM.  And this is problematic for edge computing usecases running on limited platforms.

If I could select and dynamically instantiate at runtime only the decision variables etc required for each usecase this could simplify the code a bit.

By using some relevant Python/C#/C++ etc language features I think I can implement something along these lines. But does anyone know of an existing framework already built to support this approach?

Regards

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20191207/d825352e/attachment.html>


More information about the Cbc mailing list