diff --git a/source/trunk/include/CLASS.hxx b/source/trunk/include/CLASS.hxx index dad59aadee1b58dfd43692642baa206ad0997251..1b6cbc57b65eae8123514ca4915cd3be48150640 100755 --- a/source/trunk/include/CLASS.hxx +++ b/source/trunk/include/CLASS.hxx @@ -148,6 +148,8 @@ protected : IsotopicVector fTotalCooling; ///< Sum of all IV in Cooling IV IsotopicVector fFuelFabrication; ///< Sum of all IV in Fabrication IV IsotopicVector fTotalInReactor; ///< Sum of all IV in Reactor IV + + IsotopicVector fIVInCycleTotal; ///< Summ of all IV in the cycle (without Waste) IV IsotopicVector fIVTotal; ///< Summ of all IV in the parc (including Waste) IV double fParcPower; ///< Summ of the Power of all reactor in the parc diff --git a/source/trunk/include/CLSSFacility.hxx b/source/trunk/include/CLSSFacility.hxx index 5b9ccaa4b219d51249cb006ccd6f7f158337dd38..8e1b4c33d3c69d75ceff881f4af8dd7370856a23 100644 --- a/source/trunk/include/CLSSFacility.hxx +++ b/source/trunk/include/CLSSFacility.hxx @@ -41,7 +41,9 @@ public : cSecond GetCreationTime() const { return fCreationTime; } //!< Return the creation time of the Facility cSecond GetLifeTime() const { return fLifeTime; } //!< Return the life time of the Facility CLASS* GetParc() { return fParc; } - + IsotopicVector GetCumulativeIVIn(IsotopicVector IV) { return fCumulativeIVIn;} + IsotopicVector GetCumulativeIVOut(IsotopicVector IV) { return fCumulativeIVOut;} + //********* Set Method *********// void SetId(int id) { fId = id; } //!< Set The Facility Parc'Id @@ -54,7 +56,9 @@ public : void SetInCycleTime(double incycletime) { fInCycleTime = (cSecond)incycletime; fIsStarted = true; } //!< Set the cycle time (Cycle of the loading Plan) void SetInternalTime(double internaltime) { fInternalTime = (cSecond)internaltime; } //!< Set the cycle time (Cycle of the loading Plan) - + void AddCumulativeIVIn(IsotopicVector IV) { fCumulativeIVIn += IV;} + void AddCumulativeIVOut(IsotopicVector IV) { fCumulativeIVOut += IV;} + //********* Modification Method *********// virtual void Evolution(cSecond t) { } //!< Performe the Evolution to the Time t virtual void Dump() { } //!< Write Modification (IV In/Out, filling the TF...) @@ -71,7 +75,9 @@ protected : cSecond fCycleTime; ///< Cycle Time IsotopicVector fInsideIV; ///< All IV in the Facility (fuel for reactor, total for all others...) - + IsotopicVector fCumulativeIVIn; ///< All IV in the Facility (fuel for reactor, total for all others...) + IsotopicVector fCumulativeIVOut; ///< All IV in the Facility (fuel for reactor, total for all others...) + //********* Internal Parameter *********// private : diff --git a/source/trunk/src/FabricationPlant.cxx b/source/trunk/src/FabricationPlant.cxx index ed7ba5e3d42144de5e76be0f86aec5652730c0c9..00716214691827bb06893189bd026fddef9f4b0b 100644 --- a/source/trunk/src/FabricationPlant.cxx +++ b/source/trunk/src/FabricationPlant.cxx @@ -359,6 +359,10 @@ void FabricationPlant::BuildFuelForReactor(int ReactorId) IResult = fReactorFuturIV.insert( pair<int, IsotopicVector>(ReactorId,IVBeginCycle) ); if(IResult.second == false) IResult.first->second = IVBeginCycle; + + AddCumulativeIVIn(IVBeginCycle); + + } } } @@ -436,9 +440,11 @@ void FabricationPlant::TakeReactorFuel(int Id) IsotopicVector IV; map<int ,IsotopicVector >::iterator it2 = fReactorFuturIV.find( Id ); + AddCumulativeIVOut(it2->second); + if (it2 != fReactorFuturIV.end()) (*it2).second = IV; - + } //________________________________________________________________________ diff --git a/source/trunk/src/Pool.cxx b/source/trunk/src/Pool.cxx index e8b72440ad55e64e768b40f727c4efa978a848a5..79bd4f2bc51d51e788661ea100a8e7eac76ce40e 100755 --- a/source/trunk/src/Pool.cxx +++ b/source/trunk/src/Pool.cxx @@ -146,7 +146,7 @@ IsotopicVector Pool::GetDecay(IsotopicVector isotopicvector, cSecond t) //________________________________________________________________________ // Add Temporary IV : // Cooling -// Separation +// //________________________________________________________________________ void Pool::AddIVCooling(IsotopicVector IV) { @@ -156,12 +156,16 @@ void Pool::AddIVCooling(IsotopicVector IV) fCoolingStartingTime.push_back(fInternalTime); fCoolingLastIndex++; fCoolingIndex.push_back(fCoolingLastIndex); + + AddCumulativeIVIn(IV); + } //________________________________________________________________________ void Pool::RemoveIVCooling(int i) //!< Remove a Cooling IsotopicVector { + AddCumulativeIVOut(fIVCooling[i]); fIVCooling.erase(fIVCooling.begin()+i); fCoolingStartingTime.erase(fCoolingStartingTime.begin()+i); @@ -266,7 +270,7 @@ void Pool::Dump() fStorage->AddToStock(fIVCooling[idx]); else GetParc()->AddWaste(fIVCooling[idx]); - + fCoolingEndOfCycle.erase(fCoolingEndOfCycle.begin()+i); // Remove index entry RemoveIVCooling(idx); // Remove IVcooling } diff --git a/source/trunk/src/Reactor.cxx b/source/trunk/src/Reactor.cxx index c271d7bb47b6b494eac328f3d4ff3e5f2e862f86..93f8f1b40bd18adc0ebc05751e51c7eee1ff1839 100755 --- a/source/trunk/src/Reactor.cxx +++ b/source/trunk/src/Reactor.cxx @@ -418,7 +418,10 @@ void Reactor::Dump() fEndOfCycle = false; if(fIsStarted == true ) // A Cycle has already been done + { fAssociedPool->AddIVCooling(fInsideIV); + GetCumulativeIVOut(fInsideIV); + } else fIsStarted = true; // Just start the first cycle if(GetParc()->GetStockManagement() == false && fIsStorage == true) @@ -441,12 +444,15 @@ void Reactor::Dump() else GetParc()->AddGod(fIVInCycle); fInsideIV = fIVBeginCycle; + AddCumulativeIVIn(fIVBeginCycle); + fInCycleTime = 0; } else if (fEndOfCycle == true && fShutDown == true) //shutdown at end of Cycle { fAssociedPool->AddIVCooling(fIVOutCycle); + GetCumulativeIVOut(fIVOutCycle); fInsideIV.Clear(); fInCycleTime = 0; fIsStarted = false; // shut down the Reactor @@ -454,6 +460,7 @@ void Reactor::Dump() else if (fEndOfCycle == false && fShutDown == true) //shutdown during Cycle { fAssociedPool->AddIVCooling(fInsideIV); + GetCumulativeIVOut(fInsideIV); fInsideIV.Clear(); fInCycleTime = 0; fIsStarted = false; // shut down the Reactor @@ -476,6 +483,7 @@ void Reactor::Dump() if(fIsStarted == true ) // A Cycle has already been done { fAssociedPool->AddIVCooling(fIVOutCycle); + GetCumulativeIVOut(fIVOutCycle); } else fIsStarted = true; // Just start the first cycle @@ -484,12 +492,15 @@ void Reactor::Dump() fInsideIV = fIVBeginCycle; + AddCumulativeIVIn(fIVBeginCycle); + fInCycleTime = 0; } else if (fEndOfCycle == true && fShutDown == true) //shutdown at end of Cycle { fAssociedPool->AddIVCooling(fIVOutCycle); + GetCumulativeIVOut(fIVOutCycle); fInsideIV.Clear(); fInCycleTime = 0; fIsStarted = false; // shut down the Reactor @@ -497,6 +508,7 @@ void Reactor::Dump() else if (fEndOfCycle == false && fShutDown == true) //shutdown during Cycle { fAssociedPool->AddIVCooling(fInsideIV); + GetCumulativeIVOut(fInsideIV); fInsideIV.Clear(); fInCycleTime = 0; fIsStarted = false; // shut down the Reactor diff --git a/source/trunk/src/Storage.cxx b/source/trunk/src/Storage.cxx index ff45aec16d9b2ee5a9dace435be4767da482bbf5..4e8fe5adabdf77248bbab95e0c218e0e12affb8a 100644 --- a/source/trunk/src/Storage.cxx +++ b/source/trunk/src/Storage.cxx @@ -96,6 +96,8 @@ void Storage::ClearStock() void Storage::AddToStock(IsotopicVector isotopicvector) { + AddCumulativeIVIn(isotopicvector); + if(GetParc()->GetStockManagement() == true) fIVStock.push_back(isotopicvector); AddToFullStock(isotopicvector); @@ -117,6 +119,8 @@ void Storage::TakeFractionFromStock(int IVId,double fraction) { fInsideIV -= fIVStock[IVId]*fraction; fIVStock[IVId] = fIVStock[IVId]*(1-fraction); + + AddCumulativeIVOut(fIVStock[IVId]*fraction); } @@ -137,7 +141,11 @@ void Storage::TakeFromStock(IsotopicVector isotopicvector) { if(GetParc()->GetStockManagement() == false) + { + + AddCumulativeIVOut(isotopicvector); fInsideIV -= isotopicvector; + } else { cout << "!!Warning!! !!!Storage!!! TakeFromStock can't be DEFINE WITH REAL stock management" << endl;