Scalable compact models for fast design optimization of complex electromagnetic systems