enemy.resetPossibleDamage();
    public double[] getDamageUtilities() {        int iChromIndex = populationDim - 1;        targets.clear(); //could use vector and not hashtable        double[] result = new double[this.target_array.size()];        Chromosome chromVector = this.chromosomes[iChromIndex];        int heat_total = 0;        if (chromVector.genes[chromosomeDim - 1] >= this.target_array.size()) {            chromVector.genes[chromosomeDim - 1] = ((Integer) this.valid_target_indexes.elementAt(0)).intValue();        }        Entity target = (Entity) this.target_array.elementAt(chromVector.genes[chromosomeDim - 1]);        for (int iGene = 0; iGene < chromosomeDim - 1; iGene++) {            AttackOption a = (AttackOption) (((Vector) (attack.elementAt(iGene))).elementAt(chromVector.genes[iGene]));            if (a.target != null) { //if not the no fire option                targets.put(a.target);                double mod = 1;                if (a.target.entity.getId() == target.getId()) {                    a.target.possible_damage[a.toHit.getSideTable()] += mod * a.primary_expected;                } else {                    a.target.possible_damage[a.toHit.getSideTable()] += mod * a.expected;                }                heat_total += a.heat;            }        }        for (int k = 0; k < this.target_array.size(); k++) {            Entity en = (Entity) this.target_array.elementAt(k);            CEntity enemy = null;            result[k] = 0;            if ((enemy = (CEntity) this.targets.get(new Integer(en.getId()))) != null) {                result[k] = getThreadUtility(enemy);            }            enemy.resetPossibleDamage();        }        return result;    }