def model Cai as def import using "../cellLib/Components/units.cellml" for unit mV using unit mV; unit per_s using unit per_s; unit uM using unit uM; unit uM_per_s using unit uM_per_s; unit uM_per_s_mV using unit uM_per_s_mV; enddef; def import using "JVOCCi.cellml" for comp JVOCCi using comp JVOCCi; enddef; def import using "JNCXi.cellml" for comp JNCXi using comp JNCXi; enddef; def import using "JSERCAi.cellml" for comp JSERCAi using comp JSERCAi; enddef; def import using "JCICRi.cellml" for comp JCICRi using comp JCICRi; enddef; def import using "JPMCAi.cellml" for comp JPMCAi using comp JPMCAi; enddef; def import using "Jleaki.cellml" for comp Jleaki using comp Jleaki; enddef; def comp Cai as var L: per_s {pub: in, priv: out}; var D: per_s {pub: in, priv: out}; var v_d: mV {pub: in, priv: out}; var R_d: mV {pub: in, priv: out}; var C: uM_per_s {pub: in, priv: out}; var s_c: uM {pub: in, priv: out}; var c_c: uM {pub: in, priv: out}; var B: uM_per_s {pub: in, priv: out}; var c_b: uM {pub: in, priv: out}; var G_NCX: uM_per_s_mV {pub: in, priv: out}; var v_NCX: mV {pub: in, priv: out}; var c_NCX: uM {pub: in, priv: out}; var G_Ca: uM_per_s_mV {pub: in, priv: out}; var v_Ca1: mV {pub: in, priv: out}; var v_Ca2: mV {pub: in, priv: out}; var R_Ca: mV {pub: in, priv: out}; var J_VOCCi: uM_per_s {pub: out, priv: in}; var J_NCXi: uM_per_s {pub: out, priv: in}; var J_SERCAi: uM_per_s {pub: out, priv: in}; var J_CICRi: uM_per_s {pub: out, priv: in}; var J_PMCAi: uM_per_s {pub: out, priv: in}; var J_leaki: uM_per_s {pub: out, priv: in}; var t: second {pub: in}; var ci_init: uM {pub: in}; var c_i: uM {init: ci_init, pub: out, priv: out}; ode(c_i,t)=J_VOCCi-J_NCXi-J_SERCAi+J_CICRi-J_PMCAi+J_leaki; enddef; def group as encapsulation for comp Cai incl comp JVOCCi; comp JNCXi; comp JSERCAi; comp JCICRi; comp JPMCAi; comp Jleaki; endcomp; enddef; def map between Cai and JVOCCi for vars G_Ca and G_Ca; vars J_VOCCi and J_VOCCi; vars R_Ca and R_Ca; vars v_Ca1 and v_Ca1; vars v_Ca2 and v_Ca2; enddef; def map between Cai and JNCXi for vars G_NCX and G_NCX; vars J_NCXi and J_NCXi; vars c_NCX and c_NCX; vars c_i and c_i; vars v_NCX and v_NCX; enddef; def map between Cai and JSERCAi for vars B and B; vars J_SERCAi and J_SERCAi; vars c_b and c_b; vars c_i and c_i; enddef; def map between Cai and JCICRi for vars C and C; vars J_CICRi and J_CICRi; vars c_c and c_c; vars c_i and c_i; vars s_c and s_c; enddef; def map between Cai and JPMCAi for vars D and D; vars J_PMCAi and J_PMCAi; vars R_d and R_d; vars c_i and c_i; vars v_d and v_d; enddef; def map between Cai and Jleaki for vars J_leaki and J_leaki; vars L and L; enddef; enddef;