Hello fellow OR Exchangers, I have the following Max problem: Max f = sum_i( a_i * y_i) problem s.t constraints on x constraints on x and z and the problem making constraints: y <= ( (d - t(x,z)) / 4d) + 1 y is NOT a decision variable, z is the decision 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 integer (integer on y) version of the model is irrationally slow even for small instances. 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 think 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 the solver, CPLEX or Gurobi to always Rounddown when branching on a variable? How can I do that? Is that the right way of solving my intended problem, Or should I reformulate and revise my model? Do you think this is the right way of approaching for what I aim for? Thank you very much in advance
asked
Danny |

Your parentheses in the upper limit of y are unbalanced, which makes interpretation of the expression impossible.

Thanks Paul for pointing that out, I have revised it now.