/** * Compute \Phi_j(Hi_,H_k) when F(H_ij) < F(H_kj) * as -1/theta sqrt ( sum w_jr d_(H_kj,H_ij) / w_jr) */ private function dominanceDegreeCaseUnder($i, $j, $k) { $d = euclideanDistance($this->hesitants[$i][$j], $this->hesitants[$k][$j], $this->lambda, $this->G, $this->chi); $factor = -1.0 / $this->theta; //echo " (" .$d.") W_r " . $this->W_r[$j] . " / " . $this->T_Wr ; $dd = $factor * sqrt($d * $this->T_Wr / $this->W_r[$j]); return $dd; }
/** * Compare best distances and worst distances to the evaluation matrix */ private function idealSolution() { $l_metric = array(); for ($j = 0; $j < $this->M; $j++) { $max = array_keys($this->score[$j], max($this->score[$j])); $this->positive[$j] = $this->hesitants[$j][$max[0]]; $min = array_keys($this->score[$j], min($this->score[$j])); $this->negative[$j] = $this->hesitants[$j][$min[0]]; } if ($this->debug) { echo 'positive: <pre>'; print_r($this->positive); echo '</pre><br>'; echo 'negative: <pre>'; print_r($this->negative); echo '</pre><br>'; } for ($j = 0; $j < $this->M; $j++) { //echo "C".($j+1)."<br>" ; $d_IN = euclideanDistance($this->negative[$j], $this->positive[$j], $this->lambda, $this->G, $this->xhi); for ($i = 0; $i < $this->N; $i++) { $d_IP = euclideanDistance($this->hesitants[$j][$i], $this->positive[$j], $this->lambda, $this->G, $this->xhi); $l_metric[$i][$j] = $d_IP / $d_IN * $this->W[$j]; //echo "d=".$d_IP." .... " . $l_metric[$i][$j] . "<br>"; } } for ($i = 0; $i < $this->N; $i++) { $sumGU = 0; for ($j = 0; $j < $this->M; $j++) { $sumGU += $l_metric[$i][$j]; } $this->HFLGU[$i] = $sumGU; // HFLGU group utility measure = Lp metric with p =1 $this->HFLIR[$i] = max($l_metric[$i]); // HFLIR individual regret measure = Lp metric con p \inf } }