In recent years, recommender systems have been used as a solution to support tourists with recommendations oriented to maximize the entertainment value of visiting a tourist destination. However, this is not an easy task because many aspects need to be considered to make realistic recommendations: the context of a tourist destination visited, lack of updated information about points of interest, transport information, weather forecast, etc. The recommendations concerning a tourist destination must be linked to the interests and constraints of the tourist. In this research, we present a mobile recommender system based on Tourist Trip Design Problem (TTDP)/Time Depending (TD)-Orienteering Problem (OP)-Time Windows (TW), which analyzes in real time the user's constraints and the points of interest's constraints. For solving TTDP, we clustered preferences depending on the number of days that a tourist will visit a tourist destination using a k-means algorithm. Then, with a genetic algorithm (GA), we optimize the proposed itineraries to tourists for facilitating the organization of their visits. We also used a parametrized fitness function to include any element of the context to generate an optimized recommendation. Our recommender is different from others because it is scalable and adaptable to environmental changes and users' interests, and it offers real-time recommendations. To test our recommender, we developed an application that uses our algorithm. Finally, 131 tourists used this recommender system and an analysis of users' perceptions was developed. Metrics were also used to detect the percentage of precision, in order to determine the degree of accuracy of the recommender system. This study has implications for researchers interested in developing software to recommend the best itinerary for tourists with constraint controls with regard to the optimized itineraries.