.. _branching-models-devel: ======================== Branching implementation ======================== The branching process is one of most important and computational demanding of the whole simulator, also the modelling branching efficaciously is essential for reproducing the complex arborification of nervous cells. The user can read the sufficient information to use branching properly in: :ref:`branching-models`. The implementation of each branching stage is accurately described in: :ref:`branching-models-devel`. Precise branching events ------------------------ Because branching events modify the structure, the simulation must stop at the point where the branching occurs, then resume with the additional growth_cone. * Sorted list of times at which branching events occur * Simulation manager does substeps when necessary * Check time difference inferior to eps in Branching::branching_event Additional substep_ variable to simulation_manager. Branching Event =============== The branching is managed from neurite, since in an environmental interaction model the growth cone will call the branching event at a random step we need to implement a transparent branching function. This transparent branching function is the 'growth_cone_split' which require all the geometrical information on branching event to be passed. By this way all the geometrical informations are computed inside the model and the neurite operate the computational event only. .. doxygenfunction:: growth::Neurite::growth_cone_split the cone is going to branc --> branching_cone the new growth cone branch length --> new_length the new and old cone new directions--> new_angle, old_angle the rnd_enginer Lateral Branching ================= Growth Cone Splitting ===================== VanPelt Cone Selection ---------------------- Following the growth cone branching hypothesis by VanPelt and collaborators [VanPelt]_ the probability of branching is rearranged to be a distribution of events in time and not a branching rate. When the growth cone splitting occurs the branching cone is computed. The algorithm used to select the branching cone(s) follows: To get a weighted random sample without replacement of size `m