itemsSent =  next.initItemsReceived() * (in.getWeight(out) / in.totalWeights());
itemsSent =  (int)(next.initItemsReceived() * ((double)in.getWeight(out) / in.totalWeights()));
    public static int initBufferSize(InputTraceNode in, 				     OutputTraceNode out)     {	int itemsReceived, itemsSent;	//calculate the items the input trace receives	FilterInfo next = FilterInfo.getFilterInfo((FilterTraceNode)in.getNext());	itemsSent =  next.initItemsReceived() *	    (in.getWeight(out) / in.totalWeights());		//calculate the items the output trace sends	FilterInfo prev = FilterInfo.getFilterInfo((FilterTraceNode)out.getPrevious());	itemsReceived = prev.initItemsSent() *	    (out.getWeight(in) / out.totalWeights());		//see if they are different	if (itemsSent != itemsReceived)	    Utils.fail("Calculating steady state: items received != items send on buffer");		return itemsSent * getTypeSize(next.filter.getInputType());     }