MATLAB: Find an optimal solution for a linear system with two inequations

binary contraintsoptimal solutionoptimization algorithm

Hello expert i have a function that i have to maximize, and i don't i have much information about algorithm that i should use , i used the MILP but it doesn’t work well .
The function : Max (x1+x2)
Contraints : 150×1+200×2 <= 164
X1+x2 <= 2
X1 and x2 are binary
I will be very grateful if you can help me

Best Answer

  • intlinprog([-1 -1], 1:2, [150 200;1 1], [164;2],[],[],[0 0],[1 1])