Skip to content

ODE PDE Deep learning

droten edited this page Feb 10, 2021 · 4 revisions

Interface:

General question: should this function work for both ODEs and PDEs, or do we separate these methods? The interface below was formulated for ODEs, but could be extended to PDEs.

Parameters for __init__ method:
  • DepVars: List with names of dependent variables. For example, for a SIR compartmental model, DepVars=['S', 'I', 'R'].

  • IndVars: List with names of input (independent) variables. For example, just ['t'] for ODEs such as a SIR model.

  • Params: List with names of parameters to be constrained by deep learning, for example ['beta', 'gamma'].

  • SolveFunc: Function with numerical solver. SolveFunc accepts the parameters and dependent variables for a given value of the independent variables (e.g., t), and computes the increment of the dependent variables at a point offset by step size h (e.g., t+h).

    Example for solving the susceptible compartment in a SIR model using an Euler step:

    def solver (depval, indval, params, step):
       incr={}
       incr['S'] = params['beta'] * depval['S'] * depval['I'] * step
    
    Example for 
    
  • Eqs:: Dictionary of equations associated with each term. Len(Eqs) = Ncomp. The dictionary key is the variable name. For each variable, a list of terms is given which should sum up to zero. Each term is a dictionary with the unit to be differentiated (key var), the order of the differentiation (key order) and a factor (key fact). Use order = 0to use the actual function. For constants to be added,var = None`. For example:

    $

Clone this wiki locally