/** * Two phase aggregation if only expertise is enabled */ private function crossWithHFWAoperator() { $aggregation = array(); //Temporal array of data $criterionAssessment = array(); //what several experts say about a single criterion. Temporal array for ($i = 0; $i < $this->N; $i++) { for ($j = 0; $j < $this->M; $j++) { //if ($this->debug) echo $this->data[$i * $this->P]["ref"] . " - C" . $j; //Aggregate hesitants given experts weights for each criterion weight for ($k = 0; $k < $this->P; $k++) { $c = $i * $this->P + $k; //index to get assessments - system_message("#".$c); $inf = "L" . ($j + 1); $sup = "U" . ($j + 1); //if ($this->debug) //echo " - W^E_C=" . $this->superE[$k][$j]; echo " [" . $this->data[$c][$inf] . "," . $this->data[$c][$sup] . "], "; $criterionAssessment[$k] = array("inf" => $this->data[$c][$inf], "sup" => $this->data[$c][$sup]); } $aggregation[$i][$j] = toEnvelope(aggregationHLWA($criterionAssessment, $this->E, $this->G)); $this->cSi[$i][$j] = $aggregation[$i][$j]['inf']; $this->cSj[$i][$j] = $aggregation[$i][$j]['sup']; if ($this->debug) { echo " agg1=> [" . $this->cSi[$i][$j] . ", " . $this->cSj[$i][$j] . "]<br>"; } } } }
/** * Method of the classs MCDM that decides which operator should be used * Input: data array of envelopes * Output: check boolean to decide if output is an hesitant resulting of aggregation or its envelope //To Do: aggregationHLWA with array of hesitants as input //To Do: aggregationMinMax with input hesitants and weights * Note: weight is not a param ... all methods use it for expert aggregation */ public function aggregate($assessments, $toHesitant) { //if pesos expertos solo aggregationHLWA?? //chequear cual es el array de pesos a usar. $aggOperator = elgg_get_plugin_setting('aggOperator', 'hflts'); if ($aggOperator == 0) { //system_message(elgg_echo('hflts:aggOperator:minmax'));//does not consider weights if ($toHesitant) { $result = aggregationMinMaxToHesitant($assessments); } else { $result = aggregationMinMaxToEnvelope($assessments); } } else { //system_message(elgg_echo('hflts:aggOperator:HLWA'));//admits weights $result = aggregationHLWA($assessments, $this->E, $this->G); if (!$toHesitant) { $result = toEnvelope($result); } } return $result; }