The whole program (this might be a good idea or maybe not):
For each vertex v, let x v be equal to 1 if the visited vertex is v and 0 otherwise. For each arc a, let y a be the number of times that arc a is used. Let s be the source and t be the destination. The goal is
maximize & sum; v value (v) x v .
Limitations
& sum; a value (a) y a & le; threshold? forall; v, & sum; a has a head v y a - & sum; a has a tail v y a = {-1 if v = s; 1 if v = t; 0 otherwise (save stream)
? forall; v & ne; x, x v ? & sum; a has a head v y a (you must enter a vertex to visit)
? forall; v, x v ? 1 (visit each vertex no more than once)
? forall; v & notin; {s, t},? forall; the cuts S that separate the vertex v from {s, t}, x v & le; & sum; a such that tail (a) & notin; S & wedge; head (a) & in; S y a (use only vertices, not on isolated loops).
To solve, keep a branch and associate it with relaxation values. Unfortunately, the last group of constraints is exponential in number, so when you decide a relaxed double, you need to create columns. Typically, for connection problems, this means that the minimum cut algorithm is used repeatedly to find a shortcut that needs to be followed. Good luck
source share