public void readyAllocations(){
		
		//clean out income bundle.
		income.cleanBadValues();
		
		allocations[4].goal = computeOperationalCosts();	//Operational costs
		allocations[4].demand = allocations[4].getDemand(income.getValue() * preferences.get(Preference.opCostCap));	//Now with a cap.
		incomeValue = income.getValue() - allocations[4].demand.minus(allocations[4].resources).getValue();//we immediately lose the value of demanded operational costs.
		
		
		allocations[0].demand = computeGoodsBundle();	//goods
		
		if(allocations[1].building != home)
		{
			if (home == null || (family.father != null && family.father.home == home) || (family.mother != null && family.mother.home == home))
			{
				allocations[1].goal = new Bundle();	//empty goal. yay.
				allocations[1].building = null;
			}
			else {
				allocations[1].goal = computeUpkeepCap();
				allocations[1].building = home;
			}
		}
		
		double upkeepDemandValue = incomeValue * preferences.get(Preference.upkeepAlloc);
		allocations[1].demand = allocations[1].getDemand(upkeepDemandValue);
		//the difference between upkeepDemandValue and allocations[1].demand.getValue() gets added to allocations[2] (savings)

		//Update planned home.
		updateHomePlan();
		double homeSavings = incomeValue * preferences.get(Preference.newHomeAlloc) + upkeepDemandValue - allocations[1].demand.getValue();
		allocations[2].refreshGoal();
		allocations[2].demand = allocations[2].getDemand(homeSavings);//allocations[2].demand.getValue()
		income.insert(allocations[2].refundExcessSupply());	//The value is still in the demand.
		
		allocations[3].goal = computeChildSupport();
		allocations[3].demand = allocations[3].getDemand(incomeValue * preferences.get(Preference.childAlloc));
		income.insert(allocations[3].refundExcessSupply());
		
		if(realAge % preferences.get(Preference.stubbornness).intValue() == 0){
			Bundle temp = allocations[5].planBuilding(preferences.get(Preference.timeScale).intValue(),(incomeValue * preferences.get(Preference.incomeAlloc)),preferences.get(Preference.greed) );
			if (temp != null) income.insert(temp);	//refunded abandoned plans.
		}
		allocations[5].demand = allocations[5].getDemand(incomeValue * preferences.get(Preference.incomeAlloc));
		income.insert(allocations[5].refundExcessSupply());
		
		for(int i = 0; i < allocSet.length; i++){
			demandedGoods.insert(allocations[i].demand);
		}
	}