Scalable software tools and methods for smart grid modeling and optimization