The problem of constructing an optimal rooted phylogenetic network from a set of rooted triplets is an NP-hard problem. In this paper, we present a heuristic algorithm called TripNet which tries to construct an optimal rooted phylogenetic network from an arbitrary set of triplets. We prove some theorems to justify the performance of the algorithm.