Yiliang Xiong avatar Yiliang Xiong committed 86774f0

define flow for eastbound and westbound separately

Comments (0)

Files changed (1)

 # 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];
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.