Anoop A Nair Thank you for sharing the OPF codes. However, what I've been looking for is optimal power flow for a 24-hour period. However, the code you shared is for one hour, i.e., static OPF. If possible, please provide me with the 24-hour OPF code. Thank you for your valuable and precious time.