Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

OneGeneEnsembleDirector.cpp

Go to the documentation of this file.
00001 // OneGeneEnsembleDirector.cpp: implementation of the COneGeneEnsembleDirector class.
00002 //
00004 
00005 #include "OneGeneEnsembleDirector.h"
00006 
00008 // Construction/Destruction
00010 
00011 COneGeneEnsembleDirector::COneGeneEnsembleDirector(int ensembleSize)
00012 :CEnsembleCombinationDirector(ensembleSize)
00013 {
00014         double maxSimTime = 91.0;
00015         int intTime = (int) maxSimTime + 2;
00016         double stepSize = 0.0001;
00017         double frequency = 1.0;
00018         double moveTol = 1.0e-6;
00019         bool rateFlag = true;
00020         bool chemFlag = false;
00021         bool logsFlag = false;
00022         double timeWeight = 1.0;
00023         double rateWeight = 0.0;
00024         double chemWeight = 0.0;
00025         int nCells = 1;
00026         /*
00027         // runnable
00028         m_vpRxnNetworks.push_back(new OneGeneInhibitoryNetwork());
00029         m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00030         int nChemicals = m_vpRxnNetworks[0]->GetNumberOfChemicals();
00031         m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00032         m_vpRunnables.push_back(new CRunnable());
00033         m_vpRunnables[0]->SetComponents(m_vpRxnNetworks[0],m_vpRxnMovers[0],m_vpCellObservers[0]);
00034         m_vpEnsembleRunPlotters.push_back(new GnuPlotterEnsembleRunDirectorObserver());
00035         m_vpEnsembleRunPlotters[0]->SetTitle("OGN : 1 Bound Promoter, No Protein : ODE");
00036         m_vpEnsembleRunPlotters[0]->FixRunnable(0);
00037         m_vpEnsembleRunPlotters[0]->AddChemicalToList(2);
00038         m_vpEnsembleRunPlotters[0]->AddChemicalToList(3);
00039         this->Attach(m_vpEnsembleRunPlotters[0]);
00040         */
00041         // minimizable 1 - 1 free promoter, no mRNA or protein
00042         m_vpNetworks.push_back(new OneGeneInhibitoryNetwork());
00043         m_vpExperiments.push_back(new Experiment(m_vpNetworks[0],"Free Promoter"));
00044         // data files
00045         m_vpExperiments[0]->AddDataFileToList("smallOneGeneDS.dat");
00046         // mover 
00047         m_vpMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00048         m_vpMinimizables.push_back(new SingleNetworkMinimizable());
00049         // parameters
00050         m_vpMinimizables[0]->Initialize(m_vpExperiments[0],m_vpMovers[0],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00051         m_vpMinimizables[0]->SetRateConstantsWeight(0.0);
00052         m_vpEnsembleDataPlotters.push_back(new GnuPlotterEnsembleDataDirectorObserver());
00053         m_vpEnsembleDataPlotters[0]->SetTitle("OGN : 1 Free Promoter, No Protein : ODE");
00054         m_vpEnsembleDataPlotters[0]->FixMinimizable(0);
00055         this->Attach(m_vpEnsembleDataPlotters[0]);
00056 
00057         // allocate space to accumulate statistics
00058         SumAllocate();
00059 
00060         // Define runs
00061         DefineRuns();
00062 
00063         // Define experiments
00064         DefineExperiments();
00065 
00066         // Load in the ensemble information
00067         LoadEnsembleInfo("ensemble.par");
00068 
00069 }
00070 
00071 COneGeneEnsembleDirector::~COneGeneEnsembleDirector()
00072 {
00073         for(int i = 0; i < m_vpEnsembleRunPlotters.size(); i++)
00074         {
00075                 this->Detach(m_vpEnsembleRunPlotters[i]);
00076         }
00077         for(int i = 0; i < m_vpEnsembleDataPlotters.size(); i++)
00078         {
00079                 this->Detach(m_vpEnsembleDataPlotters[i]);
00080         }
00081 }
00082 
00083 void COneGeneEnsembleDirector::DefineExperiments()
00084 {
00085         // 1 free promoter region, no bound, no mRNA, no protein
00086         m_vpMinimizables[0]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(1.0);
00087         m_vpMinimizables[0]->GetExperiment()->GetReactionNetwork()->GetChemical(0)->Reset();
00088         m_vpMinimizables[0]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(0.0);
00089         m_vpMinimizables[0]->GetExperiment()->GetReactionNetwork()->GetChemical(1)->Reset();
00090 }
00091 
00092 void COneGeneEnsembleDirector::DefineRuns()
00093 {
00094         /*
00095         // 1 bound promoter, none free, no mRNA, no protein
00096         m_vpRunnables[0]->GetReactionNetwork()->GetChemical(0)->SetInitialAmount(0.0);
00097         m_vpRunnables[0]->GetReactionNetwork()->GetChemical(0)->Reset();        
00098         m_vpRunnables[0]->GetReactionNetwork()->GetChemical(1)->SetInitialAmount(1.0);
00099         m_vpRunnables[0]->GetReactionNetwork()->GetChemical(1)->Reset();        
00100         m_vpRunnables[0]->GetReactionNetwork()->GetChemical(3)->SetInitialAmount(0.0);
00101         m_vpRunnables[0]->GetReactionNetwork()->GetChemical(3)->Reset();
00102         */
00103 }
00104 

Generated on Mon Nov 3 09:38:03 2003 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002