Information Technology Reference
In-Depth Information
ELSE
IF(k>m)THEN
array_heartbeat.add[heartbeat];
k++;
FSE
(...)
IF(sensorn> array_ttsn[i])THEN
k++;
array_sensorn.add[sensorn];
FSE
IF(sensor1> array_tts1[i]) THEN
integer anomaly= 2;
FSE
(...)
ELSE
IF(sensor(n-1)> array_tts(n-1)[i]) THEN
anomaly++;
if(anomaly>=3){
boolean flag=1;
return flag;
algorithm2();
FSE
}ELSE
IF(k>m)THEN
array_sensorn.add[sensorn];
k++;
FSE
FSE
This algorithm returns a flag that if true it will invocate the algorithm 2, which will
choose the indicated weights of the sensors according to the situation of fear or ill-
ness.
3.5
Algorithm 3
In this subsection is presented the algorithm responsible for the threshold calculation.
integer k=0; // number of anomalies detected
integer threshold_calculation (integer array_tts1, ..., integer
array_ttsn, integer sensor1, ..., integer sensorn, integer
array_heartbeat, ..., integer array_sensorn){
IF(sensor1> array_tts1[i])THEN
k++;
FSE
IF(k==m)THEN // m is the maximum number of times that
// the anomaly can occur until readjusting its threshold
array_tts1[i]=(array_heartbeat[1]+...+ array_heartbeat[j])/j;
k=0;
Search WWH ::




Custom Search