Commits

Yiliang Xiong committed 9e084e3

sliding track length should be greater than train length

  • Participants
  • Parent commits 0354eb5

Comments (0)

Files changed (1)

 # models of RAS 2012 problem
 
 param M := 1440;
+param L := 1000;
 # define a graph
 param N;    # number of nodes
 set V := 0..N-1;
 s.t. terminal_late  {(i,r,s) in LAST}: late[i,r,s]  >= a[i,r,s] - twtend[i] - (1 - y[i,r,s]) * M;
 # entry time
 s.t. entry_time_east {i in I, (r,s) in E: r == orig[i]}: a[i,r,s] >= entrytime[i];
+s.t. entry_time_west {i in J, (r,s) in W: r == orig[i]}: a[i,s,r] >= entrytime[i];
+# long train and sliding track
+s.t. long_train {i in I, (r,s) in E: tracktype[r,s] == "S"}: 
+    trackleng[r,s] >= trainleng[i] - (1 - y[i,r,s]) * L;