Hang tight while we fetch the video data and transcripts. This only takes a moment.
Connecting to YouTube player…
Fetching transcript data…
We’ll display the transcript, summary, and all view options as soon as everything loads.
Next steps
Loading transcript tools…
Gantt View Dependencies | Odoo | YouTubeToText
YouTube Transcript: Gantt View Dependencies
Skip watching entire videos - get the full transcript, search for keywords, and copy with one click.
Share:
Video Transcript
Video Summary
Summary
Core Theme
This content explains a sophisticated approach to project planning and task scheduling, moving from a poorly organized, conflict-ridden system to an optimized, efficient one by leveraging graph theory and advanced algorithms to manage task dependencies and resource availability.
Mind Map
Click to expand
Click to explore the full interactive mind map • Zoom, pan, and navigate
Hi everyone. According to caus reports
in 2015, only 40% of projects were on
time. There are many reasons, but one of
them is bad planning. If you fail to
plan, you are simply planning to fail.
So planning a project without
considering existing tasks, employee
availability, contracts, time off,
public holidays, and task dependencies
will simply lead to a poor poorly
organized project. So this view is
simply a Gant view and if task one is
blocking task two means that task one
should be finished it before starting
task two. It's simply a dependency and
we display a gray arrow between task one
and task two. So it's respected
dependency. But if we try to task to to
to schedule task two before the end of
task one, it's displayed in red and it's
blocked uh dependency or dependency with conflict.
conflict.
If our employee is working eight hours a
day and we are assigning one or many
tasks with more than eight hours, we are
forcing the employee to overwork.
So this is poorly organized project
because it's read everywhere. So um
today we're going to see in depth how
with a simple click we move from this
poorly organized uh project organization
to this one.
My name is Abdi software developer at
UDO and uh I added the pad for you. So
don't hesitate to scan the QR code and
ask any question. Now
Now
the goal of the session is simply if you
are a noodle developer working on
project scope maybe one day you will
need to fix some bug or to add some
custom features for your customer. So
you will deal with this implementation
and if you are another developer working
on any application requiring gut gant
dependencies the implementation was done
in in web gant. So maybe you will need
to inherit some hooks and add your uh
business application logic but we will
deal with it and simply if you are a
developer or a student coming to
discover UDO dependencies in general and
GAN dependencies are really common in
software industry and in many business
applications. So maybe maybe tomorrow or
uh Monday morning your manager will come
with a similar task. It's the summary of
eight months of huge work by services
team. So it it will be an educational
presentation. You will learn some new
techniques, algorithms,
um theories that were invented years ago
to tackle similar problems.
So it will change the way you think when
facing some problems related to
dependencies and try to not reinvent the
wheel and use what people have already
done. So let's get started. Our example
for today is simply this project in
computer science. This shape is called a
graph. So it's a set of nodes. In this
presentation they are tasks.
Tasks are linked by dependencies and
there are ages between tasks. So this
specific graph is called a DAG. It's a
directed asylic graph. DAG or directed
because edges between tasks are in one
direction. So if the arrow is going from
one to two means that one is blocking
two asylic because it doesn't make any
sense to have a loop in project
planning. it will never be ended. So
there are no cycles and graph because
it's simply a graph. Now in functional
uh point of view so task zero is
blocking task one but task one is
planned before task zero. It's a
conflict. So you can say okay I will
solve it easily by moving task one after
task zero. Congratulations, you solved
the local problem, but you created four
or five more problems because now task
one is blocking task two, but task two
is planned before task one. Same for
task three. You can see that task one
and task seven P1 are overlapping. Task
one, task five, and task four are simply
executed in parallel. So your employee
is forced to work more than expected. So
it's not really random or simple to just
move tasks. We need the strategy to do
it. That's why our first step is to
identify tasks to move. So as we said
it's a graph. There are two main
algorithm in graph theory to traverse a
graph. The first one is called a BFS.
It's breadth first search and a DFS
which is depth first search. You don't
need to master graph theory to follow
this presentation. It's educational. So
the goal is to introduce this concept
for you. You can go after the
presentation on the internet and get
deeper into details. So DFS is simply um
we start traversing our graph from the
node that should move. So we should move
one after zero but we need to check the
impact of moving one. So imagine that
one moved after zero but created some
conflict with its children two and three
in this example. We need also to move
two and three. After moving two, we need
to check if five is still valid or we
should also move five. So that's the
strategy that we will follow. And we
stop our DFS when we come to a specific
node called leaf. Leaf is simply a node
where there are no coming nodes or
children. So we simply can stop our
algorithm. And it's also an opportunity
to check if we have a cycle by mistake.
And uh we need to uh display a warning
to say it's about planning.
Now we fixed the issue of which tasks
should move. Let's move to how can we
solve planning tasks without without
overlapping the employee or overloading
the employee schedule. So we need to get
something called g valid intervals per
user. So simply we get the company
calendar for sure in intersection with
the company contract and then we start
to remove ranges where the employee is
not supposed to work like public holidays
holidays
ranges where where the employee is busy
doing other tasks and time off. So
finally we get a set of ranges they're
sorted it's really important and we are
sure that the employee is available to
work during the this time.
Then we have another issue which is task
duration. Imagine moving a task from
Monday to Tuesday. So if we compute
duration like as end date minus start
date it's simply 38 hours but the
employee is working only for 24 hours a
day and maybe he's doing some task on
Monday afternoon and he's off on Tuesday
morning. So the real duration should be
the intersection between task dates and
the uh availabilities of the employee.
So in this case it's only eight hours.
Last but not least, it's just the last
step before starting starting to run the
algorithm. So we compute something
called first possible date and in
degree. Don't worry, I will explain.
First possible date is simply in this
example seven is blocked by 7 P1 and 7
P2. For some reasons when moving all
blue tasks maybe I have some
availability to plan task seven earlier
before 7 P1 and 7P2 but this will lead
to create to conflicts. So when planning
again I need to keep the information
that task 7 cannot be planned before
task 7 P1 and 7P2. So the first possible
date to plan task 7 even if the employee
is available before should be the max of
end dates between 7 P1 and 7 P2. You may
ask five also is blocking seven. So why
can't we get the end date of task five?
Because all blue tasks should move. So
the end date of task five will change
when replanning it and then we're going
to update the first possible date in
real time.
So for task seven it's for example
Friday uh and then for all tasks it's
false because as you can see all blue
tasks are not planned are not blocked by
any other task.
Finally the in degree in degree is
simple the number of blocking task for a
certain task that are not yet moved in
this example for one as you can see it's
not blocked by any blue task. So in
degree equals zero for two, three, four,
five, six, seven, eight, it's one
because all these nodes are blocked by
only one task. Blocked means that I need
to wait to my previous task to be
planned to be able to be planned uh to
to to plan the task. So four for task
four is different. It's two because it
should wait for five and three.
This term of in degree is really
important to achieve s to achieve some
valid order when planning tasks and when
moving them. We're done. Let's start our
plan our planning. So the important part
that as I as I said at the beginning try
to not reinvent the wheel. People worked
on some algorithm before called can's
algorithm for topological sorting. So
getting a valid order is simply called
topological order and this algorithm is
executed on directed as cyclic graphs
like this one and we're going to simply
use it. So let's summarize. We have in
degree for each task. We have first
date. We has we have the valid ranges
for the employee. We set a pointer at
the beginning of the first range.
Task durations for simplicity let's
consider that they are all planned for
four hours and also you can see that all
intervals are for four hours to make it
simple to to to run the algorithm and
then K's algorithm uses which is first
in first out data structure. So at the
beginning we push all tasks with inderee
equals zero meaning that they are not
blocked by any other tasks. So they are
ready to be planned for for our case
it's only one. So we push on the one on
the queue and then we pop it we schedule
it on the interval where my pointer is pointing.
pointing.
I update first in degree of all coming
tasks because as you can see one is
blocking two and three. So one is is
planned. It's no more blocking two and
three. We can change or update there in
degree. Now it's zero for two and three.
We can simply push them in the queue.
Advance our pointer and first date it
should be updated because two and three
should not be planned before the end
date of task one.
So we continue, we pop two, we plan it,
we advance our pointer, we update uh in
degree of task four, now it's one. We
still wait for task five to be planned
to be able to plan task two. Task f task
four uh we update first date. So task
four cannot be planned before the end
date of two. We pop three. We plan it.
We advance our pointer. We update in
degree of five. Now it's zero. Zero
means that it's ready for planning. We
push it in the queue. We pop it. We
advance. And now this is an interesting
case where five is planned. So we can
plan four because in degree now is zero.
We updated first date which is Tuesday
5:00 p.m. And for seven we cannot update
because Friday is already uh after
Tuesday. So for c for a certain reason
it's random because may I can visit
seven before four or four before seven.
So imagine that seven is pushed before
four in the queue. So seven cannot be
planned in this valid interval. I need
to skip it and go to the last interval.
I plan seven but I no more have
intervals to plan. four is no more
planet. I have skipped one interval that
and my pointer is just going to the left
so to the right. So I cannot go back to
use that skipped one. So it's simply an
inefficient planning. Can we do better?
Let's see. As I said, if four was pushed
before seven, I could achieve a better
and optimized planning. But it's a bit
random. I can't I can't rely on
something that will change according to
the order of the DFS or the the push in
my queue. So I need something more consistent.
consistent.
That's why we move it from Q to
something called min heap or if you're a
big fan of C++ like me, it's called
priority Q. So instead of just pushing
tasks without any priority I will say
that instead of blocking a task after a
task another task should that should be
delayed I will add the first possible
date and the the importance of using a
mean heap it's a data structure that it
it's sorted so when you push it's in
logarithmic time but it's sorted every
time. So when I push four and seven it
four will be usually usually at the top
because it it can be planned before the
second task.
We got the idea of using a priority
queue from known algorithm in graph
theory which is called dishestra for
shortest path. You don't need to master
the the algorithm. The goal of the
session is it's an educ educational
session. So I tried to add some
keywords. Maybe you have a similar
problem. So when you go home, you can
watch the video again, look to the
algorithm on the internet. Maybe it can
solve your problem.
You don't need to master it.
Now let's get to more complicated
example. So if you have multi-users with
multiple valid users per employee
and we have a an issue when
this all what I presented was uh is now
on uh 17.4 four. So you can check the
code if you have access to enterprise.
But the limitation with with this
implementation when we have multi- users
and if we have a task assign it to both
user one and user two we decided to
follow the company calendar. Good idea
or not? Let's see.
The company is working on Thursday. So
we can take it as an available um
interval and plan our task. But user two
is on time off and user one is busy. So
At 18 you will see that we started we
introduced something called valid
intersection. So instead of just
following the company calendar we start
to check intersections where both
employees are free. So in this case the
task will be planned from Monday to
Thursday but with allocated hours equals
16 eight for each one.
That's why we introduced something
called valid intervals per group. So at
the beginning when we preprocess or and
prepare our data to run the algorithm we
we create um an interval for both user
one and user two with only their intersections.
intersections.
So, but is the previous implementation
still valid? We can simply run it again
and look for maybe a corner case.
We set our pointers at the beginning of
all intervals. We receive task one. We
plan it for user two. We receive task
two for both user one and user two. So,
we plan it. But when we receive task
three at this level, we are no more sure
that when we advance our pointer, all
incoming intervals are still valid. So
because this one was used to plan task
two and that's the problem. One solution
maybe is to okay, I will move to the end
of task two and plan directly task
three. Okay, no conflicts, but you
skipped um three intervals, so it's not optimized.
optimized.
The solution was
let's remember that ranges are usually
sorted. So at a certain point, I can use
any sorted data structure like a set or
a min heap or maybe do some binary
searching to find if this interval is
still valid or not. We implemented it
was fast but the problem is it was too
complex even for you following maybe
it's a bit overwhelming maybe you are a
bit lost too much details so the
implementation was really complex the
code starts to be a bit difficult to
read the complexity may result in more
time needed to understand debug and
maintain by any internal developer or
developer from the community so a large
amount of code increases This is the
risk of uh introducing bugs. And we did
a small benchmarking with a typical
conflict to solve with maximum 50 tasks
to plan. The execution time difference
between the implementation that I uh
presented and the final solution that I
will explain later was 300 milliseconds.
However, when we populate populated
larger projects, this could lead to
performance issues. So actually it's a
new feature. We don't know the size of
projects that will move. So we will we
need a valid reason and a pain point to
introduce some complexity in the code
because actually we don't know the size
of projects. So if needed the most
important point that now we work eight
months on this feature. We master the
topic. We know all possible or maybe
some possible solutions. We know the
limitation of each one. So in case of
any issue problem, we are ready to
implement the op to reimplement the
optimized one in maybe some weeks.
The final solution was simply uh and the
goal was to make the the code clear.
It's we removed the pointers concept
when we plan task two for example for
for user one and two. We remove these
user ranges in all intervals where user
one and user two are implicated.
So, thank you for your attention. Uh,
and if you have any question, don't
hesitate to add it to the pad. [Applause]
Hi there. Uh, thank you very much for
the very interesting talk. Thank you.
Um, so so far there are not many
questions on the pad, so feel free to
scan the QR code and add any uh
questions that you might have.
I'll quickly check if they're on the uh
I don't know if there's anything else
you'd like to uh add. I think it's all.
Okay, perfect. Um, if there are no more
questions, then thank you very much for
uh your attention.
We're getting a thank you message that
it was very clear.
Okay, thank you. Thank you.
Thank you very much.
Click on any text or timestamp to jump to that moment in the video
Share:
Most transcripts ready in under 5 seconds
One-Click Copy125+ LanguagesSearch ContentJump to Timestamps
Paste YouTube URL
Enter any YouTube video link to get the full transcript
Transcript Extraction Form
Most transcripts ready in under 5 seconds
Get Our Chrome Extension
Get transcripts instantly without leaving YouTube. Install our Chrome extension for one-click access to any video's transcript directly on the watch page.