Modeling oil refinery for production planning, scheduling and economic analysis