Schedule sessions according dependancies

Here is my need.

I have a table of sessions with three columns:

  • duration (one week, two weeks or more) ,
  • dependancy : link to another record in the same table
  • start-date : date of the session.

Duration is set manually.
Dependancy is set manually or empty if session is the pivot.
Start-date could be calculated if session is dependent of precedent session or set manually.

What is the elegant way to implement the algorithm?
Is it possible to use formula to do that or should I use automation?

Thanks a lot for your help.