diagrammi e riduzioni

This commit is contained in:
Francesco Mecca 2020-05-06 18:06:30 +02:00
parent 7117cc6dce
commit 104036d723
15 changed files with 287 additions and 133 deletions

View file

@ -48,7 +48,24 @@ stesso padre nei seguenti modi:
- usando reti WN - usando reti WN
** TODO Riduzione ** Riduzione
Una rete di petri puo` essere ridotta usando le seguendi tecniche:
- fusione
- eliminazione
- rimozione dei loop
Nelle figure vengono mostrate alcune fasi di riduzione della rete in
analisi; in ordine sono stati applicati:
- fusione di alcuni posti
- fusione di alcune transizioni
- eliminazione di alcuni posti
- eliminazione di alcune transizioni
- riduzione di self loop
[[./riduzioni/fusione1.jpg]]
[[./riduzioni/fusione2.jpg]]
[[./riduzioni/eliminazione1.jpg]]
[[./riduzioni/eliminazione2.jpg]]
[[./riduzioni/rimozione1.jpg]]
** TODO P e T invarianti ** TODO P e T invarianti
Tramite GreatSPN possiamo calcolare gli T- e P- semiflussi Tramite GreatSPN possiamo calcolare gli T- e P- semiflussi
@ -194,4 +211,27 @@ associati ciascuno ad un master diverso.
[[./reteD.jpg]] [[./reteD.jpg]]
** TODO P e T invarianti ** TODO P e T invarianti
** TODO Decision Diagram ** Decision Diagram
L'efficacia dei decision diagram sulla generazione dello stato degli
spazi dipende fortemente dall'ordine delle variabili.
Di seguito vengono mostrati i decision diagram usando per le
assegnazioni i seguenti algoritmi:
- Sloan: un algoritmo di riduzione della banda di matrici sparse con
una buona performance
- (advanced) Cuthill-McKee: un altro algoritmo di riduzione della banda di
matrici sparse
- Tovchigrechko e Noack: due algoritmo appositamente ideati per le reti
di Petri, anch'essi con una buona performance
- P-chaining: un algoritmo che sfrutta le informazioni strutturali
della rete ma ha una bassa performance
- Gradient-P
- Gibbs-Poole-Stockmeier: un altro algoritmo matriciale che nella rete
in analisi ha restituito il risultato peggiore
[[./diagrammi/sloan.jpg]]
[[./diagrammi/mckee.jpg]]
[[./diagrammi/tovchi.jpg]]
[[./diagrammi/noack.jpg]]
[[./diagrammi/p-chain.jpg]]
[[./diagrammi/gradient.jpg]]
[[./diagrammi/gibbs.jpg]]

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View file

@ -4,148 +4,260 @@ digraph structs {
subgraph cluster1 { style=invis; subgraph cluster1 { style=invis;
node [shape=record, height=0.8, width=0.5, fontsize=50, penwidth=4, fillcolor=white, style=filled]; node [shape=record, height=0.8, width=0.5, fontsize=50, penwidth=4, fillcolor=white, style=filled];
edge [arrowhead=vee, minlen=1, penwidth=4, color=blue]; edge [arrowhead=vee, minlen=1, penwidth=4, color=blue];
n89 [label="<i0>0|<i1>1"]; n165 [label="<i0>0|<i1>1"];
n89:i0 -> n85:n; n165:i0 -> n164:n;
n89:i1 -> n88:n; n165:i1 -> n154:n;
n85 [label="<i0>0|<i1>1"]; n164 [label="<i0>0|<i1>1"];
n85:i0 -> n84:n; n164:i0 -> n163:n;
n85:i1 -> n77:n; n164:i1 -> n153:n;
n84 [label="<i0>0|<i1>1"]; n163 [label="<i0>0|<i1>1"];
n84:i0 -> n83:n; n163:i0 -> n162:n;
n84:i1 -> n76:n; n163:i1 -> n155:n;
n83 [label="<i1>1"]; n162 [label="<i0>0|<i1>1"];
n83:i1 -> n82:n; n162:i0 -> n157:n;
n82 [label="<i0>0|<i1>1"]; n162:i1 -> n120:n;
n82:i0 -> n81:n; n157 [label="<i0>0|<i1>1"];
n82:i1 -> n70:n; n157:i0 -> n156:n;
n81 [label="<i0>0|<i1>1"]; n157:i1 -> n117:n;
n81:i0 -> n80:n; n156 [label="<i1>1"];
n81:i1 -> n66:n; n156:i1 -> n26:n;
n80 [label="<i0>0|<i1>1"]; n26 [label="<i0>0|<i1>1"];
n80:i0 -> n79:n; n26:i0 -> n49:n;
n80:i1 -> n68:n; n26:i1 -> n122:n;
n79 [label="<i0>0"]; n49 [label="<i0>0|<i1>1"];
n79:i0 -> n78:n; n49:i0 -> n149:n;
n78 [label="<i0>0|<i1>1"]; n49:i1 -> n151:n;
n78:i0 -> n59:n; n149 [label="<i0>0|<i1>1"];
n78:i1 -> n63:n; n149:i0 -> n145:n;
n59 [label="<i1>1"]; n149:i1 -> n147:n;
n59:i1 -> n58:n; n145 [label="<i0>0|<i1>1"];
n58 [label="<i0>0|<i1>1"]; n145:i0 -> n134:n;
n58:i0 -> n52:n; n145:i1 -> n144:n;
n58:i1 -> n57:n; n134 [label="<i0>0|<i1>1"];
n52 [label="<i0>0|<i1>1"]; n134:i0 -> n132:n;
n52:i0 -> n51:n; n134:i1 -> n133:n;
n52:i1 -> n42:n; n132 [label="<i1>1"];
n51 [label="<i0>0|<i1>1"]; n132:i1 -> n131:n;
n51:i0 -> n50:n; n131 [label="<i0>0|<i1>1"];
n51:i1 -> n41:n; n131:i0 -> n130:n;
n50 [label="<i0>0"]; n131:i1 -> n59:n;
n50:i0 -> n49:n; n130 [label="<i0>0"];
n49 [label="<i0>0"]; n130:i0 -> n129:n;
n49:i0 -> n48:n; n129 [label="<i0>0"];
n48 [label="<i1>1"]; n129:i0 -> n128:n;
n48:i1 -> n47:n; n128 [label="<i0>0|<i1>1"];
n47 [label="<i0>0|<i1>1"]; n128:i0 -> n126:n;
n47:i0 -> n46:n; n128:i1 -> n127:n;
n47:i1 -> n30:n; n126 [label="<i1>1"];
n46 [label="<i0>0|<i1>1"]; n126:i1 -> n5:n;
n46:i0 -> n45:n; n5 [label="<i0>0"];
n46:i1 -> n29:n; n5:i0 -> n4:n;
n45 [label="<i0>0|<i1>1"]; n4 [label="<i0>0"];
n45:i0 -> n44:n; n4:i0 -> n3:n;
n45:i1 -> n25:n; n3 [label="<i0>0"];
n44 [label="<i0>0"]; n3:i0 -> n2:n;
n44:i0 -> n43:n; n2 [label="<i0>0"];
n43 [label="<i0>0|<i1>1"]; n2:i0 -> n1:n;
n43:i0 -> n1:n;
n43:i1 -> n23:n;
n1 [label="<i1>1"]; n1 [label="<i1>1"];
n23 [label="<i0>0"]; n127 [label="<i1>1"];
n25 [label="<i0>0"]; n127:i1 -> n55:n;
n25:i0 -> n24:n;
n24 [label="<i0>0"];
n24:i0 -> n23:n;
n29 [label="<i0>0"];
n29:i0 -> n28:n;
n28 [label="<i1>1"];
n28:i1 -> n24:n;
n30 [label="<i0>0"];
n30:i0 -> n29:n;
n41 [label="<i0>0|<i1>1"];
n41:i0 -> n40:n;
n41:i1 -> n39:n;
n40 [label="<i1>1"];
n40:i1 -> n38:n;
n38 [label="<i0>0"];
n38:i0 -> n37:n;
n37 [label="<i0>0"];
n37:i0 -> n30:n;
n39 [label="<i0>0"];
n39:i0 -> n38:n;
n42 [label="<i0>0"];
n42:i0 -> n41:n;
n57 [label="<i0>0"];
n57:i0 -> n56:n;
n56 [label="<i0>0"];
n56:i0 -> n55:n;
n55 [label="<i0>0"]; n55 [label="<i0>0"];
n55:i0 -> n54:n; n55:i0 -> n54:n;
n54 [label="<i0>0"]; n54 [label="<i0>0"];
n54:i0 -> n53:n; n54:i0 -> n53:n;
n53 [label="<i0>0"]; n53 [label="<i0>0"];
n53:i0 -> n47:n; n53:i0 -> n31:n;
n63 [label="<i0>0"]; n31 [label="<i0>0"];
n63:i0 -> n58:n; n31:i0 -> n30:n;
n68 [label="<i1>1"]; n30 [label="<i0>0"];
n68:i1 -> n64:n; n59 [label="<i0>0"];
n64 [label="<i0>0"]; n59:i0 -> n58:n;
n64:i0 -> n63:n; n58 [label="<i0>0"];
n66 [label="<i0>0"]; n58:i0 -> n57:n;
n66:i0 -> n65:n; n57 [label="<i0>0|<i1>1"];
n65 [label="<i0>0"]; n57:i0 -> n6:n;
n65:i0 -> n64:n; n57:i1 -> n56:n;
n70 [label="<i0>0"]; n6 [label="<i0>0"];
n70:i0 -> n69:n; n6:i0 -> n5:n;
n69 [label="<i0>0"]; n56 [label="<i0>0"];
n69:i0 -> n68:n; n56:i0 -> n55:n;
n76 [label="<i0>0"]; n133 [label="<i0>0"];
n76:i0 -> n75:n; n133:i0 -> n131:n;
n75 [label="<i0>0"]; n144 [label="<i0>0"];
n75:i0 -> n70:n; n144:i0 -> n143:n;
n77 [label="<i0>0"]; n143 [label="<i0>0"];
n77:i0 -> n76:n; n143:i0 -> n142:n;
n88 [label="<i0>0"]; n142 [label="<i0>0|<i1>1"];
n142:i0 -> n141:n;
n142:i1 -> n44:n;
n141 [label="<i0>0|<i1>1"];
n141:i0 -> n137:n;
n141:i1 -> n140:n;
n137 [label="<i0>0"];
n137:i0 -> n136:n;
n136 [label="<i0>0"];
n136:i0 -> n135:n;
n135 [label="<i1>1"];
n135:i1 -> n35:n;
n35 [label="<i0>0"];
n35:i0 -> n34:n;
n34 [label="<i1>1"];
n34:i1 -> n33:n;
n33 [label="<i0>0|<i1>1"];
n33:i0 -> n32:n;
n33:i1 -> n31:n;
n32 [label="<i1>1"];
n32:i1 -> n30:n;
n140 [label="<i0>0"];
n140:i0 -> n139:n;
n139 [label="<i0>0"];
n139:i0 -> n138:n;
n138 [label="<i1>1"];
n138:i1 -> n40:n;
n40 [label="<i0>0"];
n40:i0 -> n39:n;
n39 [label="<i0>0"];
n39:i0 -> n33:n;
n44 [label="<i0>0|<i1>1"];
n44:i0 -> n38:n;
n44:i1 -> n43:n;
n38 [label="<i0>0"];
n38:i0 -> n37:n;
n37 [label="<i0>0"];
n37:i0 -> n36:n;
n36 [label="<i0>0"];
n36:i0 -> n35:n;
n43 [label="<i0>0"];
n43:i0 -> n42:n;
n42 [label="<i0>0"];
n42:i0 -> n41:n;
n41 [label="<i0>0"];
n41:i0 -> n40:n;
n147 [label="<i0>0"];
n147:i0 -> n146:n;
n146 [label="<i0>0"];
n146:i0 -> n133:n;
n151 [label="<i0>0"];
n151:i0 -> n150:n;
n150 [label="<i1>1"];
n150:i1 -> n146:n;
n122 [label="<i0>0"];
n122:i0 -> n151:n;
n117 [label="<i0>0"];
n117:i0 -> n26:n;
n120 [label="<i0>0"];
n120:i0 -> n119:n;
n119 [label="<i0>0"];
n119:i0 -> n118:n;
n118 [label="<i0>0|<i1>1"];
n118:i0 -> n115:n;
n118:i1 -> n116:n;
n115 [label="<i0>0|<i1>1"];
n115:i0 -> n110:n;
n115:i1 -> n112:n;
n110 [label="<i0>0|<i1>1"];
n110:i0 -> n106:n;
n110:i1 -> n108:n;
n106 [label="<i0>0|<i1>1"];
n106:i0 -> n93:n;
n106:i1 -> n105:n;
n93 [label="<i0>0|<i1>1"];
n93:i0 -> n91:n;
n93:i1 -> n92:n;
n91 [label="<i1>1"];
n91:i1 -> n90:n;
n90 [label="<i0>0"];
n90:i0 -> n89:n;
n89 [label="<i0>0"];
n89:i0 -> n88:n;
n88 [label="<i0>0|<i1>1"];
n88:i0 -> n87:n; n88:i0 -> n87:n;
n87 [label="<i0>0"]; n88:i1 -> n57:n;
n87:i0 -> n86:n; n87 [label="<i0>0|<i1>1"];
n87:i0 -> n84:n;
n87:i1 -> n86:n;
n84 [label="<i0>0"];
n84:i0 -> n83:n;
n83 [label="<i1>1"];
n83:i1 -> n4:n;
n86 [label="<i0>0"]; n86 [label="<i0>0"];
n86:i0 -> n82:n; n86:i0 -> n85:n;
n85 [label="<i1>1"];
n85:i1 -> n54:n;
n92 [label="<i0>0"];
n92:i0 -> n90:n;
n105 [label="<i0>0"];
n105:i0 -> n104:n;
n104 [label="<i0>0"];
n104:i0 -> n103:n;
n103 [label="<i0>0"];
n103:i0 -> n102:n;
n102 [label="<i0>0|<i1>1"];
n102:i0 -> n97:n;
n102:i1 -> n101:n;
n97 [label="<i0>0|<i1>1"];
n97:i0 -> n96:n;
n97:i1 -> n37:n;
n96 [label="<i0>0"];
n96:i0 -> n95:n;
n95 [label="<i0>0"];
n95:i0 -> n94:n;
n94 [label="<i1>1"];
n94:i1 -> n34:n;
n101 [label="<i0>0|<i1>1"];
n101:i0 -> n100:n;
n101:i1 -> n42:n;
n100 [label="<i0>0"];
n100:i0 -> n99:n;
n99 [label="<i0>0"];
n99:i0 -> n98:n;
n98 [label="<i1>1"];
n98:i1 -> n39:n;
n108 [label="<i0>0"];
n108:i0 -> n107:n;
n107 [label="<i0>0"];
n107:i0 -> n92:n;
n112 [label="<i0>0"];
n112:i0 -> n111:n;
n111 [label="<i1>1"];
n111:i1 -> n107:n;
n116 [label="<i0>0"];
n116:i0 -> n112:n;
n155 [label="<i0>0"];
n155:i0 -> n148:n;
n148 [label="<i0>0"];
n148:i0 -> n117:n;
n153 [label="<i0>0"];
n153:i0 -> n152:n;
n152 [label="<i1>1"];
n152:i1 -> n148:n;
n154 [label="<i0>0"];
n154:i0 -> n153:n;
} }
subgraph cluster2 { style=invis; subgraph cluster2 { style=invis;
node [shape=none, fontsize=60, margin="0.5,0.1"]; node [shape=none, fontsize=60, margin="0.5,0.1"];
P12 [label="S0"]; P1 [label="S0"];
P9 [label="S1_a"]; P3 [label="S1_a"];
P11 [label="S1_b"]; P4 [label="S1_b"];
P8 [label="S2_a"]; P2 [label="S2_a"];
P10 [label="S2_b"]; P9 [label="S2_b"];
P7 [label="S3"]; P7 [label="S3"];
P22 [label="R0"]; P10 [label="R0"];
P21 [label="R1"]; P8 [label="R1"];
P20 [label="R2"]; P5 [label="R2"];
P19 [label="R3"]; P6 [label="R3"];
P1 [label="M0"]; P11 [label="M0"];
P4 [label="M1"]; P12 [label="M1"];
P3 [label="M2"]; P13 [label="M2"];
P2 [label="M3"]; P14 [label="M3"];
P6 [label="Buffer_s"]; P15 [label="Buffer_s"];
P5 [label="Risultato"]; P16 [label="Risultato"];
P13 [label="M0_2"]; P17 [label="M0_2"];
P17 [label="M1_2"]; P18 [label="M1_2"];
P15 [label="M2_2"]; P19 [label="M2_2"];
P14 [label="M3_2"]; P20 [label="M3_2"];
P18 [label="Buffer_2"]; P21 [label="Buffer_2"];
P16 [label="Risultato_2"]; P22 [label="Risultato_2"];
} }
{rank=same n89 P22} -> {rank=same n85 n88 P21} -> {rank=same n84 n77 n87 P20} -> {rank=same n83 n76 n86 P19} -> {rank=same n82 n75 P18} -> {rank=same n81 n70 P17} -> {rank=same n80 n66 n69 P16} -> {rank=same n79 n68 n65 P15} -> {rank=same n78 n64 P14} -> {rank=same n59 n63 P13} -> {rank=same n58 P12} -> {rank=same n52 n57 P11} -> {rank=same n51 n42 n56 P10} -> {rank=same n50 n41 n55 P9} -> {rank=same n49 n40 n39 n54 P8} -> {rank=same n48 n38 n53 P7} -> {rank=same n47 n37 P6} -> {rank=same n46 n30 P5} -> {rank=same n45 n29 P4} -> {rank=same n44 n25 n28 P3} -> {rank=same n43 n24 P2} -> {rank=same n1 n23 P1} [style=invis] {rank=same n165 P22} -> {rank=same n164 n154 P21} -> {rank=same n163 n153 P20} -> {rank=same n162 n155 n152 P19} -> {rank=same n157 n120 n148 P18} -> {rank=same n156 n117 n119 P17} -> {rank=same n26 n118 P16} -> {rank=same n49 n122 n115 n116 P15} -> {rank=same n149 n151 n110 n112 P14} -> {rank=same n145 n147 n150 n106 n108 n111 P13} -> {rank=same n134 n144 n146 n93 n105 n107 P12} -> {rank=same n132 n133 n143 n91 n92 n104 P11} -> {rank=same n131 n142 n90 n103 P10} -> {rank=same n130 n59 n141 n44 n89 n102 P9} -> {rank=same n129 n58 n137 n140 n38 n43 n88 n97 n101 P8} -> {rank=same n128 n57 n136 n139 n37 n42 n87 n96 n100 P7} -> {rank=same n126 n127 n6 n56 n135 n138 n36 n41 n84 n86 n95 n99 P6} -> {rank=same n5 n55 n35 n40 n83 n85 n94 n98 P5} -> {rank=same n4 n54 n34 n39 P4} -> {rank=same n3 n53 n33 P3} -> {rank=same n2 n31 n32 P2} -> {rank=same n1 n30 P1} [style=invis]
} }

View file

@ -9,6 +9,8 @@
- [ ] analisi - [ ] analisi
- [ ] uppal - [ ] uppal
- [ ] controlla esercizi nuovi - [ ] controlla esercizi nuovi
- [ ] Chiedi perche` non riesci a riprodurre ivariable ordering
mostrati da euristica
- [ ] Controlla bene e studia Symbolic Reachability Graph: perche` - [ ] Controlla bene e studia Symbolic Reachability Graph: perche`
cosi` buono? cosi` buono?