The p-median problem was formulated as a binary linear programming problem
and two methods were applied for approaching the solutions: MATLAB© optimization package (standard branch-and-bound) and a heuristic greedy algorithm. As a result, one noticed that the difference between the two methods ranges from 1.6% to 12% in the distance sum. Regarding to CPU time, MATLAB© standard branch-and-bound is 157 times slower in the best case and up to 43,446 times in the worst.