Skip to content

Commit b30a8c1

Browse files
committed
bug fixed
1 parent 31eb518 commit b30a8c1

26 files changed

+2501
-641
lines changed

model.csl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CodY=20
1+
gbg = 50
22

33
// get the probability by other means
44
// here we just want a binary property

model.ragtimer

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
codY flache SigD_hag hag CodY_flache CodY_hag CodY SigD Hag
2-
1 1 1 1 1 1 10 10 10
3-
-1 -1 -1 -1 -1 -1 20 -1 -1
4-
R1 codY > codY CodY 0.1
5-
R2 CodY > 0 0.0002
6-
R3 flache > flache SigD 1.0
7-
R4 SigD > 0 0.0002
8-
R5 SigD_hag > SigD hag Hag 1.0
9-
R6 Hag > 0 0.0002
10-
R7 SigD hag > SigD_hag 0.01
11-
R8 SigD_hag > SigD hag 0.1
12-
R9 CodY flache > CodY_flache 0.02
13-
R10 CodY_flache > CodY flache 0.1
14-
R11 CodY hag > CodY_hag 0.01
15-
R12 CodY_hag > CodY hag 0.1
1+
r l rl g ga gbg gd
2+
50 2 0 50 0 0 0
3+
-1 -1 -1 -1 -1 50 -1
4+
r1 0 > r 0.0038
5+
r2 r > 0 0.0004
6+
r3 r l > rl l 0.042
7+
r4 rl > r 0.010
8+
r5 rl g > ga gbg 0.011
9+
r6 ga > gd 0.100
10+
r7 gbg gd > g 1050
11+
r8 0 > rl 3.21

model.sm

Lines changed: 29 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,31 @@
11
ctmc
22

