Constraints on equations concerning mathematical programming may have decision variables as well as equalities/inequalities. Some standard parameters concerning this model are market requirements, regulations relating to diesel fuel, and the crude mix ratio. For refinery operations, these parameters influence profitability, export/import of final petroleum products, and refinery operations. The performance of formulations and data accuracy are vital factors for the efficiency of the mathematical model. First, a material flow path is traced by the model. Then different mathematical formulations are prepared for individual operations. This topic will discuss mathematical programming and its attributes, crude oil planning and scheduling, fuel blending optimization, etc.