Line data Source code
1 : /* 2 : * Procedure.hpp 3 : * 4 : * Created on: 3 Mar 2020 5 : * Author(s): Jorn Reniers, Volkan Kumtepeli 6 : */ 7 : 8 : #pragma once 9 : 10 : #include "Cycler.hpp" 11 : #include "../cells/Cell.hpp" 12 : #include "../modules/Module.hpp" 13 : #include "../system/Battery.hpp" 14 : #include "../types/data_storage/cell_data.hpp" 15 : 16 : #include <vector> 17 : #include <iostream> 18 : #include <fstream> 19 : 20 : namespace slide { 21 : 22 : class Procedure 23 : { 24 : protected: 25 : bool balance{ true }; 26 : bool unitTest{ false }; 27 : int ndata{ 0 }; 28 : double balance_voltage{ 3.65 }; 29 : 30 : std::vector<ProcedureThroughputData> throughput; 31 : void storeThroughput(ThroughputData th, StorageUnit *su); 32 : 33 : public: 34 : Procedure() = default; 35 : Procedure(bool balance, double Vbal, int ndata, bool unitTest = false); 36 : 37 27 : ~Procedure() = default; 38 : 39 : void cycleAge(StorageUnit *su, bool testCV); 40 : void cycleAge(StorageUnit *su, int Ncycle, int Ncheck, int Nbal, bool testCV, double Ccha, double Cdis, double Vmax, double Vmin); 41 : void useCaseAge(StorageUnit *su, int cool); 42 : 43 : //!< function calls 44 : void balanceCheckup(StorageUnit *su, bool balance, bool checkup, double Ah, int nrCycle, std::string pref); 45 : 46 : //!< balancing 47 : Status rebalance(StorageUnit *su); 48 : 49 : //!< check-up procedures 50 : void checkUp(StorageUnit *su, double Ah, int nrCycle); //!< main checkup function which will call the others 51 : void checkUp_prep(StorageUnit *su); //!< bring the SU to a good voltage 52 : void checkUp_writeInitial(std::vector<Cell *> &cells, std::ofstream &file); 53 : 54 : //!< cooling system procedures 55 : void checkMod(StorageUnit *su); //!< main function to do a checkup on the modules 56 : 57 : //!< write the charge and energy throughput 58 : void writeThroughput(const std::string &SUID, double Ahtot); 59 : }; 60 : } // namespace slide