Example #1
0
  /**
   * \brief Determines whether or not a cell has reached the radius where cell division can be
   * triggered
   *
   * <p>Determines whether or not a cell has reached the radius where cell division can be triggered
   *
   * @return Boolean stating whether cell division should be triggered (true) or not (false)
   */
  public boolean willDivide() {
    // this ensures that the checks for when to divide don't occur too often;
    // at most they will occur at the rate of AGENTTIMESTEP
    _timeSinceLastDivisionCheck += SimTimer.getCurrentTimeStep();
    if (_timeSinceLastDivisionCheck < _agentGrid.getAgentTimeStep()) return false;

    // at this point we will actually check whether to divide
    _timeSinceLastDivisionCheck = 0;

    return getRadius(false) > this._myDivRadius;
  }