app/models/PlayerAgent.js
//the fading_fator is similar to the discount factor
the fading_fator is similar to the discount factor
the fading_fator is similar to the discount factor
calculateWTP(totalDailyDraw = 1, fading_factor = 0.5) {
    let curWTP = 0
    if (this.cur_payFrequency !== 0) {
      curWTP = this.cur_payment / this.cur_payFrequency * Math.pow(0.94, this.cur_payFrequency) + this.cur_payment / 33
    }
    curWTP += this.baseWTP
    const patienceFactor = totalDailyDraw / this.dailyDrawFrequency
    if (!isNaN(patienceFactor) && Number.isFinite(patienceFactor)) {
      curWTP = curWTP * ((patienceFactor - 1) / 10 + 1)
    }
    curWTP = Math.sqrt(curWTP)
    this.WTP = this.WTP * fading_factor + (1 - fading_factor) * curWTP
    return this.WTP
  }
calculateWTP ( totalDailyDraw = 1 , fading_factor = 0.5 ) { let curWTP = 0 if ( this . cur_payFrequency !== 0 ) { curWTP = this . cur_payment / this . cur_payFrequency * Math . pow ( 0.94 , this . cur_payFrequency ) + this . cur_payment / 33 } curWTP += this . baseWTP const patienceFactor = totalDailyDraw / this . dailyDrawFrequency if ( ! isNaN ( patienceFactor ) && Number . isFinite ( patienceFactor ) ) { curWTP = curWTP * ( ( patienceFactor - 1 ) / 10 + 1 ) } curWTP = Math . sqrt ( curWTP ) this . WTP = this . WTP * fading_factor + ( 1 - fading_factor ) * curWTP return this . WTP }
the fading_fator is similar to the discount factor
the fading_fator is similar to the discount factor