def run_tfba(self, reaction):
        """Run FBA and tFBA on model."""

        solver = self._get_solver(integer=True)
        p = fluxanalysis.FluxBalanceProblem(self._mm, solver)

        start_time = time.time()

        p.add_thermodynamic()

        try:
            p.maximize(reaction)
        except fluxanalysis.FluxBalanceError as e:
            self.report_flux_balance_error(e)

        logger.info('Solving took {:.2f} seconds'.format(
            time.time() - start_time))

        for reaction_id in self._mm.reactions:
            yield reaction_id, p.get_flux(reaction_id)
def run_tfba ( self , reaction ) : solver = self . _get_solver ( integer = True ) p = fluxanalysis . FluxBalanceProblem ( self . _mm , solver ) start_time = time . time ( ) p . add_thermodynamic ( ) try : p . maximize ( reaction ) except fluxanalysis . FluxBalanceError as e : self . report_flux_balance_error ( e ) logger . info ( 'Solving took {:.2f} seconds' . format ( time . time ( ) - start_time ) ) for reaction_id in self . _mm . reactions : yield reaction_id , p . get_flux ( reaction_id )
Run FBA and tFBA on model.