from pydmoo.problems.dynamic.cec2015 import FDA4, FDA5
from pydmoo.problems.dynamic.df import DF1, DF2, DF3, DF4, DF5, DF6, DF7, DF8, DF9, DF10, DF11, DF12, DF13, DF14
from pydmoo.problems.dynamic.gts import (
    GTS1,
    GTS1_2,
    GTS1_3,
    GTS2,
    GTS2_2,
    GTS2_3,
    GTS3,
    GTS3_2,
    GTS3_3,
    GTS4,
    GTS4_2,
    GTS4_3,
    GTS5,
    GTS5_2,
    GTS5_3,
    GTS6,
    GTS6_2,
    GTS6_3,
    GTS7,
    GTS7_2,
    GTS7_3,
    GTS8,
    GTS8_2,
    GTS8_3,
    GTS9,
    GTS9_2,
    GTS9_3,
    GTS10,
    GTS10_2,
    GTS10_3,
    GTS11,
    GTS11_2,
    GTS11_3,
)
from pydmoo.problems.real_world.dsrp import DSRP
from pydmoo.problems.real_world.dwbdp import DWBDP

PROBLEM = {
    "fda4": FDA4,
    "fda5": FDA5,
    "gts1": GTS1,
    "gts2": GTS2,
    "gts3": GTS3,
    "gts4": GTS4,
    "gts5": GTS5,
    "gts6": GTS6,
    "gts7": GTS7,
    "gts8": GTS8,
    "gts9": GTS9,
    "gts10": GTS10,
    "gts11": GTS11,
    "gts1_2": GTS1_2,
    "gts2_2": GTS2_2,
    "gts3_2": GTS3_2,
    "gts4_2": GTS4_2,
    "gts5_2": GTS5_2,
    "gts6_2": GTS6_2,
    "gts7_2": GTS7_2,
    "gts8_2": GTS8_2,
    "gts9_2": GTS9_2,
    "gts10_2": GTS10_2,
    "gts11_2": GTS11_2,
    "gts1_3": GTS1_3,
    "gts2_3": GTS2_3,
    "gts3_3": GTS3_3,
    "gts4_3": GTS4_3,
    "gts5_3": GTS5_3,
    "gts6_3": GTS6_3,
    "gts7_3": GTS7_3,
    "gts8_3": GTS8_3,
    "gts9_3": GTS9_3,
    "gts10_3": GTS10_3,
    "gts11_3": GTS11_3,
    "df1": DF1,
    "df2": DF2,
    "df3": DF3,
    "df4": DF4,
    "df5": DF5,
    "df6": DF6,
    "df7": DF7,
    "df8": DF8,
    "df9": DF9,
    "df10": DF10,
    "df11": DF11,
    "df12": DF12,
    "df13": DF13,
    "df14": DF14,
    "dsrp": DSRP,
    "dwbdp": DWBDP,
}


def get_problem(name, *args, **kwargs):
    name = name.lower()

    if name.lower() not in PROBLEM:
        raise Exception("Problem not found.")

    return PROBLEM[name.lower()](*args, **kwargs)
