private static float rateHolding(Actor actor, Holding holding) {
    if (holding == null || holding.base() != actor.base()) return -1 ;
    
    final Series <Actor> residents = holding.personnel.residents() ;
    final int
      UL = holding.upgradeLevel(),
      maxPop = HoldingUpgrades.OCCUPANCIES[UL] ;
    final float crowding = residents.size() * 1f / maxPop ;
    
    float rating = 1 ;
    if (holding == actor.mind.home()) {
      rating *= 1.5f ;
    }
    else if (crowding >= 1) return -1 ;
    if (holding.inWorld()) {
      rating *= 1.5f ;
    }
    
    rating *= (UL + 1) * (2f - crowding) / HoldingUpgrades.NUM_LEVELS ;
    rating -= actor.mind.greedFor(HoldingUpgrades.TAX_LEVELS[UL]) * 5 ;
    rating -= Plan.rangePenalty(actor.mind.work(), holding) ;
    
    if (residents.size() > 0) {
      float averageRelations = 0 ; for (Actor a : residents) {
        averageRelations += actor.mind.relationValue(a) ;
      }
      averageRelations /= residents.size() ;
      rating += averageRelations ;
    }
    
    if (verbose) I.sayAbout(actor, "  Rating for holding is: "+rating) ;
    return rating ;
  }