Skip to content

Commit

Permalink
analysis prototypes
Browse files Browse the repository at this point in the history
  • Loading branch information
kyuhyongpark committed Sep 7, 2023
1 parent 2822121 commit de767c8
Show file tree
Hide file tree
Showing 5 changed files with 1,143 additions and 8 deletions.
17 changes: 9 additions & 8 deletions analysis/SD_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from nfvsmotifs.SuccessionDiagram import SuccessionDiagram
import nfvsmotifs

LOG_LOCATION = 'SD_analysis_'+sys.argv[1].split('/')[-2]+'.txt'
LOG_LOCATION = 'SD_analysis_'+sys.argv[1].split('/')[-2]+'.csv'

# Print progress and succession diagram size.
nfvsmotifs.SuccessionDiagram.DEBUG = True
Expand Down Expand Up @@ -38,13 +38,14 @@
print(f"SD depth, {sd.depth()} ")
print(f"attractors, {attractor_count}")
print(f"motif avoidant attactors, {motif_avoidant_count}")
print(f"minimal trapspaces, {len(sd.minimal_trap_spaces())}")

log = open(LOG_LOCATION, 'a')
log.write(sys.argv[1].split('/')[-1] + ',') # model name
log.write(str(bn.num_vars()) + ',') # network size
log.write(str(len(sd)) + ',') # SD size
log.write(str(sd.depth()) + ',') # SD depth
log.write(str(attractor_count) + ',') # number of attractors
log.write(str(motif_avoidant_count) + '\n') # number of motif avoidant attractors

log.write(sys.argv[1].split('/')[-1] + ',') # model name
log.write(str(bn.num_vars()) + ',') # network size
log.write(str(len(sd)) + ',') # SD size
log.write(str(sd.depth()) + ',') # SD depth
log.write(str(attractor_count) + ',') # number of attractors
log.write(str(motif_avoidant_count) + ',') # number of motif avoidant attractors
log.write(str(len(sd.minimal_trap_spaces())) + '\n') # number of minimal trapspaces

