int quantity = (int) (((double) chunkDays) * rate);  if (quantity < 1) { error ("createDeliveredAsset - task " + originalTask.getUID () + " gets a quantity of zero, rate was " + rate + " chunk days " +chunkDays); }  AggregateAsset deliveredAsset = (AggregateAsset) ldmf.createAggregate(prototype, (int) ((double) chunkDays * rate));
AggregateAsset deliveredAsset = (AggregateAsset) ldmf.createAggregate(prototype, quantity);
  protected Asset createDeliveredAsset (Task originalTask, Asset originalAsset, double rate, long chunkDays) {    Asset prototype = originalAsset.getPrototype ();    if (prototype == null) {      prototype = originalAsset;      GLMAsset glmProto = (GLMAsset)prototype;      if (!glmProto.hasPhysicalPG()) {	warn ("createDeliveredAsset - task " + originalTask.getUID () + "'s d.o. " + prototype.getUID() + " - " +	      prototype + " doesn't have a physical PG - " + glmProto.getPhysicalPG());	if (!(prototype instanceof PhysicalAsset))	  error ("createDeliveredAsset - task " + originalTask.getUID () + "'s d.o. " + 		 prototype + " is not a physical asset?.");	else if (isInfoEnabled()){	  info ("createDeliveredAsset - task " + originalTask.getUID () + "'s d.o. " + prototype.getUID() + 		" is a physical asset.");	}      }      else { 	if (glmProto.getPhysicalPG().getFootprintArea() == null) {	  ((NewPhysicalPG)glmProto.getPhysicalPG()).setFootprintArea (new Area (Area.SQUARE_FEET, 1)); 	  if (isWarnEnabled()) {	    warn ("createDeliveredAsset - task " + originalTask.getUID () + "'s d.o. " + prototype.getUID() + 		  " doesn't have an area slot on its physical pg.");	  }	}	if (glmProto.getPhysicalPG().getVolume() == null) {	  ((NewPhysicalPG)glmProto.getPhysicalPG()).setVolume (new Volume (Volume.CUBIC_FEET, 1)); 	  if (isWarnEnabled()) {	    warn ("createDeliveredAsset - task " + originalTask.getUID () + "'s d.o. " + prototype.getUID() + 		  " doesn't have a volume slot on its physical pg.");	  }	}      }      if (!glmProto.hasPackagePG()) {	warn ("createDeliveredAsset - task " + originalTask.getUID () + "'s d.o. " + prototype.getUID() + " - " + 	      prototype + " doesn't have a package PG.");      }    }    int quantity = (int) (((double) chunkDays) * rate);    if (quantity < 1) {      error ("createDeliveredAsset - task " + originalTask.getUID () + 	     " gets a quantity of zero, rate was " + rate + 	     " chunk days " +chunkDays);    }    AggregateAsset deliveredAsset = (AggregateAsset)      ldmf.createAggregate(prototype, (int) ((double) chunkDays * rate));    return deliveredAsset;  }