  Galactic sized gravitational lenses are simulated by combining a cosmological
N-body simulation and models for the baryonic component of the galaxy. The lens
caustics, critical curves, image locations and magnification ratios are
calculated by ray-shooting on an adaptive grid. When the source is near a cusp
in a smooth lens' caustic the sum of the magnifications of the three closest
images should be close to zero. It is found that in the observed cases this sum
is generally too large to be consistent with the simulations implying that
there is not enough substructure in the simulations. This suggests that other
factors play an important role. These may include limited numerical resolution,
lensing by structure outside the halo, selection bias and the possibility that
a randomly selected galaxy halo may be more irregular, for example due to
recent mergers, than the isolated halo used in this study. It is also shown
that, with the level of substructure computed from the N-body simulations, the
image magnifications of the Einstein cross type lenses are very weak functions
of source size up to $\sim 1\kpc$. This is also true for the magnification
ratios of widely separated images in the fold and cusp caustic lenses. This
means that selected magnification ratios for different the emission regions of
a lensed quasar should agree with each other, barring microlensing by stars.
The source size dependence of the magnification ratio between the closest pair
of images is more sensitive to substructure.
