Hello Mohammed, If you want to run OPF for 24 hours then you need to have 24 cases (if topology of grid changes). Set a for loop for 24 hours in such a way that in each hour an individual MPC case will be build and OPF will be performed for each hour. This is a simple way I could suggest you according to your question.
Regards Mirish
