# Path: calliope/core/util/tools.py
# def get_from_dict(data_dict, map_list):
# def apply_to_dict(data_dict, map_list, func, args):
#     def __init__(self, func):
#     def __get__(self, obj, objtype=None):
#     def __call__(self, *args, **kw):
# def relative_path(base_path_file, path):
# def load_function(source):
# def plugin_load(name, builtin_module):
# class memoize_instancemethod(object):
# 
# Path: calliope/exceptions.py
# def _formatwarning(message, category, filename, lineno, line=None):
# def warn(message, _class=ModelWarning):
# def print_warnings_and_raise_errors(warnings=None, errors=None):
# class ModelError(Exception):
# class BackendError(Exception):
# class ModelWarning(Warning):
# class BackendWarning(Warning):


import logging
import re
import numpy as np
import pandas as pd
import xarray as xr
import pyomo.core as po
from pandas.api.types import is_numeric_dtype
from calliope.core.util.tools import memoize
from calliope import exceptions
"""
Copyright (C) since 2013 Calliope contributors listed in AUTHORS.
Licensed under the Apache 2.0 License (see LICENSE file).

"""




logger = logging.getLogger(__name__)



# Path: calliope/core/util/tools.py
# def get_from_dict(data_dict, map_list):
# def apply_to_dict(data_dict, map_list, func, args):
#     def __init__(self, func):
#     def __get__(self, obj, objtype=None):
#     def __call__(self, *args, **kw):
# def relative_path(base_path_file, path):
# def load_function(source):
# def plugin_load(name, builtin_module):
# class memoize_instancemethod(object):
# 
# Path: calliope/exceptions.py
# def _formatwarning(message, category, filename, lineno, line=None):
# def warn(message, _class=ModelWarning):
# def print_warnings_and_raise_errors(warnings=None, errors=None):
# class ModelError(Exception):
# class BackendError(Exception):
# class ModelWarning(Warning):
# class BackendWarning(Warning):


# Path: calliope/backend/pyomo/util.py
import logging
import re
import numpy as np
import pandas as pd
import xarray as xr
import pyomo.core as po
from pandas.api.types import is_numeric_dtype
from calliope.core.util.tools import memoize
from calliope import exceptions

"""
Copyright (C) since 2013 Calliope contributors listed in AUTHORS.
Licensed under the Apache 2.0 License (see LICENSE file).

"""




logger = logging.getLogger(__name__)



@memoize