00001
00002
00004
00005 #include "OneGeneEnsembleDirector.h"
00006
00008
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
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 m_vpNetworks.push_back(new OneGeneInhibitoryNetwork());
00043 m_vpExperiments.push_back(new Experiment(m_vpNetworks[0],"Free Promoter"));
00044
00045 m_vpExperiments[0]->AddDataFileToList("smallOneGeneDS.dat");
00046
00047 m_vpMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00048 m_vpMinimizables.push_back(new SingleNetworkMinimizable());
00049
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
00058 SumAllocate();
00059
00060
00061 DefineRuns();
00062
00063
00064 DefineExperiments();
00065
00066
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
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
00096
00097
00098
00099
00100
00101
00102
00103 }
00104