float distributedGreyWater = StoreFlowRateControllableImpl
StoreFlowRateControllableImpl
    private void consumeResources() {        //calculate consumption        int currentActivityIntensity = myCurrentActivity.getActivityIntensity();        O2Needed = calculateO2Needed(currentActivityIntensity);        potableWaterNeeded = calculateCleanWaterNeeded(currentActivityIntensity);        caloriesNeeded = calculateFoodNeeded(currentActivityIntensity);        dirtyWaterProduced = calculateDirtyWaterProduced(potableWaterNeeded);        dryWasteProduced = calculateDryWasteProduced(foodMassConsumed);        greyWaterProduced = calculateGreyWaterProduced(potableWaterNeeded);        CO2Produced = calculateCO2Produced(O2Needed);        vaporProduced = calculateVaporProduced(potableWaterNeeded);        //adjust tanks        eatFood(caloriesNeeded);        potableWaterConsumed = StoreFlowRateControllableImpl                .getFractionalResourceFromStore(myCurrentCrewGroup                        .getPotableWaterConsumerDefinition(),                        potableWaterNeeded, 1f / myCurrentCrewGroup                                .getCrewSize());        float distributedDirtyWater = StoreFlowRateControllableImpl                .getFractionalResourceFromStore(myCurrentCrewGroup                        .getDirtyWaterProducerDefinition(), dirtyWaterProduced,                        1f / myCurrentCrewGroup.getCrewSize());        float distributedGreyWater = StoreFlowRateControllableImpl                .getFractionalResourceFromStore(myCurrentCrewGroup                        .getGreyWaterProducerDefinition(), greyWaterProduced,                        1f / myCurrentCrewGroup.getCrewSize());        float distributedDryWaste = StoreFlowRateControllableImpl                .getFractionalResourceFromStore(myCurrentCrewGroup                        .getDryWasteProducerDefinition(), dryWasteProduced,                        1f / myCurrentCrewGroup.getCrewSize());        SimEnvironment[] myAirInputs = myCurrentCrewGroup                .getAirConsumerDefinition().getEnvironments();        SimEnvironment[] myAirOutputs = myCurrentCrewGroup                .getAirProducerDefinition().getEnvironments();        if (myAirInputs.length < 1) {            O2Consumed = 0f;        } else {            O2Consumed = myAirInputs[0].takeO2Moles(O2Needed);        }        if (myAirOutputs.length > 0) {            myAirOutputs[0].addCO2Moles(CO2Produced);            myAirOutputs[0].addWaterMoles(vaporProduced);        }    }