This paper develops a unique solar cell modeling approach that incorporates search and optimization techniques for the determination of equivalent circuit parameters. In particular, simulated annealing is applied to automate the procedure of finding near-optimal values of the solar cell under various environmental settings. Photocurrents, diode reverse saturation currents, diode ideality factors, series resistances, and shunt resistances involved in the cell structure and parameters can be identified this way for every operating condition in an accurate modeling of the cell behavior. The developed models are evaluated for a set of solar cells, and their accuracy is verified by comparing the I=V curves generated from computer simulations with those provided by the cell manufacturer or determined experimentally. In addition, an algorithm has also been presented to use this model in solar array simulation under varying environmental conditions.