Exemplo n.º 1
0
 def test_fastcore_induced_model_high_epsilon(self):
     core = {'rxn_2'}
     self.assertEqual(
         set(
             fastcore.fastcore(self.model,
                               core,
                               0.1,
                               scaling=1e7,
                               solver=self.solver)), {'rxn_1', 'rxn_2'})
Exemplo n.º 2
0
 def test_fastcore_induced_model(self):
     core = {'rxn_2', 'rxn_3'}
     self.assertEqual(set(
         fastcore.fastcore(self.model, core, 0.001, solver=self.solver)),
         {'rxn_1', 'rxn_2', 'rxn_3', 'rxn_4'})
Exemplo n.º 3
0
 def test_fastcore_induced_model_high_epsilon(self):
     core = {'rxn_2'}
     self.assertEqual(
         set(fastcore.fastcore(
             self.model, core, 0.1, scaling=1e7, solver=self.solver)),
         {'rxn_1', 'rxn_2'})
Exemplo n.º 4
0
 def test_fastcore_global_inconsistent(self):
     self.database.set_reaction('rxn_7', parse_reaction('|E| <=>'))
     self.model.add_reaction('rxn_7')
     with self.assertRaises(fastcore.FastcoreError):
         fastcore.fastcore(self.model, {'rxn_7'}, 0.001,
                           solver=self.solver)
Exemplo n.º 5
0
 def test_fastcore_induced_model(self):
     core = {"rxn_2", "rxn_3"}
     self.assertEquals(
         set(fastcore.fastcore(self.model, core, 0.001, solver=self.solver)), {"rxn_1", "rxn_2", "rxn_3", "rxn_4"}
     )
Exemplo n.º 6
0
 def test_fastcore_induced_model_high_epsilon(self):
     core = {"rxn_2"}
     self.assertEquals(set(fastcore.fastcore(self.model, core, 0.1, solver=self.solver)), {"rxn_1", "rxn_2"})