11#include "../Global/fmodule.h"
16#include "../Crew/OperatorDM.h"
17#include "../Global/SimulationContext.h"
97 vector<KnowledgeElement *>::iterator KE_itr;
110 vector<IDElement *>::iterator label_itr;
111 Label *label_group_pt = NULL;
112 Label *label_group_down_pt = NULL;
113 Label *label_group_upper_pt = NULL;
114 Label *label_group_perm_pt = NULL;
120 bool inference_direction_reverse_bl;
121 double time_start = 0;
142 && this->m_Statement_pt->m_time_range.m_end_time >= this->m_Statement_pt->m_time_range.m_time_before) {
150 && this->m_Statement_pt->m_time_range.m_end_time >= this->m_Statement_pt->m_time_range.m_time_before) {
168 if (time_start == 0 && time_end == 0) {
176 if (this->
m_ID ==
"Investigator_26") {
184 if (sent_pt != NULL) {
187 if (KE_down_X_pt == NULL) {
192 label_group_down_pt = RM_pt->
m_IB->CheckWhetherASentenceContainIndefiniteItem(sent_pt);
193 if (label_group_down_pt == NULL) {
194 this->
ErrorMessage(
"Could not find the corresponding label group for " + sent_pt->
m_ID);
199 label_ID_pt = label_down_pt;
200 if (label_down_pt == NULL) {
209 if ((*KU_itr)->m_accessable_bl ==
false) {
continue; }
211 if ((*KU_itr)->m_Descendant_pt->m_ID_Type != 401) {
return; }
214 if (this->
m_Happen != 3 && this->
m_Happen != 4 && (*KU_itr)->m_inference_type != 0) {
217 if ((*KU_itr)->m_inference_type == 1 || (*KU_itr)->m_inference_type == 3) {
219 ID_pt = (*KU_itr)->m_Descendant_pt;
220 ID_pt2 = (*KU_itr)->m_Ancestor_pt;
221 inference_direction_reverse_bl =
false;
222 }
else if ((*KU_itr)->m_inference_type == 2 || (*KU_itr)->m_inference_type == 3) {
224 ID_pt = (*KU_itr)->m_Ancestor_pt;
225 ID_pt2 = (*KU_itr)->m_Descendant_pt;
226 inference_direction_reverse_bl =
true;
239 if (KE_pt == KE_down_pt || KE_pt == KE_down_X_pt) {
250 if (match_type == 1) {
254 auto invest_link_owned = make_unique<InvestigatorLink>();
255 invest_link_pt = invest_link_owned.get();
268 label_group_pt = RM_pt->
m_IB->CheckWhetherASentenceContainIndefiniteItem(KE_buffer_pt->
m_SentenceUnit_pt);
269 if (label_group_pt == NULL) {
270 KE_pt = KE_buffer_pt;
272 }
else if (label_group_pt == label_group_down_pt) {
275 if (sent_pt == NULL) {
284 }
else if (label_group_down_pt == NULL) {
289 if (sent_pt == NULL) {
299 if (invest_pt == NULL) {
300 auto invest_owned = make_unique<Investigator>();
301 invest_pt = invest_owned.get();
302 invest_pt->
m_note =
"by downstream";
323 if (invest_pt == NULL) {
324 auto invest_owned = make_unique<Investigator>();
325 invest_pt = invest_owned.get();
326 invest_pt->
m_note =
"by downstream";
348 if (invest_pt == NULL) {
349 auto invest_owned = make_unique<Investigator>();
350 invest_pt = invest_owned.get();
351 invest_pt->
m_note =
"by downstream";
375 if ((*KU_itr)->m_causal_type == 0) {
continue; }
376 if ((*KU_itr)->m_Descendant_pt->m_ID != this->m_KElement_ID_pt->m_ID
377 && (*KU_itr)->m_Descendant_pt != (
IDElement *) KE_down_X_pt) {
continue; }
379 label_ID_pt = label_down_pt;
380 label_group_pt = label_group_down_pt;
381 time1 = time_start - (*KU_itr)->m_deltaT2;
382 time2 = time_end - (*KU_itr)->m_deltaT1;
386 auto invest_link_owned = make_unique<InvestigatorLink>();
387 invest_link_pt = invest_link_owned.get();
392 invest_link_pt->m_downstream_ID_pt = (
IDElement *)
this;
397 label_group_perm_pt = NULL;
398 if ((*KU_itr)->m_Permission_pt != NULL) {
400 label_group_perm_pt = RM_pt->
m_IB->CheckWhetherASentenceContainIndefiniteItem(KE_pt->
m_SentenceUnit_pt);
401 if (label_group_perm_pt != NULL) {
402 if (label_group_pt == NULL) {
404 "Error: The condition of this KnowledgeUnit has indefinite concept which is not in the downstream item!");
406 }
else if (label_group_pt != label_group_perm_pt) {
407 this->
ErrorMessage(
"Error: This Knowledge Unit contains more than one indefinite groups!");
413 if (label_group_perm_pt != NULL) {
417 if (KE_perm_pt == NULL) {
419 "Could not find a KE for " + sent_pt->
m_ID);
422 }
else if ((*KU_itr)->m_Permission_pt != NULL) {
427 if ((*KU_itr)->m_Permission_pt != NULL) {
430 if (KE_perm_pt->
m_ID ==
"KE_MSI_OFF") {
435 if (permission_pt == NULL) {
436 auto perm_owned = make_unique<Investigator>();
437 permission_pt = perm_owned.get();
439 permission_pt->
m_note =
"by downstream";
455 if ((*KU_itr)->m_Ancestor_pt->m_ID_Type == 401) {
459 label_group_upper_pt = RM_pt->
m_IB->CheckWhetherASentenceContainIndefiniteItem(KE_pt->
m_SentenceUnit_pt);
460 if (label_group_upper_pt != NULL) {
461 if (label_group_down_pt != NULL) {
462 if (label_group_down_pt != label_group_upper_pt) {
463 if ((*KU_itr)->m_Descendant_pt != this->m_KElement_ID_pt) {
473 if (label_group_upper_pt != NULL && label_group_down_pt != NULL && label_group_upper_pt == label_group_down_pt) {
477 if (KE_upper_pt == NULL) {
479 "Could not find a KE for" + sent_pt->
m_ID);
482 }
else if (label_group_upper_pt == NULL) {
486 if (KE_upper_pt != NULL) {
491 if (invest_pt == NULL) {
492 auto invest_owned = make_unique<Investigator>();
493 invest_pt = invest_owned.get();
494 invest_pt->
m_note =
"by downstream";
509 }
else if (label_group_upper_pt != NULL && label_group_upper_pt != label_group_down_pt) {
517 if (sent_pt == NULL) {
522 if (KE_upper_pt == NULL) {
527 if (invest_pt == NULL) {
528 auto invest_owned = make_unique<Investigator>();
529 invest_pt = invest_owned.get();
530 invest_pt->
m_note =
"by downstream";
547 }
else if ((*KU_itr)->m_Ancestor_pt->m_ID_Type == 402) {
554 if (invest_pt == NULL) {
555 auto invest_owned = make_unique<Investigator>();
556 invest_pt = invest_owned.get();
557 invest_pt->
m_note =
"by downstream";
582 if (this->
m_Happen == 1 && N_inference == 0) {
587 vector<IDElement *>::iterator ID_itr;
588 for (ID_itr = this->
m_downstream_ID_list.begin(); ID_itr != this->m_downstream_ID_list.end(); ID_itr++) {
624 this->
m_abort_reason =
"void investigator, Investigator::GetCorrespondingKE3001()";
633 prompt +=
"found a knowledge element for this investigator: ";
654 str +=
"transfer out to prioritization";
659 prompt +=
"could not find a knowledge element corresponding to the statement in this investigator: \n";
668 bool success =
false;
672 Statement *statement_found_pt, *statement_new_pt, *statement_match_pt;
673 Statement *statement_consistant_pt = NULL;
674 Statement *statement_inconsistant_pt = NULL;
677 vector<KnowledgeElement *>::iterator KE_itr;
678 vector<Statement *>::iterator statement_itr;
686 vector<SentenceUnit *>::iterator sent_itr, sent_input_itr, sent_output_itr;
687 vector<SentenceUnit *> input_sent_list;
688 vector<SentenceUnit *> output_sent_list;
689 vector<SentenceUnit *> comparing_sent_list;
690 vector<int>::iterator int_itr;
691 vector<int> type_list;
692 vector<IDElement *>::iterator label_ID_itr;
697 Label *label_group_origin_pt;
698 Label *label_group_buffer_pt;
699 vector<IDElement *> antonym_list;
700 vector<IDElement *>::iterator ID_itr;
701 string prompt, err_mes;
708 err_mes =
"This is an empty investigator!";
713 this->
m_abort_reason =
"void investigator, Investigator::FindAMatchingStatement3002()";
722 err_mes =
"This investigator doesn't have a time range";
728 this->m_effective_start,
729 this->m_effective_end);
732 statement_match_pt = *statement_itr;
733 if (statement_match_pt != NULL) {
737 && statement_match_pt->
m_state ==
false
739 statement_match_pt = NULL;
742 if (statement_match_pt != NULL) {
743 if (consistant_bl ==
true) {
752 statement_consistant_pt = statement_match_pt;
755 statement_inconsistant_pt = statement_match_pt;
761 statement_match_pt = NULL;
763 label_group_origin_pt = NULL;
766 if (label_origin_pt != NULL) {
768 label_group_origin_pt = RM_pt->
m_IB->CheckWhetherASentenceContainIndefiniteItem(sent_X_pt);
769 if (label_group_origin_pt == NULL) {
793 comparing_sent_list.push_back(sent_origin_pt);
794 if (sent_X_pt != NULL) {
795 comparing_sent_list.push_back(sent_X_pt);
798 for (ID_itr = antonym_list.begin(); ID_itr != antonym_list.end(); ID_itr++) {
799 for (i = 1; i < 3; i++) {
800 bool have_buffer =
false;
805 }
else if (i == 2 && sent_X_pt != NULL) {
823 if (sent_found_pt != NULL) {
824 comparing_sent_list.push_back(sent_found_pt);
832 if ((*KU_itr)->m_accessable_bl ==
false) {
continue; }
835 if ((*KU_itr)->m_inference_type == 1 || (*KU_itr)->m_inference_type == 3) {
836 ID_down_pt = (*KU_itr)->m_Descendant_pt;
837 ID_upper_pt = (*KU_itr)->m_Ancestor_pt;
838 }
else if ((*KU_itr)->m_inference_type == 2 || (*KU_itr)->m_inference_type == 3) {
839 ID_down_pt = (*KU_itr)->m_Ancestor_pt;
840 ID_upper_pt = (*KU_itr)->m_Descendant_pt;
846 for (sent_itr = comparing_sent_list.begin(); sent_itr != comparing_sent_list.end(); sent_itr++) {
850 label_group_buffer_pt = RM_pt->
m_IB->CheckWhetherASentenceContainIndefiniteItem((*sent_itr));
851 if (label_group_buffer_pt != NULL) {
853 if (sent_found_pt == NULL) {
856 sent_output_pt = sent_found_pt;
858 sent_output_pt = *sent_itr;
868 sent_input_pt = NULL;
869 label_group_buffer_pt =
871 if (label_group_buffer_pt == NULL) {
873 }
else if (label_group_origin_pt != NULL) {
874 if (label_group_origin_pt == label_group_buffer_pt) {
877 if (sent_input_pt == NULL) { this->
ErrorMessage(
"Error!"); }
881 if (sent_input_pt != NULL) {
883 if (sent_output_pt == NULL || sent_input_pt == NULL) {
886 input_sent_list.push_back(sent_input_pt);
887 output_sent_list.push_back(sent_output_pt);
888 type_list.push_back(type_int);
891 if (label_group_buffer_pt != NULL && label_group_origin_pt == NULL) {
896 if (sent_input_pt == NULL) { this->
ErrorMessage(
"Error!"); }
898 if (sent_output_pt == NULL || sent_input_pt == NULL) {
901 input_sent_list.push_back(sent_input_pt);
902 output_sent_list.push_back(sent_output_pt);
903 type_list.push_back(type_int);
906 }
else if (ID_upper_pt->
m_ID_Type == 402) {
909 KE_upper_pt = *KE_itr;
915 label_group_buffer_pt = RM_pt->
m_IB->CheckWhetherASentenceContainIndefiniteItem(sent_input_pt);
916 if (label_group_buffer_pt != NULL) { this->
ErrorMessage(
"Error!"); }
918 if (sent_output_pt == NULL || sent_input_pt == NULL) {
921 input_sent_list.push_back(sent_input_pt);
922 output_sent_list.push_back(sent_output_pt);
923 type_list.push_back(type_int);
931 sent_input_itr = input_sent_list.begin();
932 sent_output_itr = output_sent_list.begin();
933 int_itr = type_list.begin();
935 if (input_sent_list.size() != output_sent_list.size()
936 || input_sent_list.size() != type_list.size()) { this->
ErrorMessage(
"Error!"); }
938 while (sent_input_itr != input_sent_list.end()) {
942 statement_found_pt = (*statement_itr);
943 statement_new_pt = NULL;
944 if (statement_found_pt != NULL) {
945 if (statement_found_pt->
m_sent_pt != (*sent_input_itr)) {
946 if (statement_found_pt->
m_state ==
true) {
947 auto stmt_owned = make_unique<Statement>();
948 statement_new_pt = stmt_owned.get();
949 statement_new_pt->
m_sent_pt = (*sent_input_itr);
950 statement_new_pt->
m_state =
false;
964 auto stmt_owned = make_unique<Statement>();
965 statement_new_pt = stmt_owned.get();
966 statement_new_pt->
m_sent_pt = (*sent_input_itr);
967 statement_new_pt->
m_state =
true;
980 }
else { statement_new_pt = NULL; }
982 statement_new_pt = statement_found_pt;
986 if (statement_new_pt != NULL) {
988 auto stmt_owned = make_unique<Statement>();
989 statement_match_pt = stmt_owned.get();
990 if (*sent_output_itr == NULL) {
993 statement_match_pt->
m_sent_pt = (*sent_output_itr);
1001 statement_match_pt->
m_tbi_bl =
false;
1005 if ((*int_itr) == 1 || (*int_itr) == 4) {
1015 if (consistant_bl ==
false
1017 && statement_match_pt->
m_state ==
false
1019 statement_match_pt = NULL;
1023 if (statement_match_pt != NULL) {
1025 if (consistant_bl ==
true) {
1026 if (statement_consistant_pt == NULL) {
1027 statement_consistant_pt = statement_match_pt;
1030 statement_consistant_pt = statement_match_pt;
1034 if (statement_inconsistant_pt == NULL) {
1035 statement_inconsistant_pt = statement_match_pt;
1038 statement_inconsistant_pt = statement_match_pt;
1053 if (statement_consistant_pt != NULL) {
1064 }
else if (statement_inconsistant_pt != NULL) {
1081 string prompt, err_mes;
1098 Statement *statement_consistant_pt = NULL;
1099 Statement *statement_inconsistant_pt = NULL;
1102 vector<Statement *>::iterator statement_itr;
1113 this->
m_abort_reason =
"void investigator, Investigator::FindAMatchingStatement3002()";
1118 if (ID_pt1 == NULL) {
1142 if (this->
m_ID ==
"Investigator_126") {
1146 this->m_effective_start,
1147 this->m_effective_end);
1149 this->m_effective_start,
1150 this->m_effective_end);
1153 statement_pt = *statement_itr;
1154 if (statement_pt != NULL) {
1156 if (consistant_bl ==
false
1158 && statement_pt->
m_state ==
false
1161 if (statement_pt != NULL) {
1162 if (consistant_bl ==
true) {
1163 if (statement_consistant_pt == NULL) {
1164 statement_consistant_pt = statement_pt;
1167 statement_consistant_pt = statement_pt;
1171 if (statement_inconsistant_pt == NULL) {
1172 statement_inconsistant_pt = statement_pt;
1175 statement_inconsistant_pt = statement_pt;
1183 if (statement_consistant_pt != NULL) {
1191 }
else if (statement_inconsistant_pt != NULL) {
1199 statement_pt = NULL;
1200 new_statement_pt = NULL;
1214 if (statement_inconsistant_pt == NULL && statement_consistant_pt == NULL
1236 statement_pt = NULL;
1237 state_schema_pt = NULL;
1238 state_schema_pt1 = NULL;
1239 state_schema_pt2 = NULL;
1240 if (ID_pt1 != NULL) {
1279 if (state_schema_pt1 != NULL && state_schema_pt2 != NULL) {
1281 state_schema_pt = state_schema_pt1;
1283 auto stmt_owned = make_unique<Statement>();
1284 statement_pt = stmt_owned.get();
1321 }
else if (state_schema_pt1 != NULL && state_schema_pt2 == NULL) {
1356 consistant_bl =
false;
1357 value_schema_pt = NULL;
1358 value_schema_pt1 = NULL;
1359 value_schema_pt2 = NULL;
1360 if (ID_pt1 != NULL) {
1374 if (value_schema_pt != NULL) { consistant_bl =
true; }
1387 if (value_schema_pt != NULL) { consistant_bl =
false; }
1404 if (value_schema_pt != NULL) { consistant_bl =
true; }
1418 if (value_schema_pt != NULL) { consistant_bl =
false; }
1421 if (value_schema_pt == NULL) {
1427 if (value_schema_pt != NULL && consistant_bl ==
true) {
1428 auto stmt_owned = make_unique<Statement>();
1439 }
else if (value_schema_pt != NULL && consistant_bl ==
false) {
1442 value_schema_pt = NULL;
1445 if (value_schema_pt != NULL) {
1446 auto stmt_owned = make_unique<Statement>();
1458 if (value_schema_pt1 != NULL && value_schema_pt2
1461 bool is_consistant =
false;
1462 bool is_inconsistant =
false;
1468 if (KE_pt->
m_negation ==
false) { is_consistant =
true; }
1469 else { is_inconsistant =
true; }
1474 if (KE_pt->
m_negation ==
false) { is_inconsistant =
true; }
1475 else { is_consistant =
true; }
1486 if (KE_pt->
m_negation ==
false) { is_consistant =
true; }
1487 else { is_inconsistant =
true; }
1496 if (KE_pt->
m_negation ==
false) { is_inconsistant =
true; }
1497 else { is_consistant =
true; }
1506 is_consistant =
true;
1511 is_inconsistant =
true;
1515 if (is_consistant) {
1516 auto stmt_owned = make_unique<Statement>();
1531 }
else if (is_inconsistant) {
1532 auto stmt_owned = make_unique<Statement>();
1557 || (value_schema_pt1 != NULL && value_schema_pt2 == NULL)) {
1640 prompt =
"Could not verify this knowledge element from control panel, will dig more root causes. \n";
1648 if (ID_pt1 != NULL && ID_pt2 != NULL) {
1663 if (value_schema_pt == NULL || value_schema_pt2 == NULL) {
1665 prompt =
"There is no available information for this investigator on Mental Representation";
1673 auto stmt_owned = make_unique<Statement>();
1674 statement_pt = stmt_owned.get();
1689 statement_pt->
m_state =
false;
1696 statement_pt->
m_state =
false;
1705 statement_pt->
m_state =
false;
1712 prompt =
"Found matching information on Mental Representation, and a new statement is inferred: \n";
1722 this->
ErrorMessage(
"valve position comparison is not analyzed here");
1727 prompt =
"Could not verify this knowledge element from control panel, will dig more root causes. \n";
1738 prompt =
"There is no available information for this investigator on Mental Representation";
1748 string err_mes, prompt;
1757 if (this->
m_ID ==
"Investigator_32") { this->
PrintMessage(
"Check point!"); }
1761 && this->m_Statement_pt->m_time_range.GetTimeBoundEarlier() >= this->m_effective_start)
1763 (this->m_Statement_pt->m_time_range.GetTimeBoundLater() <= this->m_effective_end
1764 && this->m_Statement_pt->m_time_range.GetTimeBoundLater()
1765 >= this->m_effective_start)) {}
1772 && this->m_Statement_pt->m_state != KE_pt->
m_negation) {}
1780 if (consistant_bl ==
true) {
1796 if (consistant_bl ==
false) {
1798 || this->m_inconsistant_statement->m_factual_type == 2) {
1817 prompt +=
"Verification result: ";
1819 case 1: prompt +=
"Undetermined.";
1821 case 2: prompt +=
"Uncertain, could not tell.";
1823 case 3: prompt +=
"Yes, it happend.";
1825 case 4: prompt +=
"No, it didn't happen.";
1827 default: err_mes =
"Investigator::m_Happen has an unrecognized value.";
1835 prompt +=
"Statement: ";
1846 vector<IDElement *>::iterator ID_itr;
1847 for (ID_itr = this->
m_downstream_ID_list.begin(); ID_itr != this->m_downstream_ID_list.end(); ID_itr++) {
1936 str +=
": transfer out: to prioritization";
1949 string prompt, err_mes;
1961 err_mes =
"This is an empty investigator!";
1967 ID_pt = RM_pt->
m_MR->CheckExistenceByConceptStrict(ID_subject_pt);
1968 if (ID_pt == NULL) {
1971 prompt =
"There is no item on control panel that matches the subject for this knowledge element";
2002 case 3: on_CP_bl =
true;
2007 if (ID_pt != NULL) { on_CP_bl =
true; }
2012 if (on_CP_bl ==
false) {
2016 "There is no item on control panel that matches the process concept or the object concept for this knowledge element";
2028 prompt +=
"Already passed the timing to read the information, this could not be verified any more!";
2037 vector<IDElement *>::iterator ID_itr;
2038 for (ID_itr = this->
m_downstream_ID_list.begin(); ID_itr != this->m_downstream_ID_list.end(); ID_itr++) {
2047 prompt +=
"It could be verified by getting new reading from control panel.";
2064 string prompt, err_mes;
2068 bool not_existing_on_CP =
false;
2074 if (ID_pt == NULL) { not_existing_on_CP =
true; }
2079 if (ID_pt == NULL) { not_existing_on_CP =
true; }
2082 prompt =
"want to read the following indications from control panel: ";
2090 if (ID_pt == NULL) { not_existing_on_CP =
true; }
2093 prompt =
"want to read the following indications from control panel: ";
2099 if (not_existing_on_CP ==
true) {
2100 prompt =
"There is no direct reading from control panel. Try to dig more info from upperstreams.";
2113 string err_mes, prompt;
2123 prompt +=
"Finished feedback process.";
2134 prompt +=
"feedback and move to a downstream investigator";
2147 str +=
": transfer out: to ";
2153 string prompt, err_mes;
2161 int next_token_value;
2162 bool continue_investigation =
false;
2175 prompt +=
"could not determine whether the KE happened or not, close this investigator.";
2192 if (continue_investigation ==
true) {
2194 prompt +=
"continue the investigation eventhough there is one cause found";
2199 prompt +=
"Found the cause and close this investigator";
2213 prompt +=
"Close this investigator because the cause could not be determined";
2225 prompt +=
"close this investigator because the agent failed to expain the statement.";
2237 prompt +=
"close this investigator because the KE didn't happen";
2270 string prompt, err_mes;
2277 if (this->
m_ID ==
"Investigator_41") { this->
PrintMessage(
"check point!"); }
2279 vector<IDElement *>::iterator ID_itr;
2280 double highest_score = 0;
2282 bool prior_inference_link =
false;
2283 bool replace_with_new =
false;
2290 if (delta_T >= this->
m_timer) {
2296 prompt +=
"Retrieved one possible cause: ";
2303 str +=
"transfer out: to ";
2330 if (this->
m_Happen == 1 || this->
m_Happen == 2) { prior_inference_link =
true; }
2345 next_invest_link_pt = invest_link_pt;
2356 replace_with_new =
false;
2358 cout <<
'\n' <<
"retrieval score" << score;
2359 if (next_invest_link_pt == NULL) {
2360 replace_with_new =
true;
2362 && prior_inference_link ==
true)
2364 && prior_inference_link ==
false)) {
2365 if (score > highest_score) { replace_with_new =
true; }
2374 if (replace_with_new ==
true) {
2375 highest_score = score;
2376 next_invest_link_pt = invest_link_pt;
2386 if (next_invest_link_pt == NULL) {
2389 prompt +=
"Every possible cause has already been investigated.";
2396 this->
m_timer = min<float>(pow(1 / highest_score, 0.2), 5);
2432 double time_end_update;
2433 vector<IDElement *>::iterator ID_itr;
2434 vector<IDElement *>::iterator ID_itr2;
2439 for (ID_itr = this->
m_upperstream_ID_list.begin(); ID_itr != this->m_upperstream_ID_list.end(); ID_itr++) {
2467 string prompt, err_mes;
2470 int operator_branch_num = 0;
2480 if (operator_branch_num > 0) {
2497 prompt =
"finished reading relevant indications";
2518 prompt =
"send request to read: ";
2524 this->m_effective_end) != NULL) {
2574 bool finished =
false;
2601 string prompt, err_mes;
2620 if (this->
m_ID ==
"Investigator_25") {
2624 if (this->
m_ID ==
"Investigator_87" &&
r5pars_.timesno > 1031) {
2629 bool explained =
false;
2630 bool unexplored_cause_exist =
false;
2631 bool undetermined_cause_exist =
false;
2632 bool need_to_feedback =
false;
2634 bool inference_exist =
false;
2635 bool undetermined_inference_exist =
false;
2636 bool unexplored_inference_exist =
false;
2637 bool consistant_bl =
false;
2640 int Happen_buffer = 1;
2645 vector<IDElement *>::iterator ID_itr;
2646 prompt =
"\n\n Evaluation Process: \n";
2649 if (this->
m_ID ==
"Investigator_630" &&
r5pars_.timesno > 3196) {
2659 need_to_feedback =
true;
2661 prompt +=
" might happen, but could not be determined!";
2674 str +=
": transfer out: to prioritization";
2678 for (ID_itr = this->
m_upperstream_ID_list.begin(); ID_itr != this->m_upperstream_ID_list.end(); ID_itr++) {
2682 prompt += conv.str();
2687 inference_exist =
true;
2696 case 2: undetermined_inference_exist =
true;
2698 case 3: Happen_buffer = 3;
2703 unexplored_inference_exist =
true;
2709 if (consistant_bl ==
true) { Happen_buffer = 3; }
2717 case 1: prompt +=
"unexplored; \n";
2718 unexplored_cause_exist =
true;
2720 case 2: prompt +=
"could not determined; \n";
2721 undetermined_cause_exist =
true;
2726 case 3: prompt +=
"happened; \n";
2732 case 4: prompt +=
"didn't happen;\n";
2745 if ((this->
m_downstream_ID_list.size() == 0 && this->m_Happen == 4 && this->m_SI_ID_pt != NULL)
2746 || (this->m_SI_ID_pt != NULL && this->m_downstream_ID_list.size() > 0)) {
2760 str +=
": transfer out: to prioritization";
2777 if (Happen_buffer == 3) {
2779 auto stmt_owned = make_unique<Statement>();
2780 statement_pt = stmt_owned.get();
2795 need_to_feedback =
true;
2796 }
else if (unexplored_inference_exist ==
false && inference_exist ==
true) {
2797 if (undetermined_inference_exist ==
true) {
2799 need_to_feedback =
true;
2802 need_to_feedback =
true;
2808 prompt +=
"Conclusion: \n";
2809 if (unexplored_inference_exist ==
true && (this->
m_Happen == 1 || this->
m_Happen == 2)) {
2818 }
else if (explained ==
true) {
2819 prompt +=
"This investigator is explained. \n";
2823 if ((this->
m_Happen == 1 || this->
m_Happen == 2) && inference_exist ==
false) {
2825 auto stmt_owned = make_unique<Statement>();
2826 statement_pt = stmt_owned.get();
2841 need_to_feedback =
true;
2846 }
else if (unexplored_cause_exist ==
true) {
2848 prompt +=
"This investigator has not been explained yet. \n";
2858 str +=
": transfer out: to prioritization";
2864 }
else if (undetermined_cause_exist ==
true) {
2865 prompt +=
"This investigator has uncertain cause(s)!";
2871 need_to_feedback =
true;
2885 str +=
": transfer out: to prioritization";
2889 prompt +=
"This investigator failed to get an explanation. \n";
2893 if (this->
m_Happen == 1 && undetermined_inference_exist ==
false) {
2895 need_to_feedback =
true;
2907 str +=
": transfer out: to prioritization";
2913 if (need_to_feedback ==
true) {
2914 prompt =
"The KE is newly verified, needs to feedback to the downstream.";
2919 vector<IDElement *>::iterator ID_itr;
2920 for (ID_itr = this->
m_downstream_ID_list.begin(); ID_itr != this->m_downstream_ID_list.end(); ID_itr++) {
2929 float score_total = 0;
2930 float confidence = 0;
2931 if (this->
m_Happen == 3 && unexplored_cause_exist ==
false) {
2934 prompt +=
"Found the cause and close this investigator";
2984 bool continue_bl =
false;
2985 bool stop_bl =
false;
2986 bool unexplored_cause_exist =
false;
2988 vector<IDElement *>::iterator ID_itr;
2990 double highest_score = 0;
2992 for (ID_itr = this->
m_upperstream_ID_list.begin(); ID_itr != this->m_upperstream_ID_list.end(); ID_itr++) {
2995 unexplored_cause_exist =
true;
2997 if (score > highest_score) { highest_score = score; }
3001 if (unexplored_cause_exist ==
false || this->
m_explained == 4) {
3014 continue_bl =
false;
3019 if (highest_score > 0.006) {
3036 }
else {
return NULL; }
3060 float s1, s2, s3, score;
3064 s1 = 0.5 * (1 - exp(-deltaT / 300)) + 0.5;
3067 score = s1 * s2 * s3;
3097 prompt +=
"The investigator token moved from ";
3105 cout <<
r5pars_.timesno <<
" " << str <<
" in Investigator.cpp" <<
'\n';
3106 ofstream fout(
"err messages.txt", ios::app);
3107 fout <<
r5pars_.timesno <<
" " << str <<
'\n';
3113 cout <<
"Time: " <<
r5pars_.timesno <<
": " << str <<
'\n';
3116 ofstream fout(
"RMI.txt", ios::app);
3117 fout <<
"Time: " <<
r5pars_.timesno <<
": " << str <<
'\n';
3149 case inv::NoMatchingKE: str =
"3090: There is no corresponding knowledge element for this statement";
3151 default: conv.str(
"");
3163 str =
"An investigator to verify whether ";
3165 str +=
" happened or not: ";
3169 str =
"This investigator determined ";
3171 str +=
" happened.";
3173 str =
"An investigator to find the cause of statement: ";
3177 str =
"This investigator could not determine whether the KE happened or not: ";
3180 str =
"This investigator determined the KE didn't happen: ";
3183 str =
"Error: unrecognized investigator::m_Happen";
3193 str =
"Investigation Time Range: (";
3216 vector<IDElement *>::iterator ID_itr;
3217 for (ID_itr = this->
m_explanation_link_list.begin(); ID_itr != this->m_explanation_link_list.end(); ID_itr++) {
3218 if ((*ID_itr) == _ID_pt) {
3219 found_ID_pt = *ID_itr;
3227 vector<IDElement *>::iterator ID_itr;
3230 if ((*ID_itr) == _ID_pt) {
3231 found_ID_pt = *ID_itr;
3239 vector<IDElement *>::iterator ID_itr;
3242 if ((*ID_itr) == _ID_pt) {
3243 found_ID_pt = *ID_itr;
3251 vector<IDElement *>::iterator ID_itr;
3256 float score_total, confidence;
3257 bool create_new_statement_bl =
false;
3258 bool need_to_propagate_to_downstream_bl =
false;
3259 float modified_p = _p;
3266 if (this->
m_ID ==
"Investigator_515") { this->
ErrorMessage(
"check point"); }
3281 create_new_statement_bl =
true;
3285 && this->m_possible_statement_pt->m_state == !KE_pt->
m_negation) {
3289 need_to_propagate_to_downstream_bl =
true;
3299 need_to_propagate_to_downstream_bl =
true;
3302 create_new_statement_bl =
true;
3304 && this->m_possible_statement_pt->m_state == KE_pt->
m_negation) {
3307 && this->m_possible_statement_pt->m_state == !KE_pt->
m_negation) {
3315 if (create_new_statement_bl ==
true) {
3317 diagnose_invest_pt =
3319 if (diagnose_invest_pt != NULL) {
3329 need_to_propagate_to_downstream_bl =
true;
3330 create_new_statement_bl =
false;
3333 auto stmt_owned = make_unique<Statement>();
3334 new_statement_pt = stmt_owned.get();
3346 if (ES_pt != NULL) {
3347 auto di_owned = make_unique<DiagnoseInvestigator>();
3348 diagnose_invest_pt = di_owned.get();
3367 if (need_to_propagate_to_downstream_bl ==
true) {
3372 bool undetermined_cause =
false;
3375 for (ID_itr = this->
m_upperstream_ID_list.begin(); ID_itr != this->m_upperstream_ID_list.end(); ID_itr++) {
3379 undetermined_cause =
true;
3384 if (undetermined_cause ==
true) {
3415 vector<IDElement *>::iterator ID_link_itr;
3416 vector<IDElement *>::iterator ID_invest_itr;
3421 for (ID_link_itr = this->
m_upperstream_ID_list.begin(); ID_link_itr != this->m_upperstream_ID_list.end();
3440 else if (link_pt->
m_link_type == 3) { str =
"OR :"; }
3458 bool consistant_bl =
false;
3462 consistant_bl =
true;
3464 consistant_bl =
false;
3467 if (statement_match_pt->
m_state ==
true) {
3469 consistant_bl =
false;
3471 consistant_bl =
true;
3477 consistant_bl =
true;
3479 consistant_bl =
false;
3481 }
else { consistant_bl =
false; }
3484 return consistant_bl;
3606 this->
ErrorMessage(
"this->m_investigator_token_history.size() != 0");
3610 this->
ErrorMessage(
"this->m_invest_token_endtime_history.size() != 0");
3614 this->
ErrorMessage(
"m_read_indication_list.size() != 0");
3622 this->
ErrorMessage(
"m_upperstream_ID_list.size() != 0");
3626 this->
ErrorMessage(
"m_downstream_ID_list.size() != 0");
3630 this->
ErrorMessage(
"m_explanation_link_list.size() != 0");
3634 this->
ErrorMessage(
"this->m_possible_explanation_link_list.size() != 0");
3638 this->
ErrorMessage(
"this->m_rejected_explanation_list.size() != 0");
3642 this->
ErrorMessage(
"this->m_thoughtline_roots_list.size() != 0");
3646 vector<int>::iterator int_itr;
3654 vector<IDElement *>::iterator ID_itr;
3655 vector<string>::iterator str_itr;
3657 vector<float>::iterator fl_itr;
3685 ID = (*ID_itr)->m_ID;
3699 ID = (*ID_itr)->m_ID;
3712 ID = (*ID_itr)->m_ID;
3726 ID = (*ID_itr)->m_ID;
3740 ID = (*ID_itr)->m_ID;
3754 ID = (*ID_itr)->m_ID;
3768 ID = (*ID_itr)->m_ID;
3795 this->
ErrorMessage(
"this->m_inconsistant_statement == NULL");
3804 this->
ErrorMessage(
"this->m_has_moved_to_link == NULL");
3812 if (this->
m_ID_SI.compare(
"") != 0) {
3820 if (this->
m_ID_KE.compare(
"") != 0) {
3842 this->
ErrorMessage(
"this->m_possible_statement_pt == NULL");
3848 vector<string>::iterator str_itr;
3850 for (str_itr = this->
m_ID_feedback_list.begin(); str_itr != this->m_ID_feedback_list.end(); str_itr++) {
3852 if (ID_pt == NULL) {
3860 for (str_itr = this->
m_ID_upperstream_list.begin(); str_itr != this->m_ID_upperstream_list.end(); str_itr++) {
3862 if (ID_pt == NULL) {
3870 for (str_itr = this->
m_ID_downstream_list.begin(); str_itr != this->m_ID_downstream_list.end(); str_itr++) {
3872 if (ID_pt == NULL) {
3883 if (ID_pt == NULL) {
3892 str_itr != this->m_ID_possible_explanation_link_list.end(); str_itr++) {
3894 if (ID_pt == NULL) {
3905 if (ID_pt == NULL) {
3914 ID_pt = RM_pt->
m_MR->FindMRUnitByID(*str_itr);
3915 if (ID_pt == NULL) {
3916 this->
ErrorMessage(
"could not find a MR unit for this indication");
3926 vector<string>::iterator str_itr;
3927 vector<IDElement *>::iterator ID_itr;
3930 if (this->
m_ID.compare(_line_ID) == 0) {
return; }
3932 for (str_itr = this->
m_thoughtline_roots_list.begin(); str_itr != this->m_thoughtline_roots_list.end(); str_itr++) {
3933 if (_line_ID.compare(*str_itr) == 0) { found =
true; }
3936 if (found ==
true) {
return; }
3942 for (ID_itr = this->
m_upperstream_ID_list.begin(); ID_itr != this->m_upperstream_ID_list.end(); ID_itr++) {
3950 vector<IDElement *>::iterator ID_itr;
3952 vector<string>::iterator str_itr;
3955 for (ID_itr = this->
m_upperstream_ID_list.begin(); ID_itr != this->m_upperstream_ID_list.end(); ID_itr++) {
3972 bool within =
false;
3973 if (this->
m_ID.compare(_line_ID) == 0) {
3978 vector<string>::iterator str_itr;
3979 for (str_itr = this->
m_thoughtline_roots_list.begin(); str_itr != this->m_thoughtline_roots_list.end(); str_itr++) {
3980 if (_line_ID.compare(*str_itr) == 0) { within =
true; }
3999 float score_total = 0;
4000 float confidence = 0;
4001 vector<IDElement *>::iterator ID_itr;
4011 if (this->
m_Happen != 3) {
return; }
4014 && this->m_Statement_pt->m_confidence < 0.95)
4018 || this->m_Statement_pt->m_confidence >= 0.95) {
4020 else { p_total = 0.9; }
4024 for (ID_itr = this->
m_upperstream_ID_list.begin(); ID_itr != this->m_upperstream_ID_list.end(); ID_itr++) {
4034 if (score_total == 0) {
return; }
4036 rm_aux_info =
"Propagating confidence from an observable syptom. Starts from " + this->
m_ID;
4040 for (ID_itr = this->
m_upperstream_ID_list.begin(); ID_itr != this->m_upperstream_ID_list.end(); ID_itr++) {
4066 > this->m_ID_possible_explanation_link_list.size() + this->m_rejected_explanation_list.size()
4067 + this->m_explanation_link_list.size()) {
4093 if (sent_pt != NULL) {
4124 vector<IDElement *>::iterator ID_itr;
4125 vector<string>::iterator str_itr;
4135 for (ID_itr = this->
m_downstream_ID_list.begin(); ID_itr != this->m_downstream_ID_list.end(); ID_itr++) {
4142 if (invest_pt != NULL) {
4149 vector<IDElement *>::iterator ID_itr;
4151 bool mark_happen_change =
false;
4152 bool mark_explain_change =
false;
4156 for (ID_itr = this->
m_upperstream_ID_list.begin(); ID_itr != this->m_upperstream_ID_list.end(); ID_itr++) {
4164 if (mark_happen_change ==
true && this->
m_Happen != 3) {
4168 if (mark_explain_change ==
true) {
4177 vector<string>::iterator str_itr;
4178 vector<float>::iterator fl_itr;
4179 vector<IDElement *>::iterator ID_itr;
4190 "this->m_pause_confidence_propagation_ID_list.size() != this->m_paused_confidence_passing_list.size()");
4198 if (invest_pt == NULL) {
4200 "unable to find the Investigator for the FinishThePausedConfidencePropagationBeforeCloseInvestigation");
4204 for (ID_itr = this->
m_upperstream_ID_list.begin(); ID_itr != this->m_upperstream_ID_list.end(); ID_itr++) {
Diagnostic reasoning engine — knowledge representation, mental model, and inference.
SimulationContext g_sim
Global simulation context: the single instance, defined in SimulationContext.cpp.
std::vector< IDElement * > m_antonym_list
void InitiationOfthisDiagnoseInvestigator(float, IDElement *)
void UpdateForOtherEvidenceNotListedInEventSchema(IDElement *)
EventSchemaUnit * m_event_schema_pt
Statement * m_event_statement_pt
void CopyIDElementToRestartInfo(IDElement *)
bool m_inference_direction_reverse_bl
IDElement * m_condition_ID_pt
void BoostActivationOfThisLinkByActiveDiagnosisInvestigation()
KnowledgeUnit * m_K_unit_pt
bool m_invest_link_dormant
bool m_is_inference_path_bl
std::string GetASimpleDescriptionOfTheInvestigatorLink()
double CalculateBackwardRetrievalScore()
void CheckThePathStatus3102()
void UpdateMHappenIncomplete()
bool m_is_a_strong_inference
IDElement * m_downstream_ID_pt
void AttachThoughtLineToThisLink(std::string)
void BackwardPropagateConfidenceLevel(float _p)
std::vector< IDElement * > m_upperstream_ID_list
void BoostAttentionOfThisFromDiagnosisInvestigation(float, bool)
std::vector< IDElement * > m_feedback_list
std::string m_ID_possible_statement
void UpdateHappenExplainIncomeplete()
void UpdateEffectiveEndTimeRangeFromDownstream(double, bool)
void PrintCausalOrInferenceLink()
void ChoseADownstreamInvestigatorLinkToFeedback3018()
void AttachThoughtLineToThisInvestigator(std::string)
void InitiateBackwardPropagationOfConfidence()
std::vector< std::string > m_ID_read_indication_list
void WhetherItIsAvailablefromMR3003()
void RetrieveTheNextLikelyInvestigatorLink3013()
void MarkMHappenIncompleteTrue()
std::vector< IDElement * > m_rejected_explanation_list
std::vector< std::string > m_ID_explanation_link_list
void BackwardPropagateConfidenceLevel(float _p)
bool m_investigation_closed
double m_investigation_initiate_time
std::vector< IDElement * > m_read_indication_list
IDElement * CheckExistenceInPossibleExplanationList(IDElement *)
void AddTimeConsumptionInInvestigator(double)
void BoostAttentionofThisByDiagnosisInvestigation(float, bool)
bool WhetherContinueInvestigationAfterFoundExplanation()
void BuildTheConnectionsToThisInvestigator(void *)
void WhetherToCloseThisInvestigator3009()
void ExtendTheThoughtLineToUpperstream()
std::vector< float > m_paused_confidence_passing_list
void FinishThePausedConfidencePropagationBeforeCloseInvestigation()
std::string GetASimpleDescriptionOfThisInvestigator()
SentenceUnit * GetSemanticSentenceOfThisInvestigator()
void EvaluateAfterGetNewFeedback3014()
void PrintMessage(std::string)
void ErrorMessage(std::string)
std::string m_abort_reason
void CompareKEandStatement3007()
std::string GetInvestigationKEandTimeRange()
void ReopenThisInvestigator()
std::string m_ID_has_move_to_link
void FindAMatchingStatement3002()
void ChangeInvestigatorToken(int)
std::vector< std::string > m_note_list
void UpdateEffectiveEndTimeRangeFromStatement(double, bool)
std::vector< IDElement * > m_possible_explanation_link_list
float m_probability_update_time
std::vector< IDElement * > m_explanation_link_list
std::string m_ID_statement
void WhetherToCloseThisInvestigator3019()
std::string TranslateTokenIntoWords(int)
bool CheckWhetherTheFoundStatementConsistantWithKE(Statement *)
Statement * m_possible_statement_pt
IDElement * m_KElement_ID_pt
bool m_Explain_incomplete
bool m_active_investigation
std::vector< std::string > m_ID_feedback_list
bool m_root_of_a_thought_line
void CrankTheActivationToOne()
Statement * m_inconsistant_statement
std::vector< IDElement * > m_downstream_ID_list
std::vector< std::string > m_ID_upperstream_list
float m_last_time_of_refreshing_inference_item
bool CheckWhetherInAThoughtLine(std::string)
float m_independent_probability
IDElement * m_has_moved_to_link
void SearchForPossibleCauses3012()
double m_investigation_cease_time
std::vector< IDElement * > m_upperstream_ID_list
std::vector< std::string > m_pause_confidence_propagation_ID_list
float DetermineWhetherItsStillActivePhenomenon()
bool m_has_moved_to_an_upperstream
std::vector< std::string > m_ID_rejected_explanation_list
void CopyInvestigatorInfoFromAnother(Investigator *)
void WhetherGetInfoFromControlPaneltoVerifyKE3004()
float m_interest_from_SymptomInvestigator
void OneStepWorkOnThisInvestigator()
std::vector< std::string > m_ID_possible_explanation_link_list
std::string m_ID_inconsist_statement
IDElement * CheckExistenceInExplanationList(IDElement *)
float CalculateFilteredPrioritizingScoreOfInvestigator()
std::vector< int > m_investigator_token_history
void ForwardPropagateConfidenceLevel(float _p)
std::vector< float > m_invest_token_endtime_history
std::string GetKEandTimeRangeWords()
std::vector< std::string > m_thoughtline_roots_list
void RequestInfoFromControlPanelInititaion3005()
bool m_read_value_or_rate_bl
void BoostActivationOfThisByActiveDiagnosisInvestigation()
std::vector< std::string > m_ID_downstream_list
void GetCorrespondingKE3001()
float CalculatePriorityScoreEvenDormantOrPaused()
float GetInitiationTimeOrStatementTimeOrLastActiveTime()
Statement * m_Statement_pt
void CloseThisInvestigator()
void RequestInfoFromControlPanelReading3006()
IDElement * CheckExistenceInRejectedExplanationList(IDElement *)
void ChoseADownstreamInvestigatorLinkToFeedback3008()
void UpdateEffectiveEndTimeRangeToUpperstream(double, bool)
SentenceUnit * m_SentenceUnit_pt
std::vector< KnowledgeElement * > M_KElement_list
double m_backward_retrieve_weight
std::vector< IDElement * > m_label_option_list
MRStateSchema * CheckFirstAlarmStateAfterATime(float _end)
MRStateSchema * CheckLastAlarmStateBeforeATime(float _start)
void ReadAlarmIndication(double)
std::string m_alarm_indicator_name
MRValueSchema * FindAPositionReadingConsistantWithASentenceWithinTimeRange(float _start, float _end, SentenceUnit *_sent_pt)
MRValueSchema * FindTheFirstPositionReadingAfterATime(float _end)
MRValueSchema * FindTheLastPositionReadingBeforeATime(float _start)
MRStateSchema * CheckTheFirstComponentStateReadingAfterATime(float _end)
MRValueSchema * FindAPositionReadingInconsitantWithASentenceWithinTimeRange(float _start, float _end, SentenceUnit *_sent_pt)
std::string Control_Value_Indicator_ID
void ReadComponentStateIndication(double)
MRStateSchema * CheckLastComponentStateReadingBeforeATime(float _start)
std::string Component_State_Indicator_ID
MRValueSchema * FindAReadingConsistantWithASentenceWithinTimeRange(float _start, float _end, SentenceUnit *_sent_pt)
void ReadParameterRate(double)
std::string m_parameter_indicator_ID
MRValueSchema * FoundAValueReadingWithinTimeRange(float, float)
std::string m_parameter_rate_indicator_ID
void ReadParameterValue(double)
MRValueSchema * FindAReadingInconsistantWithASentenceWithinTimeRange(float _start, float _end, SentenceUnit *_sent_pt)
MRValueSchema * CheckReadingWithinTimeRange(double, double)
void ReadSupportSystemStateIndication(double)
MRStateSchema * CheckLastSupportSystemStateReadingBeforeATime(float _start)
std::string Support_System_State_Indicator_ID
MRStateSchema * CheckTheFirstSupportSystemStateReadingAfterATime(float _end)
std::unique_ptr< ReasonMachine > m_RM
std::unique_ptr< KBConcept > m_Concept_Base
Investigator * FindAMatchInvestigatorByKnowledgeElement(KnowledgeElement *, int, int)
InvestigatorLink * FindInvestigatorLinkByID(std::string)
void RemoveItemFromDecayedItemList(IDElement *)
void EraseFromOngoingItemStack(std::string)
void AddNewInvestigatorLink(InvestigatorLink *)
std::vector< Statement * > m_temporary_statement_list
std::vector< Investigator * > m_undetermined_investigator_pool
void AutoIgnitionOfDecayedInvestigatorInitiatedByActivatingAStatement(Statement *)
void WaitOneStepThereIsOneOrMoreOperatorBranches()
std::vector< Investigator * > m_failed_investigator_pool
void AddToRMFeedbackStack(IDElement *)
void AddDeltaToCognitiveLoad(float)
void AddANewStatement(Statement *)
void ZeroAllTheInterestFromSymptomInvestigator()
void RemoveInvestigatorFromUnresolvedPool(Investigator *)
KnowledgeElement * FindKnowledgeElementByID(std::string)
SentenceUnit * FindAnIndefiniteSentenceMatchTheInputSentence(SentenceUnit *)
void AddItemToOngoingItemStack(std::string)
KnowledgeElement * FindAKEbySentenceAndNegationSign(SentenceUnit *, bool)
void EraseItemFromFeedbackStack(IDElement *)
InvestigatorLink * m_working_on_invest_link_pt
std::vector< IDElement * > m_feedback_stack
std::vector< Investigator * > m_cause_undetermined_investigato_pool
KnowledgeElement * FindKnowledgeElementByStatement(Statement *)
IDElement * m_reading_indication_ID_pt
ProblemSolvingStyle m_problem_solving_style
void AddConsumptedDeltaT(double)
void WriteAuxInfo(std::string str)
std::unique_ptr< InstantiationBase > m_IB
Statement * FindStatementByID(std::string)
std::unique_ptr< MentalRepresentation > m_MR
Investigator * FindInvestigatorByID(std::string)
std::vector< IDElement * > m_investigation_trace
SentenceUnit * CheckExistInSemanticPoolBySentence(SentenceUnit *)
std::vector< std::unique_ptr< KnowledgeUnit > > m_Knowledge_list
float CheckRemainingTimeForThisStep()
void FindCorrespondingStatementWithinTimeRange(SentenceUnit *, int, int)
std::unique_ptr< EventSchemaBase > m_event_schema_base
std::vector< Investigator * > m_resolved_investigator_pool
void AddBackToUnresolvedInvestigationPool(Investigator *)
void ChangeRMTokenValue(int)
void CrankASentenceUnitActivationToAGivenValue(SentenceUnit *, float)
Investigator * m_buffer_invest_pt
void AddNewInvestigator(Investigator *)
std::vector< Investigator * > m_success_investigator_pool
SentenceUnit * InstantiateAnIndefiniteSentenceWithLabel(SentenceUnit *, IDElement *)
bool WhetherItIsBiState()
IDElement * m_comparison_pt
IDElement * GetLabelOfThisSentence()
void CopyFromAnotherSentence(SentenceUnit *)
IDElement * m_attribute_pt
IDElement * m_diagnose_invest_ID_pt
std::vector< Statement * > m_downstream_statement_list
std::vector< Statement * > m_upperstream_statement_list
double m_last_activated_time
std::string GetThisStatementWords()
void CopyAuxInfoFromUpperstreamStatement(Statement *)
IDElement * m_investigator_ID_pt
KnowledgeUnit * CheckAKnowledgeUnitInTheList(KnowledgeUnit *_KU_pt)
float GetTimeBoundEarlier()
float GetTimeBoundLater()
constexpr int VerifyFromControlPanel
constexpr int RequestInfoInit
constexpr int FindMatchingStatement
constexpr int RetrieveNextLink
constexpr int CauseUndetermined
constexpr int SuccessNotHappened
constexpr int DecideWhetherToClose
constexpr int CheckAvailableFromMR
constexpr int ChooseDownstreamLink
constexpr int GetCorrespondingKE
constexpr int RequestInfoRead
constexpr int Undetermined
constexpr int NoMatchingKE
constexpr int CompareKEAndStatement
constexpr int ActiveThreshold
constexpr int FailedToExplain
constexpr int CauseUndeterminedFeedback
constexpr int SearchPossibleCauses
constexpr int EvaluateNewFeedback
constexpr int WorkOnInvestigatorLink
OperatorAT Action_Taker
Crew action execution model.
OperatorDM Decision_Maker
Crew decision-making model.
BranchRecord Branch_center
Dynamic event tree state.