Skip to content

Implementation of RSA algorithm (Routing and spectrum allocation) to supply random demands

Notifications You must be signed in to change notification settings

wesleyburlani/routing-and-spectrum-allocation

Repository files navigation

RoutingAndSpectrumAllocation

This project applies the RSA algorithm to supply random demands.

It builds the graph based on 2 ".csv" files where 1 of them contains the graph links and the other contains the graph nodes. Like the follow example:

Nodes file example

Links file example

And after read them, it generates ramdon demands and applies Routing and spectrum allocation(RSA), returning the results on 3 files:

  • demands.json
  • graph.json
  • log.txt

Setup

There are 5 configuration variables to fill on "Program.cs" file:

  • CsvLineSeparator: specifies the character used to separate lines on specified ".csv" inputs files.
  • CsvColumnSeparator: specifies the character used to separate columns on specified ".csv" inputs files.
  • LogPath: specifies a folder path where the program must to save output files.
  • ReadNodesPath: specifies a file path where the program must to read the graph nodes.
  • ReadLinksPath: specifies a file path where the program must to read the graph links.

NuGET dependencies

Program Options

This program contains a lot of different ways to make routing and spectrum alocations. To change it's behavior you need to edit "Program.cs" file setting up the desired behavior changing the dependency injections. The following interfaces must be instanciated:

IRoutingAndSpectrumAllocation

Sets the RSA behavior. It can be instanciated by: SingleRSA, DedicatedProtectionRSA and SharedProtectionRSA. Where:

  • SingleRSA: Fills 1 dedicated allocation on RSA table that means the main path to destiantion node;
  • DedicatedProtectionRSA: Fiils 2 dedicated allocations on RSA table that mens 1 main path and 1 secundary path to destination node;
  • SharedProtectionRSA: Fills 1 dedicated allcation and 1 shared allocation on RSA table that means a main dedicated path to destination a secundary shared path that can be shared with another secundary path from another demand that main paths can't be unavailable simutaneously;

IProgramLogger

Set logs behavior to program output. It can be instanciated by: FileProgramLogger and NullFileProgramLogger. Where:

  • FileProgramLogger: Persists program output on a ".txt" file that the path is specified "LogPath" constant string;
  • NullProgramLogger: Ignores program output;

Running Locally

To run the program locally, you need to run the following commands:

docker-compose run rsa bash //to enter on container
dotnet run & //to execute program in background
cat Output/log.txt // to follow program logs

About

Implementation of RSA algorithm (Routing and spectrum allocation) to supply random demands

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published