We model the problem by a network where :
The tops represent works of the project
An arc connects two tops I and J if there is a constraint of precedence between work associated with tops I and J.
the weight cij of the arc (I, J) is equal to the duration di work (represented by the top) I.
To the built network one also adds
A top represents the beginning of work, null duration and preceding all the activities without predecessor