|
26 | 26 | },
|
27 | 27 | {
|
28 | 28 | "cell_type": "code",
|
29 |
| - "execution_count": 44, |
| 29 | + "execution_count": 1, |
30 | 30 | "id": "c17bcd9a-7f79-4a36-90be-baf204c5876c",
|
31 | 31 | "metadata": {},
|
32 | 32 | "outputs": [
|
|
35 | 35 | "text/html": [
|
36 | 36 | "\n",
|
37 | 37 | " <iframe\n",
|
38 |
| - " id=\"studygyxCRwuviL\"\n", |
| 38 | + " id=\"studyKcPvKaujLJ\"\n", |
39 | 39 | " width=\"820\"\n",
|
40 | 40 | " height=\"620\"\n",
|
41 | 41 | " frameborder=\"0\"\n",
|
|
134 | 134 | " "size": 14\n",
|
135 | 135 | " }\n",
|
136 | 136 | " },\n",
|
137 |
| - " "states": {\n", |
138 |
| - " "borderWidth": 1,\n", |
| 137 | + " "scheduled_actions": {\n", |
| 138 | + " "shape": "box",\n", |
139 | 139 | " "color": {\n",
|
140 |
| - " "background": "#8ff0a4",\n", |
| 140 | + " "background": "pink",\n", |
141 | 141 | " "border": "black",\n",
|
142 | 142 | " "highlight": {\n",
|
143 | 143 | " "background": "white",\n",
|
144 | 144 | " "border": "red"\n",
|
145 | 145 | " }\n",
|
146 | 146 | " },\n",
|
147 |
| - " "shape": "ellipse",\n", |
| 147 | + " "borderWidth": 1,\n", |
148 | 148 | " "mass": 1,\n",
|
149 | 149 | " "font": {\n",
|
150 | 150 | " "color": "black",\n",
|
151 | 151 | " "size": 14\n",
|
152 |
| - " }\n", |
| 152 | + " },\n", |
| 153 | + " "schedColor": false\n", |
153 | 154 | " },\n",
|
154 |
| - " "scheduled_actions": {\n", |
| 155 | + " "states": {\n", |
155 | 156 | " "borderWidth": 1,\n",
|
156 | 157 | " "color": {\n",
|
157 |
| - " "background": "pink",\n", |
| 158 | + " "background": "#8ff0a4",\n", |
158 | 159 | " "border": "black",\n",
|
159 | 160 | " "highlight": {\n",
|
160 | 161 | " "background": "white",\n",
|
161 | 162 | " "border": "red"\n",
|
162 | 163 | " }\n",
|
163 | 164 | " },\n",
|
164 |
| - " "shape": "box",\n", |
| 165 | + " "shape": "ellipse",\n", |
165 | 166 | " "mass": 1,\n",
|
166 | 167 | " "font": {\n",
|
167 | 168 | " "color": "black",\n",
|
168 | 169 | " "size": 14\n",
|
169 |
| - " },\n", |
170 |
| - " "schedColor": false\n", |
| 170 | + " }\n", |
171 | 171 | " }\n",
|
172 | 172 | " },\n",
|
173 | 173 | " "reload_button": false,\n",
|
|
307 | 307 | "network.on( 'doubleClick', function(properties) {\n",
|
308 | 308 | " network.setData(data);\n",
|
309 | 309 | "});\n",
|
| 310 | + "function setNodeColor(id, color) {\n", |
| 311 | + " var node = nodes.get(id);\n", |
| 312 | + " node["color"] = color\n", |
| 313 | + " nodes.update(node);\n", |
| 314 | + "}\n", |
310 | 315 | "\n",
|
311 | 316 | " </script>\n",
|
312 | 317 | " </body>\n",
|
|
367 | 372 | " available_actions=available_actions,\n",
|
368 | 373 | " labels=labels,\n",
|
369 | 374 | " modeltype=ModelType.MDP,\n",
|
370 |
| - " rewards=reward\n", |
| 375 | + " rewards=rewards\n", |
371 | 376 | ")\n",
|
372 | 377 | "vis = show(pgc_study, layout=Layout(\"layouts/pinkgreen.json\"), name=\"study\")"
|
373 | 378 | ]
|
374 | 379 | },
|
375 | 380 | {
|
376 | 381 | "cell_type": "code",
|
377 |
| - "execution_count": 28, |
| 382 | + "execution_count": 2, |
378 | 383 | "id": "4001c6f3-8c6c-4533-8dc5-6215e13fed37",
|
379 | 384 | "metadata": {},
|
380 | 385 | "outputs": [
|
|
383 | 388 | "text/html": [
|
384 | 389 | "\n",
|
385 | 390 | " <iframe\n",
|
386 |
| - " id=\"studyaBRfBOLfLN\"\n", |
| 391 | + " id=\"studyseEKlSJXhW\"\n", |
387 | 392 | " width=\"820\"\n",
|
388 | 393 | " height=\"620\"\n",
|
389 | 394 | " frameborder=\"0\"\n",
|
|
481 | 486 | " "size": 14\n",
|
482 | 487 | " }\n",
|
483 | 488 | " },\n",
|
484 |
| - " "states": {\n", |
485 |
| - " "borderWidth": 1,\n", |
| 489 | + " "scheduled_actions": {\n", |
| 490 | + " "shape": "box",\n", |
486 | 491 | " "color": {\n",
|
487 |
| - " "background": "#8ff0a4",\n", |
| 492 | + " "background": "pink",\n", |
488 | 493 | " "border": "black",\n",
|
489 | 494 | " "highlight": {\n",
|
490 | 495 | " "background": "white",\n",
|
491 | 496 | " "border": "red"\n",
|
492 | 497 | " }\n",
|
493 | 498 | " },\n",
|
494 |
| - " "shape": "ellipse",\n", |
| 499 | + " "borderWidth": 1,\n", |
495 | 500 | " "mass": 1,\n",
|
496 | 501 | " "font": {\n",
|
497 | 502 | " "color": "black",\n",
|
498 | 503 | " "size": 14\n",
|
499 |
| - " }\n", |
| 504 | + " },\n", |
| 505 | + " "schedColor": false\n", |
500 | 506 | " },\n",
|
501 |
| - " "scheduled_actions": {\n", |
| 507 | + " "states": {\n", |
502 | 508 | " "borderWidth": 1,\n",
|
503 | 509 | " "color": {\n",
|
504 |
| - " "background": "pink",\n", |
| 510 | + " "background": "#8ff0a4",\n", |
505 | 511 | " "border": "black",\n",
|
506 | 512 | " "highlight": {\n",
|
507 | 513 | " "background": "white",\n",
|
508 | 514 | " "border": "red"\n",
|
509 | 515 | " }\n",
|
510 | 516 | " },\n",
|
511 |
| - " "shape": "box",\n", |
| 517 | + " "shape": "ellipse",\n", |
512 | 518 | " "mass": 1,\n",
|
513 | 519 | " "font": {\n",
|
514 | 520 | " "color": "black",\n",
|
515 | 521 | " "size": 14\n",
|
516 |
| - " },\n", |
517 |
| - " "schedColor": false\n", |
| 522 | + " }\n", |
518 | 523 | " }\n",
|
519 | 524 | " },\n",
|
520 | 525 | " "reload_button": false,\n",
|
|
654 | 659 | "network.on( 'doubleClick', function(properties) {\n",
|
655 | 660 | " network.setData(data);\n",
|
656 | 661 | "});\n",
|
| 662 | + "function setNodeColor(id, color) {\n", |
| 663 | + " var node = nodes.get(id);\n", |
| 664 | + " node["color"] = color\n", |
| 665 | + " nodes.update(node);\n", |
| 666 | + "}\n", |
657 | 667 | "\n",
|
658 | 668 | " </script>\n",
|
659 | 669 | " </body>\n",
|
|
726 | 736 | },
|
727 | 737 | {
|
728 | 738 | "cell_type": "code",
|
729 |
| - "execution_count": 1, |
| 739 | + "execution_count": 3, |
730 | 740 | "id": "d479bc6e-df7e-4b08-a511-4a3de7d81f79",
|
731 | 741 | "metadata": {},
|
732 | 742 | "outputs": [
|
|
735 | 745 | "text/html": [
|
736 | 746 | "\n",
|
737 | 747 | " <iframe\n",
|
738 |
| - " id=\"modelAFAqNkTQzL\"\n", |
| 748 | + " id=\"modelRiavLSlkJj\"\n", |
739 | 749 | " width=\"1030\"\n",
|
740 | 750 | " height=\"797\"\n",
|
741 | 751 | " frameborder=\"0\"\n",
|
|
1593 | 1603 | " edges: edges,\n",
|
1594 | 1604 | "};\n",
|
1595 | 1605 | "var network = new vis.Network(container, data, options);\n",
|
1596 |
| - "setTimeout(network.setData, 1000, data);\n", |
1597 | 1606 | "function makeAllNodesInvisible() {\n",
|
1598 | 1607 | " ids = nodes.getIds();\n",
|
1599 | 1608 | " for (let i = 0; i < ids.length; i++) {\n",
|
|
1722 | 1731 | },
|
1723 | 1732 | {
|
1724 | 1733 | "cell_type": "code",
|
1725 |
| - "execution_count": 50, |
| 1734 | + "execution_count": 4, |
1726 | 1735 | "id": "8b36adc5-3203-47f4-8610-4e135ac26f7c",
|
1727 | 1736 | "metadata": {},
|
1728 | 1737 | "outputs": [
|
|
1731 | 1740 | "text/html": [
|
1732 | 1741 | "\n",
|
1733 | 1742 | " <iframe\n",
|
1734 |
| - " id=\"modelITcXpaZHaw\"\n", |
| 1743 | + " id=\"modelkZhkYnVlJL\"\n", |
1735 | 1744 | " width=\"1030\"\n",
|
1736 | 1745 | " height=\"797\"\n",
|
1737 | 1746 | " frameborder=\"0\"\n",
|
|
1991 | 2000 | " "size": 34\n",
|
1992 | 2001 | " }\n",
|
1993 | 2002 | " },\n",
|
| 2003 | + " "scheduled_actions": {\n", |
| 2004 | + " "shape": "box",\n", |
| 2005 | + " "color": {\n", |
| 2006 | + " "background": "pink",\n", |
| 2007 | + " "border": "red"\n", |
| 2008 | + " }\n", |
| 2009 | + " },\n", |
1994 | 2010 | " "states": {\n",
|
1995 | 2011 | " "borderWidth": 1,\n",
|
1996 | 2012 | " "color": {\n",
|
|
2557 | 2573 | "network.on( 'doubleClick', function(properties) {\n",
|
2558 | 2574 | " network.setData(data);\n",
|
2559 | 2575 | "});\n",
|
| 2576 | + "function setNodeColor(id, color) {\n", |
| 2577 | + " var node = nodes.get(id);\n", |
| 2578 | + " node["color"] = color\n", |
| 2579 | + " nodes.update(node);\n", |
| 2580 | + "}\n", |
2560 | 2581 | "\n",
|
2561 | 2582 | " </script>\n",
|
2562 | 2583 | " </body>\n",
|
|
2641 | 2662 | "mdp.add_self_loops()\n",
|
2642 | 2663 | "vis = show(mdp, layout=Layout(\"layouts/monty.json\"))"
|
2643 | 2664 | ]
|
2644 |
| - }, |
2645 |
| - { |
2646 |
| - "cell_type": "code", |
2647 |
| - "execution_count": null, |
2648 |
| - "id": "5594603e-7b9d-4df8-a90a-521e2d0fb010", |
2649 |
| - "metadata": {}, |
2650 |
| - "outputs": [], |
2651 |
| - "source": [] |
2652 | 2665 | }
|
2653 | 2666 | ],
|
2654 | 2667 | "metadata": {
|
|
0 commit comments