Skip to content

Commit

Permalink
📝 Update requirements graph with now 1 to 1 edges and transformations…
Browse files Browse the repository at this point in the history
… ids
  • Loading branch information
Mathïs Fédérico committed Jan 24, 2024
1 parent a2c2210 commit 3e6e1c5
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ <h1></h1>


// parsing and collecting nodes and edges from the python
nodes = new vis.DataSet([{"color": "red", "id": "item#4", "label": "4", "level": 4, "name": "4", "shape": "dot", "size": 10, "title": "4", "x": 0.0, "y": 800.0}, {"color": "red", "id": "item#5", "label": "5", "level": 5, "name": "5", "shape": "dot", "size": 10, "title": "5", "x": 0.0, "y": 1000.0}, {"color": "red", "id": "item#0", "label": "0", "level": 0, "name": "0", "shape": "dot", "size": 10, "title": "0", "x": 0.0, "y": 0.0}, {"color": "red", "id": "item#1", "label": "1", "level": 1, "name": "1", "shape": "dot", "size": 10, "title": "1", "x": 0.0, "y": 200.0}, {"color": "red", "id": "item#2", "label": "2", "level": 2, "name": "2", "shape": "dot", "size": 10, "title": "2", "x": 0.0, "y": 400.0}, {"color": "red", "id": "item#3", "label": "3", "level": 3, "name": "3", "shape": "dot", "size": 10, "title": "3", "x": 0.0, "y": 600.0}]);
edges = new vis.DataSet([{"arrows": {"middle": {"enabled": true}}, "color": {"color": "#56B4E97F", "highlight": "#56B4E97F", "hover": "#56B4E97F"}, "from": "item#4", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 3\u22651,4\u22651 \u27f9 -3,-4,+5 (transformation 5):\n\nConditions:\n3\u22651,4\u22651\nEffects:\n-3,-4,+5", "to": "item#5", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#0173B27F", "highlight": "#0173B27F", "hover": "#0173B27F"}, "from": "item#0", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 0\u22651 \u27f9 -0,+1 (transformation 1):\n\nConditions:\n0\u22651\nEffects:\n-0,+1", "to": "item#1", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#DE8F057F", "highlight": "#DE8F057F", "hover": "#DE8F057F"}, "from": "item#0", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 0\u22651,1\u22651 \u27f9 -0,-1,+2 (transformation 2):\n\nConditions:\n0\u22651,1\u22651\nEffects:\n-0,-1,+2", "to": "item#2", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#9494947F", "highlight": "#9494947F", "hover": "#9494947F"}, "from": "item#3", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 2\u22651,3\u22651 \u27f9 -2,-3,+4 (transformation 4):\n\nConditions:\n2\u22651,3\u22651\nEffects:\n-2,-3,+4", "to": "item#4", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#56B4E97F", "highlight": "#56B4E97F", "hover": "#56B4E97F"}, "from": "item#3", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 3\u22651,4\u22651 \u27f9 -3,-4,+5 (transformation 5):\n\nConditions:\n3\u22651,4\u22651\nEffects:\n-3,-4,+5", "to": "item#5", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#DE8F057F", "highlight": "#DE8F057F", "hover": "#DE8F057F"}, "from": "item#1", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 0\u22651,1\u22651 \u27f9 -0,-1,+2 (transformation 2):\n\nConditions:\n0\u22651,1\u22651\nEffects:\n-0,-1,+2", "to": "item#2", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#ECE1337F", "highlight": "#ECE1337F", "hover": "#ECE1337F"}, "from": "item#1", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 1\u22651,2\u22651 \u27f9 -1,-2,+3 (transformation 3):\n\nConditions:\n1\u22651,2\u22651\nEffects:\n-1,-2,+3", "to": "item#3", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#ECE1337F", "highlight": "#ECE1337F", "hover": "#ECE1337F"}, "from": "item#2", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 1\u22651,2\u22651 \u27f9 -1,-2,+3 (transformation 3):\n\nConditions:\n1\u22651,2\u22651\nEffects:\n-1,-2,+3", "to": "item#3", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#9494947F", "highlight": "#9494947F", "hover": "#9494947F"}, "from": "item#2", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 2\u22651,3\u22651 \u27f9 -2,-3,+4 (transformation 4):\n\nConditions:\n2\u22651,3\u22651\nEffects:\n-2,-3,+4", "to": "item#4", "width": 1}]);
nodes = new vis.DataSet([{"color": "red", "id": "item#4", "label": "4", "level": 4, "name": "4", "shape": "dot", "size": 10, "title": "4", "x": 0.0, "y": 800.0}, {"color": "red", "id": "item#5", "label": "5", "level": 5, "name": "5", "shape": "dot", "size": 10, "title": "5", "x": 0.0, "y": 1000.0}, {"color": "red", "id": "item#3", "label": "3", "level": 3, "name": "3", "shape": "dot", "size": 10, "title": "3", "x": 0.0, "y": 600.0}, {"color": "red", "id": "item#2", "label": "2", "level": 2, "name": "2", "shape": "dot", "size": 10, "title": "2", "x": 0.0, "y": 400.0}, {"color": "red", "id": "item#1", "label": "1", "level": 1, "name": "1", "shape": "dot", "size": 10, "title": "1", "x": 0.0, "y": 200.0}, {"color": "red", "id": "item#0", "label": "0", "level": 0, "name": "0", "shape": "dot", "size": 10, "title": "0", "x": 0.0, "y": 0.0}]);
edges = new vis.DataSet([{"arrows": {"middle": {"enabled": true}}, "color": {"color": "#CC78BC7F", "highlight": "#CC78BC7F", "hover": "#CC78BC7F"}, "from": "item#4", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 3\u22651,4\u22651 \u27f9 -3,-4,+5 (transformation 5):\n\nConditions:\n3\u22651,4\u22651\nEffects:\n-3,-4,+5", "to": "item#5", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#029E737F", "highlight": "#029E737F", "hover": "#029E737F"}, "from": "item#3", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 2\u22651,3\u22651 \u27f9 -2,-3,+4 (transformation 4):\n\nConditions:\n2\u22651,3\u22651\nEffects:\n-2,-3,+4", "to": "item#4", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#CC78BC7F", "highlight": "#CC78BC7F", "hover": "#CC78BC7F"}, "from": "item#3", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 3\u22651,4\u22651 \u27f9 -3,-4,+5 (transformation 5):\n\nConditions:\n3\u22651,4\u22651\nEffects:\n-3,-4,+5", "to": "item#5", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#56B4E97F", "highlight": "#56B4E97F", "hover": "#56B4E97F"}, "from": "item#2", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 1\u22651,2\u22651 \u27f9 -1,-2,+3 (transformation 3):\n\nConditions:\n1\u22651,2\u22651\nEffects:\n-1,-2,+3", "to": "item#3", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#029E737F", "highlight": "#029E737F", "hover": "#029E737F"}, "from": "item#2", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 2\u22651,3\u22651 \u27f9 -2,-3,+4 (transformation 4):\n\nConditions:\n2\u22651,3\u22651\nEffects:\n-2,-3,+4", "to": "item#4", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#9494947F", "highlight": "#9494947F", "hover": "#9494947F"}, "from": "item#1", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 0\u22651,1\u22651 \u27f9 -0,-1,+2 (transformation 2):\n\nConditions:\n0\u22651,1\u22651\nEffects:\n-0,-1,+2", "to": "item#2", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#56B4E97F", "highlight": "#56B4E97F", "hover": "#56B4E97F"}, "from": "item#1", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 1\u22651,2\u22651 \u27f9 -1,-2,+3 (transformation 3):\n\nConditions:\n1\u22651,2\u22651\nEffects:\n-1,-2,+3", "to": "item#3", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#FBAFE47F", "highlight": "#FBAFE47F", "hover": "#FBAFE47F"}, "from": "item#0", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 0\u22651 \u27f9 -0,+1 (transformation 1):\n\nConditions:\n0\u22651\nEffects:\n-0,+1", "to": "item#1", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#9494947F", "highlight": "#9494947F", "hover": "#9494947F"}, "from": "item#0", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required for 0\u22651,1\u22651 \u27f9 -0,-1,+2 (transformation 2):\n\nConditions:\n0\u22651,1\u22651\nEffects:\n-0,-1,+2", "to": "item#2", "width": 1}]);

nodeColors = {};
allNodes = nodes.get({ returnType: "Object" });
Expand Down
4 changes: 2 additions & 2 deletions docs/images/requirements_graphs/MineHcraft.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/images/requirements_graphs/MiniHCraftCrossing.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ <h1></h1>


// parsing and collecting nodes and edges from the python
nodes = new vis.DataSet([{"color": "blue", "id": "zone_item#goal in zone", "image": "file:///c:/users/mwx1306333/documents/codebases/hierarchycraft/src/hcraft/examples/minicraft/resources/items/goal.png", "label": "Goal in zone", "level": 2, "name": "goal", "shape": "image", "size": 10, "title": "Goal in zone", "x": 0.0, "y": 666.6666666666666}, {"color": "red", "id": "item#goal", "image": "file:///c:/users/mwx1306333/documents/codebases/hierarchycraft/src/hcraft/examples/minicraft/resources/items/goal.png", "label": "Goal", "level": 3, "name": "goal", "shape": "image", "size": 10, "title": "Goal", "x": 0.0, "y": 1000.0}, {"color": "blue", "id": "zone_item#lava in zone", "image": "file:///c:/users/mwx1306333/documents/codebases/hierarchycraft/src/hcraft/examples/minicraft/resources/items/lava.png", "label": "Lava in zone", "level": 2, "name": "lava", "shape": "image", "size": 10, "title": "Lava in zone", "x": 600.0, "y": 666.6666666666666}, {"color": "red", "id": "item#lava", "image": "file:///c:/users/mwx1306333/documents/codebases/hierarchycraft/src/hcraft/examples/minicraft/resources/items/lava.png", "label": "Lava", "level": 3, "name": "lava", "shape": "image", "size": 10, "title": "Lava", "x": 600.0, "y": 1000.0}, {"color": "green", "id": "zone#room", "label": "Room", "level": 1, "name": "room", "shape": "dot", "size": 10, "title": "Room", "x": 0.0, "y": 333.3333333333333}, {"color": "black", "font": {"color": "transparent", "strokeColor": "transparent"}, "id": "START#", "label": "START#", "level": 0, "shape": "dot", "size": 10, "title": "Start", "x": 0.0, "y": 0.0}]);
edges = new vis.DataSet([{"arrows": {"middle": {"enabled": true}}, "color": {"color": "#56B4E97F", "highlight": "#56B4E97F", "hover": "#56B4E97F"}, "from": "zone_item#goal in zone", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required_in_zone for reach_goal (transformation 2):\n\nConditions:\nZone(goal\u22651)\nEffects:\n+goal", "to": "item#goal", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#CC78BC7F", "highlight": "#CC78BC7F", "hover": "#CC78BC7F"}, "from": "zone_item#lava in zone", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required_in_zone for reach_lava (transformation 4):\n\nConditions:\nZone(lava\u22651)\nEffects:\n+lava", "to": "item#lava", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#DE8F057F", "highlight": "#DE8F057F", "hover": "#DE8F057F"}, "from": "zone#room", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "zone_required for find_goal (transformation 1):\n\nConditions:\nZone(goal\u22640) | at room\nEffects:\nZone(+goal)", "to": "zone_item#goal in zone", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#ECE1337F", "highlight": "#ECE1337F", "hover": "#ECE1337F"}, "from": "zone#room", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "zone_required for find_lava (transformation 3):\n\nConditions:\nZone(lava\u22640) | at room\nEffects:\nZone(+lava)", "to": "zone_item#lava in zone", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#D55E007F", "highlight": "#D55E007F", "hover": "#D55E007F"}, "from": "START#", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "Start_zone", "to": "zone#room", "width": 1}]);
nodes = new vis.DataSet([{"color": "blue", "id": "zone_item#lava in zone", "image": "file:///c:/users/mwx1306333/documents/codebases/hierarchycraft/src/hcraft/examples/minicraft/resources/items/lava.png", "label": "Lava in zone", "level": 2, "name": "lava", "shape": "image", "size": 10, "title": "Lava in zone", "x": 0.0, "y": 666.6666666666666}, {"color": "red", "id": "item#lava", "image": "file:///c:/users/mwx1306333/documents/codebases/hierarchycraft/src/hcraft/examples/minicraft/resources/items/lava.png", "label": "Lava", "level": 3, "name": "lava", "shape": "image", "size": 10, "title": "Lava", "x": 0.0, "y": 1000.0}, {"color": "blue", "id": "zone_item#goal in zone", "image": "file:///c:/users/mwx1306333/documents/codebases/hierarchycraft/src/hcraft/examples/minicraft/resources/items/goal.png", "label": "Goal in zone", "level": 2, "name": "goal", "shape": "image", "size": 10, "title": "Goal in zone", "x": 600.0, "y": 666.6666666666666}, {"color": "red", "id": "item#goal", "image": "file:///c:/users/mwx1306333/documents/codebases/hierarchycraft/src/hcraft/examples/minicraft/resources/items/goal.png", "label": "Goal", "level": 3, "name": "goal", "shape": "image", "size": 10, "title": "Goal", "x": 600.0, "y": 1000.0}, {"color": "green", "id": "zone#room", "label": "Room", "level": 1, "name": "room", "shape": "dot", "size": 10, "title": "Room", "x": 0.0, "y": 333.3333333333333}, {"color": "black", "font": {"color": "transparent", "strokeColor": "transparent"}, "id": "START#", "label": "START#", "level": 0, "shape": "dot", "size": 10, "title": "Start", "x": 0.0, "y": 0.0}]);
edges = new vis.DataSet([{"arrows": {"middle": {"enabled": true}}, "color": {"color": "#CA91617F", "highlight": "#CA91617F", "hover": "#CA91617F"}, "from": "zone_item#lava in zone", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required_in_zone for reach_lava (transformation 3):\n\nConditions:\nZone(lava\u22651)\nEffects:\n+lava", "to": "item#lava", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#ECE1337F", "highlight": "#ECE1337F", "hover": "#ECE1337F"}, "from": "zone_item#goal in zone", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "item_required_in_zone for reach_goal (transformation 1):\n\nConditions:\nZone(goal\u22651)\nEffects:\n+goal", "to": "item#goal", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#CC78BC7F", "highlight": "#CC78BC7F", "hover": "#CC78BC7F"}, "from": "zone#room", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "zone_required for find_goal (transformation 0):\n\nConditions:\nZone(goal\u22640) | at room\nEffects:\nZone(+goal)", "to": "zone_item#goal in zone", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#029E737F", "highlight": "#029E737F", "hover": "#029E737F"}, "from": "zone#room", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "zone_required for find_lava (transformation 2):\n\nConditions:\nZone(lava\u22640) | at room\nEffects:\nZone(+lava)", "to": "zone_item#lava in zone", "width": 1}, {"arrows": {"middle": {"enabled": true}}, "color": {"color": "#DE8F057F", "highlight": "#DE8F057F", "hover": "#DE8F057F"}, "from": "START#", "hoverWidth": 0.1, "selectionWidth": 0.1, "smooth": {"enabled": false}, "title": "Start_zone", "to": "zone#room", "width": 1}]);

nodeColors = {};
allNodes = nodes.get({ returnType: "Object" });
Expand Down
Loading

0 comments on commit 3e6e1c5

Please sign in to comment.