Madrid to Málaga weekend by train

How to plan a Madrid–Málaga weekend by rail using Renfe’s route and station information, without relying on fixed schedules or fares.