Vector<Double> resultsTranscripts = new Vector<Double>();
Vector<Double> resultsProteins = new Vector<Double>();
Vector<Double> time = new Vector<Double>();
// Initialize Cell Amounts
Cell cell = new Cell();
cell.templates.initialize(new Item("Template", templates, 0.0));
cell.proteins.initialize(new Item("Rib", ribosomes, 0.0));
cell.proteins.initialize(new Item("Pol", polymerases, 0.0));
Vector<Reaction> rxns = new Vector<Reaction>();
// Add reactions
TestPolymeraseRxn transcription = new TestPolymeraseRxn(cell.templates, "Template", cell.proteins, "Pol", kms, transcriptDelay, cell.transcripts);
TestPolymeraseRxn translation = new TestPolymeraseRxn(cell.transcripts, "Template", cell.proteins, "Rib", ksp, proteinDelay, cell.proteins);
rxns.add(transcription);
rxns.add(translation);
LSVList reactions = new LSVList();
reactions.add("Reactions");
for (Reaction r : rxns)
{
reactions.add(r.toString());
}
Recorder.log(reactions.toString(), "Tester");
double t = 0;
while (t <= tf)
{
// Add matured items to the pool
cell.mature(t);
if(t % dtRecord == 0)
{
resultsTranscripts.add(cell.transcripts.getCount("Template"));
resultsProteins.add(cell.proteins.getCount("Template"));
time.add(t);
}
// calculate rates based on each reaction in the simulation
for (Reaction rxn : rxns)
{
rxn.calculateBaseRate();
rxn.applyStoichAndRate();
}
cell.simpleLinearIntegrate(dt, t, 1);
t = t + dt;
}
if(plot)