I have the following Max problem:
----------------------------------------------------------------------------------------
Max f = sum_i( a_i * y_i) problem ''' a_i all Positive is the parameter and y_i is variable'''
s.t
constraints on x
constraints on x and z
and the problem making constraints:
y <= (d - t(x,z)) / 4d) + 1 ''' d is a parameter, and t(x,z) at most can be = 4d '''
----------------------------------------------------------------------------------------
y is NOT a decision variable, z is the decison variable, and x is a function of z, and y is a function of x; y is an indicator variable, I want y to indicate: if t(x,z) > d then set y = 0 else if t(x,z) <= d set y = 1,
and what y <= (d - t(x,z)) / 4d) + 1 does is :
(1) when t(x,z) <= d ---> 0 < d - t(x,z)) / 4d < 1 ---> 1 <= (d - t(x,z)) / 4d) + 1 < 2
(2) when t(x,z) > d ---> d - t(x,z)) / 4d < 0 ---> 0 < (d - t(x,z)) / 4d) + 1 < 1
The LP relaxation gives the optimal solutions with y either >= 1 or y < 1. The point is every feasible solution of the LP relaxation has ONLY ONE corresponding feasible integer solution and that is to always ROUND DOWN on y_values, so that in case (1) y = 1 and in case (2) y = 0. I could actually represent this in the objective function as:
Max f = sum_i( a_i * ROUNDDOWN(y_i) )
So I figured I can get rid of y > 1 ( e.g. y = 1.46) by setting ub = 1 for y. But I don't know how to get rid of y < 1 (e.g. y = 0.35), what if I could tell Gurobi to always Rounddown when branching on a variable? How can I do that? Or should I reformulate or revise my model? Do you think this is the right for what I aim for?
Thank you very much in advance