public void calculateAllocation() {
		/* calculate processing rate of each site */
		double tmp = 0;
		double[] daRelativeWeightBySite = new double[iSite];
		for (int i = 0; i < iSite; i++) {
			tmp = 0;
			for (int j = 0; j < iClass; j++) {
				tmp += dmPrediction[j][i] * dmWeight[j][i] * dmDist[j][i];
			}
			// System.out.println("RelativeValue["+i+"] = "+ tmp);
			daRelativeWeightBySite[i] = tmp;
		}

		for (int i = 0; i < iSite; i++) {
			for (int j = 0; j < iClass; j++) {
				if (daRelativeWeightBySite[i] != 0) {
					dmAlloc[j][i] = (dmDist[j][i] * dmPrediction[j][i] * dmWeight[j][i] * iaCPU[i]) / daRelativeWeightBySite[i];
				} else {
					dmAlloc[j][i] = -1;
				}

				// if the allocated resource is more than requirement,...
				// if (dmAllocation[j][i] > dmDistribution[j][i] *
				// dmPrediction[j][i] / dDeadline)
				// {
				// dmAllocation[j][i] = dmDistribution[j][i] *
				// dmPrediction[j][i] / dDeadline;
				// }
			}
		}

		for (int i = 0; i < iClass; i++) {
			print(iStage + " Allocation[" + i + "]");
			for (int j = 0; j < iSite; j++) {
				print(dmAlloc[i][j] + ", ");
			}
			println();
		}
	}