  We present a study of the lens properties of quadruply imaged systems, lensed
by numerically simulated galaxies. We investigate a simulated elliptical and
disc galaxy drawn from high resolution simulations of galaxy formation in a
concordance $\Lambda$CDM universe. The simulations include the effects of gas
dynamics, star formation and feedback processes. Flux-ratio anomalies observed
in strong gravitational lensing potentially provide an indicator for the
presence of mass substructure in lens galaxies as predicted from CDM
simulations. We particularly concentrate on the prediction that, for an ideal
cusp caustic, the sum of the signed magnifications of the three highly
magnified images should vanish when the source approaches the cusp. Strong
violation of this cusp relation indicates the presence of substructure,
regardless of the global, smooth mass model of the lens galaxy. We draw the
following conclusions: (1) the level of substructure present in simulations
produces violations of the cusp relation comparable to those observed, (2)
higher-order catastrophes (e.g. swallowtails) can also cause changes of the
order of 0.6 in the cusp relation as predicted by a smooth model, (3) the flux
anomaly distribution depends on the image parity and flux and both the
brightest minimum and saddle-point images are more affected by substructure
than the fainter images. In addition, the brightest saddle point is demagnified
w.r.t. the brightest minimum. Our results are fully numerical and properly
include all mass scales, without making semi-analytic assumptions. They are
ultimately limited by the mass resolution of single particles in the simulation
determined by current computational limits, however show that our results are
not affected by shot-noise due to the finite number of particles.
