wsphillips / Conductor.jl

Choo-choo
MIT License
60 stars 12 forks source link

Rebase MulticompartmentSystem onto tree data structure #45

Closed wsphillips closed 1 year ago

wsphillips commented 1 year ago

Instead of starting with an adjacency matrix, build MulticompartmentSystem on a tree data structure (potentially AbstractTrees.jl interface). It will be more robust for equation building, and it should eliminate the need to depend on parent references directly in CompartmentSystem.

Later, during lowering, we will likely transform to an adjacency matrix for PDE Cable equation modeling. Again, having a tree to start from will make this easier since a Hines matrix is a depth first search on a dendritic tree.

wsphillips commented 1 year ago

I tried this but ran into issues with updating tree structures. Specifically, when adding postsynaptic conductances, you wind up breaking pointers to child branches. It might be solved with a more sophisticated/clever implementation, but for now its not worth the added effort.