Giter Club home page Giter Club logo

ai4scion-topo-simulation's Introduction

ai4scion-topo-simulation

Test framework to simulate scion traffic over multiple paths to train agents

Usage

# Sample ASNs
asns = [47377, 12392] 
graph = load_topology('output_fixed.json')
print("Loaded Topology")
print("Nodes:", len(graph.nodes))
print("Edges:", len(graph.edges))

# Get random combination of ASes
res = [(a, b) for idx, a in enumerate(asns) for b in asns[idx + 1:]]
for elem in res:

    src_asn = elem[0]
    dst_asn = elem[1]
    
    # Get all SCION paths, adjust cut depending on topology/number of paths
    result = get_scion_paths(graph, src_asn, dst_asn)

    # Debug statements
    print_scion_paths(result[:2])
    print_scion_paths_extended(result[:2])

    # Simulate traffic using the first two paths and a 50/50 distribution
    distribution = [0.5, 0.5]
    selected_path_set = result[:2]
    sim_result = simulate_scion_traffic(src_asn, dst_asn, selected_path_set, distribution)

    i = 0
    print("Results:")
    for res in sim_result:
        print(f"Path {i + 1}: Latency {res['latency']}, Loss {res['loss']}, Goodput {res['goodput']}")
        i += 1

ai4scion-topo-simulation's People

Contributors

martenwallewein avatar

Watchers

David Hausheer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.