00001 #include "CombinatorialNetworksSloppyMinimizableDirector.h"
00002
00003 CCombinatorialNetworksSloppyMinimizableDirector::CCombinatorialNetworksSloppyMinimizableDirector(void)
00004 {
00005 double maxSimTime = 720.0;
00006 int intTime = (int) maxSimTime + 2;
00007 double stepSize = 0.001;
00008 double frequency = 0.1;
00009 double moveTol = 1.0e-06;
00010 int cnt = 0;
00011 int nChemicals;
00012
00013 m_dGammaSquared = 1.0e-07;
00014
00015
00016 m_vpRxnNetworks.push_back(new CCombinatorialNetwork());
00017 m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00018 nChemicals = m_vpRxnNetworks[cnt]->GetNumberOfChemicals();
00019 m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00020 m_vpRunnables.push_back(new CRunnable());
00021 m_vpRunnables[cnt]->SetComponents(m_vpRxnNetworks[cnt],m_vpRxnMovers[cnt],m_vpCellObservers[cnt]);
00022 m_vpRunnables[cnt]->SetRunnableName("D016_IPTGm_aTcm");
00023
00024 m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00025 m_vpGnuPlotters[cnt]->AddChemicalNumberToList(0);
00026 m_vpGnuPlotters[cnt]->SetTitle("D016 IPTG -, aTc -");
00027 m_vpRunnables[cnt]->Attach(m_vpGnuPlotters[cnt]);
00028 cnt++;
00029
00030
00031 m_vpRxnNetworks.push_back(new CCombinatorialNetwork());
00032 m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00033 nChemicals = m_vpRxnNetworks[cnt]->GetNumberOfChemicals();
00034 m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00035 m_vpRunnables.push_back(new CRunnable());
00036 m_vpRunnables[cnt]->SetComponents(m_vpRxnNetworks[cnt],m_vpRxnMovers[cnt],m_vpCellObservers[cnt]);
00037 m_vpRunnables[cnt]->SetRunnableName("D016_IPTGp_aTcm");
00038
00039 m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00040 m_vpGnuPlotters[cnt]->AddChemicalNumberToList(0);
00041 m_vpGnuPlotters[cnt]->SetTitle("D016 IPTG +, aTc -");
00042 m_vpRunnables[cnt]->Attach(m_vpGnuPlotters[cnt]);
00043 cnt++;
00044
00045
00046 m_vpRxnNetworks.push_back(new CCombinatorialNetwork());
00047 m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00048 nChemicals = m_vpRxnNetworks[cnt]->GetNumberOfChemicals();
00049 m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00050 m_vpRunnables.push_back(new CRunnable());
00051 m_vpRunnables[cnt]->SetComponents(m_vpRxnNetworks[cnt],m_vpRxnMovers[cnt],m_vpCellObservers[cnt]);
00052 m_vpRunnables[cnt]->SetRunnableName("D016_IPTGm_aTcp");
00053
00054 m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00055 m_vpGnuPlotters[cnt]->AddChemicalNumberToList(0);
00056 m_vpGnuPlotters[cnt]->SetTitle("D016 IPTG -, aTc +");
00057 m_vpRunnables[cnt]->Attach(m_vpGnuPlotters[cnt]);
00058 cnt++;
00059
00060
00061 m_vpRxnNetworks.push_back(new CCombinatorialNetwork());
00062 m_vpRxnMovers.push_back(new CQualityControlCashKarpMover(frequency,stepSize,moveTol));
00063 nChemicals = m_vpRxnNetworks[cnt]->GetNumberOfChemicals();
00064 m_vpCellObservers.push_back(new CellAverageObserver(nChemicals,intTime,1));
00065 m_vpRunnables.push_back(new CRunnable());
00066 m_vpRunnables[cnt]->SetComponents(m_vpRxnNetworks[cnt],m_vpRxnMovers[cnt],m_vpCellObservers[cnt]);
00067 m_vpRunnables[cnt]->SetRunnableName("D016_IPTGp_aTcp");
00068
00069 m_vpGnuPlotters.push_back(new GnuPlotterRunnableObserver());
00070 m_vpGnuPlotters[cnt]->AddChemicalNumberToList(0);
00071 m_vpGnuPlotters[cnt]->SetTitle("D016 IPTG -, aTc +");
00072 m_vpRunnables[cnt]->Attach(m_vpGnuPlotters[cnt]);
00073 cnt++;
00074
00075
00076 this->ParseDataFile("combinatorial.dat");
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088 DefineRuns();
00089 }
00090
00091 CCombinatorialNetworksSloppyMinimizableDirector::~CCombinatorialNetworksSloppyMinimizableDirector(void)
00092 {
00093 }
00094
00095 int CCombinatorialNetworksSloppyMinimizableDirector::GetNParameters()
00096 {
00097
00098 return m_vpRunnables[0]->GetReactionNetwork()->GetNumberOfRateConstants();
00099 }
00100
00101 void CCombinatorialNetworksSloppyMinimizableDirector::DefineRuns()
00102 {
00103 int i;
00104
00105 for(i = 0; i < 4; i++)
00106 {
00107 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(44);
00108 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(43);
00109 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(42);
00110 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(41);
00111 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(40);
00112 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(39);
00113 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(38);
00114 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(37);
00115 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(36);
00116 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(35);
00117 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(34);
00118 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(33);
00119 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(30);
00120 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(29);
00121 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(28);
00122 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(27);
00123 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(26);
00124 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(25);
00125 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(22);
00126 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(21);
00127 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(20);
00128 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(19);
00129 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(18);
00130 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(17);
00131 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(16);
00132 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(14);
00133 m_vpRunnables[i]->GetReactionNetwork()->RemoveReaction(12);
00134 }
00135
00136 m_vpRunnables[0]->GetReactionNetwork()->ChemicalReset();
00137 m_vpRunnables[1]->GetReactionNetwork()->ChemicalReset();
00138 }