The precise design of a photovoltaic (PV) array is best achieved by considering all types of physical real losses in the computation of output power. In this paper, the losses of PV equivalent circuit have been evaluated leading to ideal single diode (ISD), simplified single diode, single diode, simplified two-diode, and two-diode (TD) PV models. These models were compared with the 6th, 7th, 8th, and 9th PV models. The impact of PV modeling has been investigated using Ant Lion optimization on an on-grid PV array in Marsaa', Jordan using measured data. It is found that the TD model results in an optimal value of 99.9% of the index of reliability with 38,070 PV panels. Moreover, examining the system with other PV models, such as the ISD model, decreases the number of PV panels by 23.52%. Further, adapting the TD model reduces the system emissions by 10.15% compared with the ISD model. Also, sensitivity analysis, on the measured data, is tested to validate the robustness of the system. In sum, the investigation revealed that even the TD model has the lowest output power, it is more realistic because it considers all circuit losses (i.e. diffusion, recombination, internal series, and leakage losses).