112 changes: 112 additions & 0 deletions analysis/bbm-identity-prototype.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name,N,sd size,depth,attractors,motif-avoidant-attractors,minimal trapspaces
003.bnet,20,5,2,,,
005.bnet,28,7,4,,,
007.bnet,5,3,1,,,
008.bnet,28,53,4,,,
010.bnet,15,9,2,,,
011.bnet,44,65,3,,,
013.bnet,34,6,2,,,
015.bnet,16,5,1,,,
020.bnet,41,18,3,,,
021.bnet,17,17,3,,,
022.bnet,22,97,4,,,
023.bnet,10,4,2,,,
024.bnet,20,35,3,,,
026.bnet,18,1,0,,,
028.bnet,18,257,1,,,
029.bnet,11,5,1,,,
030.bnet,24,65,1,,,
031.bnet,9,2,1,,,
032.bnet,40,10,2,,,
040.bnet,23,59,3,,,
042.bnet,24,1025,1,,,
043.bnet,33,9,3,,,
044.bnet,26,21,4,,,
047.bnet,23,513,1,,,
049.bnet,19,3,1,,,
051.bnet,70,27,5,,,
053.bnet,15,9,2,,,
054.bnet,62,5,2,,,
055.bnet,19,6,3,,,
057.bnet,15,3,2,,,
058.bnet,14,1,0,,,
060.bnet,49,65,2,,,
061.bnet,26,10,3,,,
063.bnet,13,11,2,,,
064.bnet,12,73,3,,,
065.bnet,32,15,3,,,
067.bnet,13,19,2,,,
068.bnet,23,49,2,,,
069.bnet,22,5,1,,,
070.bnet,53,43,4,,,
073.bnet,33,48,5,,,
074.bnet,18,5,2,,,
076.bnet,51,58,5,,,
081.bnet,42,5,1,,,
085.bnet,27,25,2,,,
086.bnet,20,15,3,,,
088.bnet,6,4,1,,,
089.bnet,17,39,4,,,
090.bnet,18,49,4,,,
091.bnet,16,43,4,,,
095.bnet,10,51,5,,,
096.bnet,20,5,2,,,
097.bnet,10,5,1,,,
099.bnet,19,58,3,,,
100.bnet,21,9,1,,,
102.bnet,22,89,3,,,
104.bnet,14,23,3,,,
107.bnet,33,12,4,,,
108.bnet,25,13,3,,,
109.bnet,5,2,1,,,
110.bnet,9,3,1,,,
119.bnet,19,65,1,,,
129.bnet,34,3,1,,,
133.bnet,10,21,3,,,
134.bnet,38,10,2,,,
135.bnet,30,5,1,,,
136.bnet,28,11,2,,,
141.bnet,45,5,1,,,
145.bnet,62,3,1,,,
147.bnet,16,87,2,,,
148.bnet,83,2,1,,,
149.bnet,14,6,2,,,
150.bnet,33,55,5,,,
153.bnet,18,6,2,,,
154.bnet,21,44,4,,,
158.bnet,7,3,1,,,
161.bnet,96,5,1,,,
162.bnet,18,513,2,,,
165.bnet,8,33,2,,,
168.bnet,13,65,1,,,
169.bnet,7,5,1,,,
170.bnet,7,11,2,,,
171.bnet,7,9,3,,,
172.bnet,7,17,3,,,
174.bnet,19,54,4,,,
176.bnet,49,7,2,,,
177.bnet,34,47,4,,,
178.bnet,48,46,4,,,
180.bnet,12,5,2,,,
181.bnet,13,7,4,,,
182.bnet,14,23,6,,,
183.bnet,35,63,4,,,
184.bnet,6,5,3,,,
185.bnet,15,56,3,,,
186.bnet,10,49,3,,,
189.bnet,6,5,2,,,
190.bnet,37,33,1,,,
191.bnet,19,12,2,,,
193.bnet,30,17,3,,,
198.bnet,11,7,3,,,
199.bnet,30,20,3,,,
200.bnet,26,7,3,,,
201.bnet,33,13,3,,,
202.bnet,31,8,4,,,
203.bnet,40,10,3,,,
204.bnet,77,4,2,,,
205.bnet,45,25,2,,,
208.bnet,15,14,4,,,
210.bnet,144,2,1,,,
211.bnet,183,3,2,,,
212.bnet,16,15,2,,,
211 changes: 211 additions & 0 deletions analysis/bbm-true-prototype.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
name,N,sd size,depth,attractors,motifavoidantattractors,minimal trapspaces
001.bnet,321,1,0,1,0,1
002.bnet,139,10656,,24,0,24
003.bnet,20,1,0,1,0,1
004.bnet,247,17620,,352,0,352
005.bnet,28,7,4,1,0,1
006.bnet,68,1,0,1,0,1
007.bnet,5,3,1,2,0,2
008.bnet,28,5,2,3,0,3
009.bnet,73,1,0,1,0,1
010.bnet,15,1,0,1,0,1
011.bnet,44,8,2,2,0,2
012.bnet,101,1,0,1,0,1
013.bnet,34,1,0,1,0,1
014.bnet,61,4,2,2,0,2
015.bnet,16,1,0,1,0,1
016.bnet,118,1,0,1,0,1
017.bnet,50,6,2,3,0,3
018.bnet,104,2,1,1,0,1
019.bnet,86,1,0,1,0,1
020.bnet,41,6,2,2,0,2
021.bnet,17,1,0,1,0,1
022.bnet,22,1,0,1,0,1
023.bnet,10,1,0,1,0,1
024.bnet,20,1,0,1,0,1
025.bnet,60,4,2,2,0,2
026.bnet,18,1,0,1,0,1
027.bnet,26,1,0,1,0,1
028.bnet,18,1,0,1,0,1
029.bnet,11,1,0,1,0,1
030.bnet,24,1,0,1,0,1
031.bnet,9,2,1,1,0,1
032.bnet,40,2,1,1,0,1
033.bnet,24,432,,36,0,36
034.bnet,23,6680,,180,0,180
035.bnet,16,6,2,3,0,3
036.bnet,16,30,4,8,0,8
037.bnet,16,240,7,27,0,27
038.bnet,25,1809,,22,0,22
039.bnet,138,3,1,2,0,2
040.bnet,23,3,1,2,0,2
041.bnet,131,1,0,1,0,1
042.bnet,24,1,0,1,0,1
043.bnet,33,9,3,3,0,3
044.bnet,26,5,2,2,0,2
045.bnet,24,1,0,1,0,1
046.bnet,53,119,,17,0,17
047.bnet,23,1,0,1,0,1
048.bnet,73,1,0,1,0,1
049.bnet,19,1,0,1,0,1
050.bnet,188,18,,6,0,6
051.bnet,70,13,4,5,0,5
052.bnet,31,3,1,2,0,2
053.bnet,15,1,0,1,0,1
054.bnet,62,1,0,1,0,1
055.bnet,19,6,3,3,0,3
056.bnet,91,2,1,1,0,1
057.bnet,15,3,2,1,0,1
058.bnet,14,1,0,1,0,1
059.bnet,67,1,0,1,0,1
060.bnet,49,3,1,2,0,2
061.bnet,26,2,1,1,0,1
062.bnet,18,1,0,1,0,1
063.bnet,13,1,0,1,0,1
064.bnet,12,3,1,2,0,2
065.bnet,32,4,1,3,0,3
066.bnet,38,4,2,2,0,2
067.bnet,13,1,0,1,0,1
068.bnet,23,3,1,2,0,2
069.bnet,22,1,0,1,0,1
070.bnet,53,1,0,1,0,1
071.bnet,42,1,0,1,0,1
072.bnet,81,3,1,2,0,2
073.bnet,33,11,2,4,0,4
074.bnet,18,5,2,3,0,3
075.bnet,47,4,,1,0,1
076.bnet,51,1,0,1,0,1
077.bnet,66,1,0,1,0,1
078.bnet,164,8,3,1,0,1
079.bnet,197,475,,4,0,4
080.bnet,110,1,0,1,0,1
081.bnet,42,1,0,1,0,1
082.bnet,128,1,0,1,0,1
083.bnet,133,3,2,1,0,1
084.bnet,81,8,3,1,0,1
085.bnet,27,1,0,1,0,1
086.bnet,20,4,1,3,0,3
087.bnet,133,1,0,1,0,1
088.bnet,6,4,1,3,0,3
089.bnet,17,1,0,1,0,1
090.bnet,18,1,0,1,0,1
091.bnet,16,1,0,1,0,1
092.bnet,69,1,0,1,0,1
093.bnet,66,1,0,1,0,1
094.bnet,31,1,0,1,0,1
095.bnet,10,4,2,1,0,1
096.bnet,20,1,0,1,0,1
097.bnet,10,1,0,1,0,1
098.bnet,42,1,0,1,0,1
099.bnet,19,7,2,3,0,3
100.bnet,21,1,0,1,0,1
101.bnet,85,8,3,1,0,1
102.bnet,22,2,1,1,0,1
103.bnet,69,6,2,2,0,2
104.bnet,14,3,2,1,0,1
105.bnet,49,16,4,1,0,1
106.bnet,80,8,3,1,0,1
107.bnet,33,9,3,3,0,3
108.bnet,25,5,2,2,0,2
109.bnet,5,2,1,1,0,1
110.bnet,9,3,1,2,0,2
111.bnet,33,1,0,1,0,1
112.bnet,112,3,1,2,0,2
113.bnet,182,2268,,120,0,120
114.bnet,84,378,,40,0,40
115.bnet,35,1,0,1,0,1
116.bnet,144,18,3,6,0,6
117.bnet,47,3,1,2,0,2
118.bnet,121,3,1,2,0,2
119.bnet,19,1,0,1,0,1
120.bnet,150,3,1,2,0,2
121.bnet,57,42,4,10,0,10
123.bnet,60,27,3,8,0,8
124.bnet,252,3,1,2,0,2
125.bnet,51,3,1,2,0,2
126.bnet,42,162,5,24,0,24
127.bnet,79,1,0,1,0,1
128.bnet,90,3,1,2,0,2
129.bnet,34,1,0,1,0,1
130.bnet,77,1,0,1,0,1
131.bnet,21,1,0,1,0,1
132.bnet,148,3,1,2,0,2
133.bnet,10,9,2,4,0,4
134.bnet,38,1,0,1,0,1
135.bnet,30,1,0,1,0,1
136.bnet,28,2,1,1,0,1
137.bnet,82,1,0,1,0,1
138.bnet,31,1,0,1,0,1
139.bnet,19,3,1,2,0,2
140.bnet,80,9,2,4,0,4
141.bnet,45,1,0,1,0,1
142.bnet,29,18,3,6,0,6
143.bnet,97,5832,,216,0,216
145.bnet,62,1,0,1,0,1
146.bnet,50,416,,7,0,7
147.bnet,16,2,1,1,0,1
148.bnet,83,4,1,1,0,1
149.bnet,14,7,0,1,0,1
150.bnet,33,12,3,5,0,5
151.bnet,133,54,2,2,0,2
152.bnet,53,29,2,2,0,2
153.bnet,18,2,1,1,0,1
154.bnet,21,11,1,2,0,2
155.bnet,71,81,2,4,0,4
156.bnet,36,9,2,4,0,4
157.bnet,103,3,0,1,0,1
158.bnet,7,3,1,2,0,2
159.bnet,39,84,,7,0,7
160.bnet,92,177,,18,0,18
161.bnet,96,12,0,1,0,1
162.bnet,18,3,1,2,0,2
163.bnet,34,3,1,2,0,2
164.bnet,24,375,5,24,0,24
165.bnet,8,3,1,2,0,2
166.bnet,19,1,0,1,0,1
167.bnet,57,18,2,4,0,4
168.bnet,13,1,0,1,0,1
169.bnet,7,1,0,1,0,1
170.bnet,7,1,0,1,0,1
171.bnet,7,4,2,2,0,2
172.bnet,7,9,2,4,0,4
173.bnet,76,3,1,2,0,2
174.bnet,19,54,4,13,0,13
175.bnet,41,102,5,15,0,15
176.bnet,49,2,0,1,0,1
177.bnet,34,3,1,2,0,2
178.bnet,48,3,1,2,0,2
179.bnet,56,1,0,1,0,1
180.bnet,12,15,1,2,0,2
181.bnet,13,1,0,1,0,1
182.bnet,14,4,2,1,0,1
183.bnet,35,7,2,2,0,2
184.bnet,6,3,2,1,0,1
185.bnet,15,8,2,3,0,3
186.bnet,10,7,2,3,0,3
187.bnet,19,8,2,3,0,3
188.bnet,37,64,4,9,0,9
189.bnet,6,3,1,2,0,2
190.bnet,37,2,0,1,0,1
191.bnet,19,6,1,2,0,2
192.bnet,102,3503,,,,65
193.bnet,30,98,2,4,0,4
194.bnet,106,93,2,3,0,3
195.bnet,216,783,,48,0,48
196.bnet,61,9,3,4,0,4
197.bnet,56,214,,16,0,16
198.bnet,11,7,3,4,0,4
199.bnet,30,20,3,7,0,7
200.bnet,26,4,2,2,0,2
201.bnet,33,4,2,2,0,2
202.bnet,31,5,3,2,0,2
203.bnet,40,11,2,3,0,3
204.bnet,77,2,1,1,0,1
205.bnet,45,1,0,1,0,1
206.bnet,41,3,1,2,0,2
207.bnet,103,18,3,4,0,4
208.bnet,15,14,4,5,0,5
209.bnet,87,2,1,1,0,1
210.bnet,144,2,1,,,1
211.bnet,183,3,2,,,1
212.bnet,16,2,1,1,0,1
Loading

