← Documentation
ADS-IDAC Engine 5.0.0
ShortTermMemory.h
Go to the documentation of this file.
1#include <iostream>
2#include <typeinfo>
3// ShortTermMemory.h: interface for the ShortTermMemory class.
4#pragma once
5
6#include <list>
7#include <math.h>
8#include <boost/serialization/export.hpp>
9
10#include "InfoChunk.h"
11#include "InfoChunkMental.h"
12#include "../Scheduler/CommunicationPlace.h"
13#include "../CalculationAid/Timer.h"
14#include "KB.h"
15
16#include <list>
17#include <memory>
18#include <fstream>
19#include <boost/serialization/list.hpp>
20#include <boost/serialization/unique_ptr.hpp>
21#include <boost/serialization/assume_abstract.hpp>
22#include <boost/archive/text_oarchive.hpp>
23#include <boost/archive/text_iarchive.hpp>
24
25
27 public:
29 virtual ~ShortTermMemory();
30 void clearNewInfo();
36// void ShortTermMemoryPerceiveNewInfo(int, CommunicationPlace &, PIF &);
56 void setInfoGatherMode(int);
60 void saveShortTermMemoryToFile(std::ofstream &);
61 void retrieveShortTermMemoryFromFile(std::ifstream &);
62 int getCurrentGoal();
63 //
64 std::list<std::unique_ptr<InfoChunkMental>> grouped_info;
68 // Grant serialization access
70 template<class Archive>
71 void serialize(Archive & ar, const unsigned int version)
72 {
73// std::cout << "Serializing class: " << typeid(*this).name() << std::endl;
74 ar & grouped_info;
75 ar & perceived_info;
76 ar & new_info;
82 }
83 private:
84 int info_gather_mode;//sim::State::New or sim::State::OldInfo
85};
Knowledge Base — long-term knowledge about plant systems, components, and procedures.
Definition: KB.h:46
void serialize(Archive &ar, const unsigned int version)
virtual ~ShortTermMemory()
void addNewInfoChunkMentalForTheDiagnosis(DecisionDiagnosis *)
Timer support_system_update_time
void calculatePriorityAndSetStateOfActivation()
void clearShortTermMemoryFromRestartNodeInfoMultiProcessors()
int getTotalPieceOfInfoPerceived()
InfoChunkMental * getInfoChunkAt(int)
void checkAndGenerateInfoChunkMentalForRelatedAction(DecisionAction *, KB &)
void retrieveShortTermMemoryFromFile(std::ifstream &)
void activatePausedInfoChunck()
int getTotalNumberOfAlarmPerceived()
Timer parameter_update_time
void copyShortTermMemoryFromRestartInfo(ShortTermMemory &)
void checkAndGenerateInfoChunkMentalForRelatedAlarm(MentalAlarm *, KB &)
double getIntensiveOfInformationPerceived()
void checkAndGenerateInfoChunkMentalForRelatedComponentState(MentalComponentState *, KB &)
CommunicationPlace new_info
void checkAndGenerateInfoChunkMentalForRelatedParameterValue(MentalParameterValue *, KB &)
std::list< std::unique_ptr< InfoChunkMental > > grouped_info
void clearShortTermMemoryFromRestartInfo()
void saveShortTermMemoryToFile(std::ofstream &)
InfoChunkMental * getWorkingMemory()
void clearShortTermMemoryForRestart()
void copyShortTermMemoryToRestartInfo(ShortTermMemory &)
void checkAndGenerateInfoChunkMentalForRelatedSupportSystemState(MentalSupportSystemState *, KB &)
void setInfoGatherMode(int)
void initiationForSimulation()
void failCurrentDiagnosisAndActivateAPausedDiagnosis()
Timer component_update_time
InfoChunk perceived_info
friend class boost::serialization::access
void checkAndGenerateInfoChunkMentalForRelatedParameterTrend(MentalParameterTrend *, KB &)
void checkAndGenerateInfoChunkMentalForDiagnosis(DecisionDiagnosis *)
int getTotalFailedActionPack()
double getTotalWeightOfAlarmPerceived()
Definition: Timer.h:17