Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. // for (int k = 0; k < vehicles.size()+1;k++){
  2. // for (int i = 0; i < n; i++) {
  3. // for (int j = 0; j < n; j++) {
  4. // for (int t = 0; t < tb-1; t++) {
  5. // lits.clear();
  6. // lits.push(~Lit(car[k][i][j][t]));
  7. // lits.push(Lit(car[k][i][j][t+1])); // (not c(i,j,t) et c(i,j,t+1) -> Move
  8. // if (j-(vehicles[k].width-1)-1!=0 and inboard(i,j-(vehicles[k].width-1),n)) { lits.push(Lit(move[k][i][j-(vehicles[k].width-1)][t][0])) ; }
  9. // if (i+(vehicles[k].height-1)!=0 and inboard(i+(vehicles[k].height-1),j,n)) { lits.push(Lit(move[k][i+(vehicles[k].height-1)][j][t][1])) ; }
  10. // if (j+(vehicles[k].width-1)!=0 and inboard(i,j+(vehicles[k].width-1),n)) { lits.push(Lit(move[k][i][j+(vehicles[k].width-1)][t][2])) ; }
  11. // if (i-(vehicles[k].height-1)!=n-1 and inboard(i-(vehicles[k].height-1),j,n)) { lits.push(Lit(move[k][i-(vehicles[k].height-1)][j][t][3])) ; }
  12. //
  13. // s.addClause(lits);
  14. // lits.clear();
  15. // lits.push(Lit(car[k][i][j][t]));
  16. // lits.push(~Lit(car[k][i][j][t+1]));
  17. // if (j+1!=n-1 and inboard(i,j+1,n)) { lits.push(Lit(move[k][i][j+1][t][0])) ; }
  18. // if (i+1!=0 and inboard(i+1,j,n)) { lits.push(Lit(move[k][i+1][j][t][1])) ; }
  19. // if (j-1!=0 and inboard(i,j-1,n)) { lits.push(Lit(move[k][i][j-1][t][2])) ; }
  20. // if (i-1!=n-1 and inboard(i-1,j,n)) { lits.push(Lit(move[k][i-1][j][t][3])) ; }
  21. //
  22. // s.addClause(lits);
  23. // }
  24. // }
  25. // }
  26. // }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement