In original the mathematical model what is path_intersections[p]
supposed to be? In the AMPL model it is a set of pairs which is not indexed. It is supposed to be the list of paths that intersect with path p
?
For that is could be:
subject to at_least_two_intersections {p in paths}:
sum {(p,i) in path_intersections} x[i] + sum {(j,p) in path_intersections} x[j] >= 2*y[p];
The sum of x[i]
for all i
that intersect with p
should be greater or equal than 2 if y[p]