A simulator for reconfigurable optical networks with Optical Topology Programming (OTP).
📌 Author: Matthew Nance-Hall, University of Oregon
📌 Purpose: This simulator evaluates dynamic optical network reconfiguration for improving network resilience and performance.
- Introduction
- Installation
- Input Files
- Running the Simulator
- Understanding the Codebase
- Contributing
- License
This repository contains a network simulation tool for evaluating Optical Topology Programming (OTP), a method that dynamically reconfigures optical networks.
The simulator models traffic dynamics, network topologies, and performance characteristics under various conditions. It is designed for research, experimentation, and evaluation of optical network behavior.
Ensure you have the following installed:
- Python 3.8+
- Required dependencies (install via
pip) - Gurobi (for network optimization)
- NetworkX, NumPy, Matplotlib
git clone https://github.com/mattall/topology-programming.git
cd topology-programmingpip install -r requirements.txtFor Gurobi installation, follow the official guide.
The simulator requires three key input files:
| File | Description |
|---|---|
Topology File (.gml or .json) |
Defines the network structure (nodes, edges, and capacities). |
Traffic Matrix (.txt) |
Time-series data defining traffic loads between network nodes. |
Host List (.txt) |
Lists the active hosts in the network. |
Each line represents a time step, and contains a flattened matrix (rows concatenated into a single line).
- The matrix dimensions match the number of nodes in the topology file.
- Each entry represents traffic volume between a source and destination.
Example Format:
0.0 100.5 200.3 0.0 50.1 10.0 ...
120.0 0.0 95.3 70.8 0.0 0.0 ...
...
- Row 1: Traffic at time step 1
- Row 2: Traffic at time step 2
- Each value corresponds to a traffic volume from node i to node j.
The main simulation can be run using:
python src/onset/simulator.py <network_name> <number_of_nodes> <experiment_name>python src/onset/simulator.py example_network 18 experiment1This command:
- Loads the
example_network.gmltopology fromdata/graphs/gml/. - Assumes the network has 18 nodes.
- Saves results in
data/results/experiment1/.
topology-programming/
│── data/ # Input files
│ ├── graphs/
│ │ ├── gml/ # Network topology files (GML format)
│ │ └── json/ # Network topology files (JSON format)
│ ├── traffic/ # Traffic matrix files
│ └── hosts/ # Host lists
│── results/ # Output files (logs, analysis)
│── src/ # Main source code
│ └── onset/
│ ├── simulator.py # Main simulation script
│ ├── network.py # Network simulation logic
│ ├── doppler.py # OTP-based mechanism
│ ├── utils.py # Helper functions (logging, visualization)
│── tests/ # Unit tests
│── requirements.txt # Python dependencies
│── README.md # This file
To contribute:
- Fork the repository.
- Create a new branch (
feature-xyz). - Write clear, documented code.
- Submit a Pull Request.
This project is licensed under the MIT License.