-
Notifications
You must be signed in to change notification settings - Fork 22
ODE PDE Deep learning
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.
-
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 (keyvar), the order of the differentiation (keyorder) and a factor (keyfact). Useorder = 0to use the actual function. For constants to be added,var = None`. For example:$