It would be better to lay a railway line from Maddur to Malavalli in first phase and then take it further to Kollegal. In second stage, Malavalli to Harohalli to Anekal should be thought of. In 3rd stage, Ramanagara to Kanakapura link should be done. With these links, MYS gets connectivity to TN in a shorter route. Kanakapura get connected to Bangalore via Harohalli and also via Ramanagara. Circular train can be introduced from Bangalore via Anekal Road, Harohalli, Ramanagara and Kengeri. Linking Kollegal and Chamarajanagar may not be economically viable.
Main reason for my suggestion is that Bangalore Metro is coming all the way upto Kaggalipura which is just 15 KM's from Harohalli. Harohalli can be a junction with branches...
more... to Kanakapura/ Kollegal, Ramanagara and Anekal/ Hosur. Another junction is Anekal Road on Bangalore Salem line.