Model driven software engineering for grid modeling, optimization and simulation