← Documentation
ADS-IDAC Engine 5.0.0
SymptomCase.cpp
Go to the documentation of this file.
1// SymptomCase.cpp: implementation of the SymptomCase class.
2//
4
5#include "SymptomCase.h"
6#include "ReasonMachine.h"
7using namespace std;
8
9
11// Construction/Destruction
13
15{
16 this->m_finished_bl = false;
17/*
18 KnowledgeUnit * m_stuck_KU_pt;
19 Investigator* m_problem_permission_invest_pt;
20 Investigator* m_problem_invest_pt;
21 Investigator * m_invest_pt;
22 Investigator * m_unfinished_invest_pt;
23 InvestigatorLink * m_unfinished_invest_link_pt;
24*/
25 this->m_invest_opposite_bl = false;
26 this->m_stuck_KU_pt = NULL;
27 this->m_problem_invest_pt = NULL;
29 this->m_invest_pt = NULL;
30 this->m_unfinished_invest_pt = NULL;
31 this->m_unfinished_invest_link_pt = NULL;
32
33 this->m_ID_stuck_KU = "";
35 this->m_ID_problem_invest = "";
36 this->m_ID_invest = "";
37 this->m_ID_unfinished_invest = "";
39
40 this->m_initiating_time = r5pars_.timesno;
41}
42
44{
45
46}
47
48//DEL KnowledgeUnit * SymptomCase::m_stuck_KU_pt()
49//DEL {
50//DEL
51//DEL }
52
54{
55/*
56 bool m_consistant_bl;
57 bool m_finished_bl;
58 float m_exception_time;
59 float m_confirmed_time;
60 float m_rejection_time;
61 float m_path_confidence;
62*/
63 this->m_consistant_bl = _sc_pt->m_consistant_bl;
64 this->m_finished_bl = _sc_pt->m_finished_bl;
65 this->m_exception_time = _sc_pt->m_exception_time;
66 this->m_confirmed_time = _sc_pt->m_confirmed_time;
67 this->m_rejection_time = _sc_pt->m_rejection_time;
68 this->m_path_confidence = _sc_pt->m_path_confidence;
71
72/*
73 KnowledgeUnit * m_stuck_KU_pt;
74 Investigator* m_problem_permission_invest_pt;
75 Investigator* m_problem_invest_pt;
76 Investigator * m_invest_pt;
77 Investigator * m_unfinished_invest_pt;
78 InvestigatorLink * m_unfinished_invest_link_pt;
79
80 string m_ID_stuck_KU;
81 string m_ID_problem_permission_invest;
82 string m_ID_problem_invest;
83 string m_ID_invest;
84 string m_ID_unfinished_invest;
85 string m_ID_unfinished_invest_link;
86*/
87 if(_sc_pt->m_problem_permission_invest_pt != NULL)
89 else
91
92 if(_sc_pt->m_problem_permission_invest_pt != NULL)
94 else
96
97 if(_sc_pt->m_problem_invest_pt != NULL)
99 else
101
102 if(_sc_pt->m_invest_pt != NULL)
103 {this->m_ID_invest = _sc_pt->m_invest_pt->m_ID;}
104 else
105 {this->m_ID_invest = _sc_pt->m_ID_invest;}
106
107 if(_sc_pt->m_unfinished_invest_pt != NULL)
109 else
111
112 if(_sc_pt->m_unfinished_invest_link_pt != NULL)
114 else
116}
117
119{
120 ReasonMachine * RM_pt;
121 RM_pt = (ReasonMachine*)_pt;
122
123 //KnowledgeUnit * m_stuck_KU_pt;
124 if(this->m_ID_stuck_KU.compare("") != 0)
125 {
127 if(this->m_stuck_KU_pt == NULL)
128 {this->ErrorMessage("this->m_stuck_KU_pt == NULL"); return;}
129 }
130 this->m_ID_stuck_KU = "";
131
132 //Investigator* m_problem_permission_invest_pt;
133 if(this->m_ID_problem_permission_invest.compare("") != 0)
134 {
136 if(this->m_problem_permission_invest_pt == NULL)
137 {this->ErrorMessage("this->m_problem_permission_invest_pt == NULL"); return;}
138 }
140
141 //Investigator* m_problem_invest_pt;
142 if(this->m_ID_problem_invest.compare("") != 0)
143 {
145 if(this->m_problem_invest_pt == NULL)
146 {this->ErrorMessage("this->m_problem_invest_pt == NULL"); return;}
147 }
148 this->m_ID_problem_invest = "";
149
150 //Investigator * m_invest_pt;
151 if(this->m_ID_invest.compare("") != 0)
152 {
153 this->m_invest_pt = RM_pt->FindInvestigatorByID(this->m_ID_invest);
154 if(this->m_invest_pt == NULL)
155 {this->ErrorMessage("this->m_invest_pt == NULL"); return;}
156 }
157 this->m_ID_invest = "";
158
159 //Investigator * m_unfinished_invest_pt;
160 if(this->m_ID_unfinished_invest.compare("") != 0)
161 {
163 if(this->m_unfinished_invest_pt == NULL)
164 {this->ErrorMessage("this->m_unfinished_invest_pt == NULL"); return;}
165 }
166 this->m_ID_unfinished_invest = "";
167
168 //InvestigatorLink * m_unfinished_invest_link_pt;
169 if(this->m_ID_unfinished_invest_link.compare("") != 0)
170 {
172 if(this->m_unfinished_invest_link_pt == NULL)
173 {this->ErrorMessage("this->m_unfinished_invest_link_pt == NULL"); return;}
174 }
176
177
178}
179
181{
182 cout << r5pars_.timesno << " " << str << "In SymptomCase.cpp" << '\n';
183 ofstream fout("err messages.txt", ios::app);
184 fout << r5pars_.timesno << " " << str << '\n';
185 fout.close();
186 //r5pars_.terminateall = true;
187}
Diagnostic reasoning engine — knowledge representation, mental model, and inference.
std::string m_ID
Definition: IDElement.h:16
InvestigatorLink * FindInvestigatorLinkByID(std::string)
KnowledgeUnit * FindKnowledgeUnitByID(std::string)
Investigator * FindInvestigatorByID(std::string)
Investigator * m_invest_pt
Definition: SymptomCase.h:30
float m_exception_time
Definition: SymptomCase.h:22
float m_initiating_time
Definition: SymptomCase.h:18
std::string m_ID_stuck_KU
Definition: SymptomCase.h:34
Investigator * m_unfinished_invest_pt
Definition: SymptomCase.h:31
std::string m_ID_invest
Definition: SymptomCase.h:37
KnowledgeUnit * m_stuck_KU_pt
Definition: SymptomCase.h:27
InvestigatorLink * m_unfinished_invest_link_pt
Definition: SymptomCase.h:32
std::string m_ID_unfinished_invest_link
Definition: SymptomCase.h:39
std::string m_ID_problem_permission_invest
Definition: SymptomCase.h:35
Investigator * m_problem_permission_invest_pt
Definition: SymptomCase.h:28
virtual ~SymptomCase()
Definition: SymptomCase.cpp:43
Investigator * m_problem_invest_pt
Definition: SymptomCase.h:29
float m_rejection_time
Definition: SymptomCase.h:24
void ErrorMessage(std::string)
bool m_consistant_bl
Definition: SymptomCase.h:20
bool m_invest_opposite_bl
Definition: SymptomCase.h:13
float m_path_confidence
Definition: SymptomCase.h:25
std::string m_ID_unfinished_invest
Definition: SymptomCase.h:38
bool m_finished_bl
Definition: SymptomCase.h:21
float m_confirmed_time
Definition: SymptomCase.h:23
void CopySymptomCaseInfoFromAnother(SymptomCase *)
Definition: SymptomCase.cpp:53
void BuildConnectionsForThisSymptomCase(void *)
std::string m_ID_problem_invest
Definition: SymptomCase.h:36
struct @0 r5pars_