This paper discusses a novel method for modeling the spread of an epidemic that facilitates the calculation of the optimal control policy. The proposed model considers seven compartments in the population as opposed to popular approaches based on three or four compartments. The usual compartments, i.e., susceptible, exposed, infected, and recovered individuals have been included in the seven compartment model with the addition of compartments pertaining to individuals under treatment, vaccinated individuals, and individuals in quarantine. The addition of new compartments allows for the incorporation of multiple control options such as treatment, quarantine, and vaccination. The mathematical expressions involved in the model have been described followed by a discussion on the calculation of optimal control policy. Finally, a simulation-based example has been included for demonstrating the effectiveness of the control policy resulting from the proposed model.