1 comment on commit de767c8

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report
FileStmtsMissCoverMissing
nfvsmotifs
   SuccessionDiagram.py154497%6–7, 208, 452
   control.py1201389%47, 56, 60, 66, 80, 89–105, 319, 334
   interaction_graph_utils.py142894%6–9, 57, 70, 95–96
   motif_avoidant.py163696%23–24, 130, 147, 184, 309
   petri_net_translation.py84693%23–24, 52, 63–64, 94
   pyeda_utils.py953464%12, 56–66, 90, 95, 98–112, 140–144
   space_utils.py118596%15–16, 198, 213, 270
   state_utils.py681282%15, 55–66, 98, 105, 114
   terminal_restriction_space.py44393%6–7, 80
   trappist_core.py1862089%10–11, 39, 41, 81, 127, 192, 194, 196, 231–233, 259, 317, 319, 349, 389, 391, 422, 451
nfvsmotifs/FVSpython3
   FVS.py481079%90–91, 97, 133, 183–189
   FVS_localsearch_10_python.py90199%179
nfvsmotifs/_sd_algorithms
   compute_attractor_seeds.py29197%6
   expand_attractor_seeds.py51492%6, 95–100
   expand_bfs.py28196%6
   expand_dfs.py30197%6
   expand_minimal_spaces.py37197%6
   expand_to_target.py30390%6, 37, 42
TOTAL161413392% 

Tests Skipped Failures Errors Time
360 0 💤 0 ❌ 0 🔥 3m 4s ⏱️

Please sign in to comment.