sohamc0 / Routing-and-Spectrum-Allocation

Solving the Routing and Spectrum Allocation (RSA) problem in optical communication networks with Deep Reinforcement Learning (RL)
2 stars 0 forks source link

How to obtain personal optical network topology (nsfnet.gml)? #1

Open Team-boy opened 1 month ago

Team-boy commented 1 month ago

Hello, developer. I have some questions. I am unable to reuse your simulation settings. What software should I use to obtain personal optical network topology (nsfnet.gml)? Or, how can I obtain real network topology data for dataset input? Thank you.

sohamc0 commented 1 month ago

The file nsfnet.gml is already there in the src sub-directory. You can use any gml file which represents a network, given the network is a single connected component and is an undirected graph. NSFNET is a very basic network with less than twenty nodes and edges. Reading the gml file and creating its own network representation is handled by the networkx library. Creating your own network topologies can be found here

Team-boy commented 1 month ago

The file nsfnet.gml is already there in the src sub-directory. You can use any gml file which represents a network, given the network is a single connected component and is an undirected graph. NSFNET is a very basic network with less than twenty nodes and edges. Reading the gml file and creating its own network representation is handled by the networkx library. Creating your own network topologies can be found here

Hello developer, I'm just starting to research this issue and have quite a few questions. Is your implementation of the simple shortest path algorithm achieved by setting the learning rate to 0? Does the NetworkEnv also need adjustment? Do you think it's necessary to compare with other methods, such as dynamic routing algorithms? In evaluation, is 'value' the average reward, and what does 'relative' refer to? How can it be obtained? What parameters should be used to evaluate spectrum allocation as mentioned in your text?

sohamc0 commented 1 month ago
  1. The "simple shortest path algorithm" only has the option of choosing the shortest path between a source and destination pair when a new request comes in. This implementation can be found in src/simple_shortest_path_net_env.py. There is no learning rate at all because, obviously, there is nothing to learn. The only reason we decided to include a separate environment for the "simple shortest path algorithm" is because we wanted to compare its results to the actual learning algorithms (i.e. the 3 disjoint paths approach) and display it on TensorBoard.

  2. As mentioned above, there are 2 NetworkEnv variations: one is for the 3 disjoint paths approach and the other is for the simple shortest path algorithm. They can be found in src/net_env.py and src/simple_shortest_path_net_env.py, respectively. There's no adjustment needed in either file other than toggling between Case 1 and Case 2 (you can read more about the 2 cases in README.md). You can toggle between the 2 cases in the _generate_req function definition.

  3. You can choose to implement your own routing algorithms. This version already chooses dynamically between 3 disjoint paths. I predict that if you choose edges dynamically, it will adversely affect runtime.

  4. You can read more about our evaluation in the paper we added to the repository. In general, our reward system takes the total reward collected over 100 timesteps/requests. Each request can have a randomly assigned holding time of a value between 10 and 19. If a request is allocated, then the reward for that timestep is the holding time. If the request is blocked, then the reward for that timestep is -1. So, the ideal expected total return value is 1,450, assuming 0 requests are blocked.

  5. To run this on your own machine, simply go into the 'src' directory of this repository and run python PPO-runner.py or python DQN-runner.py depending on which RL (Reinforcement Learning) algorithm you want to use.

  6. We only recorded how many requests were successfully allocated and how many were blocked. This is seen through our results from TensorBoard. Another good metric to judge the success of an algorithm is by seeing the utilization of each edge's links (i.e. spectrum allocation) at the end of every 100-timestep round. You can read more about utilization in README.md.

Team-boy commented 1 month ago
  1. The "simple shortest path algorithm" only has the option of choosing the shortest path between a source and destination pair when a new request comes in. This implementation can be found in src/simple_shortest_path_net_env.py. There is no learning rate at all because, obviously, there is nothing to learn. The only reason we decided to include a separate environment for the "simple shortest path algorithm" is because we wanted to compare its results to the actual learning algorithms (i.e. the 3 disjoint paths approach) and display it on TensorBoard.
  2. As mentioned above, there are 2 NetworkEnv variations: one is for the 3 disjoint paths approach and the other is for the simple shortest path algorithm. They can be found in src/net_env.py and src/simple_shortest_path_net_env.py, respectively. There's no adjustment needed in either file other than toggling between Case 1 and Case 2 (you can read more about the 2 cases in README.md). You can toggle between the 2 cases in the _generate_req function definition.
  3. You can choose to implement your own routing algorithms. This version already chooses dynamically between 3 disjoint paths. I predict that if you choose edges dynamically, it will adversely affect runtime.
  4. You can read more about our evaluation in the paper we added to the repository. In general, our reward system takes the total reward collected over 100 timesteps/requests. Each request can have a randomly assigned holding time of a value between 10 and 19. If a request is allocated, then the reward for that timestep is the holding time. If the request is blocked, then the reward for that timestep is -1. So, the ideal expected total return value is 1,450, assuming 0 requests are blocked.
  5. To run this on your own machine, simply go into the 'src' directory of this repository and run python PPO-runner.py or python DQN-runner.py depending on which RL (Reinforcement Learning) algorithm you want to use.
  6. We only recorded how many requests were successfully allocated and how many were blocked. This is seen through our results from TensorBoard. Another good metric to judge the success of an algorithm is by seeing the utilization of each edge's links (i.e. spectrum allocation) at the end of every 100-timestep round. You can read more about utilization in README.md.

Thank you to the developers, I will try to understand first.