# Commits

committed 86774f0

define flow for eastbound and westbound separately

# dispatching.mod

` # if i immediately precedes j on track (r,s)`
` var x {i in T, j in T, (r,s) in E: i <> j} binary;`
` # if i travel from r to s on track (r,s)`
`-var f {i in T, (r,s) in A} binary;`
`+var f {i in T, (r,s) in A: i in I and (r,s) in E or i in J and (r,s) in W} binary;`
` # if i uses track (r,s) in E`
` var y {i in T, (r,s) in E} binary;`
` # if i go through track (r,s) before MOW`
` s.t. flow_orig_west {j in J}: sum {(r,s) in W: r == orig[j]} f[j,r,s] = 1;`
` s.t. flow_dest_west {j in J}: sum {(r,s) in W: s == dest[j]} f[j,r,s] = 1;`
` # toal track flow`
`-s.t. flow_total {i in T, (r,s) in E}: y[i,r,s] = f[i,r,s] + f[i,s,r];`
`+s.t. flow_total_east {i in I, (r,s) in E}: y[i,r,s] = f[i,r,s];`
`+s.t. flow_total_west {i in J, (r,s) in E}: y[i,r,s] = f[i,s,r];`
` # traffic flow and order`
` s.t. flow_row {j in T, (r,s) in E}: sum {i in T: i <> j} x[i,j,r,s] <= y[j,r,s];`
` s.t. flow_col {j in T, (r,s) in E}: sum {k in T: k <> j} x[j,k,r,s] <= y[j,r,s];`