def recompute_operational_costs(self, y, k='monetary', carrier='power',
                                    cost_adjustment=1.0):
        """
        Recompute operational costs for the given technology ``y``.

        ``cost_adjustment`` linearly scales the construction costs used
        internally, but is not applied to the rest of the operational
        costs.

        """
        get_cost = self.get_cost
        get_depreciation = self.get_depreciation
        solution = self.solution
        # Here we want gross production
        production = solution['es_prod'].loc[dict(c=carrier, y=y)]
        fuel = (solution['rs'].loc[dict(y=y)].sum(dim='t')
                / self.get_option(y + '.constraints.r_eff'))
        fuel_rb = (solution['rbs'].loc[dict(y=y)].sum(dim='t')
                   / self.get_option(y + '.constraints.rb_eff'))
        icf = self.recompute_investment_costs
        cost_con = icf(y, k=k, cost_adjustment=cost_adjustment)['total'].sum()
        cost_op = pd.DataFrame()
        cost_op['om_frac'] = (get_cost('om_frac', y, k) * cost_con
                              * get_depreciation(y, k)
                              * (solution['time_res'].to_pandas().sum() / 8760))
        cost_op['om_fixed'] = (get_cost('om_fixed', y, k)
                               * solution['e_cap'].loc[dict(y=y)]
                               * (solution['time_res'].to_pandas().sum() / 8760))
        cost_op['om_var'] = get_cost('om_var', y, k) * production
        cost_op['om_fuel'] = get_cost('om_fuel', y, k) * fuel
        cost_op['om_rb'] = get_cost('om_rb', y, k) * fuel_rb
        cost_op['total'] = cost_op.sum(axis=1)
        return cost_op
dataset/ETHPy150Open calliope-project/calliope/calliope/analysis.py/SolutionModel.recompute_operational_costs/original