Equações Relacionais Fuzzy Soluções minimal e maximal Dr. Eng. Odair Barbosa de Moraes PCC/POLI/USP odair.moraes@poli.usp.br  http://odairmoraes.pcc.usp.br Instituto de Matemática e Estatística da USP Seminários de Lógica Fuzzy 03 de abril de 2009
RELAÇÃO CRISP X={1, 2, 3, 4} e Y={1, 2, 4, 5, 6} R: y é o dobro de x R(x,y)={(1, 2), (2, 4), (3, 6)} 1  2  4  5  6
Relação Fuzzy X={1, 2, 3, 4} e Y={1, 2, 4, 5, 6} R:  y  é “próximo” de  x R( x,y )={1.0/(1, 1), 0.5/(1, 2), 0.25/(1, 4),..., 0.66/(4, 6)} 1 2 4 5 6 1 1.00 0.50 0.25 0.20 0.17 2 0.50 1.00 0.50 0.40 0.33 3 0.33 0.67 0.75 0.60 0.50 4 0.25 0.50 1.00 0.80 0.67
  i  é uma t-norma Importante Dadas duas relações fuzzy P(X,Y) e Q(Y,Z) Composição sup-i COMPOSIÇÕES DE RELAÇÕES FUZZY Composição inf-  i    i   é a implicação
  Considere três relações  fuzzy  binárias  P(X,Y), Q(Y,Z)  e  R(X,Z) Equações relacionais  fuzzy  baseadas na composição sup- i Considere então o problema: dado Q (ou P) e R como calcular P (ou Q)  E as matrizes P, Q e R denotadas por: Considere a equação
