MCPcopy Create free account
hub / github.com/StevenLyt/mapf-visualizer / LAMAPFVisualizer

Class LAMAPFVisualizer

src/LAMAPFVisualizer.jsx:21–1217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19const DEFAULTCOL = 15;
20
21class LAMAPFVisualizer extends Component {
22 constructor(props) {
23 super(props);
24 this.state = {
25 numRow: DEFAULTROW,
26 numCol: DEFAULTCOL,
27 tempRow: DEFAULTROW,
28 tempCol: DEFAULTCOL,
29 algorithms: ["MC-CBS", "MC-CBS-M"],
30 algorithm: 1,
31 map: new Array(DEFAULTROW).fill().map(() =>
32 new Array(DEFAULTCOL).fill().map((u) => ({
33 isWall: false,
34 isStart: false,
35 isGoal: false,
36 agent: -1,
37 color: "",
38 }))
39 ),
40 agents: [],
41 numAgents: 0,
42 addedSRow: null,
43 addedSCol: null,
44 addedGRow: null,
45 addedGCol: null,
46 addedHeight: null,
47 addedWidth: null,
48 snackbarOpen: false,
49 isError: false,
50 isMousePressed: false,
51 isPlanning: false,
52 isPlanned: false,
53 isAnimationFinished: false,
54 planningTime: -1,
55 planningStatus: "",
56 paths: [],
57 isInfoDialogOpen: true,
58 isDialogOpen: false,
59 isAlgDialogOpen: false,
60
61 startToAdd: false,
62 goalToAdd: false,
63 colorToAdd: "",
64 addedHeightByClick: null,
65 addedWidthByClick: null,
66 addedSRowClick: null,
67 addedSColClick: null,
68 toDelete: false,
69
70 usedColors: new Set(),
71 speed: 0.6,
72 };
73 }
74
75 setSpeed(speed) {
76 switch (speed) {
77 case "Slow":
78 this.setState({ speed: 1 });

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected