ampl / mp

An open-source library for mathematical programming
https://mp.ampl.com
Other
229 stars 42 forks source link

Backend hierarchy #145

Closed glebbelov closed 2 years ago

glebbelov commented 3 years ago

MIPBackend is a descendant of Backend. Implies that a CP solver could derive from a CPBackend. Then what about ORTools? One possibility is to merge everything into just Backend and rely on the STD_FEATURE mechanism to switch components on/off. @mapgccv any opinion?

mapgccv commented 3 years ago

I have no strong opinion on this: multiple inheritance comes with its own issues, on the other hand merging everything into Backend would create a huge monolithic class which might be difficult to follow. Maybe we could start by defining the scope of this: do we need/want to pave the road to implement an interface to something as generic as ORTools? And even if we want to, we can of course easily relate to the linear solving algorithms in there, but were you thinking on trying to detect and interface with more problem specific algorithms also?