Solving system of linear inequalities I am trying to solve a system of inequalities in the following form:
$\ x_i - x_j \leq w $

I know these inequalities can be solved using Bellman-Ford algorithm. But there is also another condition. I want to find the solution that maximizes $\ x_n - x_1$

As far as I know the default Bellman-Ford algorithm minimizes it. How do I do that?
The obvious (but perhaps not optimal) solution would be to give it as input to a LP solver.