00001
00002
00004
00005 #include "MartielGoldbeterDictyNetworkMinimizableDirector.h"
00006
00008
00010
00011 CMartielGoldbeterDictyNetworkMinimizableDirector::CMartielGoldbeterDictyNetworkMinimizableDirector()
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 CMartielGoldbeterDictyNetwork());
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 int masterResidualsSize = 0;
00055 for(int i = 0; i < _minimizableList.size(); i++)
00056 {
00057 int subRes = _minimizableList[i]->GetNResiduals();
00058 masterResidualsSize += subRes;
00059 cout << subRes << " residuals in minimizable " << i << endl;
00060 }
00061 if(m_dGammaSquared > 0.0)
00062 {
00063 masterResidualsSize += 1;
00064 }
00065 Allocate(masterResidualsSize);
00066
00067 cout << "Master Residuals size : " << masterResidualsSize << endl;
00068
00069
00070 DefineExperiments();
00071
00072 }
00073
00074 CMartielGoldbeterDictyNetworkMinimizableDirector::~CMartielGoldbeterDictyNetworkMinimizableDirector()
00075 {
00076 for(int i = 0; i < _plotterList.size(); i++)
00077 {
00078 _minimizableList[i]->Detach(_plotterList[i]);
00079 delete _plotterList[i];
00080 }
00081 }
00082
00083 void CMartielGoldbeterDictyNetworkMinimizableDirector::DefineExperiments()
00084 {
00085
00086 }
00087
00088 double CMartielGoldbeterDictyNetworkMinimizableDirector::GetParameter(int parIndex)
00089 {
00090
00091
00092 return _minimizableList[0]->GetParameter(parIndex);
00093 }
00094
00095 int CMartielGoldbeterDictyNetworkMinimizableDirector::GetNParameters()
00096 {
00097
00098 return _minimizableList[0]->GetNParameters();
00099 }
00100