Esempio n. 1
0
 function clonar()
 {
     $clon = new literal();
     $clon->setHecho($this->getHecho()->clonar());
     $clon->setOprel($this->getOprel());
     return $clon;
 }
Esempio n. 2
0
 private function regla10()
 {
     $hecho1 = new hecho();
     $hecho1->setVariable(self::$RESPUESTA);
     $hecho1->setValor(self::$VALIDA);
     $hecho1->setEsNumerico(FALSE);
     $hecho2 = new hecho();
     $hecho2->setVariable(self::$NRO_PROF_PREF);
     $hecho2->setValor(4);
     $hecho2->setEsNumerico(TRUE);
     $hecho3 = new hecho();
     $hecho3->setVariable(self::$DISCREPANCIA_PROF_PREF);
     $hecho3->setValor(self::$EXISTE);
     $literal1 = new literal();
     $literal1->setHecho($hecho1);
     $literal1->setOprel(literal::$IGUAL);
     $literal2 = new literal();
     $literal2->setHecho($hecho2);
     $literal2->setOprel(literal::$MENOR);
     $literal3 = new literal();
     $literal3->setHecho($hecho3);
     $literal3->setOprel(literal::$IGUAL);
     $consecuente = new hecho();
     $consecuente->setVariable(self::$PERFIL);
     $consecuente->setValor(self::$NO_DEFINIDO);
     $consecuente->setEsNumerico(FALSE);
     $regla = new regla();
     $regla->addLiteral($literal1);
     $regla->addLiteral($literal2);
     $regla->addLiteral($literal3);
     $regla->setConsecuente($consecuente);
     $this->reglas[] = $regla;
 }