3-
const int var_bound = 20;
4-
5-
const double k1 = 0.1;
6-
const double k2 = 0.0002;
7-
const double k3 = 1;
8-
const double k4 = 0.0002;
9-
const double k5 = 1;
10-
const double k6 = 0.0002;
11-
const double k7 = 0.01;
12-
const double k8 = 0.1;
13-
const double k9 = 0.02;
14-
const double k10 = 0.1;
15-
const double k11 = 0.01;
16-
const double k12 = 0.1;
17-
18-
module motility
19-
20-
codY : [0..var_bound] init 1;
21-
flache : [0..var_bound] init 1;
22-
SigD_hag : [0..var_bound] init 1;
23-
hag : [0..var_bound] init 1;
24-
CodY_flache : [0..var_bound] init 1;
25-
CodY_hag : [0..var_bound] init 1;
26-
CodY : [0..var_bound] init 10;
27-
SigD : [0..var_bound] init 10;
28-
Hag : [0..var_bound] init 10;
29-
30-
[R1] codY>0 & CodY<var_bound -> (k1*codY) : (CodY'=CodY+1);
31-
[R2] CodY>0 -> (k2*CodY) : (CodY'=CodY-1);
32-
[R3] flache>0 & SigD<var_bound -> (k3*flache) : (SigD'=SigD+1);
33-
[R4] SigD>0 -> (k4*SigD) : (SigD'=SigD-1);
34-
[R5] SigD_hag>0 & SigD<var_bound & hag<var_bound & Hag<var_bound-> (k5*SigD_hag) : (SigD_hag'=SigD_hag-1)&(SigD'=SigD+1)&(hag'=hag+1)&(Hag'=Hag+1);
35-
[R6] Hag>0 -> (k6*Hag) : (Hag'=Hag-1);
36-
[R7] SigD>0 & hag>0 & SigD_hag<var_bound-> (k7*SigD*hag) : (SigD'=SigD-1)&(hag'=hag-1)&(SigD_hag'=SigD_hag+1);
37-
[R8] SigD_hag>0 & SigD<var_bound & hag<var_bound -> (k8*SigD_hag) : (SigD_hag'=SigD_hag-1)&(SigD'=SigD+1)&(hag'=hag+1);
38-
[R9] CodY>0 & flache>0 & CodY_flache<var_bound -> (k9*CodY*flache) : (CodY'=CodY-1)&(flache'=flache-1)&(CodY_flache'=CodY_flache+1);
39-
[R10] CodY_flache>0 & CodY<var_bound & flache<var_bound -> (k10*CodY_flache) : (CodY_flache'=CodY_flache-1)& (CodY'=CodY+1) & (flache'=flache+1);
40-
[R11] CodY>0 & hag>0 & CodY_hag<var_bound -> (k11*CodY*hag) : (CodY'=CodY-1)&(hag'=hag-1)&(CodY_hag'=CodY_hag+1);
41-
[R12] CodY_hag>0 & CodY<var_bound & hag<var_bound -> (k12*CodY_hag) : (CodY_hag'=CodY_hag-1)& (CodY'=CodY+1) & (hag'=hag+1);
42-
43-
44-
45-
endmodule
46-
47-
48-
49-
50-
51-
3+
const double k1 = 0.0038;
4+
const double k2 = 0.0004;
5+
const double k3 = 0.042;
6+
const double k4 = 0.01;
7+
const double k5 = 0.011;
8+
const double k6 = 0.1;
9+
const double k7 = 1050;
10+
const double k8 = 3.21;
11+
12+
module cycle
13+
14+
r : int init 50;
15+
l : int init 2;
16+
rl : int init 0;
17+
g : int init 50;
18+
ga : int init 0;
19+
gbg : int init 0;
20+
gd : int init 0;
21+
22+
[r1] true -> k1 : (r' = r+1);
23+
[r2] r>0 -> k2 * r : (r' = r-1);
24+
[r3] r>0 & l>0 -> k3 * l * r : (r' = r-1) & (rl' = rl+1);
25+
[r4] rl>0 -> k4 * rl : (rl' = rl-1) & (r' = r+1);
26+
[r5] rl>0 & g>0 -> k5 * rl * g : (rl' = rl-1) & (g' = g-1) & (ga' = ga+1) & (gbg' = gbg+1);
27+
[r6] ga>0 -> k6 * ga : (ga' = ga-1) & (gd' = gd+1);
28+
[r7] gbg>0 & gd>0 -> k7 * gbg * gd : (gbg' = gbg-1) & (gd' = gd-1) & (g' = g+1);
29+
[r8] true -> k8 : (rl' = rl+1);
30+
31+
endmodule

motility.csl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CodY=20
2+
3+
// get the probability by other means
4+
// here we just want a binary property
5+
// which we desire to reach
6+
// (i.e. a bool that describes the failure state)

motility.ragtimer

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
codY flache SigD_hag hag CodY_flache CodY_hag CodY SigD Hag
2+
1 1 1 1 1 1 10 10 10
3+
-1 -1 -1 -1 -1 -1 20 -1 -1
4+
r1 codY > codY CodY 0.1
5+
r2 CodY > 0 0.0002
6+
r3 flache > flache SigD 1.0
7+
r4 SigD > 0 0.0002
8+
r5 SigD_hag > SigD hag Hag 1.0
9+
r6 Hag > 0 0.0002
10+
r7 SigD hag > SigD_hag 0.01
11+
r8 SigD_hag > SigD hag 0.1
12+
r9 CodY flache > CodY_flache 0.02
13+
r10 CodY_flache > CodY flache 0.1
14+
r11 CodY hag > CodY_hag 0.01
15+
r12 CodY_hag > CodY hag 0.1

motility.sm

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
ctmc
2+
3+
const int var_bound = 20;
4+
5+
const double k1 = 0.1;
6+
const double k2 = 0.0002;
7+
const double k3 = 1;
8+
const double k4 = 0.0002;
9+
const double k5 = 1;
10+
const double k6 = 0.0002;
11+
const double k7 = 0.01;
12+
const double k8 = 0.1;
13+
const double k9 = 0.02;
14+
const double k10 = 0.1;
15+
const double k11 = 0.01;
16+
const double k12 = 0.1;
17+
18+
module motility
19+
20+
codY : [0..var_bound] init 1;
21+
flache : [0..var_bound] init 1;
22+
SigD_hag : [0..var_bound] init 1;
23+
hag : [0..var_bound] init 1;
24+
CodY_flache : [0..var_bound] init 1;
25+
CodY_hag : [0..var_bound] init 1;
26+
CodY : [0..var_bound] init 10;
27+
SigD : [0..var_bound] init 10;
28+
Hag : [0..var_bound] init 10;
29+
30+
[r1] codY>0 & CodY<var_bound -> (k1*codY) : (CodY'=CodY+1);
31+
[r2] CodY>0 -> (k2*CodY) : (CodY'=CodY-1);
32+
[r3] flache>0 & SigD<var_bound -> (k3*flache) : (SigD'=SigD+1);
33+
[r4] SigD>0 -> (k4*SigD) : (SigD'=SigD-1);
34+
[r5] SigD_hag>0 & SigD<var_bound & hag<var_bound & Hag<var_bound-> (k5*SigD_hag) : (SigD_hag'=SigD_hag-1)&(SigD'=SigD+1)&(hag'=hag+1)&(Hag'=Hag+1);
35+
[r6] Hag>0 -> (k6*Hag) : (Hag'=Hag-1);
36+
[r7] SigD>0 & hag>0 & SigD_hag<var_bound-> (k7*SigD*hag) : (SigD'=SigD-1)&(hag'=hag-1)&(SigD_hag'=SigD_hag+1);
37+
[r8] SigD_hag>0 & SigD<var_bound & hag<var_bound -> (k8*SigD_hag) : (SigD_hag'=SigD_hag-1)&(SigD'=SigD+1)&(hag'=hag+1);
38+
[r9] CodY>0 & flache>0 & CodY_flache<var_bound -> (k9*CodY*flache) : (CodY'=CodY-1)&(flache'=flache-1)&(CodY_flache'=CodY_flache+1);
39+
[r10] CodY_flache>0 & CodY<var_bound & flache<var_bound -> (k10*CodY_flache) : (CodY_flache'=CodY_flache-1)& (CodY'=CodY+1) & (flache'=flache+1);
40+
[r11] CodY>0 & hag>0 & CodY_hag<var_bound -> (k11*CodY*hag) : (CodY'=CodY-1)&(hag'=hag-1)&(CodY_hag'=CodY_hag+1);
41+
[r12] CodY_hag>0 & CodY<var_bound & hag<var_bound -> (k12*CodY_hag) : (CodY_hag'=CodY_hag-1)& (CodY'=CodY+1) & (hag'=hag+1);
42+
43+
44+
45+
endmodule
46+
47+
48+
49+
50+
51+

new_rag_backup/depgraph.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ def buildGraph(recdepth, reactions, chemicals, initials, targets, parent, add_or
199199
# Update required number of executions
200200
reqExec = 0
201201
for d in range(numChems):
202-
print("DELTATARGET", d, "= ", deltaTarget[d])
202+
if printing:
203+
print("DELTATARGET", d, "= ", deltaTarget[d])
203204
if deltaTarget[d] > 0:
204205
for p in range(len(r.products)):
205206
if chemicals[d] in r.products[p]:

new_rag_backup/reactions_v5.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@ def randTest(runswanted, reactions1, prefix, prefix_index, loose=False, printing
12931293
reaction_exec_count[int(line[25])-1] += 1
12941294
if line[0] == "t":
12951295
if trace in tracelist:
1296-
print(f"***Run {count} was a duplicate and has been thrown out of {Options.traceList}")
1296+
print(f"***Run {count+1} was a duplicate and has been thrown out of {Options.traceList}")
12971297
else:
12981298
tracelist.append(trace)
12991299
# tracelistfile.write(f"{prefixTrans}\t")
@@ -1364,12 +1364,14 @@ def randTest(runswanted, reactions1, prefix, prefix_index, loose=False, printing
13641364
iterations[x].append(int(line[14]))
13651365

13661366
if printing:
1367+
print(50*"-")
13671368
print("\n\nAverage number of transitions in a trace is:", Totaltran/int(runswanted))
13681369
print("The biggest number of transitions recorded in a trace is:", max(Totaltranlist))
13691370
print("The smallest number of transitions recorded in a trace is:", min(Totaltranlist))
13701371
print("\nAverage number of iterations needed in a trace is:", Totaliter/int(runswanted))
13711372
print("The biggest number of iterations needed for a trace was:", max(Totaliterlist))
13721373
print("The smallest number of iterations needed for a trace was:", min(Totaliterlist))
1374+
print(50*"-")
13731375

13741376
for x in range(numOfReactions):
13751377
print("\n\nAverage number of reaction", x+1, "executions in a trace is:", Total[x]/int(runswanted))
67 Bytes
Binary file not shown.
326 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)