Learn R Programming

Rato (version 0.1.0)

Michaelis.Menten.Fast: Optimized Michaelis-Menten equations

Description

The optimized Michaelis-Menten equations described by Barabasi in his paper 'Universal resilience patterns in complex networks'.

Usage

Michaelis.Menten.Fast(t, x, params)

Value

A list with `dx`

Arguments

t

Current time

x

Current value of all nodes

params

List of parameters. Should include the B_eff matrix of the network as `Beta`, and parameters `f, h,` and `B`. To understand how to construct the matrix B_eff, please refer to the Barabasi paper.

Examples

Run this code
# \donttest{
   node_file <- system.file("extdata", "IL17.nodes.csv", package = "Rato")
   edge_file <- system.file("extdata", "IL17.edges.csv", package = "Rato")
   g <- Rato::graph.from.csv(node_file, edge_file, sep=",", header=TRUE)
 
   initial_parameters <- function(M){
     initial_params <- list('f' = 1, 'h' = 2, 'B' = 0.1, 'Beta' = Rato::Barabasi.B_eff(M))
     return(initial_params)
   }
   
   update_parameters <- function(params){
     M <- params$M
     params$Beta <- Rato::Barabasi.B_eff(M)
     return(params)
   }
 
   Rato::node.removal.thread( system = Rato::Michaelis.Menten.Fast
                            , M = g$M
                            , x0 = Rato::Barabasi.X_eff(g$M, g$initial_values)
                            , initial_params = initial_parameters
                            , update_params = update_parameters
                            , to.numeric = TRUE)

# }

Run the code above in your browser using DataLab