for ( CallIDIterator i = new CallIDIterator(proxyCallIDs); i.hasNext(); )
for ( CallIDIterator j = new CallIDIterator(proxyCallIDs); j.hasNext(); )
	private double[] solveCallFractions(double maxTimeSum)	{		Log.debug(LOG, "Attempting LP solution with maxTimeSum = ", maxTimeSum);		lp = new LPInterface();				solve lpSolve = new solve();		lprec lpIn = new lprec(0, lp.getNumVariables());		/* 		 * Minimize the sum of the 'x' variables:		 * x1 + x2 + ...		 */		double[] objective = new double[lp.getRowArraySize()];		for ( CallIDIterator i = new CallIDIterator(proxyCallIDs); i.hasNext(); )		{			CallID callID = i.next();			lp.setXValue(callID, objective, 1);		}		lpSolve.set_obj_fn(lpIn, objective);		lpSolve.set_minim(lpIn);		/* 		 * Add the absolute value constraints 		 * For each x:		 *   x1 - f(store1) >= - parentRCC(store1).nCalls / ( parentRCC(store1).nCalls + parentRCC(store2).nCalls )		 *   x1 + f(store1) >= parentRCC(store1).nCalls / ( parentRCC(store1).nCalls + parentRCC(store2).nCalls )		 */		for ( CallIDIterator i = new CallIDIterator(proxyCallIDs); i.hasNext(); )		{			CallID callID = i.next();			double parentNCalls = callID.getParentRCC().getCallCount();			double totalNCalls = 0;			for ( CallIDIterator j = new CallIDIterator((List)proxyCallsByRCC.get(callID.getRCC())); j.hasNext(); )			{				CallID sibling = j.next();				totalNCalls += sibling.getParentRCC().getCallCount();			}			double ratio = parentNCalls / totalNCalls;			double[] row;			row = new double[lp.getRowArraySize()];			lp.setXValue(callID, row, 1);			lp.setFValue(callID, row, -1);			lpSolve.add_constraint(lpIn, row, constant.GE, -ratio);			row = new double[lp.getRowArraySize()];			lp.setXValue(callID, row, 1);			lp.setFValue(callID, row, 1);			lpSolve.add_constraint(lpIn, row, constant.GE, ratio);		}		/*		 * Add the sum of times constraints		 * For each RCC (store):		 * f(store1) * rcc(store1).time + f(store2) * rcc(store2).time <= 		 *   ( parentRCC(store1).time - ( other singular child RCCs of parentRCC ) ) * TIME_FACTOR		 */		for ( Iterator i = parentRCCSet.iterator(); i.hasNext(); )		{			RCC rcc = (RCC)i.next();			long time = rcc.getTime();			// Subtract the time of all the non-proxy children from the parent time			for ( CallIDIterator j = new CallIDIterator(callIDs); j.hasNext(); )			{				CallID child = j.next();				if ( child != null && !child.isProxy() && child.getParentRCCKey() == rcc.getKey() )					time -= child.getRCC().getTime();			}			if ( time < 0 )			{				LOG.warn("Child time adds up to " + -time + " more than parent time for RCC " + rcc);				time = 0;			}			// Find all the proxy CallIDs whose parent is 'rcc' and add them to the constraint			double[] row = new double[lp.getRowArraySize()];			for ( CallIDIterator j = new CallIDIterator(proxyCallIDs); j.hasNext(); )			{				CallID child = j.next();				if ( child.getParentRCC() == rcc )					lp.setFValue(child, row, child.getRCC().getTime());			}			lpSolve.add_constraint(lpIn, row, constant.LE, time * maxTimeSum);		}		/* 		 * Add constraint sum of all fs = 1		 * f(store1) + f(store2) = 1		 */		int constraintCount;		{			double[] row = new double[lp.getRowArraySize()];			for ( CallIDIterator i = new CallIDIterator(proxyCallIDs); i.hasNext(); )			{				CallID callID = i.next();				lp.setFValue(callID, row, 1);			}			constraintCount = lpSolve.add_constraint(lpIn, row, constant.EQ, 1);		}				if ( LP_PRINT_LOG.isDebugEnabled() )		{			lpSolve.write_LP(lpIn, System.out);		}		int result = lpSolve.solve(lpIn);		if (result == constant.OPTIMAL)		{			LOG.info("Optimal solution found for maxTimeSum = " + maxTimeSum);			if ( LP_PRINT_LOG.isDebugEnabled() )			{				lpSolve.print_solution(lpIn);			}			double[] fractions = new double[callIDs.size()];			for ( int i = 0; i < fractions.length; ++i )				fractions[i] = 1.0;			for ( CallIDIterator i = new CallIDIterator(proxyCallIDs); i.hasNext(); )			{				CallID callID = i.next();				fractions[callID.getKey()] = lp.readFSolution(lpIn, constraintCount, callID);			}			return fractions;		}		else		{			LOG.info("No optimal solution for maxTimeSum = " + maxTimeSum);			return null;		}			}