← Documentation
ADS-IDAC Engine 5.0.0
KB Class Reference

#include <KB.h>

Public Member Functions

void state_save (boost::archive::binary_oarchive &ar) const
 
void state_load (boost::archive::binary_iarchive &ar)
 
 KB ()
 
virtual ~KB ()
 
void initiationForSimulation (int, InfoChunk &)
 
void readSystemDecompositionKB (int)
 
void readHardWiredDiagnosis (int, InfoChunk &)
 
void readIndicatorBiasFactors (int)
 
void readActionPack (int)
 
void KBcheckHardWiredMatchForAlarmState (std::string, int)
 
void KBcheckHardWiredMatchForComponentState (std::string, int)
 
void KBcheckHardWiredMatchForSupportSystemState (std::string, int)
 
void KBcheckHardWiredMatchForParameterValue (std::string, double, int)
 
void KBcheckHardWiredMatchForParameterTrend (std::string, int)
 
void KBcheckHardWiredMatchForControl (std::string, double)
 
void KBcheckHardWiredMatchForMentalBelief (std::string, int)
 
void KBcheckHardWiredMatchForProcedureActivity (std::string, int)
 
void KBcalculateHardWiredConfidence ()
 
void copyKBForRestart (KB &)
 
void clearKBForRestart ()
 
void copyKB (KB &)
 
void outputHardWiredDiagnosisLabelToFile (std::string, std::ofstream &)
 
void outputHardWiredDiagnosisUnitToFile (std::ofstream &)
 
void clearKB ()
 
std::string getProcedureNameOfHWDiagnosis (std::string)
 
std::string getStepNameOfHWDiagnosis (std::string)
 
std::string getAssociatedFunctionalDecompositionName (int)
 
double getConfidenceLevelOfHWDiagnosis (std::string)
 
void saveKBToFile (std::ofstream &)
 
void retrieveKBFromFile (std::ifstream &)
 
KBHardWiredUnit * getPtrToHardWiredDiagnosis (std::string)
 

Public Attributes

std::vector< std::unique_ptr< KBHardWiredUnit > > hard_wired_diagnosis
 
std::vector< std::unique_ptr< KBSystemDecompositionUnit > > system_decomposition
 
std::vector< std::unique_ptr< KBBiasFactorUnit > > indicator_bias_factors
 
std::map< std::string, KBSystemDecompositionUnit * > system_decomposition_map
 
std::map< int, std::string > system_function_map
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 

Detailed Description

Definition at line 46 of file KB.h.

Constructor & Destructor Documentation

◆ KB()

KB::KB ( )

Definition at line 17 of file KB.cpp.

◆ ~KB()

KB::~KB ( )
virtual

Definition at line 21 of file KB.cpp.

References clearKB().

Here is the call graph for this function:

Member Function Documentation

◆ clearKB()

void KB::clearKB ( )

Definition at line 24 of file KB.cpp.

References hard_wired_diagnosis, indicator_bias_factors, system_decomposition, system_decomposition_map, and system_function_map.

Referenced by Operator::clearOperatorFinal(), Operator::clearOperatorFromRestartNodeInfoMultiProcessors(), Operator::seedKnowledgeBaseFromMaster(), and ~KB().

Here is the caller graph for this function:

◆ clearKBForRestart()

void KB::clearKBForRestart ( )

Definition at line 309 of file KB.cpp.

References hard_wired_diagnosis, indicator_bias_factors, system_decomposition, system_decomposition_map, and system_function_map.

Referenced by Operator::clearOperatorForRestart(), and Operator::clearOperatorFromRestartInfo().

Here is the caller graph for this function:

◆ copyKB()

void KB::copyKB ( KB &  _kb)

Definition at line 287 of file KB.cpp.

References hard_wired_diagnosis, indicator_bias_factors, system_decomposition, system_decomposition_map, and system_function_map.

Referenced by Operator::copyOperatorFromRestartInfoMultiProcessor().

Here is the caller graph for this function:

◆ copyKBForRestart()

void KB::copyKBForRestart ( KB &  _kb)

Definition at line 265 of file KB.cpp.

References hard_wired_diagnosis, indicator_bias_factors, system_decomposition, system_decomposition_map, and system_function_map.

Referenced by Operator::copyOperatorFromRestartInfo(), Operator::copyOperatorToRestartInfo(), and Operator::seedKnowledgeBaseFromMaster().

Here is the caller graph for this function:

◆ getAssociatedFunctionalDecompositionName()

string KB::getAssociatedFunctionalDecompositionName ( int  _function_id)

Definition at line 383 of file KB.cpp.

References r5pars_, and system_function_map.

Referenced by Operator::checkItemRelevanceToCurrentDiagnosis().

Here is the caller graph for this function:

◆ getConfidenceLevelOfHWDiagnosis()

double KB::getConfidenceLevelOfHWDiagnosis ( std::string  )

