Optimization problems containing binary variable

All right, I am going to search if there is some other way to solve this problem. Once solved, I will share the solution.