A system and method of optimizing delivery of a radiation therapy treatment. The system optimizes treatment delivery in real-time to take into account a variety of factors, such as patient anatomical and physiological changes (e.g., respiration and other movement, etc.), and machine configuration changes (e.g., beam output factors, couch error, leaf error, etc.).