Definition at line 422 of file KB.cpp.

References hard_wired_diagnosis, and r5pars_.

◆ getProcedureNameOfHWDiagnosis()

string KB::getProcedureNameOfHWDiagnosis ( std::string  )

Definition at line 334 of file KB.cpp.

References AdsSimErr, SimulationContext::Branch_center, g_sim, hard_wired_diagnosis, r5pars_, BranchRecord::setTempESMessage(), and BranchRecord::setTempTypeOfConsequence().

Referenced by OperatorAT::infoChunking(), OperatorDM::infoChunking(), and OperatorDM::performRecoveryAction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPtrToHardWiredDiagnosis()

KBHardWiredUnit * KB::getPtrToHardWiredDiagnosis ( std::string  )

Definition at line 400 of file KB.cpp.

References hard_wired_diagnosis, and r5pars_.

Referenced by OperatorDM::selectGoal().

Here is the caller graph for this function:

◆ getStepNameOfHWDiagnosis()

string KB::getStepNameOfHWDiagnosis ( std::string  )

Definition at line 358 of file KB.cpp.

References AdsSimErr, SimulationContext::Branch_center, g_sim, hard_wired_diagnosis, r5pars_, BranchRecord::setTempESMessage(), and BranchRecord::setTempTypeOfConsequence().

Referenced by OperatorAT::infoChunking(), OperatorDM::infoChunking(), and OperatorDM::performRecoveryAction().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initiationForSimulation()

void KB::initiationForSimulation ( int  _operator,
InfoChunk &  _perceived_info 
)

Definition at line 32 of file KB.cpp.

References readHardWiredDiagnosis(), readIndicatorBiasFactors(), and readSystemDecompositionKB().

Referenced by Operator::initiationForSimulation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ KBcalculateHardWiredConfidence()

void KB::KBcalculateHardWiredConfidence ( )

Definition at line 329 of file KB.cpp.

References hard_wired_diagnosis.

Referenced by OperatorAT::oneThroughProcessForBlockI(), and OperatorDM::oneThroughProcessForBlockI().

Here is the caller graph for this function:

◆ KBcheckHardWiredMatchForAlarmState()

void KB::KBcheckHardWiredMatchForAlarmState ( std::string  ,
int   
)

Definition at line 240 of file KB.cpp.

References hard_wired_diagnosis.

Referenced by OperatorAT::infoChunking(), and OperatorDM::infoChunking().

Here is the caller graph for this function:

◆ KBcheckHardWiredMatchForComponentState()

void KB::KBcheckHardWiredMatchForComponentState ( std::string  ,
int   
)

Definition at line 245 of file KB.cpp.

References hard_wired_diagnosis.

Referenced by OperatorAT::infoChunking(), and OperatorDM::infoChunking().

Here is the caller graph for this function:

◆ KBcheckHardWiredMatchForControl()

void KB::KBcheckHardWiredMatchForControl ( std::string  ,
double   
)

Definition at line 225 of file KB.cpp.

References hard_wired_diagnosis.

Referenced by OperatorAT::infoChunking(), and OperatorDM::infoChunking().

Here is the caller graph for this function:

◆ KBcheckHardWiredMatchForMentalBelief()

void KB::KBcheckHardWiredMatchForMentalBelief ( std::string  ,
int   
)

Definition at line 230 of file KB.cpp.

References hard_wired_diagnosis.

Referenced by Operator::checkAndActivateHWKB(), OperatorAT::infoChunking(), OperatorDM::infoChunking(), and readHardWiredDiagnosis().

Here is the caller graph for this function:

◆ KBcheckHardWiredMatchForParameterTrend()

void KB::KBcheckHardWiredMatchForParameterTrend ( std::string  ,
int   
)

Definition at line 260 of file KB.cpp.

References hard_wired_diagnosis.

◆ KBcheckHardWiredMatchForParameterValue()

void KB::KBcheckHardWiredMatchForParameterValue ( std::string  ,
double  ,
int   
)

Definition at line 255 of file KB.cpp.

References hard_wired_diagnosis.

Referenced by OperatorAT::infoChunking(), and OperatorDM::infoChunking().

Here is the caller graph for this function:

◆ KBcheckHardWiredMatchForProcedureActivity()

void KB::KBcheckHardWiredMatchForProcedureActivity ( std::string  ,
int   
)

Definition at line 235 of file KB.cpp.

References hard_wired_diagnosis.

Referenced by ProcedureStep::executeInstinctiveResponseProcedureTransfer(), OperatorAT::infoChunking(), OperatorDM::infoChunking(), ProcedureStep::oneThroughProcessForInstinctiveResponseProcedure(), and ProcedureStep::oneThroughProcessForProcedureStep().

Here is the caller graph for this function:

◆ KBcheckHardWiredMatchForSupportSystemState()

