def solve_iterative(self, iterative_warmstart=True):
        o = self.config_model
        d = self.data
        time_res = d.time_res_series
        window_adj = int(o.opmode.window / d.time_res_data)
        steps = [t for t in d._dt.index if (t % window_adj) == 0]
        # Remove the last step - since we look forward at each step,
        # it would take us beyond actually existing data
        steps = steps[:-1]
        node_vars = []
        total_vars = []
        cost_vars = []
        d.time_res_sum = 0
        self.generate_model(t_start=steps[0])
        for index, step in enumerate(steps):
            if index == 0:
                self.solve(warmstart=False)
            else:
                self.t_start = step
                self._set_t_end()
                # Note: we don't update the timestep set, so it keeps the
                # values it got on first construction. Instead,
                # we use an offset when updating parameter data so that
                # the correct values are read into the "incorrect" timesteps.
                self.update_parameters(t_offset=step - steps[0])
                self.solve(warmstart=iterative_warmstart)
            self.load_results()

            # Gather relevant model results over decision interval, so
            # we only grab [0:window/time_res_static] steps, where
            # window/time_res_static will be an iloc index
            if index == (len(steps) - 1):
                # Final iteration saves data from entire horizon
                stepsize = int(o.opmode.horizon / d.time_res_static)
            else:
                # Non-final iterations only save data from window
                stepsize = int(o.opmode.window / d.time_res_static)

            node = self.get_node_variables()
            node_vars.append(node[dict(t=slice(0, stepsize))])
            # Get totals
            totals = self.get_totals(t_subset=slice(0, stepsize))
            total_vars.append(totals)
            costs = self.get_costs(t_subset=slice(0, stepsize)).to_dataset(name='costs')
            cost_vars.append(costs)

            timesteps = [time_res.at[t] for t in self.m.t][0:stepsize]
            d.time_res_sum += sum(timesteps)

            # Save state of storage for carry over to next iteration
            s = self.get_var('s')
            # Convert from timestep length to absolute index
            storage_state_index = stepsize - 1
            assert (isinstance(storage_state_index, int) or
                    storage_state_index.is_integer())
            storage_state_index = int(storage_state_index)
            d.s_init = s[dict(t=storage_state_index)].to_pandas().T

        self.load_solution_iterative(node_vars, total_vars, cost_vars)
Solve iterative by updating model parameters.
dataset/ETHPy150Open calliope-project/calliope/calliope/core.py/Model.solve_iterative