Your "liability" constraints are defined by
subject to liability {i in M}:
z[i-1] - z[i] + sum{j in N} d[i,j] * x[j] >= L[i];
set M is 0..m, so there is a constraint liability[0] that is
z[-1] - z[0] + sum {j in N} d[0,j] * x[j] >= L[0];But you have defined "var z{M} >=0;", so there is no variable z[-1], and as a result you are getting the "invalid subscript z[-1]" error. One way to fix this is to write instead
subject to liability {i in M diff {0}}:
z[i-1] - z[i] + sum{j in N} d[i,j] * x[j] >= L[i];
so that AMPL does not generate a liability[0] constraint.