Graphical optimization solution for integer linear programming