I do have a MILP problem. The decision variables are Integer ones. Let's call them $x_i$ and i $\in \{0,1,2,3,...,N \}$ I do want to find all distinct solutiuons for this problem.
The problem is solved and the optimal solution is found as $x^*_i$. If the decision variables where binary ones I could add the following cut and resolve to find a distinct new solution
for i in range(1,N+1):
if $x^*_i$>0:
expr+=1-x_i
else:
expr+=x_i
add the cut as expr $\geq 1$ and resolve the problem
The Idea can be
for i in range(1,N+1):
if $x^*_i$>0:
expr+=|x^*_i-x_i|
else:
expr+=x_i
but it is not linear ! Any advice would be appreciated.