/** * \brief With it determined that cell division will occur, create a new agent from the existing * one * * <p>With it determined that cell division will occur, create a new agent from the existing one * * @throws CloneNotSupportedException Thrown if the agent cannot be cloned */ public void makeKid() throws CloneNotSupportedException { // Create the new instance LocatedAgent baby = (LocatedAgent) sendNewAgent(); // Note that mutateAgent() does nothing yet baby.mutateAgent(); this._myDivRadius = getDivRadius(); baby._myDivRadius = getDivRadius(); baby._myDeathRadius = getDeathRadius(); // Update the lineage recordGenealogy(baby); // Share mass of all compounds between two daughter cells and compute // new size divideCompounds(baby, getBabyMassFrac()); // sonia:chemostat if (Simulator.isChemostat) { // upon division the daughter cells remain with the coordinates of their progenitor } else { // Compute movement to apply to both cells setDivisionDirection(getInteractDistance(baby) / 2); // move both daughter cells baby._movement.subtract(_divisionDirection); _movement.add(_divisionDirection); } // Now register the agent inside the guilds and the agent grid baby.registerBirth(); baby._netVolumeRate = 0; }