Question

I am a newbie for mathematical programming stuff. I want to solve a MILP problem. It aims to maximize summation of x_i s , however I want x_i s either 0 or multiple of some value (let's say, 5). So each x_i can be either 0, 5, 10, etc.

If I give 5 as a lower bound than each x_i becomes at least 5, however it should be 0 as well for my problem. How can I code this for cplexmilp function in MATLAB? Thanks.

Was it helpful?

Solution

To deal with x(i) being a multiple of 5 or whatever number, just rescale your argument space. Namely, if f(x) is your original objective function and x is to be a multiple of 5, just re-express the function through the transformation f(5*z) and now you can optimize over a new vector of decision variables, z, that can consist of any integers. Do likewise in any constraint functions that you may have.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top