Exemple #1
0
def initialize_ems(my_ems):
    """ assign default values to the device parameters (Power=0, ...)

    :param my_ems: ems object
    :return: none
    """
    key_new = {'devices': {}, 'flexopts': {}, 'optplan': {}, 'reoptim': {}}
    my_ems.update(key_new)
    dict_devices_normal = ['hp', 'boiler', 'pv', 'sto', 'bat']
    for device_name in dict_devices_normal:
        my_ems['devices'].update(
            create_device(device_name=device_name, minpow=0, maxpow=0))

    my_ems['devices'].update(
        create_device(device_name='chp', minpow=0, maxpow=0, eta=[0.3, 0.65]))
    my_ems['devices'].update(
        create_device(device_name='ev',
                      minpow=0,
                      maxpow=0,
                      stocap=0,
                      eta=0.98,
                      init_soc=[20],
                      end_soc=[20],
                      ev_aval=[
                          my_ems['time_data']['start_time'],
                          my_ems['time_data']['end_time']
                      ],
                      timesetting=my_ems['time_data']))
Exemple #2
0
def scenario_mini_apartment(ems):
    """ mini apartment with pv, bat, hp, ev, heat storage and boiler

    Args:
        - ems: ems model instance

    """
    ems['devices'].update(
        create_device(device_name='pv', minpow=0.5, maxpow=3, eta=0.95))
    ems['devices'].update(
        create_device(device_name='bat',
                      minpow=0,
                      maxpow=3,
                      stocap=5,
                      init_soc=50,
                      eta=0.95))
    ems['devices']['sto']['maxpow'] = 10
    ems['devices']['sto']['stocap'] = 15
    ems['devices']['boiler']['maxpow'] = 3
    ems['devices'].update(
        create_device(device_name='hp', minpow=0, maxpow=4, supply_temp=45))
    ems['devices'].update(
        create_device(device_name='ev',
                      minpow=0,
                      maxpow=8,
                      stocap=20,
                      eta=0.98,
                      timesetting=ems['time_data'],
                      ev_aval=[
                          '2019-12-18 00:00', '2019-12-18 08:00',
                          '2019-12-18 18:00', '2019-12-18 23:45'
                      ],
                      init_soc=[30, 50],
                      end_soc=[80, 100]))
    return ems
Exemple #3
0
def scenario_simple_house(ems):
    """ simple house with PV and battery + boiler for satisfying heat load

    Args:
        - ems: ems model instance

    """
    ems['devices'].update(create_device(device_name='pv', minpow=0.5, maxpow=3, eta=0.95))
    ems['devices'].update(create_device(device_name='bat', minpow=0, maxpow=3, stocap=5, init_soc=50, eta=0.95))
    ems['devices']['sto']['maxpow'] = 10
    ems['devices']['sto']['stocap'] = 15
    ems['devices']['boiler']['maxpow'] = 6
    return ems
Exemple #4
0
def scenario_residential_house(ems):
    """  residential house with pv, bat, heat storage and boiler

    Args:
        - ems: ems model instance

    """
    ems['devices'].update(create_device(device_name='pv', minpow=0.5, maxpow=3, eta=0.95))
    ems['devices'].update(create_device(device_name='bat', minpow=0, maxpow=3, stocap=5, init_soc=5, eta=0.95))
    ems['devices']['sto']['maxpow'] = 10
    ems['devices']['sto']['stocap'] = 15
    ems['devices']['boiler']['maxpow'] = 3
    ems['devices'].update(create_device(device_name='hp', minpow=0, maxpow=4, supply_temp=45))
    return ems
Exemple #5
0
def scenario_bat(ems):
    """ only battery + boiler for satisfying heat load

    Args:
        - ems: ems model instance

    """
    ems['devices'].update(create_device(device_name='bat', minpow=0, maxpow=3, stocap=15, init_soc=0, eta=0.95))
    ems['devices']['sto']['maxpow'] = 10
    ems['devices']['sto']['stocap'] = 15
    ems['devices']['boiler']['maxpow'] = 6
    return ems
