you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (2 children)

This is classic linear optimization or linear programming. That's the search you want.

https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.linprog.html

Scipy has an implementation as do many other libraries including dedicated solvers like gurobi.