The bunker fuel consumption cost takes up the largest percentage of the total operating cost of a container ship. How to control bunker fuel consumption is one of the important problems to be solved by the shipping companies. Especially nowadays, shipping companies have to reduce emissions to meet the regulations of the international maritime organization (IMO) and local governments. Bunker consumption is impacted by the sailing speed of ships, which also influences the round-trip time and the number of ships deploying on the specific routes. In addition, the ships deployed in the same route may have different consumption rates due to different construction techniques, waring out, etc. This paper considers two situations where bunker consumption functions are the same and different on different legs of the shipping route and establishes two mixed integer nonlinear programming models to adjust the fleet deployment with heterogenous ships and optimize ship sailing speed while maintaining the weekly service frequency to reduce the total operating cost which consists of bunker consumption cost and ship operation cost. Then two tailored exact algorithms are developed to obtain the global optimal solutions for the two models. Finally, numerical experiments are conducted to verify the validity of the two models.