I'm using scipy.optimize.minimize to optimize a real-world problem for which the answers can only be integers. But I want it optimized with integer values (rounding all x to the nearest whole number doesn't always give the minimum). Is there a way to use scipy.optimize.minimize with only integer values?
Asked
Active
Viewed 586 times
2
-
1Maybe [Z3py](https://ericpony.github.io/z3py-tutorial/guide-examples.htm) is helpful for this situation? If you provided some more detail, some demo data and some example code, people could shed more light on your question. – JohanC Mar 24 '20 at 21:11
-
I don't think scipy.optimize has much to offer for discrete optimization. – Erwin Kalvelagen Mar 24 '20 at 21:51
-
Check minimize_scalar. Maybe your function is scalar or can be transformed to one – Wilmer E. Henao Mar 29 '20 at 02:06
-
Also check [here](https://stackoverflow.com/questions/39236863/) – RadioSilence Apr 02 '20 at 07:37