Detailed available data on compact groups of galaxies still have to be fitted in a consistent cosmological context. Specifically, no comparison exists between the observed space density of compact groups and the predictions of cosmological models. I propose to use numerical simulations to estimate the formation rate and the current space density of compact groups based on my recent demonstration that these systems form in short-lived structures within rich looser groups. These properties are expected to be sensitive to the cosmological model chosen and so may discriminate between otherwise possible models. This proposal fits within a major project currently under way at the MPA which involves cosmological simulations on parallel computers including gas dynamics effects. I will use simulations run on a Cray T3E to be installed in Garching in early 1996. These simulations will allow me to understand the evolution of compact groups in a cosmological context and their relation to the origin and transformation of galaxy morphology.