I have a binary integer program. It is of a large size and the solver is taking longer time.
I am thinking of relaxing the binary integer variable and making it a continuous variable.
How can I penalise the objective function?
I have a binary integer program. It is of a large size and the solver is taking longer time.
I am thinking of relaxing the binary integer variable and making it a continuous variable.
How can I penalise the objective function?
You can't quite create a penalty function to enforce integrality and keep your problem linear, at best it would be quadratic (which could indeed be easier to solve sometimes).
The closest thing that comes to mind along the lines of what you propose is to create a feasibility pump objective:
$\min \bar f(x)+\Delta(x,\tilde x)$ s.t. your relaxed constraints, where:
$\Delta(x,\tilde x) = \sum_{j\in I:\tilde x = 1}(1-x_j)+\sum_{j\in I:\tilde x = 0}(x_j)$
and $\bar f(x)$ is your relaxed objective and $I$ is the set of your binary variables.
This does not guarantee a global solution, but it could find an integer feasible point.
This is then solved in a loop where we solve the relaxed LP and feed that into the pump objective (that's where the $\tilde x$ comes from).
Just a heads up though - if you're using CPLEX/GUROBI you probably shouldn't bother trying it, as their heuristics are much better than this.