def check_storage_cap_ini_max(df):
    """Initial capacity cannot be greater than the maximum capacity.
    Otherwise, a ValueError is raised."""
    if any(df['cap_ini'] > df['cap_max']):
        raise ValueError(
            f"Initial capacity of storages {df[df['cap_ini'] > df['cap_max']].index.to_list()} is greater than the maximum capacity"
            )
