Пример #1
0
  /**
   * \brief Used in creation of results files - specifies the header of the columns of output
   * information for this agent
   *
   * <p>Used in creation of results files - specifies the header of the columns of output
   * information for this agent
   *
   * @return String specifying the header of each column of results associated with this agent
   */
  public String sendHeader() {
    // return the header file for this agent's values after sending those for super
    StringBuffer tempString = new StringBuffer(super.sendHeader());
    tempString.append(",");

    // location info and radius
    tempString.append("locationX,locationY,locationZ,radius,totalRadius");

    return tempString.toString();
  }
Пример #2
0
  /**
   * \brief Used in creation of results files - creates an output string of information generated on
   * this particular agent
   *
   * <p>Used in creation of results files - creates an output string of information generated on
   * this particular agent
   *
   * @return String containing results associated with this agent
   */
  public String writeOutput() {
    // write the data matching the header file
    StringBuffer tempString = new StringBuffer(super.writeOutput());
    tempString.append(",");

    // location info and radius
    tempString.append(_location.x + "," + _location.y + "," + _location.z + ",");
    tempString.append(_radius + "," + _totalRadius);

    return tempString.toString();
  }