+ " O2 risk level="
+ " low O2 risk level=" + (consumedLowOxygenBuffer.getCapacity() - consumedLowOxygenBuffer .getLevel()) / consumedLowOxygenBuffer.getCapacity() + " (level=" + consumedLowOxygenBuffer.getLevel() + ", capacity=" + consumedLowOxygenBuffer.getCapacity() + ")"); myLogger.debug("\thigh oxygen taken=" + (O2Needed - O2Consumed) + ", high recovered " + O2_HIGH_RECOVERY_RATE * highOxygenBuffer.getCapacity() + " high O2 risk level="
    private void healthCheck() {        //check for death        float randomNumber = myRandomGen.nextFloat();        float calorieRiskReturn = sigmoidLikeProbability((consumedCaloriesBuffer                .getCapacity() - consumedCaloriesBuffer.getLevel())                / consumedCaloriesBuffer.getCapacity());        float waterRiskReturn = sigmoidLikeProbability((consumedWaterBuffer                .getCapacity() - consumedWaterBuffer.getLevel())                / consumedWaterBuffer.getCapacity());        float oxygenLowRiskReturn = sigmoidLikeProbability((consumedLowOxygenBuffer                .getCapacity() - consumedLowOxygenBuffer.getLevel())                / consumedLowOxygenBuffer.getCapacity());        float oxygenHighRiskReturn = sigmoidLikeProbability((highOxygenBuffer                .getCapacity() - highOxygenBuffer.getLevel())                / highOxygenBuffer.getCapacity());        float CO2RiskReturn = sigmoidLikeProbability((consumedCO2Buffer                .getCapacity() - consumedCO2Buffer.getLevel())                / consumedCO2Buffer.getCapacity());        float sleepRiskReturn = sigmoidLikeProbability((sleepBuffer                .getCapacity() - sleepBuffer.getLevel())                / sleepBuffer.getCapacity());        myLogger.debug(getName());        myLogger                .debug("\tcalorie taken="                        + (caloriesNeeded - caloriesConsumed)                        + ", recovered "                        + CALORIE_RECOVERY_RATE                        * consumedCaloriesBuffer.getCapacity()                        + " calorie risk level="                        + (consumedCaloriesBuffer.getCapacity() - consumedCaloriesBuffer                                .getLevel())                        / consumedCaloriesBuffer.getCapacity() + " (level="                        + consumedCaloriesBuffer.getLevel() + ", capacity="                        + consumedCaloriesBuffer.getCapacity() + ")");        myLogger.debug("\twater taken="                + (potableWaterNeeded - potableWaterConsumed)                + ", recovered "                + WATER_RECOVERY_RATE                * consumedWaterBuffer.getCapacity()                + " thirst risk level="                + (consumedWaterBuffer.getCapacity() - consumedWaterBuffer                        .getLevel()) / consumedWaterBuffer.getCapacity()                + " (level=" + consumedWaterBuffer.getLevel() + ", capacity="                + consumedWaterBuffer.getCapacity() + ")");        myLogger.debug("\toxygen taken="                + (O2Needed - O2Consumed)                + ", recovered "                + O2_LOW_RECOVERY_RATE                * consumedLowOxygenBuffer.getCapacity()                + " O2 risk level="                + (consumedLowOxygenBuffer.getCapacity() - consumedLowOxygenBuffer                        .getLevel()) / consumedLowOxygenBuffer.getCapacity()                + " (level=" + consumedLowOxygenBuffer.getLevel() + ", capacity="                + consumedLowOxygenBuffer.getCapacity() + ")");        myLogger.debug("\tCO2 taken="                + (getCO2Ratio() - CO2_HIGH_RATIO)                + ", recovered "                + CO2_HIGH_RECOVERY_RATE                * consumedCO2Buffer.getCapacity()                + " CO2 risk level="                + (consumedCO2Buffer.getCapacity() - consumedCO2Buffer                        .getLevel()) / consumedCO2Buffer.getCapacity()                + " (level=" + consumedCO2Buffer.getLevel() + ", capacity="                + consumedCO2Buffer.getCapacity() + ")");        myLogger.debug("\tsleep (level=" + sleepBuffer.getLevel()                + ", capacity=" + sleepBuffer.getCapacity() + ")");        myLogger.debug("\tCO2 ration =" + getCO2Ratio()                + ", DANGEROUS_CO2_RATION=" + CO2_HIGH_RATIO);        if (sleepRiskReturn > (randomNumber + 0.05f)) {            sicken();            myLogger.info(getName()                    + " has fallen ill from exhaustion (risk was "                    + numFormat.format(sleepRiskReturn * 100) + "%) @ tick "                    + myCurrentCrewGroup.getMyTicks());        }        if (calorieRiskReturn > randomNumber) {            hasDied = true;            myLogger.info(getName() + " has died from starvation on tick "                    + myCurrentCrewGroup.getMyTicks() + " (risk was "                    + numFormat.format(calorieRiskReturn * 100) + "%)");        } else if (waterRiskReturn > randomNumber) {            hasDied = true;            myLogger.info(getName() + " has died from thirst on tick "                    + myCurrentCrewGroup.getMyTicks() + " (risk was "                    + numFormat.format(waterRiskReturn * 100) + "%)");        } else if (oxygenLowRiskReturn > randomNumber) {            hasDied = true;            SimEnvironment[] myAirInputs = myCurrentCrewGroup.getAirConsumerDefinition().getEnvironments();            myLogger.info(getName() + " has died from lack of oxygen on tick "                    + myCurrentCrewGroup.getMyTicks() + " (risk was "                    + numFormat.format(oxygenLowRiskReturn * 100) + "%)");            myLogger.info(getName() + " Environmental conditions were: 02="                    + myAirInputs[0].getO2Moles() + ", CO2="                    + myAirInputs[0].getCO2Moles() + ", N="                    + myAirInputs[0].getNitrogenMoles() + ", water="                    + myAirInputs[0].getWaterMoles() + ", other="                    + myAirInputs[0].getOtherMoles());        } else if (oxygenHighRiskReturn > randomNumber) {            hasDied = true;            SimEnvironment[] myAirInputs = myCurrentCrewGroup.getAirConsumerDefinition().getEnvironments();            myLogger.info(getName() + " has died from oxygen flammability on tick "                    + myCurrentCrewGroup.getMyTicks() + " (risk was "                    + numFormat.format(oxygenHighRiskReturn * 100) + "%)");            myLogger.info(getName() + " Environmental conditions were: 02="                    + myAirInputs[0].getO2Moles() + ", CO2="                    + myAirInputs[0].getCO2Moles() + ", N="                    + myAirInputs[0].getNitrogenMoles() + ", water="                    + myAirInputs[0].getWaterMoles() + ", other="                    + myAirInputs[0].getOtherMoles());        }        else if (CO2RiskReturn > randomNumber) {            hasDied = true;            SimEnvironment[] myAirInputs = myCurrentCrewGroup.getAirConsumerDefinition().getEnvironments();            myLogger.info(getName() + " has died from CO2 poisoning on tick "                    + myCurrentCrewGroup.getMyTicks() + " (risk was "                    + numFormat.format(CO2RiskReturn * 100) + "%)");            myLogger.info(getName() + " Environmental conditions were: 02="                    + myAirInputs[0].getO2Moles() + ", CO2="                    + myAirInputs[0].getCO2Moles() + ", N="                    + myAirInputs[0].getNitrogenMoles() + ", water="                    + myAirInputs[0].getWaterMoles() + ", other="                    + myAirInputs[0].getOtherMoles());        }        //if died, kill        if (hasDied) {            O2Consumed = 0f;            CO2Produced = 0f;            caloriesConsumed = 0f;            potableWaterConsumed = 0f;            dirtyWaterProduced = 0f;            greyWaterProduced = 0f;            caloriesConsumed = 0f;            myCurrentActivity = mySchedule.getActivityByName("dead");            timeActivityPerformed = 0;        }    }