Skip to content

Commit

Permalink
fix: reset credibility when evaluate a new service provider
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanCapistrano committed Mar 9, 2024
1 parent 216dc3c commit ac8966c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/main/java/reputation/node/models/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -805,13 +805,10 @@ private float calculateCredibility(
logger.info(String.valueOf(nodeCredibility)); // TODO: Remover

/**
* Calculando a credibilidade do nó avaliador.
* Calculando a credibilidade do nó avaliador, somente se o provedor de
* serviço tenha recebido avaliações previamente.
*/
if (this.isAverageEvaluationZero) {
/* Caso o provedor de serviço não tenha recebido avaliações, deve-se
considerar a credibilidade inicial do nó avaliador. */
nodeCredibility = (float) 0.5;
} else {
if (!this.isAverageEvaluationZero) {
if (
consistency <= consistencyThreshold &&
trustworthiness <= trustworthinessThreshold
Expand Down

0 comments on commit ac8966c

Please sign in to comment.