inputs outputs ? n  variáveis m  casos n  variáveis p  saídas = p  saídas m  casos
Regras Input Output Base de  conhecimento Sintomas Diagnóstico Base de  conhecimento Indicadores Índice
Exemplo 1: Diagnóstico médico (Barros e Bassanezi (2006)) Relação: pacientes e sintomas Febre Cefa-léia Garganta inflamada Exan-tema Gânglio Coriza Conjun-tivite Língua de morango Foto-fobia Tosse seca Vômito P/s s 1 s 2 s 3 s 4 s 5 s 6 s 7 s 8 s 9 s 10 s 11 P 1 0,8 0,4 0,5 0,8 0,2 0,1 0,1 0,9 0,1 0,1 0,4 P 2 0,3 0,1 0,4 0,8 0,9 0,2 0,1 0,1 0,1 0,1 0,3 P 3 0,8 0,3 0,5 0,8 0,1 0,2 0,9 0,1 0,6 0,3 0,6 P 4 0,8 0,7 0,7 0,2 0,1 0,9 0,1 0,1 0,1 0,9 0,4
Relação: pacientes e sintomas Escarlatina Rubéola Sarampo Gripe P/d d 1 d 2 d 3 d 4 P 1 0,9 0,3 0,4 0,2 P 2 0,3 0,9 0,1 0,1 P 3 0,4 0,1 0,9 0,3 P 4 0,2 0,1 0,3 0,9
É provado para a equação  é a composição inf–  i . Dados  P  e  R  a solução maximal para  Q  é dada pela composição onde Solução maximal
Relação Sintoma e doença Solução maximal Escarlatina Rubéola Sarampo Gripe S/d d 1 d 2 d 3 d 4 Febre S 1 0,2 0,1 0,1 0,1 Cefaléia S 2 0,2 0,1 0,3 0,2 Garganta inflamada S 3 0,2 0,1 0,1 0,1 Exantema S 4 0,3 0,1 0,1 0,1 Gânglio S 5 0,3 1,0 0,1 0,1 Coriza S 6 0,2 0,1 0,1 0,1 Conjuntivite S 7 0,4 0,1 1,0 0,3 Língua de morango S 8 1,0 0,3 0,4 0,2 Fotofobia S 9 0,4 0,1 1,0 0,3 Tosse seca S 10 0,2 0,1 0,3 1,0 Vômito s 11 0,2 0,1 0,1 0,1
Relação Sintoma e doença Solução minimal – Uma candidata Escarlatina Rubéola Sarampo Gripe S/d d 1 d 2 d 3 d 4 Febre S 1 0,0 0,0 0,0 0,0 Cefaléia S 2 0,0 0,0 0,3 0,0 Garganta inflamada S 3 0,0 0,0 0,0 0,0 Exantema S 4 0,3 0,0 0,0 0,0 Gânglio S 5 0,0 0,9 0,0 0,0 Coriza S 6 0,0 0,0 0,0 0,0 Conjuntivite S 7 0,4 0,0 0,9 0,0 Língua de morango S 8 0,9 0,3 0,4 0,2 Fotofobia S 9 0,0 0,0 0,0 0,0 Tosse seca S 10 0,0 0,0 0,0 0,9 Vômito s 11 0,0 0,0 0,0 0,0
Estrutura do conjunto solução Solução máxima (Única) Soluções mínimas Reticulado Reticulado
Algoritmo para obtenção de soluções minimais max-min P/s s 1 s 2 s 3 s 4 s 5 s 6 s 7 s 8 s 9 s 10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0,0 0,0 Exantema 0,0 0,0 0,0 0,1 0,1 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 Gânglio 0,0 0,0 0,0 0,0 0,0 0,1 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 Coriza 0,0 0,0 0,0 0,0 0,0 0,0 0,1 0,1 0,0 0,0 0,0 0,0 0,0 0,0 Conjuntivite 0,3 0,3 0,3 0,3 0,0 0,0 0,0 0,0 0,1 0,0 0,0 0,0 0,0 0,0 Língua de morango 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,2 0,2 0,2 0,2 0,2 0,2 0,2 Fotofobia 0,0 0,0 0,0 0,0 0,3 0,3 0,3 0,3 0,3 0,3 0,0 0,1 0,0 0,0 Tosse seca 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 Vômito 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,1
Exemplo 2: Avaliação do ambiente urbano Indicadores “ Índice”
Solução maximal Avaliação parcial Avaliação final Péssimo/Ruim Regular Bom/Ótimo Av_Inst_Agua Péssimo/Ruim 1,0 0,1 0,1 Regular 0,5 0,1 0,1 Bom/Ótimo 0,1 0,1 0,1 Av_Inst_Esgoto Péssimo/Ruim 1,0 0,1 0,1 Regular 0,1 0,1 0,1 Bom/Ótimo 0,1 0,1 0,1 Av_Inst_Eletrica Péssimo/Ruim 0,1 0,1 0,1 Regular 0,1 0,1 0,1 Bom/Ótimo 0,1 0,1 0,1 Av_Quartos Péssimo/Ruim 0,1 0,1 0,1 Regular 0,1 0,1 0,1 Bom/Ótimo 0,1 0,2 0,5 Av_Tam_Casa Péssimo/Ruim 0,1 0,1 0,1 Regular 0,1 0,2 0,5 Bom/Ótimo 0,1 0,1 0,1 Av_Telhado Péssimo/Ruim 0,1 0,1 0,1 Regular 0,1 0,1 0,1 Bom/Ótimo 0,1 0,2 1,0 Av_Paredes Péssimo/Ruim 1,0 0,1 0,1 Regular 0,1 0,1 0,1 Bom/Ótimo 0,1 0,1 0,1 Av_Piso Péssimo/Ruim 0,1 0,1 0,1 Regular 0,1 0,1 0,1 Bom/Ótimo 0,1 0,1 0,1 Av_Ventila Péssimo/Ruim 0,1 0,1 0,1 Regular 0,1 1,0 0,1 Bom/Ótimo 0,1 0,1 0,1
Uma solução minimal Avaliação Final Avaliação Parcial Bom/Ótimo Regular Péssimo/Ruim Av_Inst_Agua Péssimo/Ruim 0,0 0,1 0,1 Regular 0,5 0,0 0,0 Bom/Ótimo 0,1 0,0 0,0 Av_Inst_Esgoto Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Bom/Ótimo 0,0 0,0 0,0 Av_Inst_Eletrica Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Bom/Ótimo 0,0 0,0 0,0 Av_Quartos Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Bom/Ótimo 0,0 0,2 0,5 Av_Tam_Casa Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Bom/Ótimo 0,0 0,0 0,0 Av_Telhado Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Bom/Ótimo 0,0 0,0 1,0 Av_Paredes Péssimo/Ruim 1,0 0,0 0,0 Regular 0,0 0,0 0,0 Bom/Ótimo 0,0 0,0 0,0 Av_Piso Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Bom/Ótimo 0,0 0,0 0,0 Av_Ventila Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 1,0 0,0 Bom/Ótimo 0,0 0,0 0,0
Solução maximal Avaliação parcial Avaliação final Péssimo/Ruim Regular Ótimo/Bom Av_Abast_Água Péssimo/Ruim 1,0 1,0 1,0 Regular 0,3 0,0 0,2 Ótimo/Bom 0,3 0,0 0,2 Av_Esgoto Péssimo/Ruim 0,3 0,0 0,2 Regular 0,3 0,4 1,0 Ótimo/Bom 0,3 0,0 0,2 Av_Coleta_Lixo Péssimo/Ruim 1,0 0,0 0,2 Regular 0,3 1,0 1,0 Ótimo/Bom 0,3 0,0 0,2 Av_Varrição Péssimo/Ruim 0,3 0,0 0,2 Regular 0,3 1,0 0,4 Ótimo/Bom 0,3 0,0 0,2 Av_Boc_Sarj Péssimo/Ruim 0,3 0,0 0,2 Regular 0,3 0,4 1,0 Ótimo/Bom 0,3 0,0 0,2 Seg_Inund Péssimo/Ruim 0,3 0,0 0,2 Regular 1,0 0,0 0,2 Ótimo/Bom 0,3 0,0 0,2 Av_larg_rua Péssimo/Ruim 0,3 0,0 0,2 Regular 0,3 0,4 1,0 Ótimo/Bom 0,3 0,0 1,0 Av_Rua Péssimo/Ruim 0,9 0,0 0,2 Regular 0,3 0,4 0,4 Ótimo/Bom 0,3 0,0 1,0 Seg_Terreno Péssimo/Ruim 0,3 0,0 0,2 Regular 1,0 0,0 0,2 Ótimo/Bom 0,3 0,0 0,2 Av_Esp_Pub Péssimo/Ruim 1,0 0,0 0,2 Regular 1,0 0,0 0,2 Ótimo/Bom 0,3 0,0 0,2 Av_Energia Péssimo/Ruim 1,0 1,0 1,0 Regular 1,0 0,0 1,0 Ótimo/Bom 0,3 0,0 0,2 Av_Ilumina Péssimo/Ruim 1,0 0,0 0,2 Regular 0,3 1,0 0,4 Ótimo/Bom 0,3 0,0 0,4 Dist_Tel Péssimo/Ruim 0,3 0,0 0,2 Regular 0,3 0,0 1,0 Ótimo/Bom 0,3 0,4 1,0 Seg_Posse Péssimo/Ruim 0,3 0,0 0,2 Regular 1,0 0,0 0,2 Ótimo/Bom 0,3 0,0 0,2
Uma solução minimal Avaliação parcial Avaliação final – MDI e MSP Péssimo/Ruim Regular Ótimo/Bom Av_Abast_Água Péssimo/Ruim 0,0 0,0 0,0 Regular 0,3 0,0 0,2 Ótimo/Bom 0,0 0,0 0,0 Av_Esgoto Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,4 0,0 Ótimo/Bom 0,0 0,0 0,0 Av_Coleta_Lixo Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Av_Varrição Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,4 Ótimo/Bom 0,0 0,0 0,0 Av_Boc_Sarj Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Seg_Inund Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Av_larg_rua Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 1,0 Av_Rua Péssimo/Ruim 0,9 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Seg_Terreno Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Av_Esp_Pub Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Av_Energia Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Av_Ilumina Péssimo/Ruim 1,0 0,0 0,0 Regular 0,0 1,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Dist_Tel Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Seg_Posse Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0

