Solving Thurston's equation on triangulated 3-manifolds