def solve_optimisation_investment(model):
    """

    Parameters
    ----------
    model : oemof.solph.Model
        The oemof model, which is optimized.

    Returns
    -------
    dict : Results of optimisation. Contains:
        - 'oemof' : Complete "oemof" results of the energy system optimisation (.results['main']).
        - 'oemof_meta' : Meta results of oemof solph optimisation.
        - 'components' : 'pipes' : Investment results of pipes.
    """

    model.solve()

    if model.settings['dump_path'] is not None:
        my_es = model.es
        my_es.dump(dpath=model.settings['dump_path'], filename=model.settings['dump_name'])
        print('oemof Energysystem stored in "{}"'.format(model.settings['dump_path']))

    edges_results = model.get_results_edges()

    results = {'oemof': model.es.results['main'],
               'oemof_meta': model.es.results['meta'],
               'components': {'pipes': edges_results}}

    return results