I’m completely new to Julia / JuMP. I’m working on writing least-cost dispatch code for a power system.
I want to load in data for one year (8760 hours), but have the model optimize only one day at a time. What is the best way to do this?
One thought is to set up a model for each 24-hour period, and then execute each model sequentially, such as:
m[1]=Model(Gurobi.Optimizer) #for the first day, and so on
One issue, however, is that some information from the previous day needs to be carried over to the next day (such as the on/off state of the generators, the battery state of charge, etc.). Whatever method used would need to be able to accommodate this…
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.
@odow
Could you please clarify what you mean by “updating the model in-place?”
In this case, I am using some of the results of the last optimization to inform the start of the next optimization. I’m simply creating a constraint that one of the starting values of the next run must equal the ending value of the last run. I’m not using set_start_value. (Should I be?)