task.getProperty(ABCTask.PROP_RATE).setValue(new Integer(factor * demand));
task.getProperty(ABCTask.PROP_RATE).setValue(new Long(factor * demand));
  private String addCustomerAgent(String name, int index, int factor, 				  int duration, double vital, int chaos,				  int distance, int direction, String[] roles, 				  String initializer ) {    Property p = null;    ABCAgent agent = new ABCAgent(getName().toString(), name, index);    addChild(agent);    ABCTaskFile taskFile = new ABCTaskFile("Tasks");    taskFile.initProperties();     String[] tasks = (String[])getProperty(PROP_TASKVERB).getValue();    //String taskverb = (String)getProperty(PROP_TASKVERB).getValue();    int count = 0;    for(int i=0; i < tasks.length; i++) {      String tt = tasks[i];      ABCTask task = new ABCTask(tt);      task.initProperties();      task.getProperty(PROP_TASKVERB).setValue(tt);      int demand = ((Integer)getProperty(PROP_DEMAND).getValue()).intValue();      task.getProperty(ABCTask.PROP_RATE).setValue(new Integer(factor * demand));      task.getProperty(ABCTask.PROP_VITAL).setValue(new Double(vital));      task.getProperty(ABCTask.PROP_DURATION).setValue(new Integer(duration));      task.getProperty(ABCTask.PROP_CHAOS).setValue(new Integer(chaos));      taskFile.addChild(task);    }    agent.addChild(taskFile);    // Create Allocations    ABCAllocation alloc = new ABCAllocation();    alloc.initProperties();    for(int i=0; i < tasks.length; i++) {      ABCAllocationRule rule = new ABCAllocationRule(tasks[i]);      rule.initProperties();      Property type = rule.getProperty(PROP_TASKVERB);      type.setValue(tasks[i]);      type.setToolTip(PROP_TASKVERB_DESC);      Property role = rule.getProperty(PROP_ROLES);      role.setValue(roles);      role.setToolTip(PROP_ROLES_DESC);      alloc.addChild(rule);    }    agent.addChild(alloc);    addPropertyAlias(agent, getProperty(PROP_STARTTIME), PROP_STARTTIME);    addPropertyAlias(agent, getProperty(PROP_STOPTIME), PROP_STOPTIME);    addPropertyAlias(agent, getProperty(PROP_SAMPLEINTERVAL), PROP_SAMPLEINTERVAL);    addPropertyAlias(agent, getProperty(PROP_MAXNUMBSAMPLES), PROP_MAXNUMBSAMPLES);    addPropertyAlias(agent, getProperty(PROP_STARTDELAY), PROP_STARTDELAY);    addPropertyAlias(agent, getProperty(PROP_NUMBPROVIDERS), PROP_NUMBPROVIDERS);    agent.initProperties();    agent.getProperty(PROP_DISTANCE).setValue(new Integer(distance));    agent.getProperty(PROP_DIRECTION).setValue(new Integer(direction));    return agent.getName().toString();  }