full draft - uploaded version
This commit is contained in:
14
bn_sim.py
14
bn_sim.py
@@ -23,6 +23,14 @@ probabilistic_funcs = [
|
||||
]
|
||||
|
||||
|
||||
repressilator_funcs = [
|
||||
lambda x1, x2, x3: not x3,
|
||||
lambda x1, x2, x3: not x1,
|
||||
lambda x1, x2, x3: not x2,
|
||||
]
|
||||
|
||||
funcs = repressilator_funcs
|
||||
|
||||
nodes = []
|
||||
|
||||
|
||||
@@ -72,7 +80,7 @@ def simulate(initial_state):
|
||||
|
||||
|
||||
def get_table():
|
||||
for i in product((0, 1), repeat=4):
|
||||
for i in product((0, 1), repeat=3):
|
||||
init(tuple(i))
|
||||
state = state_to_str()
|
||||
update()
|
||||
@@ -81,8 +89,8 @@ def get_table():
|
||||
|
||||
def update():
|
||||
# return synchronous_update()
|
||||
# return sequential_update([0, 1, 2, 3])
|
||||
return probabilistic_update()
|
||||
return sequential_update([0, 1, 2])
|
||||
# return probabilistic_update()
|
||||
# return block_sequential_update(...)
|
||||
# return asynchronous_deterministic_update(...)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user