00001
00002
00004
00005 #include "LaubLoomisDictyNetworkMinimizableDirector.h"
00006
00008
00010
00011 CLaubLoomisDictyNetworkMinimizableDirector::CLaubLoomisDictyNetworkMinimizableDirector()
00012 {
00013
00014 double maxSimTime = 91.0;
00015 double stepSize = 0.0001;
00016 double frequency = 1.0;
00017 int nCells = 1;
00018 double moveTol = 1.0e-06;
00019
00020 m_dGammaSquared = 1.0e-07;
00021
00022
00023 bool rateFlag = true;
00024 bool chemFlag = false;
00025 bool logsFlag = false;
00026 double timeWeight = 1.0;
00027 double rateWeight = 0.0;
00028 double chemWeight = 0.0;
00029
00030 int cnt = 0;
00031
00032
00033
00034 _networkList.push_back(new CLaubLoomisDictyNetwork());
00035 _experimentList.push_back(new Experiment(_networkList[cnt],"Roos et. al. 1977"));
00036
00037 _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/cAMPiRoos.dat");
00038
00039 _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00040 _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00041
00042 _plotterList[cnt]->SetTitle("D. discoideum cAMP Production:Roos et. al. 1977:ODE");
00043
00044 _minimizableList.push_back(new SingleNetworkMinimizable());
00045
00046 _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00047 _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00048
00049 _minimizableList[cnt]->Attach(_plotterList[cnt]);
00050 cnt++;
00051
00052
00053
00054 _networkList.push_back(new CLaubLoomisDictyNetwork);
00055 _experimentList.push_back(new Experiment(_networkList[cnt],"Aubry et. al. 1997"));
00056
00057 _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/dictyERK2Aubry.dat");
00058
00059 _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00060 _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00061
00062 _plotterList[cnt]->SetTitle("WT D. discoideum ERK2 Activation:Aubry et. al. 1997:ODE");
00063
00064 _minimizableList.push_back(new SingleNetworkMinimizable());
00065
00066 _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00067 _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00068
00069 _minimizableList[cnt]->Attach(_plotterList[cnt]);
00070 cnt++;
00071
00072
00073
00074 _networkList.push_back(new CLaubLoomisDictyNetwork);
00075 _experimentList.push_back(new Experiment(_networkList[cnt],"Aubry et. al. 1997"));
00076
00077 _experimentList[cnt]->AddDataFileToList("../DataFiles/TimeSeries/dictyERK2PKANullAubry.dat");
00078
00079 _moverList.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00080 _plotterList.push_back(new GnuPlotterTimeSeriesObserver());
00081
00082 _plotterList[cnt]->SetTitle("PKA- D. discoideum ERK2 Activation:Aubry et. al. 1997:ODE");
00083
00084 _minimizableList.push_back(new SingleNetworkMinimizable());
00085
00086 _minimizableList[cnt]->Initialize(_experimentList[cnt],_moverList[cnt],nCells,rateFlag,chemFlag,logsFlag,timeWeight,rateWeight,chemWeight);
00087 _minimizableList[cnt]->SetRateConstantsWeight(0.0);
00088
00089 _minimizableList[cnt]->Attach(_plotterList[cnt]);
00090 cnt++;
00091
00092
00093 int masterResidualsSize = 0;
00094 for(int i = 0; i < _minimizableList.size(); i++)
00095 {
00096 int subRes = _minimizableList[i]->GetNResiduals();
00097 masterResidualsSize += subRes;
00098 cout << subRes << " residuals in minimizable " << i << endl;
00099 }
00100 if(m_dGammaSquared > 0.0)
00101 {
00102 masterResidualsSize += 1;
00103 }
00104 Allocate(masterResidualsSize);
00105
00106 cout << "Master Residuals size : " << masterResidualsSize << endl;
00107
00108
00109 DefineExperiments();
00110
00111 }
00112
00113 CLaubLoomisDictyNetworkMinimizableDirector::~CLaubLoomisDictyNetworkMinimizableDirector()
00114 {
00115 for(int i = 0; i < _plotterList.size(); i++)
00116 {
00117 _minimizableList[i]->Detach(_plotterList[i]);
00118 delete _plotterList[i];
00119 }
00120
00121 }
00122
00123 void CLaubLoomisDictyNetworkMinimizableDirector::DefineExperiments()
00124 {
00125
00126
00127 _minimizableList[1]->GetExperiment()->GetReactionNetwork()->GetChemical(5)->SetInitialAmount(300000*30);
00128 _minimizableList[1]->GetExperiment()->GetReactionNetwork()->ChemicalReset();
00129
00130
00131 _minimizableList[2]->GetExperiment()->GetReactionNetwork()->GetChemical(5)->SetInitialAmount(300000*30);
00132 _minimizableList[2]->GetExperiment()->GetReactionNetwork()->ChemicalReset();
00133 _minimizableList[2]->GetExperiment()->GetReactionNetwork()->RemoveReaction(5);
00134 _minimizableList[2]->GetExperiment()->GetReactionNetwork()->RemoveReaction(3);
00135 _minimizableList[2]->GetExperiment()->GetReactionNetwork()->RemoveReaction(2);
00136 _minimizableList[2]->GetExperiment()->GetReactionNetwork()->RemoveReaction(1);
00137
00138 }
00139
00140 double CLaubLoomisDictyNetworkMinimizableDirector::GetParameter(int parIndex)
00141 {
00142
00143
00144 return _minimizableList[0]->GetParameter(parIndex);
00145 }
00146
00147 int CLaubLoomisDictyNetworkMinimizableDirector::GetNParameters()
00148 {
00149
00150 return _minimizableList[0]->GetNParameters();
00151 }