From our friends at AAA, for 2017 total cost of ownership, driving 15,000 miles a year, the costs are per year: EV $8439, Small ICE $6354, Medium ICE $8171. EV's are i3, Bolt, 500e, Soul and Leaf. Tesla not included, not enough info yet. This is for 5 years, no battery or engine replacements. The killer for EV's is depreciation they are just not worth much used. However, for the thrifty, a used EV might be a good buy.
Now when you talk about solar on the roof, learn about the financial friend Internal Rate of Return, aka Discounted Cash Flow Rate of Return. This tool allows you to compare a solar array to other uses of your money. Along with Monte Carlo analysis, you can decide: Solar on the roof, or 10 year Treasuries? Right now I am better off buying power, and investing money. Your mileage may vary. It is just an investment like any other.