| 431 | } |
| 432 | |
| 433 | startNewTask() { |
| 434 | this.setState( |
| 435 | { |
| 436 | numRow: DEFAULTROW, |
| 437 | numCol: DEFAULTCOL, |
| 438 | tempRow: DEFAULTROW, |
| 439 | tempCol: DEFAULTCOL, |
| 440 | map: this.createEmptyMap(DEFAULTROW, DEFAULTCOL), |
| 441 | agents: [], |
| 442 | numAgents: 0, |
| 443 | addedSRow: null, |
| 444 | addedSCol: null, |
| 445 | addedGRow: null, |
| 446 | addedGCol: null, |
| 447 | snackbarOpen: false, |
| 448 | isError: false, |
| 449 | isMousePressed: false, |
| 450 | isPlanning: false, |
| 451 | isPlanned: false, |
| 452 | isAnimationFinished: false, |
| 453 | planningTime: -1, |
| 454 | planningStatus: "", |
| 455 | paths: [], |
| 456 | whichSolver: 2, |
| 457 | whichHeuristic: 3, |
| 458 | whichInadmissibleHeuristic: 1, |
| 459 | isSuboptimal: true, |
| 460 | suboptimality: 1.1, |
| 461 | isPrioritizeConflict: true, |
| 462 | isBypass: true, |
| 463 | isDisjointSplitting: false, |
| 464 | isRectangle: true, |
| 465 | isCorridor: true, |
| 466 | isTarget: true, |
| 467 | algorithmSummary: "", |
| 468 | |
| 469 | startToAdd: false, |
| 470 | goalToAdd: false, |
| 471 | }, |
| 472 | () => { |
| 473 | for (let i = 0; i < DEFAULTROW; i++) { |
| 474 | for (let j = 0; j < DEFAULTCOL; j++) { |
| 475 | document.getElementById(`grid-${i}-${j}`).style.backgroundColor = ""; |
| 476 | document.getElementById(`grid-${i}-${j}`).style.border = ""; |
| 477 | } |
| 478 | } |
| 479 | } |
| 480 | ); |
| 481 | } |
| 482 | |
| 483 | checkRowOOR() { |
| 484 | return ( |