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;
  }
Example #2
0
 /** Test if the episome can be transfered. */
 public Boolean isReadyToConjugate() {
   /*
    * First check if the plasmid has sufficient copies.
    */
   if (_nCopy < 1) return false;
   /*
    * Now check timings: cannot conjugate if given/received a plasmid too
    * recently.
    */
   EpisomeParam param = getSpeciesParam();
   Double triggerTime =
       Math.max(param.exchangeLag + lastExchange, param.receptionLag + lastReception);
   return triggerTime >= SimTimer.getCurrentTime(); // jan: this seems wrong!
 }
Example #3
0
 /**
  * Attributes the plasmid to an host (used for conjugation events)
  *
  * @param anHost
  */
 public void setHost(EpiBac anHost) {
   lastReception = SimTimer.getCurrentTime();
   lastExchange = -1.0;
   _host = anHost;
   setDefaultCopyNumber();
 }
Example #4
0
 /** You are doing a conjugation! Update your lag variables. */
 public void updateConjugationTime(Episome baby) {
   lastExchange = SimTimer.getCurrentTime();
   baby.lastReception = SimTimer.getCurrentTime();
 }