Terminally differentiated effector cell needs additional death term. RC_fun = exp...
authorDariusz Murakowski <murakdar@mit.edu>
Wed, 29 Apr 2015 20:56:40 +0000 (16:56 -0400)
committerDariusz Murakowski <murakdar@mit.edu>
Wed, 29 Apr 2015 20:56:40 +0000 (16:56 -0400)
reaction.cpp
ss.cpp

index c95d419..5abc6e9 100644 (file)
@@ -63,7 +63,8 @@ double RC_fun(double E)
     // sigmoid function
     //double z = exp(-E);
     //return z/(1.0+z);
-    return (E>0.0) ? 1.0/(1.0+exp(-E)) : exp(E)/(1.0+exp(E));
+    //return (E>0.0) ? 1.0/(1.0+exp(-E)) : exp(E)/(1.0+exp(E));
+    return exp(-E);
 }
 
 double VirusReaction::recalc()
diff --git a/ss.cpp b/ss.cpp
index 56f26bd..ed39d8c 100644 (file)
--- a/ss.cpp
+++ b/ss.cpp
@@ -515,10 +515,16 @@ void importEpitope(RunParameters_SS &r, Species_parray &species, Rxn_parray &rea
             rx->products.push_back(Tgen[i+1]); rx->product_stoich.push_back(2);
             reactions.push_back(rx);
         }
-        // un-commenting the following reaction causes there to be no difference
-        // between the effector cell generations, so that the last generation
-        // will simply accumulate; dynamics should be equivalent to the original
-        // version before including multiple divisions
+        {   // r    // terminally differentiated effector cell just dies
+            ElementaryReaction* rx = new ElementaryReaction(r.rate_r);
+            rx->reactants.push_back(Tgen.back()); rx->reactant_stoich.push_back(1);
+            rx->products.push_back(Tgen.back()); rx->product_stoich.push_back(-1);
+            reactions.push_back(rx);
+        }
+        // un-commenting the following reaction, and removing the above reaction,
+        // causes there to be no difference between the effector cell generations,
+        // so that the last generation will simply accumulate; dynamics should be
+        // equivalent to the original version before including multiple divisions
         //{   // r
         //    ElementaryReaction* rx = new ElementaryReaction(r.rate_r);
         //    rx->reactants.push_back(Tgen.back()); rx->reactant_stoich.push_back(1);
@@ -684,10 +690,16 @@ void importEpitope_Potts(RunParameters_SS &r, Species_parray &species, Rxn_parra
             rx->products.push_back(Tgen[i+1]); rx->product_stoich.push_back(2);
             reactions.push_back(rx);
         }
-        // un-commenting the following reaction causes there to be no difference
-        // between the effector cell generations, so that the last generation
-        // will simply accumulate; dynamics should be equivalent to the original
-        // version before including multiple divisions
+        {   // r   // terminally differentiated effector cell just dies
+            ElementaryReaction* rx = new ElementaryReaction(r.rate_r);
+            rx->reactants.push_back(Tgen.back()); rx->reactant_stoich.push_back(1);
+            rx->products.push_back(Tgen.back()); rx->product_stoich.push_back(-1);
+            reactions.push_back(rx);
+        }
+        // un-commenting the following reaction, and removing the above reaction,
+        // causes there to be no difference between the effector cell generations,
+        // so that the last generation will simply accumulate; dynamics should be
+        // equivalent to the original version before including multiple divisions
         //{   // r
         //    ElementaryReaction* rx = new ElementaryReaction(r.rate_r);
         //    rx->reactants.push_back(Tgen.back()); rx->reactant_stoich.push_back(1);