The decision variable of my optimization problem (which I am aiming at keeping linear) is a placement binary vector, where the value in each position is either 0 or 1 (two different possible locations of item i).
One component of the objective function is this:
C_T is the const of transferring N items.
k is the iteration in which I am currently solving the problem and k-1 is the current displacement of items (result of solving the last iteration of the problem k-1). I have an initial condition (k=0).
N is "how many positions of x are different between the current displacement (k-1) and the outcome of the optimization problem (future optimal displacement x^k)".
How can I keep this component of the objective function linear? In other words, how can I replace the XOR operator? I thought about using the absolute difference as an alternative but I'm not sure it will help.
Is there a linear way to do this?
I will implement this problem with PuLP in python, maybe there is something that can help over there as well...