void KB::KBcheckHardWiredMatchForSupportSystemState ( std::string  ,
int   
)

Definition at line 250 of file KB.cpp.

References hard_wired_diagnosis.

Referenced by OperatorAT::infoChunking(), and OperatorDM::infoChunking().

Here is the caller graph for this function:

◆ outputHardWiredDiagnosisLabelToFile()

void KB::outputHardWiredDiagnosisLabelToFile ( std::string  ,
std::ofstream &   
)

Definition at line 316 of file KB.cpp.

References hard_wired_diagnosis.

Referenced by KeyParameterHistoryUnit::outputLabelToFile().

Here is the caller graph for this function:

◆ outputHardWiredDiagnosisUnitToFile()

void KB::outputHardWiredDiagnosisUnitToFile ( std::ofstream &  )

Definition at line 324 of file KB.cpp.

References hard_wired_diagnosis.

Referenced by KeyParameterHistoryUnit::outputUnitToFile().

Here is the caller graph for this function:

◆ readActionPack()

void KB::readActionPack ( int  )

◆ readHardWiredDiagnosis()

void KB::readHardWiredDiagnosis ( int  _operator,
InfoChunk &  _perceived_info 
)

Definition at line 40 of file KB.cpp.

References SimulationContext::Branch_center, g_sim, Scheduler::getOATDirectory(), Scheduler::getOCTDirectory(), Scheduler::getODMDirectory(), hard_wired_diagnosis, KBcheckHardWiredMatchForMentalBelief(), InfoChunk::mental_belief, NoKB, sim::None, sim::Operator::OAT, sim::Operator::OCT, sim::Operator::ODM, r5pars_, BranchRecord::setTempESMessage(), BranchRecord::setTempTypeOfConsequence(), and SimulationContext::SScheduler.

Referenced by initiationForSimulation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readIndicatorBiasFactors()

void KB::readIndicatorBiasFactors ( int  _operator)

Definition at line 103 of file KB.cpp.

References SimulationContext::Branch_center, g_sim, Scheduler::getOATDirectory(), Scheduler::getOCTDirectory(), Scheduler::getODMDirectory(), indicator_bias_factors, NoKB, sim::Operator::OAT, sim::Operator::OCT, sim::Operator::ODM, r5pars_, BranchRecord::setTempESMessage(), BranchRecord::setTempTypeOfConsequence(), and SimulationContext::SScheduler.

Referenced by initiationForSimulation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readSystemDecompositionKB()

void KB::readSystemDecompositionKB ( int  _operator)

Definition at line 150 of file KB.cpp.

References SimulationContext::Branch_center, g_sim, KBElement::getInfoName(), Scheduler::getOATDirectory(), Scheduler::getOCTDirectory(), Scheduler::getODMDirectory(), NoKB, sim::Operator::OAT, sim::Operator::OCT, sim::Operator::ODM, r5pars_, BranchRecord::setTempESMessage(), BranchRecord::setTempTypeOfConsequence(), SimulationContext::SScheduler, system_decomposition, system_decomposition_map, and system_function_map.

Referenced by initiationForSimulation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ retrieveKBFromFile()

void KB::retrieveKBFromFile ( std::ifstream &  )

Definition at line 467 of file KB.cpp.

References SimulationContext::Branch_center, g_sim, hard_wired_diagnosis, indicator_bias_factors, NoKB, r5pars_, BranchRecord::setTempESMessage(), BranchRecord::setTempTypeOfConsequence(), system_decomposition, system_decomposition_map, and system_function_map.

Referenced by Operator::retrieveOperatorFromFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveKBToFile()

void KB::saveKBToFile ( std::ofstream &  )

Definition at line 444 of file KB.cpp.

References hard_wired_diagnosis, indicator_bias_factors, system_decomposition, and system_function_map.

Referenced by Operator::saveOperatorToFile().

Here is the caller graph for this function:

◆ serialize()

template<class Archive >
void KB::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprivate

◆ state_load()

void KB::state_load ( boost::archive::binary_iarchive &  ar)

Definition at line 543 of file KB.cpp.

References hard_wired_diagnosis, and indicator_bias_factors.

Referenced by Operator::serialize().

Here is the caller graph for this function:

◆ state_save()

void KB::state_save ( boost::archive::binary_oarchive &  ar) const

Definition at line 535 of file KB.cpp.

References hard_wired_diagnosis, and indicator_bias_factors.

Referenced by Operator::serialize().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 91 of file KB.h.

Member Data Documentation

◆ hard_wired_diagnosis

◆ indicator_bias_factors

std::vector<std::unique_ptr<KBBiasFactorUnit> > KB::indicator_bias_factors

◆ system_decomposition

std::vector<std::unique_ptr<KBSystemDecompositionUnit> > KB::system_decomposition

◆ system_decomposition_map

◆ system_function_map

std::map<int, std::string> KB::system_function_map

The documentation for this class was generated from the following files: