The general purpose of this work is to improve the quality of radiotherapy through efficiency, consistency, accuracy, and precision. The methods described in this work use automation to improve efficiency and consistency, and rigorous physical simulation to assure accuracy and precision. The combination of all the qualities mentioned leads to the best possible outcome for patients being treated for cancer using radiotherapy.