def get_param_elas_mat(net, p=None, normed=False): """ """ net.update(p=p, t=np.inf) ns = net.namespace.copy() ns.update(net.varvals.to_dict()) if not hasattr(net, 'Ep_str'): Ep_code = get_Ep_str(net)[1] else: Ep_code = net.Ep_code Ep = Matrix(eval(Ep_code, ns), net.vids, net.pids) if normed: return Ep.normalize(net.v, net.p) else: return Ep
def get_param_elas_mat(net, p=None, normed=False): """ """ net.update(p=p, t=np.inf) ns = net.namespace.copy() ns.update(net.varvals.to_dict()) if not hasattr(net, 'Ep_str'): Ep_code = get_Ep_str(net)[1] else: Ep_code = net.Ep_code Ep = Matrix(eval(Ep_code, ns), net.rateids, net.pids) if normed: return Ep.normalize(net.J, net.p) else: return Ep
def get_concn_elas_mat(net, p=None, normed=False): """ FIXME ***: compile or generate dynamic Python functions """ net.update(p=p, t=np.inf) ns = net.namespace.copy() # without copy, the namespace is contaminated ns.update(net.varvals.to_dict()) if not hasattr(net, 'Ex_code'): Ex_code = get_Ex_str(net)[1] else: Ex_code = net.Ex_code Es = Matrix(eval(Ex_code, ns), net.vids, net.xids) if normed: return Es.normalize(net.v, net.s) else: return Es
def get_concn_elas_mat(net, p=None, normed=False): """ FIXME ***: compile or generate dynamic Python functions """ net.update(p=p, t=np.inf) ns = net.namespace.copy() # without copy, the namespace is contaminated ns.update(net.vals.to_dict()) if not hasattr(net, 'Ex_code'): Ex_code = get_Ex_str(net)[1] else: Ex_code = net.Ex_code Es = Matrix(eval(Ex_code, ns), net.rateids, net.xids) if normed: return Es.normalize(net.J, net.s) else: return Es