# Online Optimization SHOP was originally designed to be used as a stand-alone program executed in the terminal, which has created certain limitations in how SHOP expects to be executed. The standard way of running SHOP is to: - Create a new and empty model - Set the time resolution of the model - Add all objects with input data - Connect objects to specify the topology - Run several full iterations with MIP to decide unit commitment - Switch to incremental mode to lock unit commitment - Run some incremental iterations to polish the solution This procedure must be followed in order to avoid undefined behaviour. SHOP has become more deeply integrated in several decision processes for short-term hydropower optimization, and rerunning SHOP several times per day is common. This will likely be more relevant as markets move closer to real-time with shorter time horizons. A major issue is the time it takes to run SHOP again after new information becomes available during the day. This could be new inflow and price forecasts, bids being accepted in an intra-day market, or a unit becoming unavailable due to unforeseen events. Since SHOP expects to be run from scratch every time, all the expensive full iterations with binary variables have to be performed again, which could take several minutes. However, the solution from the last performed SHOP run is likely close to the optimal solution. The online optimization functionality enables a more flexible way of running SHOP, where users can save the entire SHOP state from a standard SHOP run and load this into a new run to perform a "warm start" of the SHOP model. If the changes are minor, running a single incremental iteration might suffice when updating an old SHOP state. It also enables users to switch back from incremental to full iterations and change the time resolution (start time, end time, time unit, and step length) between iterations. This is described in more detail in the [serialization example](serialize-example) and the [change time resolution example](changing-time-res-example).