12#include "../Global/fmodule.h"
14#include "../Crew/OperatorDM.h"
15#include "../Global/SimulationContext.h"
76 vector<Statement *>::iterator statement_itr;
100 prompt =
"A Statement is updated: ";
103 prompt =
"it is NULL!";
111 statement_itr != this->m_downstream_statement_list.end(); statement_itr++) {
112 (*statement_itr)->RefreshStatementEndTimeToCurrentTime(_type);
120 ofstream fout(
"RMI.txt", ios::app);
122 str =
"This statement is NULL, check the program";
151 cout <<
r5pars_.timesno <<
" " << str <<
" in Statement.cpp" <<
'\n';
152 ofstream fout(
"err messages.txt", ios::app);
153 fout <<
r5pars_.timesno <<
" " << str <<
'\n';
171 str +=
"started from ";
176 str +=
"happened after ";
198 cout <<
"Time: " <<
r5pars_.timesno <<
": " << str <<
'\n';
201 ofstream fout(
"RMI.txt", ios::app);
202 fout <<
"Time: " <<
r5pars_.timesno <<
": " << str <<
'\n';
266 vector<string>::iterator str_itr;
267 vector<Statement *>::iterator state_itr;
272 this->
ErrorMessage(
"this->m_ID_upperstream_statement_list.size() != 0");
276 this->
ErrorMessage(
"this->m_ID_downstream_statement_list.size() != 0");
283 ID = (*state_itr)->m_ID;
316 if (this->
m_ID_DI.compare(
"") != 0) {
326 vector<string>::iterator str_itr;
329 this->
ErrorMessage(
"this->m_upperstream_statement_list.size() != 0 before rebuild the connection");
333 this->
ErrorMessage(
"this->m_downstream_statement_list.size() != 0 before rebuild the connection");
341 if (state_pt == NULL) {
342 this->
ErrorMessage(
"could not find the upperstream statement " + *str_itr);
351 if (state_pt == NULL) {
352 this->
ErrorMessage(
"could not find the downstream statement " + *str_itr);
Diagnostic reasoning engine — knowledge representation, mental model, and inference.
SimulationContext g_sim
Global simulation context: the single instance, defined in SimulationContext.cpp.
void CopyActivationToRestartInfo(Activation *)
void CopyIDElementToRestartInfo(IDElement *)
void UpdateEffectiveEndTimeRangeFromStatement(double, bool)
std::unique_ptr< ReasonMachine > m_RM
SentenceUnit * SearchSentenceByID(std::string)
void ActivationUpdateByRefreshAStatement(Statement *)
Statement * FindStatementByID(std::string)
Investigator * FindInvestigatorByID(std::string)
std::unique_ptr< EventSchemaBase > m_event_schema_base
IDElement * m_diagnose_invest_ID_pt
std::vector< Statement * > m_downstream_statement_list
void PropagateFullActivationToSemanticSentence()
void ErrorMessage(std::string)
std::string m_ID_sentence
std::vector< Statement * > m_upperstream_statement_list
void PrintThisStatement()
void BuildConnectionsToThisStatement(void *)
std::vector< std::string > m_ID_upperstream_statement_list
void CopyStatementInfoFromAnother(Statement *)
double m_last_activated_time
std::vector< std::string > m_ID_downstream_statement_list
std::string GetThisStatementWords()
void CopyAuxInfoFromUpperstreamStatement(Statement *)
void RefreshStatementEndTimeToCurrentTime(int)
IDElement * m_investigator_ID_pt
std::string m_ID_investigator
void PrintMessage(std::string)
void CopyTimeRangeFromAnother(TimeRange &)
OperatorAT Action_Taker
Crew action execution model.
OperatorDM Decision_Maker
Crew decision-making model.