Exemple #6
0
def scenario_pv(ems):
    """ only pv + boiler for satisfying heat load

    Args:
        - ems: ems model instance

    """
    ems['devices'].update(create_device(device_name='pv', minpow=0.5, maxpow=3, eta=0.95))
    ems['devices']['sto']['maxpow'] = 10
    ems['devices']['sto']['stocap'] = 15
    ems['devices']['boiler']['maxpow'] = 6
    return ems
Exemple #7
0
def scenario_combination_test(my_ems, test_code):
    """
    

    Parameters
    ----------
    my_ems : dict
        ems model
    test_code : string
        Device availability booleans merged as string.

    Returns
    -------
    my_ems : dict
        ems model.

    """
    s_pv = int(test_code[0])
    s_bat = int(test_code[1])
    s_ev = int(test_code[2])
    s_hp = int(test_code[3])
    s_chp = int(test_code[4])

    # add or change the utility/devices
    my_ems['devices']['boiler']['maxpow'] = 4
    if s_chp: my_ems['devices']['chp']['maxpow'] = 2
    if s_hp: my_ems['devices'].update(create_device(device_name='hp', minpow=0, maxpow=2, supply_temp=45))
    if s_pv: my_ems['devices'].update(create_device(device_name='pv', minpow=0.5, maxpow=3, eta=0.95))
    if s_bat: my_ems['devices'].update(
        create_device(device_name='bat', minpow=0.5, maxpow=3, stocap=5, init_soc=45, eta=0.95))
    if s_ev: my_ems['devices'].update(create_device(device_name='ev', minpow=0, maxpow=11,
                                                    stocap=20, eta=0.98, timesetting=my_ems['time_data'],
                                                    ev_aval=['2019-12-18 00:00', '2019-12-18 08:00',
                                                             '2019-12-18 18:00', '2019-12-18 23:45'],
                                                    init_soc=[30, 50], end_soc=[80, 100]))

    if not s_chp: my_ems['devices']['chp']['maxpow'] = 0
    if not s_hp: my_ems['devices'].update(create_device(device_name='hp', minpow=0, maxpow=0, supply_temp=45))
    if not s_pv: my_ems['devices'].update(create_device(device_name='pv', minpow=0, maxpow=0, eta=0.95))
    if not s_bat: my_ems['devices'].update(
        create_device(device_name='bat', minpow=0, maxpow=0, stocap=0, init_soc=0, eta=0.95))
    if not s_ev: my_ems['devices'].update(create_device(device_name='ev', minpow=0, maxpow=0,
                                                        stocap=20, eta=0.98, timesetting=my_ems['time_data'],
                                                        ev_aval=['2019-12-18 00:00', '2019-12-18 08:00',
                                                                 '2019-12-18 18:00', '2019-12-18 23:45'],
                                                        init_soc=[30, 50], end_soc=[80, 100]))

    return my_ems
Exemple #8
0
def scenario_hp(ems):
    """ only hp + boiler for satisfying heat load

    Args:
        - ems: ems model instance

    """

    ems['devices']['sto']['maxpow'] = 10
    ems['devices']['sto']['stocap'] = 15
    ems['devices']['boiler']['maxpow'] = 3
    ems['devices'].update(create_device(device_name='hp', minpow=0, maxpow=4, supply_temp=45))

    return ems
Exemple #9
0
def scenario_ev(ems):
    """ only ev + boiler for satisfying heat load

    Args:
        - ems: ems model instance

    """
    ems['devices'].update(create_device(device_name='ev', minpow=0, maxpow=10,
                                        stocap=20, eta=0.98, timesetting=ems['time_data'],
                                        ev_aval=['2019-12-18 00:00', '2019-12-18 08:00',
                                                 '2019-12-18 18:00', '2019-12-18 23:45'],
                                        init_soc=[30, 50], end_soc=[80, 100]))
    ems['devices']['sto']['maxpow'] = 10
    ems['devices']['sto']['stocap'] = 15
    ems['devices']['boiler']['maxpow'] = 6
    return ems