In this paper, an adaptive radiation therapy algorithm is derived and evaluated using numerical simulations. Patient setup errors are considered and an off-line adaptive method to compensate for the effect of these is provided. The method consists of two parts, one for correction of patient position to account for the systematic error, and one for modulation of the fluence profiles to account for the random errors. The method is based on standard control theory for linear systems. It is investigated if this adaptive method can replace the use of a planning target volume (PTV) and therefore increase the possibilities to escalate the dose. Numerical simulations of treatments of a prostate patient indicate that this is the case. The simulations show that better organ-at-risk protection can be achieved when using the adaptation algorithm to correct for the geometrical uncertainties than when using a PTV.