|
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | +<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd"> |
| 3 | + <!--Created by yFiles for Java 2.7--> |
| 4 | + <key for="graphml" id="d0" yfiles.type="resources"/> |
| 5 | + <key attr.name="url" attr.type="string" for="node" id="d1"/> |
| 6 | + <key attr.name="description" attr.type="string" for="node" id="d2"/> |
| 7 | + <key for="node" id="d3" yfiles.type="nodegraphics"/> |
| 8 | + <key attr.name="url" attr.type="string" for="edge" id="d4"/> |
| 9 | + <key attr.name="description" attr.type="string" for="edge" id="d5"/> |
| 10 | + <key for="edge" id="d6" yfiles.type="edgegraphics"/> |
| 11 | + <graph edgedefault="directed" id="G"> |
| 12 | + <node id="n0"> |
| 13 | + <data key="d3"> |
| 14 | + <y:ShapeNode> |
| 15 | + <y:Geometry height="30.0" width="54.0" x="251.0" y="-80.6"/> |
| 16 | + <y:Fill color="#00FF00" color2="#CCFFCC" transparent="false"/> |
| 17 | + <y:BorderStyle color="#000000" type="line" width="1.0"/> |
| 18 | + <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="20.5166015625" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="31.45361328125" x="11.273193359375" y="4.74169921875">Start</y:NodeLabel> |
| 19 | + <y:Shape type="roundrectangle"/> |
| 20 | + <y:DropShadow color="#B3A691" offsetX="1" offsetY="1"/> |
| 21 | + </y:ShapeNode> |
| 22 | + </data> |
| 23 | + </node> |
| 24 | + <node id="n1"> |
| 25 | + <data key="d3"> |
| 26 | + <y:ShapeNode> |
| 27 | + <y:Geometry height="39.0" width="123.04097452934661" x="386.4795127353267" y="24.5"/> |
| 28 | + <y:Fill color="#FFCC00" color2="#FFFF00" transparent="false"/> |
| 29 | + <y:BorderStyle color="#000000" type="line" width="1.0"/> |
| 30 | + <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="20.5166015625" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="103.759765625" x="9.640604452173307" y="9.24169921875">Container_Empty</y:NodeLabel> |
| 31 | + <y:Shape type="roundrectangle"/> |
| 32 | + <y:DropShadow color="#B3A691" offsetX="1" offsetY="1"/> |
| 33 | + </y:ShapeNode> |
| 34 | + </data> |
| 35 | + </node> |
| 36 | + <node id="n2"> |
| 37 | + <data key="d3"> |
| 38 | + <y:ShapeNode> |
| 39 | + <y:Geometry height="39.0" width="123.04097452934667" x="388.4795127353267" y="333.5"/> |
| 40 | + <y:Fill color="#FFCC00" color2="#FFFF00" transparent="false"/> |
| 41 | + <y:BorderStyle color="#000000" type="line" width="1.0"/> |
| 42 | + <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="20.5166015625" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="87.865234375" x="17.587870077173307" y="9.24169921875">Container_Full</y:NodeLabel> |
| 43 | + <y:Shape type="roundrectangle"/> |
| 44 | + <y:DropShadow color="#B3A691" offsetX="1" offsetY="1"/> |
| 45 | + </y:ShapeNode> |
| 46 | + </data> |
| 47 | + </node> |
| 48 | + <node id="n3"> |
| 49 | + <data key="d3"> |
| 50 | + <y:ShapeNode> |
| 51 | + <y:Geometry height="39.0" width="197.0409745293466" x="349.4795127353267" y="179.0"/> |
| 52 | + <y:Fill color="#FFCC00" color2="#FFFF00" transparent="false"/> |
| 53 | + <y:BorderStyle color="#000000" type="line" width="1.0"/> |
| 54 | + <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="13" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="20.5166015625" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="150.77685546875" x="23.132059530298307" y="9.24169921875">Container_Has_Elements</y:NodeLabel> |
| 55 | + <y:Shape type="roundrectangle"/> |
| 56 | + <y:DropShadow color="#B3A691" offsetX="1" offsetY="1"/> |
| 57 | + </y:ShapeNode> |
| 58 | + </data> |
| 59 | + </node> |
| 60 | + <node id="n4"> |
| 61 | + <data key="d3"> |
| 62 | + <y:ShapeNode> |
| 63 | + <y:Geometry height="30.0" width="109.0" x="393.5" y="-80.6"/> |
| 64 | + <y:Fill color="#FFCC00" transparent="false"/> |
| 65 | + <y:BorderStyle color="#000000" type="line" width="1.0"/> |
| 66 | + <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.24609375" modelName="internal" modelPosition="c" textColor="#000000" visible="true" width="101.435546875" x="3.7822265625" y="5.376953125">Model_Configured</y:NodeLabel> |
| 67 | + <y:Shape type="roundrectangle"/> |
| 68 | + </y:ShapeNode> |
| 69 | + </data> |
| 70 | + </node> |
| 71 | + <edge id="e0" source="n4" target="n1"> |
| 72 | + <data key="d6"> |
| 73 | + <y:PolyLineEdge> |
| 74 | + <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> |
| 75 | + <y:LineStyle color="#000000" type="line" width="1.0"/> |
| 76 | + <y:Arrows source="none" target="standard"/> |
| 77 | + <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="278.4296875" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="false" width="242.880859375" x="2.0" y="-101.67597656250001"><name> |
| 78 | +Model_Init |
| 79 | +</name> |
| 80 | + |
| 81 | +<init> |
| 82 | +// Max elements |
| 83 | +const int LIMIT_ELEMENTS = 3; |
| 84 | +// Domain of elements |
| 85 | +static Set<string> elements() |
| 86 | +{ |
| 87 | + Set<string> elementsSet = new Set<string>(); |
| 88 | + for (int i = 0; i < LIMIT_ELEMENTS; ++i) |
| 89 | + { |
| 90 | + elementsSet = elementsSet.Add("e" + (i + 1)); |
| 91 | + } |
| 92 | + return elementsSet; |
| 93 | +} |
| 94 | +</init></y:EdgeLabel> |
| 95 | + <y:BendStyle smoothed="false"/> |
| 96 | + </y:PolyLineEdge> |
| 97 | + </data> |
| 98 | + </edge> |
| 99 | + <edge id="e1" source="n1" target="n3"> |
| 100 | + <data key="d6"> |
| 101 | + <y:PolyLineEdge> |
| 102 | + <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"> |
| 103 | + <y:Point x="475.0" y="125.0"/> |
| 104 | + </y:Path> |
| 105 | + <y:LineStyle color="#000000" type="line" width="1.0"/> |
| 106 | + <y:Arrows source="none" target="standard"/> |
| 107 | + <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="110.72265625" modelName="free" modelPosition="anywhere" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="false" width="193.966796875" x="-53.24272098109384" y="-44.56706196884903"><name> |
| 108 | +empty_add_e |
| 109 | +</name> |
| 110 | + |
| 111 | +<parameters> |
| 112 | +[Domain("elements")] string element |
| 113 | +</parameters></y:EdgeLabel> |
| 114 | + <y:BendStyle smoothed="true"/> |
| 115 | + </y:PolyLineEdge> |
| 116 | + </data> |
| 117 | + </edge> |
| 118 | + <edge id="e2" source="n3" target="n2"> |
| 119 | + <data key="d6"> |
| 120 | + <y:PolyLineEdge> |
| 121 | + <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"> |
| 122 | + <y:Point x="475.0" y="275.0"/> |
| 123 | + </y:Path> |
| 124 | + <y:LineStyle color="#000000" type="line" width="1.0"/> |
| 125 | + <y:Arrows source="none" target="standard"/> |
| 126 | + <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="186.953125" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="false" width="293.974609375" x="44.15275691105768" y="-11.824951171875"><name> |
| 127 | +has_e_add_e_to_full |
| 128 | +</name> |
| 129 | + |
| 130 | +<parameters> |
| 131 | +[Domain("elements")] string element |
| 132 | +</parameters> |
| 133 | + |
| 134 | +<guard> |
| 135 | +// Check if the container will become full after this action |
| 136 | +Elements.container.Count == (LIMIT_ELEMENTS - 1) |
| 137 | +</guard></y:EdgeLabel> |
| 138 | + <y:BendStyle smoothed="true"/> |
| 139 | + </y:PolyLineEdge> |
| 140 | + </data> |
| 141 | + </edge> |
| 142 | + <edge id="e3" source="n2" target="n3"> |
| 143 | + <data key="d6"> |
| 144 | + <y:PolyLineEdge> |
| 145 | + <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"> |
| 146 | + <y:Point x="425.0" y="275.0"/> |
| 147 | + </y:Path> |
| 148 | + <y:LineStyle color="#000000" type="line" width="1.0"/> |
| 149 | + <y:Arrows source="none" target="standard"/> |
| 150 | + <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="110.72265625" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="false" width="193.966796875" x="8.918882712339723" y="-89.1357421875"><name> |
| 151 | +full_remove_e |
| 152 | +</name> |
| 153 | + |
| 154 | +<parameters> |
| 155 | +[Domain("elements")] string element |
| 156 | +</parameters></y:EdgeLabel> |
| 157 | + <y:BendStyle smoothed="true"/> |
| 158 | + </y:PolyLineEdge> |
| 159 | + </data> |
| 160 | + </edge> |
| 161 | + <edge id="e4" source="n3" target="n1"> |
| 162 | + <data key="d6"> |
| 163 | + <y:PolyLineEdge> |
| 164 | + <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"> |
| 165 | + <y:Point x="425.0" y="125.0"/> |
| 166 | + </y:Path> |
| 167 | + <y:LineStyle color="#000000" type="line" width="1.0"/> |
| 168 | + <y:Arrows source="none" target="standard"/> |
| 169 | + <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="110.72265625" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="false" width="193.966796875" x="8.253984616126559" y="-135.561279296875"><name> |
| 170 | +has_e_remove_e_to_empty |
| 171 | +</name> |
| 172 | + |
| 173 | +<parameters> |
| 174 | +[Domain("elements")] string element |
| 175 | +</parameters></y:EdgeLabel> |
| 176 | + <y:BendStyle smoothed="true"/> |
| 177 | + </y:PolyLineEdge> |
| 178 | + </data> |
| 179 | + </edge> |
| 180 | + <edge id="e5" source="n0" target="n4"> |
| 181 | + <data key="d6"> |
| 182 | + <y:PolyLineEdge> |
| 183 | + <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> |
| 184 | + <y:LineStyle color="#000000" type="line" width="1.0"/> |
| 185 | + <y:Arrows source="none" target="standard"/> |
| 186 | + <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="125.96875" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="false" width="110.072265625" x="-10.80517578125" y="1.9999984741210994"><name> |
| 187 | +Model_Config |
| 188 | +</name> |
| 189 | + |
| 190 | +<config> |
| 191 | +modifier: static |
| 192 | +model_type: feature |
| 193 | +</config></y:EdgeLabel> |
| 194 | + <y:BendStyle smoothed="true"/> |
| 195 | + </y:PolyLineEdge> |
| 196 | + </data> |
| 197 | + </edge> |
| 198 | + <edge id="e6" source="n3" target="n3"> |
| 199 | + <data key="d6"> |
| 200 | + <y:PolyLineEdge> |
| 201 | + <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"> |
| 202 | + <y:Point x="575.0" y="147.5"/> |
| 203 | + <y:Point x="575.0" y="250.0"/> |
| 204 | + </y:Path> |
| 205 | + <y:LineStyle color="#000000" type="line" width="1.0"/> |
| 206 | + <y:Arrows source="none" target="standard"/> |
| 207 | + <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="186.953125" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="false" width="327.326171875" x="80.413818359375" y="-73.715576171875"><name> |
| 208 | +has_e_add_e |
| 209 | +</name> |
| 210 | + |
| 211 | +<parameters> |
| 212 | +[Domain("elements")] string element |
| 213 | +</parameters> |
| 214 | + |
| 215 | +<guard> |
| 216 | +// Check that the container will not become full after this action |
| 217 | +Elements.container.Count < (LIMIT_ELEMENTS - 1) |
| 218 | +</guard></y:EdgeLabel> |
| 219 | + <y:BendStyle smoothed="true"/> |
| 220 | + </y:PolyLineEdge> |
| 221 | + </data> |
| 222 | + </edge> |
| 223 | + <edge id="e7" source="n3" target="n3"> |
| 224 | + <data key="d6"> |
| 225 | + <y:PolyLineEdge> |
| 226 | + <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"> |
| 227 | + <y:Point x="325.0" y="250.0"/> |
| 228 | + <y:Point x="325.0" y="150.5"/> |
| 229 | + </y:Path> |
| 230 | + <y:LineStyle color="#000000" type="line" width="1.0"/> |
| 231 | + <y:Arrows source="none" target="standard"/> |
| 232 | + <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="110.72265625" modelName="six_pos" modelPosition="tail" preferredPlacement="anywhere" ratio="0.5" textColor="#000000" visible="false" width="193.966796875" x="-74.424560546875" y="-73.1124267578125"><name> |
| 233 | +has_e_remove_e |
| 234 | +</name> |
| 235 | + |
| 236 | +<parameters> |
| 237 | +[Domain("elements")] string element |
| 238 | +</parameters></y:EdgeLabel> |
| 239 | + <y:BendStyle smoothed="true"/> |
| 240 | + </y:PolyLineEdge> |
| 241 | + </data> |
| 242 | + </edge> |
| 243 | + </graph> |
| 244 | + <data key="d0"> |
| 245 | + <y:Resources/> |
| 246 | + </data> |
| 247 | +</graphml> |
0 commit comments