print_spec.push_back(Tn);
}
- { // p
+ std::vector<CTLSpecies*>::iterator it = Tgen.begin(), end = Tgen.end();
+
+ for (it = Tgen.begin(); it != end; ++it) { // p
KillingReaction* rx = new KillingReaction(r.rate_p);
- rx->T = T; rx->V = V;
+ rx->T = *it; rx->V = V;
reactions.push_back(rx);
}
{ // a
rx->Tfrom = N; rx->Tto = T; rx->V = V;
reactions.push_back(rx);
}
- { // r
+ for (size_t i=0; i<r.num_T_gen-1; i++) { // r
ElementaryReaction* rx = new ElementaryReaction(r.rate_r);
- rx->reactants.push_back(T); rx->reactant_stoich.push_back(1);
- rx->products.push_back(T); rx->product_stoich.push_back(1);
+ rx->reactants.push_back(Tgen[i]); rx->reactant_stoich.push_back(1);
+ rx->products.push_back(Tgen[i]); rx->product_stoich.push_back(-1);
+ rx->products.push_back(Tgen[i+1]); rx->product_stoich.push_back(2);
reactions.push_back(rx);
}
- { // d = 0.5 // note d' = 3.0
- ElementaryReaction* rx = new ElementaryReaction(r.rate_dprime);
- rx->reactants.push_back(T); rx->reactant_stoich.push_back(1);
- rx->products.push_back(T); rx->product_stoich.push_back(-1);
+ // 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
+ // 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);
+ //}
+ for (it = Tgen.begin(); it != end; ++it) { // d = 0.5 // note d' = 3.0
+ ElementaryReaction* rx = new ElementaryReaction(r.rate_d);
+ rx->reactants.push_back(*it); rx->reactant_stoich.push_back(1);
+ rx->products.push_back(*it); rx->product_stoich.push_back(-1);
reactions.push_back(rx);
}
{ // b
rx->Tfrom = M; rx->Tto = T; rx->V = V;
reactions.push_back(rx);
}
- { // g
+ for (it = Tgen.begin(); it != end; ++it) { // g
ElementaryReaction* rx = new ElementaryReaction(r.rate_g);
- rx->reactants.push_back(T); rx->reactant_stoich.push_back(1);
- rx->products.push_back(T); rx->product_stoich.push_back(-1);
+ rx->reactants.push_back(*it); rx->reactant_stoich.push_back(1);
+ rx->products.push_back(*it); rx->product_stoich.push_back(-1);
rx->products.push_back(M); rx->product_stoich.push_back(1);
reactions.push_back(rx);
}
print_spec.push_back(Tn);
}
- { // p
+ std::vector<CTLaaSpecies*>::iterator it = Tgen.begin(), end = Tgen.end();
+
+ for (it = Tgen.begin(); it != end; ++it) { // p
AAKillingReaction* rx = new AAKillingReaction(r.rate_p);
- rx->T = T; rx->V = V;
+ rx->T = *it; rx->V = V;
reactions.push_back(rx);
}
{ // a
rx->Tfrom = N; rx->Tto = T; rx->V = V;
reactions.push_back(rx);
}
- { // r
+ for (size_t i=0; i<r.num_T_gen-1; i++) { // r
ElementaryReaction* rx = new ElementaryReaction(r.rate_r);
- rx->reactants.push_back(T); rx->reactant_stoich.push_back(1);
- rx->products.push_back(T); rx->product_stoich.push_back(1);
+ rx->reactants.push_back(Tgen[i]); rx->reactant_stoich.push_back(1);
+ rx->products.push_back(Tgen[i]); rx->product_stoich.push_back(-1);
+ rx->products.push_back(Tgen[i+1]); rx->product_stoich.push_back(2);
reactions.push_back(rx);
}
- { // d = 0.5 // note d' = 3.0
- ElementaryReaction* rx = new ElementaryReaction(r.rate_dprime);
- rx->reactants.push_back(T); rx->reactant_stoich.push_back(1);
- rx->products.push_back(T); rx->product_stoich.push_back(-1);
+ // 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
+ // 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);
+ //}
+ for (it = Tgen.begin(); it != end; ++it) { // d = 0.5 // note d' = 3.0
+ ElementaryReaction* rx = new ElementaryReaction(r.rate_d);
+ rx->reactants.push_back(*it); rx->reactant_stoich.push_back(1);
+ rx->products.push_back(*it); rx->product_stoich.push_back(-1);
reactions.push_back(rx);
}
{ // b
rx->Tfrom = M; rx->Tto = T; rx->V = V;
reactions.push_back(rx);
}
- { // g
+ for (it = Tgen.begin(); it != end; ++it) { // g
ElementaryReaction* rx = new ElementaryReaction(r.rate_g);
- rx->reactants.push_back(T); rx->reactant_stoich.push_back(1);
- rx->products.push_back(T); rx->product_stoich.push_back(-1);
+ rx->reactants.push_back(*it); rx->reactant_stoich.push_back(1);
+ rx->products.push_back(*it); rx->product_stoich.push_back(-1);
rx->products.push_back(M); rx->product_stoich.push_back(1);
reactions.push_back(rx);
}