We report on molecular dynamics simulations of vortex patterns in the presence of a periodic array of ferromagnetic dots with out-of-plane magnetization. Dots and vortices show the interesting behaviour of having attractive or repulsive interaction depending on the mutual orientation of the flux of the vortices and the magnetic moment of the dots. This microscopic property strongly influences the simulated magnetization loops and critical force curves, Different configurations of the magnetization direction of the dot array have been systematically studied, For all dots magnetized in one direction the experimentally observed asymmetric magnetization loops are clearly reproduced. We also investigate random distributions of up and down magnetized dots, These simulations show that new vortex phases can be stabilized by the magnetic dot array. (C) 2001 Elsevier Science B.V. All rights reserved.