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:
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
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.
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:
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;
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;
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