long today) {
long today, int ost) {
  private void createRefillTask(double quantity, long endDay,                                 Asset inv, LogisticsInventoryPG thePG,                                 long today) {    // make a new task    NewTask newRefill = inventoryPlugin.getRootFactory().newTask();    newRefill.setVerb(Constants.Verb.Supply);    newRefill.setDirectObject(inv);    // create preferences    Vector prefs = new Vector();    Preference p_end,p_qty;    p_end = createRefillTimePreference(endDay, today);    p_qty = createRefillQuantityPreference(quantity);    prefs.add(p_end);    prefs.add(p_qty);    newRefill.setPreferences(prefs.elements());    //create Prepositional Phrases    Vector pp_vector = new Vector();    pp_vector.add(createPrepPhrase(Constants.Preposition.FOR, getOrgName()));    pp_vector.add(createPrepPhrase(Constants.Preposition.OFTYPE, 					 inventoryPlugin.getSupplyType()));    Object io;    Enumeration geolocs = getAssetUtils().      getGeolocLocationAtTime(getMyOrganization(), endDay);    if (geolocs.hasMoreElements()) {      io = (GeolocLocation)geolocs.nextElement();    } else {	io = getHomeLocation();    }    pp_vector.add(createPrepPhrase(Constants.Preposition.TO, io));    Asset resource = thePG.getResource();    TypeIdentificationPG tip = ((Asset)resource).getTypeIdentificationPG();    MaintainedItem itemID = MaintainedItem.      findOrMakeMaintainedItem("Inventory", tip.getTypeIdentification(),                               null, tip.getNomenclature(), inventoryPlugin);    pp_vector.add(createPrepPhrase(Constants.Preposition.MAINTAINING, itemID));    pp_vector.add(createPrepPhrase(Constants.Preposition.REFILL, null));    newRefill.setPrepositionalPhrases(pp_vector.elements());    // hook this in with MaintainInventory and publish    inventoryPlugin.publishRefillTask(newRefill, (Inventory)inv);    //apply this to the LogisticsInventoryBG    thePG.addRefillRequisition(newRefill);  }