Beispiel #1
0
def best_fit_run(physical_graph,
                 requests,
                 save=True,
                 load=2000,
                 max_time=500,
                 verbose=True):
    physical_best_fit = physical_graph.copy()
    request_graphs_best_fit = [r.copy() for r in requests]
    results = get_run_result(physical_best_fit,
                             request_graphs_best_fit,
                             method="bestFit",
                             traffic_load=load,
                             max_time=max_time,
                             cost_revenue=True,
                             utils=True,
                             verbose=verbose)

    if save:
        save_results('bf', results)

    return results
Beispiel #2
0
def neuroViNE_run(physical_graph,
                  requests,
                  save=True,
                  load=2000,
                  max_time=500,
                  verbose=True):
    physical_neuro = physical_graph.copy()
    request_graphs_neuro = [r.copy() for r in requests]
    results = get_run_result(physical_neuro,
                             request_graphs_neuro,
                             method="neuroViNE",
                             traffic_load=load,
                             max_time=max_time,
                             cost_revenue=True,
                             utils=True,
                             verbose=verbose)

    if save:
        save_results('nv', results)

    return results
Beispiel #3
0
def grc_run(physical_graph,
            requests,
            save=True,
            load=2000,
            max_time=500,
            verbose=True):
    physical_grc = physical_graph.copy()
    request_graphs_grc = [r.copy() for r in requests]
    results = get_run_result(physical_grc,
                             request_graphs_grc,
                             method="grc",
                             traffic_load=load,
                             max_time=max_time,
                             cost_revenue=True,
                             utils=True,
                             verbose=verbose)

    if save:
        save_results('grc', results)

    return results
Beispiel #4
0
def graphViNE_run(physical_graph,
                  requests,
                  save=True,
                  load=2000,
                  max_time=500,
                  verbose=True,
                  n_clusters=4):
    physical_graph_vine = physical_graph.copy()
    request_graphs_graph_vine = [r.copy() for r in requests]
    results = get_run_result(physical_graph_vine,
                             request_graphs_graph_vine,
                             method="graphViNE",
                             traffic_load=load,
                             max_time=max_time,
                             cost_revenue=True,
                             utils=True,
                             verbose=verbose,
                             n_clusters=n_clusters)

    if save:
        save_results(f'gv{n_clusters}', results)

    return results