Table of Contents
NFOpt (Network Flow Optimizer) is a tool designed to optimize network flow by setting up problems as Linear Programming (LP) minimization problems. The optimizer can generate a baseline using uniform path splitting ratios for traffic, while available optimization models (average utilization, maximum utilization, and squared utilization) yield optimized ratios and utilization. Additionally, it can also be used to solve a multi-commodity flow problem over the network resulting in new optimized paths and their respective ratios.
- Generates baseline with uniform path splitting ratios
- Optimizes network flow using LP with option for several minimization objectives
- Average Utilization
- Maximum Utilization
- Squared Utilization
- Utilizes multicommodity flow problem for path optimization
- Python 3.x
- Poetry
- A Gurobi license
- Clone the repository:
git clone https://github.com/sabotack/NFOpt.git cd NFOpt
- Install the required dependencies:
poetry install
- Set up environment variables:
- Create a new file named:
variables.env
- Edit
variables.env
to include the necessary environment variables listed invariables.env-example
- Create a new file named:
Before you can start using the tool, ensure the following steps are completed:
- Data Formatting: Make sure your data is formatted according to the examples provided in the
sample-data
directory. - Environment Variables: Set the environment variable for the data directory correctly in the
variables.env
file.
You can use thevariables.env-example
file as a reference for the required environment variables and their values.
Renamevariables.env-example
to.env
and update it with the appropriate information.
-
Running baseline calculations:
poetry run nfopt baseline [day]
where [day] is an optional argument describing the day of data to use as an integer (default is 1).
-
Running optimization models:
poetry run nfopt type [day]
where type can be either 'average', 'max', 'squared' or 'paths'.
Argument | Shortened | Description |
---|---|---|
--help |
-h |
Displays information about all available arguments. |
--use-ratios |
-ur |
Use existing path ratios for calculations, requires DAY , TYPE , and DATE in the format 1 squared 20240131 . DAY is the day of data the ratios you want to use are from. TYPE is the type of optimization that the ratios are from. DATE is the date the ratios are from. |
--use-paths |
-up |
Use existing paths for calculations, requires DAY , DATE , and USERATIOS? (True or False ) in the format 1 20240131 False . DAY is the day of data the paths are from. DATE is the date the paths are from. USERATIOS indicates whether the ratios associated with the paths should be used or if new ones should be calculated instead. |
--save-lp-models |
-slpm |
Save LP models of optimization to a file. |
- sabotack (Ali Sajad Khorami)
- EmilML (Emil Monrad Laursen)
- SBejer (Simon Mikkelsen Bejer)
- ViktorPlatz (Viktor Platz)