Hi @Anjinsan,
This tutorial should point you in the right direction: Power Systems · JuMP
If it’s only the data that is changing between periods, you can update the model in-place. Otherwise, write a function that takes in the current state of the system, formulates and solves a problem, and then returns the new state of the system.
You should also check out other projects like https://github.com/NREL-SIIP/PowerSimulations.jl and https://github.com/NREL-SIIP/PowerSystems.jl. They already have a lot of tooling to help solve least-cost dispatch problems, along with a range of other things.
Here’s a tutorial to get started:
https://nrel-siip.github.io/PowerSystems.jl/stable/modeler_guide/generated_modeling_with_JuMP/