Operational And Investment Solutions For Dynamic Line Switching And Rating In Electrical Grid