Apresentacao Ime030409

  • 1.
    Equações Relacionais FuzzySoluções minimal e maximal Dr. Eng. Odair Barbosa de Moraes PCC/POLI/USP odair.moraes@poli.usp.br http://odairmoraes.pcc.usp.br Instituto de Matemática e Estatística da USP Seminários de Lógica Fuzzy 03 de abril de 2009
  • 2.
    RELAÇÃO CRISP X={1,2, 3, 4} e Y={1, 2, 4, 5, 6} R: y é o dobro de x R(x,y)={(1, 2), (2, 4), (3, 6)} 1 2 4 5 6
  • 3.
    Relação Fuzzy X={1,2, 3, 4} e Y={1, 2, 4, 5, 6} R: y é “próximo” de x R( x,y )={1.0/(1, 1), 0.5/(1, 2), 0.25/(1, 4),..., 0.66/(4, 6)} 1 2 4 5 6 1 1.00 0.50 0.25 0.20 0.17 2 0.50 1.00 0.50 0.40 0.33 3 0.33 0.67 0.75 0.60 0.50 4 0.25 0.50 1.00 0.80 0.67
  • 4.
      i é uma t-norma Importante Dadas duas relações fuzzy P(X,Y) e Q(Y,Z) Composição sup-i COMPOSIÇÕES DE RELAÇÕES FUZZY Composição inf-  i    i é a implicação
  • 5.
      Considere trêsrelações fuzzy binárias P(X,Y), Q(Y,Z) e R(X,Z) Equações relacionais fuzzy baseadas na composição sup- i Considere então o problema: dado Q (ou P) e R como calcular P (ou Q) E as matrizes P, Q e R denotadas por: Considere a equação
  • 6.
    inputs outputs ?n variáveis m casos n variáveis p saídas = p saídas m casos
  • 7.
    Regras Input OutputBase de conhecimento Sintomas Diagnóstico Base de conhecimento Indicadores Índice
  • 8.
    Exemplo 1: Diagnósticomédico (Barros e Bassanezi (2006)) Relação: pacientes e sintomas Febre Cefa-léia Garganta inflamada Exan-tema Gânglio Coriza Conjun-tivite Língua de morango Foto-fobia Tosse seca Vômito P/s s 1 s 2 s 3 s 4 s 5 s 6 s 7 s 8 s 9 s 10 s 11 P 1 0,8 0,4 0,5 0,8 0,2 0,1 0,1 0,9 0,1 0,1 0,4 P 2 0,3 0,1 0,4 0,8 0,9 0,2 0,1 0,1 0,1 0,1 0,3 P 3 0,8 0,3 0,5 0,8 0,1 0,2 0,9 0,1 0,6 0,3 0,6 P 4 0,8 0,7 0,7 0,2 0,1 0,9 0,1 0,1 0,1 0,9 0,4
  • 9.
    Relação: pacientes esintomas Escarlatina Rubéola Sarampo Gripe P/d d 1 d 2 d 3 d 4 P 1 0,9 0,3 0,4 0,2 P 2 0,3 0,9 0,1 0,1 P 3 0,4 0,1 0,9 0,3 P 4 0,2 0,1 0,3 0,9
  • 10.
    É provado paraa equação é a composição inf–  i . Dados P e R a solução maximal para Q é dada pela composição onde Solução maximal
  • 11.
    Relação Sintoma edoença Solução maximal Escarlatina Rubéola Sarampo Gripe S/d d 1 d 2 d 3 d 4 Febre S 1 0,2 0,1 0,1 0,1 Cefaléia S 2 0,2 0,1 0,3 0,2 Garganta inflamada S 3 0,2 0,1 0,1 0,1 Exantema S 4 0,3 0,1 0,1 0,1 Gânglio S 5 0,3 1,0 0,1 0,1 Coriza S 6 0,2 0,1 0,1 0,1 Conjuntivite S 7 0,4 0,1 1,0 0,3 Língua de morango S 8 1,0 0,3 0,4 0,2 Fotofobia S 9 0,4 0,1 1,0 0,3 Tosse seca S 10 0,2 0,1 0,3 1,0 Vômito s 11 0,2 0,1 0,1 0,1
  • 12.
    Relação Sintoma edoença Solução minimal – Uma candidata Escarlatina Rubéola Sarampo Gripe S/d d 1 d 2 d 3 d 4 Febre S 1 0,0 0,0 0,0 0,0 Cefaléia S 2 0,0 0,0 0,3 0,0 Garganta inflamada S 3 0,0 0,0 0,0 0,0 Exantema S 4 0,3 0,0 0,0 0,0 Gânglio S 5 0,0 0,9 0,0 0,0 Coriza S 6 0,0 0,0 0,0 0,0 Conjuntivite S 7 0,4 0,0 0,9 0,0 Língua de morango S 8 0,9 0,3 0,4 0,2 Fotofobia S 9 0,0 0,0 0,0 0,0 Tosse seca S 10 0,0 0,0 0,0 0,9 Vômito s 11 0,0 0,0 0,0 0,0
  • 13.
    Estrutura do conjuntosolução Solução máxima (Única) Soluções mínimas Reticulado Reticulado
  • 14.
    Algoritmo para obtençãode soluções minimais max-min P/s s 1 s 2 s 3 s 4 s 5 s 6 s 7 s 8 s 9 s 10 s 11 P 1 0,8 0,4 0,5 0,8 0,2 0,1 0,1 0,9 0,1 0,1 0,4 P 2 0,3 0,1 0,4 0,8 0,9 0,2 0,1 0,1 0,1 0,1 0,3 P 3 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 1,0 0,3 S 8 1,0 0,3 0,4 0,2 S 9 0,4 0,1 1,0 0,3 S 10 0,2 0,1 0,3 1,0 s 11 0,2 0,1 0,1 0,1 P/d d 1 d 2 d 3 d 4 P 1 0,9 0,3 0,4 0,2 P 2 0,3 0,9 0,1 0,1 P 3 0,4 0,1 0,9 0,3 P 4 0,2 0,1 0,3 0,9
  • 18.
    Escarlatina 1 23 4 5 6 7 8 Febre 0,2 0,0 0,0 0,0 0,0 0,0 0,0 0,0 Cefaléia 0,0 0,2 0,0 0,0 0,0 0,0 0,0 0,0 Garganta inflamada 0,3 0,0 0,2 0,0 0,0 0,0 0,0 0,0 Exantema 0,0 0,3 0,3 0,3 0,2 0,0 0,0 0,0 Gânglio 0,0 0,0 0,0 0,0 0,3 0,3 0,3 0,3 Coriza 0,0 0,0 0,0 0,0 0,0 0,2 0,0 0,0 Conjuntivite 0,4 0,4 0,4 0,4 0,0 0,0 0,0 0,0 Língua de morango 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 Fotofobia 0,0 0,0 0,0 0,0 0,4 0,4 0,4 0,4 Tosse seca 0,0 0,0 0,0 0,0 0,0 0,0 0,2 0,0 Vômito 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,2
  • 19.
    Rubéola 1 23 4 5 6 7 8 9 10 11 Febre 0,1 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 Cefaléia 0,0 0,1 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 Garganta inflamada 0,0 0,0 0,1 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 Exantema 0,0 0,0 0,0 0,1 0,0 0,0 0,0 0,0 0,0 0,0 0,0 Gânglio 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 Coriza 0,0 0,0 0,0 0,0 0,0 0,1 0,0 0,0 0,0 0,0 0,0 Conjuntivite 0,0 0,0 0,0 0,0 0,0 0,0 0,1 0,0 0,0 0,0 0,0 Língua de morango 0,3 0,3 0,3 0,3 0,3 0,3 0,3 0,3 0,3 0,3 0,3 Fotofobia 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,1 0,0 0,0 Tosse seca 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,1 0,0 Vômito 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,1
  • 20.
    Sarampo 1 23 4 5 6 7 8 9 10 Febre 0,1 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 Cefaléia 0,3 0,3 0,3 0,3 0,3 0,3 0,0 0,0 0,0 0,0 Garganta inflamada 0,0 0,0 0,1 0,0 0,0 0,0 0,0 0,0 0,0 0,0 Exantema 0,0 0,0 0,0 0,1 0,0 0,0 0,0 0,0 0,0 0,0 Gânglio 0,0 0,0 0,0 0,0 0,1 0,0 0,0 0,0 0,0 0,0 Coriza 0,0 0,0 0,0 0,0 0,0 0,1 0,0 0,0 0,0 0,0 Conjuntivite 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 Língua de morango 0,4 0,4 0,4 0,4 0,4 0,4 0,4 0,4 0,4 0,4 Fotofobia 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,1 0,0 0,0 Tosse seca 0,0 0,0 0,0 0,0 0,0 0,0 0,3 0,3 0,3 0,3 Vômito 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,1
  • 21.
    Gripe 1 23 4 5 6 7 8 9 10 11 12 13 14 Febre 0,1 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 Cefaléia 0,2 0,2 0,2 0,2 0,2 0,2 0,2 0,0 0,0 0,0 0,0 0,0 0,0 0,0 Garganta inflamada 0,0 0,0 0,1 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 Exantema 0,0 0,0 0,0 0,1 0,1 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 Gânglio 0,0 0,0 0,0 0,0 0,0 0,1 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 Coriza 0,0 0,0 0,0 0,0 0,0 0,0 0,1 0,1 0,0 0,0 0,0 0,0 0,0 0,0 Conjuntivite 0,3 0,3 0,3 0,3 0,0 0,0 0,0 0,0 0,1 0,0 0,0 0,0 0,0 0,0 Língua de morango 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,2 0,2 0,2 0,2 0,2 0,2 0,2 Fotofobia 0,0 0,0 0,0 0,0 0,3 0,3 0,3 0,3 0,3 0,3 0,0 0,1 0,0 0,0 Tosse seca 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 0,9 Vômito 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,1
  • 22.
    Exemplo 2: Avaliaçãodo ambiente urbano Indicadores “ Índice”
  • 23.
    Solução maximal Avaliaçãoparcial Avaliação final Péssimo/Ruim Regular Bom/Ótimo Av_Inst_Agua Péssimo/Ruim 1,0 0,1 0,1 Regular 0,5 0,1 0,1 Bom/Ótimo 0,1 0,1 0,1 Av_Inst_Esgoto Péssimo/Ruim 1,0 0,1 0,1 Regular 0,1 0,1 0,1 Bom/Ótimo 0,1 0,1 0,1 Av_Inst_Eletrica Péssimo/Ruim 0,1 0,1 0,1 Regular 0,1 0,1 0,1 Bom/Ótimo 0,1 0,1 0,1 Av_Quartos Péssimo/Ruim 0,1 0,1 0,1 Regular 0,1 0,1 0,1 Bom/Ótimo 0,1 0,2 0,5 Av_Tam_Casa Péssimo/Ruim 0,1 0,1 0,1 Regular 0,1 0,2 0,5 Bom/Ótimo 0,1 0,1 0,1 Av_Telhado Péssimo/Ruim 0,1 0,1 0,1 Regular 0,1 0,1 0,1 Bom/Ótimo 0,1 0,2 1,0 Av_Paredes Péssimo/Ruim 1,0 0,1 0,1 Regular 0,1 0,1 0,1 Bom/Ótimo 0,1 0,1 0,1 Av_Piso Péssimo/Ruim 0,1 0,1 0,1 Regular 0,1 0,1 0,1 Bom/Ótimo 0,1 0,1 0,1 Av_Ventila Péssimo/Ruim 0,1 0,1 0,1 Regular 0,1 1,0 0,1 Bom/Ótimo 0,1 0,1 0,1
  • 24.
    Uma solução minimalAvaliação Final Avaliação Parcial Bom/Ótimo Regular Péssimo/Ruim Av_Inst_Agua Péssimo/Ruim 0,0 0,1 0,1 Regular 0,5 0,0 0,0 Bom/Ótimo 0,1 0,0 0,0 Av_Inst_Esgoto Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Bom/Ótimo 0,0 0,0 0,0 Av_Inst_Eletrica Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Bom/Ótimo 0,0 0,0 0,0 Av_Quartos Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Bom/Ótimo 0,0 0,2 0,5 Av_Tam_Casa Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Bom/Ótimo 0,0 0,0 0,0 Av_Telhado Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Bom/Ótimo 0,0 0,0 1,0 Av_Paredes Péssimo/Ruim 1,0 0,0 0,0 Regular 0,0 0,0 0,0 Bom/Ótimo 0,0 0,0 0,0 Av_Piso Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Bom/Ótimo 0,0 0,0 0,0 Av_Ventila Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 1,0 0,0 Bom/Ótimo 0,0 0,0 0,0
  • 25.
    Solução maximal Avaliaçãoparcial Avaliação final Péssimo/Ruim Regular Ótimo/Bom Av_Abast_Água Péssimo/Ruim 1,0 1,0 1,0 Regular 0,3 0,0 0,2 Ótimo/Bom 0,3 0,0 0,2 Av_Esgoto Péssimo/Ruim 0,3 0,0 0,2 Regular 0,3 0,4 1,0 Ótimo/Bom 0,3 0,0 0,2 Av_Coleta_Lixo Péssimo/Ruim 1,0 0,0 0,2 Regular 0,3 1,0 1,0 Ótimo/Bom 0,3 0,0 0,2 Av_Varrição Péssimo/Ruim 0,3 0,0 0,2 Regular 0,3 1,0 0,4 Ótimo/Bom 0,3 0,0 0,2 Av_Boc_Sarj Péssimo/Ruim 0,3 0,0 0,2 Regular 0,3 0,4 1,0 Ótimo/Bom 0,3 0,0 0,2 Seg_Inund Péssimo/Ruim 0,3 0,0 0,2 Regular 1,0 0,0 0,2 Ótimo/Bom 0,3 0,0 0,2 Av_larg_rua Péssimo/Ruim 0,3 0,0 0,2 Regular 0,3 0,4 1,0 Ótimo/Bom 0,3 0,0 1,0 Av_Rua Péssimo/Ruim 0,9 0,0 0,2 Regular 0,3 0,4 0,4 Ótimo/Bom 0,3 0,0 1,0 Seg_Terreno Péssimo/Ruim 0,3 0,0 0,2 Regular 1,0 0,0 0,2 Ótimo/Bom 0,3 0,0 0,2 Av_Esp_Pub Péssimo/Ruim 1,0 0,0 0,2 Regular 1,0 0,0 0,2 Ótimo/Bom 0,3 0,0 0,2 Av_Energia Péssimo/Ruim 1,0 1,0 1,0 Regular 1,0 0,0 1,0 Ótimo/Bom 0,3 0,0 0,2 Av_Ilumina Péssimo/Ruim 1,0 0,0 0,2 Regular 0,3 1,0 0,4 Ótimo/Bom 0,3 0,0 0,4 Dist_Tel Péssimo/Ruim 0,3 0,0 0,2 Regular 0,3 0,0 1,0 Ótimo/Bom 0,3 0,4 1,0 Seg_Posse Péssimo/Ruim 0,3 0,0 0,2 Regular 1,0 0,0 0,2 Ótimo/Bom 0,3 0,0 0,2
  • 26.
    Uma solução minimalAvaliação parcial Avaliação final – MDI e MSP Péssimo/Ruim Regular Ótimo/Bom Av_Abast_Água Péssimo/Ruim 0,0 0,0 0,0 Regular 0,3 0,0 0,2 Ótimo/Bom 0,0 0,0 0,0 Av_Esgoto Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,4 0,0 Ótimo/Bom 0,0 0,0 0,0 Av_Coleta_Lixo Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Av_Varrição Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,4 Ótimo/Bom 0,0 0,0 0,0 Av_Boc_Sarj Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Seg_Inund Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Av_larg_rua Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 1,0 Av_Rua Péssimo/Ruim 0,9 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Seg_Terreno Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Av_Esp_Pub Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Av_Energia Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Av_Ilumina Péssimo/Ruim 1,0 0,0 0,0 Regular 0,0 1,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Dist_Tel Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0 Seg_Posse Péssimo/Ruim 0,0 0,0 0,0 Regular 0,0 0,0 0,0 Ótimo/Bom 0,0 0,0 0,0