Generalized methodology for modeling and simulating optical interconnection networks using diffraction analysis