la.getProperty(ABCLocalAsset.PROP_DECAMOUNT).setValue(new Long(deplete / production));
long newDeplete = ((deplete / production) > 100) ? 100 : (deplete / production); la.getProperty(ABCLocalAsset.PROP_DECAMOUNT).setValue(new Long(newDeplete));
  private String addProviderAgent(String name, int index, String[] supplies, int distance,				  int direction, String assetName, String[] roles,				  long deplete, long invChaos, long timeChaos, long avgTime,				  String[] allocRoles, String initializer) {    Property p = null;    ABCAgent agent = new ABCAgent(getFullName().toString(), name, index);    addChild(agent);    ABCLocalAsset la = new ABCLocalAsset("LocalAsset");    la.initProperties();    la.getProperty(ABCLocalAsset.PROP_NAME).setValue(assetName);    la.getProperty(ABCLocalAsset.PROP_ROLES).setValue(roles);    int production = ((Integer)getProperty(PROP_PRODUCTION).getValue()).intValue();    la.getProperty(ABCLocalAsset.PROP_DECAMOUNT).setValue(new Long(deplete / production));    la.getProperty(ABCLocalAsset.PROP_AVGTIME).setValue(new Long(avgTime));    la.getProperty(ABCLocalAsset.PROP_INVDEV).setValue(new Long(invChaos));    la.getProperty(ABCLocalAsset.PROP_TIMEDEV).setValue(new Long(timeChaos));    agent.addChild(la);    // Create Allocations    ABCAllocation alloc = new ABCAllocation();    alloc.initProperties();    String[] tasks = (String[])getProperty(PROP_TASKVERB).getValue();    for(int i=0; i < tasks.length; i++) {      ABCAllocationRule rule = new ABCAllocationRule(tasks[i]);      rule.initProperties();      Property verb = rule.getProperty(PROP_TASKVERB);      verb.setValue(tasks[i]);      verb.setToolTip(PROP_TASKVERB_DESC);      Property role = rule.getProperty(PROP_ROLES);      role.setValue(allocRoles);      role.setToolTip(PROP_ROLES_DESC);      alloc.addChild(rule);    }    agent.addChild(alloc);    agent.initProperties();    agent.getProperty(PROP_DIRECTION).setValue(new Integer(direction));    agent.getProperty(PROP_DISTANCE).setValue(new Integer(distance));    // Create Supplies    if(supplies != null) {      Property supp = agent.getProperty(ABCAgent.PROP_SUPPLIES);      supp.setValue(supplies);    }    return agent.getFullName().toString();  }