This is a follow-up from this post. In short, I am using IBM ILOG CPLEX CP Optimizer in Python to solve a constraint programming problem. One of the optimization objectives is to maximize the product of integers x_1 * x_2 * ... * x_n. As the problem scales up (e.g. n is around 300), the product will apparently get very large and CP Optimizer seemed to be unable to handle this large integer. For different values of n, the returned product was always 1.79769e+308.
Integers are unlimited in size and have no maximum value in native Python, so I guess CP Optimizer handles large integers differently. Is there any way to deal with large integers in CP Optimizer?
Some side notes:
- My program worked fine with smaller data sizes (small n).
- I tried maximizing log(x_1) + log(x_2) + ... + log(x_n) but the program was running non-stop. I reckon the log makes things complicated.
- For those who are interested, my source code and sample data is here.
Thanks a lot!