In the maritime industry, optimizing energy systems for cruise ships is critical for enhancing fuel efficiency and advancing sustainability. This study presents a novel approach that integrates empirical data and computational modeling techniques with a combination of optimization of the engine configuration and the speed of the ship. A methodology aimed at minimizing fuel consumption while keeping timetable is developed using dynamic programming. The presented approach uses the NAPA Voyage Optimization API to provide information about how the ship requires propulsion power for keeping a certain speed at the weather conditions at hand. Passenger-induced hotel load and other non-propulsion auxiliary load are predicted using a machine learning model obtained from ship data. The proposed method shows in a test case fuel savings of up to 3.3% with conventional engines and 2.7% with next-generation engines. Furthermore, optimizing the sizes of engines contribute to an additional 0.5% reduction in the fuel consumption.