From a575a1286f07cc12bf01c794007c71e39657cd9c Mon Sep 17 00:00:00 2001 From: Ryan Spangler Date: Tue, 16 Jul 2024 15:52:50 -0700 Subject: [PATCH 01/10] began on new composite emitter config --- process_bigraph/composite.py | 61 ++++++++++++++++++++++++++++++-- process_bigraph/process_types.py | 1 + process_bigraph/tests.py | 61 ++++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+), 2 deletions(-) diff --git a/process_bigraph/composite.py b/process_bigraph/composite.py index 1df335f..db2fa30 100644 --- a/process_bigraph/composite.py +++ b/process_bigraph/composite.py @@ -594,8 +594,19 @@ class Composite(Process): 'bridge': { 'inputs': 'wires', 'outputs': 'wires'}, - 'global_time_precision': 'maybe[float]', - } + 'emitter': { + 'path': { + '_type': 'path', + '_default': ['emitter']}, + 'address': { + '_type': 'string', + '_default': 'local:ram-emitter'}, + 'config': 'tree[any]', + 'mode': { # this should be an enum: all, none, bridge, port + '_type': 'string', + '_default': 'none'}, + 'emit': 'wires'}, + 'global_time_precision': 'maybe[float]'} def __init__(self, config=None, core=None): @@ -665,6 +676,9 @@ def __init__(self, config=None, core=None): self.global_time_precision = self.config[ 'global_time_precision'] + self.add_emitter( + self.config['emitter']) + self.step_triggers = {} for step_path, step in self.step_paths.items(): @@ -730,6 +744,46 @@ def outputs(self): return self.process_schema.get('outputs', {}) + def read_emitter_config(self, emitter_config): + address = emitter_config.get('address', 'local:ram-emitter') + config = emitter_config.get('config', {}) + mode = emitter_config.get('mode', 'none') + + if mode == 'all': + inputs = { + key: [key] + for key in self.state.keys() + if not is_schema_key(key) and key not in self.config['emitter']['inputs']} + + elif mode == 'none': + inputs = emitter_config.get('emit', {}) + + elif mode == 'bridge': + inputs = {} + + elif mode == 'ports': + inputs = {} + + if not 'emit' in config: + config['emit'] = { + input: 'any' + for input in inputs} + + return { + '_type': 'step', + 'address': address, + 'config': config, + 'inputs': inputs} + + + def add_emitter(self, emitter_config): + path = emitter_config['path'] + step_config = self.read_emitter_config(emitter_config) + emitter = set_path( + {}, path, step_config) + self.merge(emitter) + + def merge(self, initial_state): self.state = self.core.merge( self.composition, @@ -1163,6 +1217,9 @@ def query(self, query=None): return result +# def StateEmitter(Emitter): + + # def test_emitter(): # composite = Composite({}) diff --git a/process_bigraph/process_types.py b/process_bigraph/process_types.py index 72e719a..08466f8 100644 --- a/process_bigraph/process_types.py +++ b/process_bigraph/process_types.py @@ -188,6 +188,7 @@ def deserialize_step(schema, encoded, core): 'address': 'protocol', 'config': 'tree[any]'}, + # TODO: slice process to allow for navigating through a port 'process': { '_type': 'process', '_inherit': 'edge', diff --git a/process_bigraph/tests.py b/process_bigraph/tests.py index e883055..ee7629c 100644 --- a/process_bigraph/tests.py +++ b/process_bigraph/tests.py @@ -384,6 +384,66 @@ def test_reaction(): 'inner': ['inner']}}}}}} +def test_emitter(core): + composite_schema = { + 'bridge': { + 'inputs': { + 'DNA': ['DNA'], + 'mRNA': ['mRNA']}, + 'outputs': { + 'DNA': ['DNA'], + 'mRNA': ['mRNA']}}, + + 'state': { + 'interval': { + '_type': 'step', + 'address': 'local:!process_bigraph.experiments.minimal_gillespie.GillespieInterval', + 'config': {'ktsc': '6e0'}, + 'inputs': { + 'DNA': ['DNA'], + 'mRNA': ['mRNA']}, + 'outputs': { + 'interval': ['event', 'interval']}}, + + 'event': { + '_type': 'process', + 'address': 'local:!process_bigraph.experiments.minimal_gillespie.GillespieEvent', + 'config': {'ktsc': 6e0}, + 'inputs': { + 'DNA': ['DNA'], + 'mRNA': ['mRNA']}, + 'outputs': { + 'mRNA': ['mRNA']}, + 'interval': '3.0'}}, + + 'emitter': { + 'emit': { + 'time': ['global_time'], + 'mRNA': ['mRNA'], + 'interval': ['event', 'interval']}}} + + gillespie = Composite( + composite_schema, + core=core) + + updates = gillespie.update({ + 'DNA': { + 'A gene': 11.0, + 'B gene': 5.0}, + 'mRNA': { + 'A mRNA': 33.3, + 'B mRNA': 2.1}}, + 1000.0) + + # TODO: make this work + results = gillespie.gather_results() + + assert 'mRNA' in updates[0] + # TODO: support omit as well as emit + + + + if __name__ == '__main__': core = ProcessTypes() @@ -394,4 +454,5 @@ def test_reaction(): test_infer(core) test_step_initialization(core) test_dependencies(core) + test_emitter(core) # test_reaction() From c0b5765a92f1985f5c41763ffb6a849bd69417e8 Mon Sep 17 00:00:00 2001 From: Ryan Spangler Date: Tue, 6 Aug 2024 16:25:42 -0700 Subject: [PATCH 02/10] emitter merged, we need to update the schema --- process_bigraph/composite.py | 31 ++++++++++++++++++---- process_bigraph/experiments/comets.py | 38 ++++++++++++++++----------- 2 files changed, 48 insertions(+), 21 deletions(-) diff --git a/process_bigraph/composite.py b/process_bigraph/composite.py index db2fa30..5dde4f4 100644 --- a/process_bigraph/composite.py +++ b/process_bigraph/composite.py @@ -676,8 +676,10 @@ def __init__(self, config=None, core=None): self.global_time_precision = self.config[ 'global_time_precision'] - self.add_emitter( - self.config['emitter']) + emitter_config = self.config.get('emitter') + if emitter_config: + self.add_emitter( + emitter_config) self.step_triggers = {} @@ -751,9 +753,9 @@ def read_emitter_config(self, emitter_config): if mode == 'all': inputs = { - key: [key] + key: [emitter_config.get('inputs', {}).get(key, key)] for key in self.state.keys() - if not is_schema_key(key) and key not in self.config['emitter']['inputs']} + if not is_schema_key(key)} elif mode == 'none': inputs = emitter_config.get('emit', {}) @@ -777,13 +779,25 @@ def read_emitter_config(self, emitter_config): def add_emitter(self, emitter_config): - path = emitter_config['path'] + path = tuple(emitter_config['path']) + step_config = self.read_emitter_config(emitter_config) emitter = set_path( {}, path, step_config) self.merge(emitter) + _, instance = self.core.slice( + self.composition, + self.state, + path) + + self.emitter_paths[path] = instance + self.step_paths[path] = instance + # TODO: merge needs to be schema aware, + # and since the results of the merge may + # entail a schema update, we need to return + # the new schema def merge(self, initial_state): self.state = self.core.merge( self.composition, @@ -1065,6 +1079,8 @@ def run_steps(self, step_paths): self.state, step_path) + import ipdb; ipdb.set_trace() + state = self.core.view_edge( self.composition, self.state, @@ -1128,6 +1144,9 @@ def gather_results(self, queries=None): emitter = get_path(self.state, path) results[path] = emitter['instance'].query(query) + # TODO: unnest the results? + # TODO: allow the results to be transposed + return results def update(self, state, interval): @@ -1201,6 +1220,8 @@ def __init__(self, config, core): def update(self, state) -> Dict: + import ipdb; ipdb.set_trace() + self.history.append(copy.deepcopy(state)) return {} diff --git a/process_bigraph/experiments/comets.py b/process_bigraph/experiments/comets.py index ed3bbfb..7c47586 100644 --- a/process_bigraph/experiments/comets.py +++ b/process_bigraph/experiments/comets.py @@ -465,25 +465,31 @@ def run_comets(): 'fields': ['fields'] } }, - 'emitter': { - '_type': 'step', - 'address': 'local:ram-emitter', - 'config': { - 'emit': { - 'fields': 'map', - 'time': 'float', - } - }, - 'inputs': { - 'fields': ['fields'], - 'time': ['global_time'] - } - } + # 'emitter': { + # '_type': 'step', + # 'address': 'local:ram-emitter', + # 'config': { + # 'emit': { + # 'fields': 'map', + # 'time': 'float', + # } + # }, + # 'inputs': { + # 'fields': ['fields'], + # 'time': ['global_time'] + # } + # } } - sim = Composite({'state': composite_state}, core=core) + sim = Composite({ + 'state': composite_state, + 'emitter': { + 'mode': 'all'}}, core=core) - sim.update({}, 100.0) + # sim = Composite({ + # 'state': composite_state}, core=core) + + sim.update({}, 10.0) results = sim.gather_results() From 1b3e9406b06a5cc082b92a4222950f2ef8f729f4 Mon Sep 17 00:00:00 2001 From: Ryan Spangler Date: Fri, 9 Aug 2024 15:12:06 -0700 Subject: [PATCH 03/10] adding a complete to merge to infer the resulting schema, emitter config option 'all' is working --- process_bigraph/composite.py | 8 ++++---- process_bigraph/experiments/comets.py | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/process_bigraph/composite.py b/process_bigraph/composite.py index 5dde4f4..e6723c5 100644 --- a/process_bigraph/composite.py +++ b/process_bigraph/composite.py @@ -804,6 +804,10 @@ def merge(self, initial_state): self.state, initial_state) + self.composition, self.state = self.core.complete( + self.composition, + self.state) + def process_update( self, @@ -1079,8 +1083,6 @@ def run_steps(self, step_paths): self.state, step_path) - import ipdb; ipdb.set_trace() - state = self.core.view_edge( self.composition, self.state, @@ -1220,8 +1222,6 @@ def __init__(self, config, core): def update(self, state) -> Dict: - import ipdb; ipdb.set_trace() - self.history.append(copy.deepcopy(state)) return {} diff --git a/process_bigraph/experiments/comets.py b/process_bigraph/experiments/comets.py index 7c47586..7138455 100644 --- a/process_bigraph/experiments/comets.py +++ b/process_bigraph/experiments/comets.py @@ -493,6 +493,8 @@ def run_comets(): results = sim.gather_results() + import ipdb; ipdb.set_trace() + print(results) From 8f6a4938551ad7a327faba634d14b515157d1e44 Mon Sep 17 00:00:00 2001 From: Ryan Spangler Date: Fri, 9 Aug 2024 15:38:21 -0700 Subject: [PATCH 04/10] working on emitter config --- process_bigraph/composite.py | 10 +++++++--- process_bigraph/experiments/comets.py | 5 ++++- process_bigraph/process_types.py | 3 +++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/process_bigraph/composite.py b/process_bigraph/composite.py index e6723c5..661daf6 100644 --- a/process_bigraph/composite.py +++ b/process_bigraph/composite.py @@ -310,6 +310,12 @@ def __init__(self, config=None, core=None): self.config_schema, config) + # TODO: validate your config after filling, report if anything + # is off + # print(self.core.validate_state( + # self.config_schema, + # config)) + def initial_state(self): return {} @@ -602,9 +608,7 @@ class Composite(Process): '_type': 'string', '_default': 'local:ram-emitter'}, 'config': 'tree[any]', - 'mode': { # this should be an enum: all, none, bridge, port - '_type': 'string', - '_default': 'none'}, + 'mode': 'emitter_mode', 'emit': 'wires'}, 'global_time_precision': 'maybe[float]'} diff --git a/process_bigraph/experiments/comets.py b/process_bigraph/experiments/comets.py index 7138455..fe39cfe 100644 --- a/process_bigraph/experiments/comets.py +++ b/process_bigraph/experiments/comets.py @@ -486,8 +486,11 @@ def run_comets(): 'emitter': { 'mode': 'all'}}, core=core) + # TODO: this should fail validation # sim = Composite({ - # 'state': composite_state}, core=core) + # 'state': composite_state, + # 'emitter': { + # 'mode': 'pluto'}}, core=core) sim.update({}, 10.0) diff --git a/process_bigraph/process_types.py b/process_bigraph/process_types.py index 08466f8..d5230ad 100644 --- a/process_bigraph/process_types.py +++ b/process_bigraph/process_types.py @@ -168,6 +168,9 @@ def deserialize_step(schema, encoded, core): '_type': 'protocol', '_inherit': 'string'}, + # TODO: have the default enum be the first option + 'emitter_mode': 'enum[none,all,paths,bridge,port]', + 'interval': { '_type': 'interval', '_inherit': 'float', From 6b54966e17cf61fde36d223fbc542f314d83c3c8 Mon Sep 17 00:00:00 2001 From: Ryan Spangler Date: Wed, 14 Aug 2024 16:45:41 -0700 Subject: [PATCH 05/10] adding default method to init --- process_bigraph/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process_bigraph/__init__.py b/process_bigraph/__init__.py index 316a8d5..3da93d6 100644 --- a/process_bigraph/__init__.py +++ b/process_bigraph/__init__.py @@ -1,5 +1,5 @@ import pprint -from bigraph_schema.registry import deep_merge +from bigraph_schema.registry import deep_merge, default from process_bigraph.composite import Process, Step, Composite, ProcessTypes, interval_time_precision From 6b5849f392077012a6ebc6697c9b00142b68db5e Mon Sep 17 00:00:00 2001 From: Ryan Spangler Date: Wed, 14 Aug 2024 16:48:24 -0700 Subject: [PATCH 06/10] fix extra addopts in pytest.ini --- pytest.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pytest.ini b/pytest.ini index 72ca674..01efc49 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,8 +1,7 @@ [pytest] -addopts = --ignore=setup.py +addopts = --ignore=setup.py --ignore=process_bigraph/experiments/comets.py python_files = *.py #skip comets tests -addopts = --ignore=process_bigraph/experiments/comets.py testpaths = process_bigraph markers = slow: indicates slow tests (deselect with '-m "not slow"') From deb26eb211ced067fc92014c805513c52cdb1eed Mon Sep 17 00:00:00 2001 From: Ryan Spangler Date: Fri, 16 Aug 2024 15:09:51 -0700 Subject: [PATCH 07/10] fix emitter none mode --- process_bigraph/composite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process_bigraph/composite.py b/process_bigraph/composite.py index 661daf6..1f6d420 100644 --- a/process_bigraph/composite.py +++ b/process_bigraph/composite.py @@ -681,7 +681,7 @@ def __init__(self, config=None, core=None): 'global_time_precision'] emitter_config = self.config.get('emitter') - if emitter_config: + if emitter_config and not emitter_config.get('mode', 'none') == 'none': self.add_emitter( emitter_config) From c722135e1e15c6406d7d7c36f33a64c590ef131c Mon Sep 17 00:00:00 2001 From: Ryan Spangler Date: Fri, 23 Aug 2024 14:59:15 -0700 Subject: [PATCH 08/10] ignore out dir --- .gitignore | 1 + out/comets.json | 3343 ----------------------------------------------- 2 files changed, 1 insertion(+), 3343 deletions(-) delete mode 100644 out/comets.json diff --git a/.gitignore b/.gitignore index ed298f0..7d56086 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ dist/ build/ process_bigraph.egg-info/ +out/ diff --git a/out/comets.json b/out/comets.json deleted file mode 100644 index c917aa9..0000000 --- a/out/comets.json +++ /dev/null @@ -1,3343 +0,0 @@ -{ - "global_time": "0.0", - "fields": { - "_type": "map", - "_value": { - "_type": "array", - "_shape": [ - 6, - 6 - ], - "_data": "positive_float" - }, - "glucose": { - "list": [ - [ - 19.779478971116056, - 15.742072723142812, - 2.2521671028356915, - 11.247785783325066, - 9.780448136819906, - 6.716165422565458 - ], - [ - 15.718951408504608, - 3.6084256447703544, - 5.656613562283832, - 5.6449358833170145, - 6.969883341561904, - 4.957477884806238 - ], - [ - 7.087252415155514, - 3.463959628273794, - 10.572797591032925, - 14.917594188680322, - 18.98446133257418, - 12.826397426395237 - ], - [ - 18.970305174641656, - 3.7431131823494646, - 0.25757183861342847, - 8.324173564358047, - 14.395433559276709, - 8.651872458612292 - ], - [ - 17.204846301227136, - 3.4198664525326583, - 15.67263257131711, - 8.58367680863541, - 10.9554401873564, - 13.013121692520249 - ], - [ - 2.163658990484194, - 12.748163547582658, - 8.77136859359534, - 10.837287542691698, - 14.547505597241813, - 17.169541903929396 - ] - ], - "data": "float", - "shape": [ - 6, - 6 - ] - }, - "acetate": { - "list": [ - [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ], - [ - 0.0, - 0.0, - 0.0, - 0.0, - 0.0, - 0.0 - ] - ], - "data": "float", - "shape": [ - 6, - 6 - ] - }, - "biomass": { - "list": [ - [ - 0.06792005328108794, - 0.06994978764665728, - 0.08989552882880456, - 0.0015727161818465342, - 0.08825663667914363, - 0.059515389710095117 - ], - [ - 0.06696065776745806, - 0.02436348448311785, - 0.008481380595277355, - 0.054085528639122527, - 0.02236197711741894, - 0.03437498340598795 - ], - [ - 0.0008455852849481361, - 0.022402172182903957, - 0.06475047965554762, - 0.09763972136448086, - 0.005920909338954128, - 0.08670505981477239 - ], - [ - 0.07231864102507027, - 0.0489039246797403, - 0.07764107973389647, - 0.06412396300396749, - 0.03534690977819628, - 0.0944322199505641 - ], - [ - 0.053744219668966565, - 0.0949669784819969, - 0.07058882748542174, - 0.08764880184112095, - 0.06875110982878717, - 0.039499103752164234 - ], - [ - 0.05911399855463792, - 0.06633280097671883, - 0.04289217208902721, - 0.08868053793755619, - 0.057788573282514126, - 0.059485583137849796 - ] - ], - "data": "float", - "shape": [ - 6, - 6 - ] - } - }, - "spatial_dfba": { - "[0,0]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 0, - 0 - ], - "acetate": [ - "..", - "fields", - "acetate", - 0, - 0 - ], - "biomass": [ - "..", - "fields", - "biomass", - 0, - 0 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 0, - 0 - ], - "acetate": [ - "..", - "fields", - "acetate", - 0, - 0 - ], - "biomass": [ - "..", - "fields", - "biomass", - 0, - 0 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[0,1]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 0, - 1 - ], - "acetate": [ - "..", - "fields", - "acetate", - 0, - 1 - ], - "biomass": [ - "..", - "fields", - "biomass", - 0, - 1 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 0, - 1 - ], - "acetate": [ - "..", - "fields", - "acetate", - 0, - 1 - ], - "biomass": [ - "..", - "fields", - "biomass", - 0, - 1 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[0,2]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 0, - 2 - ], - "acetate": [ - "..", - "fields", - "acetate", - 0, - 2 - ], - "biomass": [ - "..", - "fields", - "biomass", - 0, - 2 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 0, - 2 - ], - "acetate": [ - "..", - "fields", - "acetate", - 0, - 2 - ], - "biomass": [ - "..", - "fields", - "biomass", - 0, - 2 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[0,3]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 0, - 3 - ], - "acetate": [ - "..", - "fields", - "acetate", - 0, - 3 - ], - "biomass": [ - "..", - "fields", - "biomass", - 0, - 3 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 0, - 3 - ], - "acetate": [ - "..", - "fields", - "acetate", - 0, - 3 - ], - "biomass": [ - "..", - "fields", - "biomass", - 0, - 3 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[0,4]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 0, - 4 - ], - "acetate": [ - "..", - "fields", - "acetate", - 0, - 4 - ], - "biomass": [ - "..", - "fields", - "biomass", - 0, - 4 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 0, - 4 - ], - "acetate": [ - "..", - "fields", - "acetate", - 0, - 4 - ], - "biomass": [ - "..", - "fields", - "biomass", - 0, - 4 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[0,5]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 0, - 5 - ], - "acetate": [ - "..", - "fields", - "acetate", - 0, - 5 - ], - "biomass": [ - "..", - "fields", - "biomass", - 0, - 5 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 0, - 5 - ], - "acetate": [ - "..", - "fields", - "acetate", - 0, - 5 - ], - "biomass": [ - "..", - "fields", - "biomass", - 0, - 5 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[1,0]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 1, - 0 - ], - "acetate": [ - "..", - "fields", - "acetate", - 1, - 0 - ], - "biomass": [ - "..", - "fields", - "biomass", - 1, - 0 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 1, - 0 - ], - "acetate": [ - "..", - "fields", - "acetate", - 1, - 0 - ], - "biomass": [ - "..", - "fields", - "biomass", - 1, - 0 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[1,1]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 1, - 1 - ], - "acetate": [ - "..", - "fields", - "acetate", - 1, - 1 - ], - "biomass": [ - "..", - "fields", - "biomass", - 1, - 1 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 1, - 1 - ], - "acetate": [ - "..", - "fields", - "acetate", - 1, - 1 - ], - "biomass": [ - "..", - "fields", - "biomass", - 1, - 1 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[1,2]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 1, - 2 - ], - "acetate": [ - "..", - "fields", - "acetate", - 1, - 2 - ], - "biomass": [ - "..", - "fields", - "biomass", - 1, - 2 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 1, - 2 - ], - "acetate": [ - "..", - "fields", - "acetate", - 1, - 2 - ], - "biomass": [ - "..", - "fields", - "biomass", - 1, - 2 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[1,3]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 1, - 3 - ], - "acetate": [ - "..", - "fields", - "acetate", - 1, - 3 - ], - "biomass": [ - "..", - "fields", - "biomass", - 1, - 3 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 1, - 3 - ], - "acetate": [ - "..", - "fields", - "acetate", - 1, - 3 - ], - "biomass": [ - "..", - "fields", - "biomass", - 1, - 3 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[1,4]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 1, - 4 - ], - "acetate": [ - "..", - "fields", - "acetate", - 1, - 4 - ], - "biomass": [ - "..", - "fields", - "biomass", - 1, - 4 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 1, - 4 - ], - "acetate": [ - "..", - "fields", - "acetate", - 1, - 4 - ], - "biomass": [ - "..", - "fields", - "biomass", - 1, - 4 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[1,5]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 1, - 5 - ], - "acetate": [ - "..", - "fields", - "acetate", - 1, - 5 - ], - "biomass": [ - "..", - "fields", - "biomass", - 1, - 5 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 1, - 5 - ], - "acetate": [ - "..", - "fields", - "acetate", - 1, - 5 - ], - "biomass": [ - "..", - "fields", - "biomass", - 1, - 5 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[2,0]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 2, - 0 - ], - "acetate": [ - "..", - "fields", - "acetate", - 2, - 0 - ], - "biomass": [ - "..", - "fields", - "biomass", - 2, - 0 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 2, - 0 - ], - "acetate": [ - "..", - "fields", - "acetate", - 2, - 0 - ], - "biomass": [ - "..", - "fields", - "biomass", - 2, - 0 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[2,1]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 2, - 1 - ], - "acetate": [ - "..", - "fields", - "acetate", - 2, - 1 - ], - "biomass": [ - "..", - "fields", - "biomass", - 2, - 1 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 2, - 1 - ], - "acetate": [ - "..", - "fields", - "acetate", - 2, - 1 - ], - "biomass": [ - "..", - "fields", - "biomass", - 2, - 1 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[2,2]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 2, - 2 - ], - "acetate": [ - "..", - "fields", - "acetate", - 2, - 2 - ], - "biomass": [ - "..", - "fields", - "biomass", - 2, - 2 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 2, - 2 - ], - "acetate": [ - "..", - "fields", - "acetate", - 2, - 2 - ], - "biomass": [ - "..", - "fields", - "biomass", - 2, - 2 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[2,3]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 2, - 3 - ], - "acetate": [ - "..", - "fields", - "acetate", - 2, - 3 - ], - "biomass": [ - "..", - "fields", - "biomass", - 2, - 3 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 2, - 3 - ], - "acetate": [ - "..", - "fields", - "acetate", - 2, - 3 - ], - "biomass": [ - "..", - "fields", - "biomass", - 2, - 3 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[2,4]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 2, - 4 - ], - "acetate": [ - "..", - "fields", - "acetate", - 2, - 4 - ], - "biomass": [ - "..", - "fields", - "biomass", - 2, - 4 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 2, - 4 - ], - "acetate": [ - "..", - "fields", - "acetate", - 2, - 4 - ], - "biomass": [ - "..", - "fields", - "biomass", - 2, - 4 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[2,5]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 2, - 5 - ], - "acetate": [ - "..", - "fields", - "acetate", - 2, - 5 - ], - "biomass": [ - "..", - "fields", - "biomass", - 2, - 5 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 2, - 5 - ], - "acetate": [ - "..", - "fields", - "acetate", - 2, - 5 - ], - "biomass": [ - "..", - "fields", - "biomass", - 2, - 5 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[3,0]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 3, - 0 - ], - "acetate": [ - "..", - "fields", - "acetate", - 3, - 0 - ], - "biomass": [ - "..", - "fields", - "biomass", - 3, - 0 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 3, - 0 - ], - "acetate": [ - "..", - "fields", - "acetate", - 3, - 0 - ], - "biomass": [ - "..", - "fields", - "biomass", - 3, - 0 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[3,1]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 3, - 1 - ], - "acetate": [ - "..", - "fields", - "acetate", - 3, - 1 - ], - "biomass": [ - "..", - "fields", - "biomass", - 3, - 1 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 3, - 1 - ], - "acetate": [ - "..", - "fields", - "acetate", - 3, - 1 - ], - "biomass": [ - "..", - "fields", - "biomass", - 3, - 1 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[3,2]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 3, - 2 - ], - "acetate": [ - "..", - "fields", - "acetate", - 3, - 2 - ], - "biomass": [ - "..", - "fields", - "biomass", - 3, - 2 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 3, - 2 - ], - "acetate": [ - "..", - "fields", - "acetate", - 3, - 2 - ], - "biomass": [ - "..", - "fields", - "biomass", - 3, - 2 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[3,3]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 3, - 3 - ], - "acetate": [ - "..", - "fields", - "acetate", - 3, - 3 - ], - "biomass": [ - "..", - "fields", - "biomass", - 3, - 3 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 3, - 3 - ], - "acetate": [ - "..", - "fields", - "acetate", - 3, - 3 - ], - "biomass": [ - "..", - "fields", - "biomass", - 3, - 3 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[3,4]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 3, - 4 - ], - "acetate": [ - "..", - "fields", - "acetate", - 3, - 4 - ], - "biomass": [ - "..", - "fields", - "biomass", - 3, - 4 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 3, - 4 - ], - "acetate": [ - "..", - "fields", - "acetate", - 3, - 4 - ], - "biomass": [ - "..", - "fields", - "biomass", - 3, - 4 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[3,5]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 3, - 5 - ], - "acetate": [ - "..", - "fields", - "acetate", - 3, - 5 - ], - "biomass": [ - "..", - "fields", - "biomass", - 3, - 5 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 3, - 5 - ], - "acetate": [ - "..", - "fields", - "acetate", - 3, - 5 - ], - "biomass": [ - "..", - "fields", - "biomass", - 3, - 5 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[4,0]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 4, - 0 - ], - "acetate": [ - "..", - "fields", - "acetate", - 4, - 0 - ], - "biomass": [ - "..", - "fields", - "biomass", - 4, - 0 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 4, - 0 - ], - "acetate": [ - "..", - "fields", - "acetate", - 4, - 0 - ], - "biomass": [ - "..", - "fields", - "biomass", - 4, - 0 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[4,1]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 4, - 1 - ], - "acetate": [ - "..", - "fields", - "acetate", - 4, - 1 - ], - "biomass": [ - "..", - "fields", - "biomass", - 4, - 1 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 4, - 1 - ], - "acetate": [ - "..", - "fields", - "acetate", - 4, - 1 - ], - "biomass": [ - "..", - "fields", - "biomass", - 4, - 1 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[4,2]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 4, - 2 - ], - "acetate": [ - "..", - "fields", - "acetate", - 4, - 2 - ], - "biomass": [ - "..", - "fields", - "biomass", - 4, - 2 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 4, - 2 - ], - "acetate": [ - "..", - "fields", - "acetate", - 4, - 2 - ], - "biomass": [ - "..", - "fields", - "biomass", - 4, - 2 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[4,3]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 4, - 3 - ], - "acetate": [ - "..", - "fields", - "acetate", - 4, - 3 - ], - "biomass": [ - "..", - "fields", - "biomass", - 4, - 3 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 4, - 3 - ], - "acetate": [ - "..", - "fields", - "acetate", - 4, - 3 - ], - "biomass": [ - "..", - "fields", - "biomass", - 4, - 3 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[4,4]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 4, - 4 - ], - "acetate": [ - "..", - "fields", - "acetate", - 4, - 4 - ], - "biomass": [ - "..", - "fields", - "biomass", - 4, - 4 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 4, - 4 - ], - "acetate": [ - "..", - "fields", - "acetate", - 4, - 4 - ], - "biomass": [ - "..", - "fields", - "biomass", - 4, - 4 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[4,5]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 4, - 5 - ], - "acetate": [ - "..", - "fields", - "acetate", - 4, - 5 - ], - "biomass": [ - "..", - "fields", - "biomass", - 4, - 5 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 4, - 5 - ], - "acetate": [ - "..", - "fields", - "acetate", - 4, - 5 - ], - "biomass": [ - "..", - "fields", - "biomass", - 4, - 5 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[5,0]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 5, - 0 - ], - "acetate": [ - "..", - "fields", - "acetate", - 5, - 0 - ], - "biomass": [ - "..", - "fields", - "biomass", - 5, - 0 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 5, - 0 - ], - "acetate": [ - "..", - "fields", - "acetate", - 5, - 0 - ], - "biomass": [ - "..", - "fields", - "biomass", - 5, - 0 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[5,1]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 5, - 1 - ], - "acetate": [ - "..", - "fields", - "acetate", - 5, - 1 - ], - "biomass": [ - "..", - "fields", - "biomass", - 5, - 1 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 5, - 1 - ], - "acetate": [ - "..", - "fields", - "acetate", - 5, - 1 - ], - "biomass": [ - "..", - "fields", - "biomass", - 5, - 1 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[5,2]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 5, - 2 - ], - "acetate": [ - "..", - "fields", - "acetate", - 5, - 2 - ], - "biomass": [ - "..", - "fields", - "biomass", - 5, - 2 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 5, - 2 - ], - "acetate": [ - "..", - "fields", - "acetate", - 5, - 2 - ], - "biomass": [ - "..", - "fields", - "biomass", - 5, - 2 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[5,3]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 5, - 3 - ], - "acetate": [ - "..", - "fields", - "acetate", - 5, - 3 - ], - "biomass": [ - "..", - "fields", - "biomass", - 5, - 3 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 5, - 3 - ], - "acetate": [ - "..", - "fields", - "acetate", - 5, - 3 - ], - "biomass": [ - "..", - "fields", - "biomass", - 5, - 3 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[5,4]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 5, - 4 - ], - "acetate": [ - "..", - "fields", - "acetate", - 5, - 4 - ], - "biomass": [ - "..", - "fields", - "biomass", - 5, - 4 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 5, - 4 - ], - "acetate": [ - "..", - "fields", - "acetate", - 5, - 4 - ], - "biomass": [ - "..", - "fields", - "biomass", - 5, - 4 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - }, - "[5,5]": { - "_type": "process", - "address": "local:DynamicFBA", - "config": { - "model_file": "TESTING", - "model": "None", - "kinetic_params": { - "glucose": [ - "0.5", - "1.0" - ], - "acetate": [ - "0.5", - "2.0" - ] - }, - "biomass_reaction": "Biomass_Ecoli_core", - "substrate_update_reactions": { - "glucose": "EX_glc__D_e", - "acetate": "EX_ac_e" - }, - "biomass_identifier": "biomass", - "bounds": { - "EX_o2_e": {}, - "ATPM": {} - } - }, - "inputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 5, - 5 - ], - "acetate": [ - "..", - "fields", - "acetate", - 5, - 5 - ], - "biomass": [ - "..", - "fields", - "biomass", - 5, - 5 - ] - } - }, - "outputs": { - "substrates": { - "glucose": [ - "..", - "fields", - "glucose", - 5, - 5 - ], - "acetate": [ - "..", - "fields", - "acetate", - 5, - 5 - ], - "biomass": [ - "..", - "fields", - "biomass", - 5, - 5 - ] - } - }, - "interval": 1.0, - "_inputs": { - "substrates": "map[positive_float]" - }, - "_outputs": { - "substrates": "map[positive_float]" - } - } - }, - "diffusion": { - "_type": "process", - "address": "local:DiffusionAdvection", - "config": { - "n_bins": [ - "6", - "6" - ], - "bounds": [ - "10.0", - "10.0" - ], - "default_diffusion_rate": "0.1", - "default_diffusion_dt": "0.1", - "diffusion_coeffs": { - "glucose": "0.1", - "acetate": "0.1", - "biomass": "0.1" - }, - "advection_coeffs": { - "glucose": [ - "0.0", - "0.0" - ], - "acetate": [ - "0.0", - "0.0" - ], - "biomass": [ - "0.0", - "0.0" - ] - } - }, - "inputs": { - "fields": [ - "fields" - ] - }, - "outputs": { - "fields": [ - "fields" - ] - }, - "interval": 1.0, - "_inputs": { - "fields": { - "_type": "map", - "_value": { - "_type": "array", - "_shape": [ - 6, - 6 - ], - "_data": "positive_float" - } - } - }, - "_outputs": { - "fields": { - "_type": "map", - "_value": { - "_type": "array", - "_shape": [ - 6, - 6 - ], - "_data": "positive_float" - } - } - } - }, - "emitter": { - "_type": "step", - "address": "local:ram-emitter", - "config": { - "emit": { - "fields": "map", - "time": "float" - } - }, - "inputs": { - "fields": [ - "fields" - ], - "time": [ - "global_time" - ] - }, - "_inputs": { - "fields": "map", - "time": "float" - }, - "_outputs": {}, - "outputs": {} - } -} \ No newline at end of file From 0d50bd4f95ca2943205a3dcb0a68236567e6396b Mon Sep 17 00:00:00 2001 From: Ryan Spangler Date: Fri, 23 Aug 2024 15:41:53 -0700 Subject: [PATCH 09/10] deserialize_schema requires attention --- process_bigraph/composite.py | 38 ++++++++++++++++++++++----- process_bigraph/experiments/comets.py | 24 ++++++++++++++--- 2 files changed, 53 insertions(+), 9 deletions(-) diff --git a/process_bigraph/composite.py b/process_bigraph/composite.py index 05ccf57..be99567 100644 --- a/process_bigraph/composite.py +++ b/process_bigraph/composite.py @@ -614,6 +614,17 @@ class Composite(Process): 'global_time_precision': 'maybe[float]'} + @classmethod + def load(cls, path, core=None): + with open(path) as data: + document = json.load(data) + composite = cls( + document, + core=core) + + return composite + + def __init__(self, config=None, core=None): super().__init__(config, core) @@ -714,11 +725,26 @@ def __init__(self, config=None, core=None): def save(self, filename='one_cell_two_directions.json', outdir='out', - ): - serialized_doc = self.core.serialize( - schema=self.composition, - state=self.state, - ) + include_schema=False): + + serialized_state = self.core.serialize( + self.composition, + self.state) + + document = { + 'state': serialized_state} + + if include_schema: + serialized_schema = self.core.serialize( + 'schema', + self.composition) + document['composition'] = serialized_schema + + # TODO: make this true + # copy_composite = Composite({ + # 'state': self.state}) + + # assert copy_composite == self # save the dictionary to a JSON file if not os.path.exists(outdir): @@ -727,7 +753,7 @@ def save(self, # write the new data to the file with open(filename, 'w') as json_file: - json.dump(serialized_doc, json_file, indent=4) + json.dump(document, json_file, indent=4) print(f"Created new file: {filename}") def reset_step_state(self, step_paths): diff --git a/process_bigraph/experiments/comets.py b/process_bigraph/experiments/comets.py index 00f17fa..9fc3511 100644 --- a/process_bigraph/experiments/comets.py +++ b/process_bigraph/experiments/comets.py @@ -1,11 +1,13 @@ import numpy as np -from process_bigraph import Process, ProcessTypes, Composite -from process_bigraph.experiments.parameter_scan import RunProcess +from pathlib import Path import matplotlib.pyplot as plt from scipy.ndimage import convolve import cobra from cobra.io import load_model +from process_bigraph import Process, ProcessTypes, Composite +from process_bigraph.experiments.parameter_scan import RunProcess + core = ProcessTypes() @@ -472,13 +474,29 @@ def run_comets(): 'emitter': { 'mode': 'all'}}, core=core) + outdir = Path('out') + filename = 'comets.json' + # save the document - sim.save(filename='comets.json', outdir='out') + sim.save( + filename=filename, + outdir=outdir, + include_schema=True) sim.update({}, 100.0) results = sim.gather_results() + load = Composite.load( + path=outdir/filename, + core=core) + + load.update({}, 100.0) + + other_results = load.gather_results() + + assert results == other_results + import ipdb; ipdb.set_trace() print(results) From aa1188872a1b0accce89e6cd3ec33ace76defd4d Mon Sep 17 00:00:00 2001 From: Ryan Spangler Date: Wed, 28 Aug 2024 01:32:59 -0700 Subject: [PATCH 10/10] successfully loading a saved composite --- process_bigraph/composite.py | 1 + process_bigraph/experiments/comets.py | 60 ++++++++++++++------------- 2 files changed, 32 insertions(+), 29 deletions(-) diff --git a/process_bigraph/composite.py b/process_bigraph/composite.py index be99567..739681b 100644 --- a/process_bigraph/composite.py +++ b/process_bigraph/composite.py @@ -618,6 +618,7 @@ class Composite(Process): def load(cls, path, core=None): with open(path) as data: document = json.load(data) + composite = cls( document, core=core) diff --git a/process_bigraph/experiments/comets.py b/process_bigraph/experiments/comets.py index 9fc3511..e405d7d 100644 --- a/process_bigraph/experiments/comets.py +++ b/process_bigraph/experiments/comets.py @@ -8,27 +8,12 @@ from process_bigraph import Process, ProcessTypes, Composite from process_bigraph.experiments.parameter_scan import RunProcess -core = ProcessTypes() - # create new types def apply_non_negative(schema, current, update, core): new_value = current + update return max(0, new_value) -positive_float = { - '_type': 'positive_float', - '_inherit': 'float', - '_apply': apply_non_negative -} -core.register('positive_float', positive_float) - -bounds_type = { - 'lower': 'maybe[float]', - 'upper': 'maybe[float]' -} -core.register_process('bounds', bounds_type) - # TODO -- check the function signature of the apply method and report missing keys upon registration @@ -76,7 +61,6 @@ def __init__(self, config, core): # error handling raise ValueError('Invalid model file') - for reaction_id, bounds in self.config['bounds'].items(): if bounds['lower'] is not None: self.model.reactions.get_by_id(reaction_id).lower_bound = bounds['lower'] @@ -125,9 +109,6 @@ def update(self, state, interval): 'substrates': substrate_update, } -core.register_process('DynamicFBA', DynamicFBA) - - # Laplacian for 2D diffusion LAPLACIAN_2D = np.array([[0, 1, 0], [1, -4, 1], @@ -246,9 +227,6 @@ def diffusion_delta(self, state, interval, diffusion_coeff, advection_coeff): return updated_state - state -core.register_process('DiffusionAdvection', DiffusionAdvection) - - def dfba_config( model_file='textbook', kinetic_params={ @@ -294,6 +272,27 @@ def run_process( return run.update(initial_state) +def register_types(core): + core.register('positive_float', { + '_type': 'positive_float', + '_inherit': 'float', + '_apply': apply_non_negative}) + + core.register('bounds', { + 'lower': 'maybe[float]', + 'upper': 'maybe[float]'}) + + core.register_process( + 'DynamicFBA', + DynamicFBA) + + core.register_process( + 'DiffusionAdvection', + DiffusionAdvection) + + return core + + def run_dfba_spatial(): n_bins = (2, 2) @@ -396,7 +395,7 @@ def run_diffusion_process(): print(data) -def run_comets(): +def run_comets(core): n_bins = (6, 6) initial_glucose = np.random.uniform(low=0, high=20, size=n_bins) @@ -495,15 +494,18 @@ def run_comets(): other_results = load.gather_results() - assert results == other_results - - import ipdb; ipdb.set_trace() + np.testing.assert_equal( + results[('emitter',)][-1]['fields'], + other_results[('emitter',)][-1]['fields']) print(results) if __name__ == '__main__': - # run_dfba_spatial() - # run_diffusion_process() - run_comets() + core = ProcessTypes() + core = register_types(core) + + # run_dfba_spatial(core) + # run_diffusion_process(core) + run_comets(core)