virne


Namevirne JSON
Version 0.5.0 PyPI version JSON
download
home_page
SummaryA unified framework for virtual network embedding.
upload_time2023-08-11 08:12:11
maintainer
docs_urlNone
author
requires_python>=3.8
licenseApache License, Version 2.0
keywords network virtualization virtual network embedding reinforcement learning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Virne | <img src="https://img.shields.io/badge/version-0.5.0-blue" />  <img src="https://img.shields.io/pypi/v/virne?label=pypi" />

<p align="center">
  <a href="https://virne.readthedocs.io">Documentation</a> |
  <a href="https://github.com/GeminiLight/sdn-nfv-papers">SDN-NFV Papers</a> |
  <a href="https://github.com/GeminiLight/virne#license">License</a>
</p>

--------------------------------------------------------------------------------

**Virne** is a simulator for **resource allocation problems in network virtualization**, mainly for **virtual network embedding (VNE)**. 
It also is adaptable to VNE's variants, such as **service function chain deployment (SFC Deployment)**, **network slicing**, etc. 
Specifically, it provides a unified interface for various VNE algorithms, and provides a variety of network topologies, network attributes, and RL environments.

Its main characteristics are as follows.

- **Rich Implementations**: Provide 20+ solvers, including exact, heuristic, meta-heuristic, and learning-based algorithms.
- **Extensible Development**: Provide a variety of network topologies, network attributes, and RL environments, which can be easily extended.
- **Light-Weight**: Implement concisely with less necessary dependencies, and can be extended easily for specific algorithms.
        

![](resource/figures/workflow.jpg)

> Virne is still under development. If you have any questions, please open a new issue or contact me via email (wtfly2018@gmail.com)
> 
> - Completing the documentation
> - Implementing more VNE algorithms


### Citation

Please cite our papers if you use Virne in your research.

Our Related Papers

**[ICC, 2021] DRL-SFCP**

```bibtex
@INPROCEEDINGS{tfw-icc-2021-drl-sfcp,
  author={Wang, Tianfu and Fan, Qilin and Li, Xiuhua and Zhang, Xu and Xiong, Qingyu and Fu, Shu and Gao, Min},
  booktitle={ICC 2021 - IEEE International Conference on Communications}, 
  title={DRL-SFCP: Adaptive Service Function Chains Placement with Deep Reinforcement Learning}, 
  year={2021},
  volume={},
  number={},
  pages={1-6},
  doi={10.1109/ICC42927.2021.9500964}
}
```

**[TSC, Reviewing] HRL-ACRA**

### Table of Contents

- [Quick Start](#quick-start)
  - [Installation](#installation)
    - [Install with pip](#install-with-pip)
    - [Install with script](#install-with-script)
  - [Minimal Example](#minimal-example)
- [VNE Problem](#vne-problem)
- [Supported Features](#supported-features)
- [Implemented Algorithms](#implemented-algorithms)
  - [Exact Algorithms](#exact-algorithms)
  - [Heuristic Algorithms](#heuristic-algorithms)
  - [Meta-Heuristic Algorithms](#meta-heuristic-algorithms)
  - [Learning-Based Algorithms](#learning-based-algorithms)

## Quick Start

### Installation

#### Install with pip

```bash
pip install virne
```

#### Install with script

```bash
# only cpu
bash install.sh -c 0

# use cuda (optional version: 10.2, 11.3)
bash install.sh -c 11.3
```

### Minimal Example

```Python
from virne.base import BasicScenario
from virne import Config, REGISTRY, Generator, update_simulation_setting


def run(config):
    print(f"\n{'-' * 20}    Start     {'-' * 20}\n")
    # Load solver info: environment and solver class
    solver_info = REGISTRY.get(config.solver_name)
    Env, Solver = solver_info['env'], solver_info['solver']
    print(f'Use {config.solver_name} Solver (Type = {solver_info["type"]})...\n')

    scenario = BasicScenario.from_config(Env, Solver, config)
    scenario.run()

    print(f"\n{'-' * 20}   Complete   {'-' * 20}\n")


if __name__ == '__main__':
    config = Config(
        solver_name='nrm_rank',
        # p_net_setting_path='customized_p_net_setting_file_path',
        # v_sim_setting_path='customized_v_sim_setting_file_path',
    )
    Generator.generate_dataset(config, p_net=False, v_nets=False, save=False)
    run(config)
```

## VNE Problem

### Brife Defination

![](resource/figures/vne-example.p_net)

### Main Objectives

- Acceptance rate

$$
\text{Acceptance Rate} = \cfrac{\sum_{t=0}^{t=T} \text{Number}(VNR_{accept})}{\sum_{t=0}^{t=T} \text{Number}(VNR_{reject})}
$$

- Long-term revenue

$$
\text{Long-term Revenue} = \sum_{n_v \in N_v}{Revenue(n_v)} + \sum_{e_v \in E_v}{Revenue(e_v)}
$$

- Revenue-to-cost Ratio

$$
\text{Long-term Revenue} = \cfrac{\text{Long-term Revenue}}{\text{Long-term Cost}}
$$

- Running Time

$$
\text{Running Time} = \frac{\text{Time consumption of solving }N\text{ instances}}{N}
$$

- Load Balancing

- Latency Garentee


### QoS Awarenesses (Additional Constraints/ Objectives)

- [x] Position (Node level)
- [x] Latency (Graph, Node and Link level)
- [x] Security (Graph, Node and Link level)
- [ ] Congestion (Graph, Node and Link level)
- [ ] Energy (Graph, Node and Link level)
- [x] Reliability (Graph, Node and Link level)
- [ ] Dynamic (Graph, Node and Link level)
- [ ] Parallelization
- [ ] Privacy

### Mapping Strategy

- Two-Stage
  - In this fromework, the VNE solving process are composed of Node mapping and Edge Mapping.
  - Firstly, the node mapping solution is generate with node mapping algorithm, i.e., Node Ranking
  - Secondly, the BFS algorithm is employed to route the physical link pairs obtained from the node mapping solution. 
- Joint Place and Route
  - The solution of node mapping consists of a sequential placement decision.
  - Simultaneously, the available physical link pairs are routed by BFS algorithm.
- BFS Trails
  - Based on breadth-first search, it expands the search space by exploiting the awareness of restarts.

## Supported Features

- **Adaptation to VNE Variants**
  - Service Function Chain Deployment (SFC Deployment)
  - Network Slicing
- **Diverse Network Topologies**
  - Star Graph: Data Center Network
  - 2D-grid Graph: Grid Network
  - Waxman Graph: General Network
  - Path Graph: Chain-style Network
  - Edge Probabilistic Connection Graph
  - Customlized Topology 
- **Graph/ Node / Link-level Attributes**: 
  - For resources/ constraints/ QoS
  - Graph Level: e.g. the global requirements of virtual network
  - Node level: e.g. Node resource, node position
  - Link level: e.g. Link resource, link latency
- **Multiple RL Environments**
  - Provide serval RL Environments in gym.Env-style
- **Various Simulation Scenarios**
  - Admission control: Reject Early some not cost-effective virtual networks
  - Time window: Developping


## Implemented Algorithms

**Virne** has implemented the following heuristic-based and learning-based algorithms:

### Learning-based Solvers

| Name                           | Command                | Type         | Mapping  | Title                                                        | Publication    | Year | Note |
| ------------------------------ | ---------------------- | ------------ | ------------------------------------------------------------ | -------------- | ---- | ---- | ------------------------------ |
| PG-CNN2 | `pg_cnn2` | `learning`   | `two-stage` | [A Virtual Network EmbeddingAlgorithm Based On Double-LayerReinforcement Learning](https://ieeexplore.ieee.org/document/9500964) | The Computer Journal | 2022 |  |
| A3C-G3C-Seq2Seq* | `a3c_gcn_seq2seq` | `learning` | `joint_pr`   | [DRL-SFCP: Adaptive Service Function Chains Placement with Deep Reinforcement Learning](https://ieeexplore.ieee.org/document/9500964)     | ICC         | 2021 |             |
| PG-CNN-QoS | `pg_cnn_qos` | `learning`   | `two-stage` | [Resource Management and Security Scheme of ICPSs and IoT Based on VNE Algorithm](https://arxiv.org/pdf/2202.01375.pdf) | IoTJ | 2021 |  |
| PG-Seq2Seq      | `pg_seq2seq` | `learning`   | `joint_pr` | [A Continuous-Decision Virtual Network Embedding Scheme Relying on Reinforcement Learning](https://ieeexplore.ieee.org/document/8982091) | TNSM   | 2020 |  |
| GAE-Clustering                    | `gae_clustering`          | `learning`   | `bfs_trials` | [Accelerating Virtual Network Embedding with Graph Neural Networks](https://ieeexplore.ieee.org/document/9269128) | CNSM           | 2020 | Clustering |
| PG-MLP                | `pg_mlp`   | `learning`   | `joint_pr` | [NFVdeep: adaptive online service function chain deployment with deep reinforcement learning](http://ieeexplore.ieee.org/document/9068634/). | IWQOS          | 2019 |  |
| Hopfield-Network          | `hopfield_network` | `learning`   | `two-stage` | [NeuroViNE: A Neural Preprocessor for Your Virtual Network Embedding Algorithm](https://mediatum.ub.tum.de/doc/1449121/document.pdf) | INFOCOM   | 2018 | Subgraph Extraction |
| PG-CNN | `pg_cnn`          | `learning`   | `two-stage` | [A Novel Reinforcement Learning Algorithm for Virtual Network Embedding](https://bura.brunel.ac.uk/bitstream/2438/17673/1/FullText.pdf) | Neurocomputing | 2018 |  |
| MCTS                   | `mcts`              | `learning`   | `two-stage` | [Virtual Network Embedding via Monte Carlo Tree Search](https://www.researchgate.net/profile/Ljiljana-Trajkovic/publication/313873926_Virtual_Network_Embedding_via_Monte_Carlo_Tree_Search/links/5ac0386945851584fa7404f4/Virtual-Network-Embedding-via-Monte-Carlo-Tree-Search.pdf?_sg%5B0%5D=IbJ7vUDENmXiBbfMTzU7pe38Z0gve9tpmZe8Z0178rNWQVa5y6AFGJksV2UA1gPa2Fiohm7X1HzI-1rdAPT5Jg.Edi8Rb3R7d-SAgZ4Jl6Z-AnccOosuWHRn2EFIt8dcGLqnDdaw8vBfh1mKV-HieWT8lpuArIMwCjnyAg4CflgVw.cWgci1nNGkvx6bRqmirSaRRk-bi80Q0gMjvmyL49gbkiYRuKU6Zu1Aswe4xTxC99BNyBH7dYbFH3YyQTzUJczg&_sg%5B1%5D=XE66L-R7TPh36UxeMPExdBq5KyXxwAikDWvZbhvLjlAdwbBQ3MNiZbmBZzwQ0L1ntkXedGL1rZZYqX6LhuHdgQbg5Xi8I7phGNSAPGvh1OJv.Edi8Rb3R7d-SAgZ4Jl6Z-AnccOosuWHRn2EFIt8dcGLqnDdaw8vBfh1mKV-HieWT8lpuArIMwCjnyAg4CflgVw.cWgci1nNGkvx6bRqmirSaRRk-bi80Q0gMjvmyL49gbkiYRuKU6Zu1Aswe4xTxC99BNyBH7dYbFH3YyQTzUJczg&_iepl=) | TCYB           | 2018 | MultiThreading Support |

> `*` means that the algorithm only supports chain-shape virtual networks embedding


### Meta-heuristics Solvers

| Name                           | Command       | Type         | Mapping      | Title                                                        | Publication | Year | Note |
| ------------------------------ | ------------- | ------------ | ------------ | ------------------------------------------------------------ | ----------- | ---- | ------------------------------ |
| NodeRanking-MetaHeuristic          | `**_**`         | `meta-heuristics`   | `joint` | [Virtual network embedding through topology awareness and optimization](https://www.sciencedirect.com/science/article/abs/pii/S1389128612000461) | CN         | 2012 | MultiThreading Support |
| Genetic-Algorithm          | `ga`         | `meta-heuristics`   | `two-stage` | [Virtual network embedding based on modified genetic algorithm](https://link.springer.com/article/10.1007/s12083-017-0609-x#:~:text=Virtual%20network%20embedding%20is%20a,nodes%2C%20the%20goal%20of%20link) | Peer-to-Peer Networking and Applications         | 2019 | MultiThreading Support |
| Tabu-Search          | `ts`         | `meta-heuristics`   | `joint` | [Virtual network forwarding graph embedding based on Tabu Search](https://ieeexplore.ieee.org/document/8171072) | WCSP         | 2017 | MultiThreading Support |
| ParticleSwarmOptimization          | `pso`         | `meta-heuristics`   | `two-stage` | [Energy-Aware Virtual Network Embedding](https://ieeexplore.ieee.org/document/6709811) | TON         | 2014 | MultiThreading Support |
| Ant-Colony-Optimization  | `aco`          | `meta-heuristics` | `joint`     | [Link mapping-oriented ant colony system for virtual network embedding](https://ieeexplore.ieee.org/document/7969445) | CEC         | 2017 | MultiThreading Support |
| AntColony-Optimization  | `aco`          | `meta-heuristics` | `joint`     | [VNE-AC: Virtual Network Embedding Algorithm Based on Ant Colony Metaheuristic](https://www.gta.ufrj.br/ensino/cpe717-2011/VNE-ICC-1.pdf) | ICC         | 2011 | MultiThreading Support |
| Simulated-Annealing  | `sa`          | `meta-heuristics` | `two-stage`     | [FELL: A Flexible Virtual Network Embedding Algorithm with Guaranteed Load Balancing](https://ieeexplore.ieee.org/abstract/document/5962960) | ICC         | 2011 | MultiThreading Support |

**Other Related Papers**
- Particle Swarm Optimization 
  - Xiang Cheng et al. "Virtual network embedding through topology awareness and optimization". CN, 2012.
  - An Song et al. "A Constructive Particle Swarm Optimizer for Virtual Network Embedding". TNSE, 2020.
- Genetic Algorithm
  - Liu Boyang et al. "Virtual Network Embedding Based on Hybrid Adaptive Genetic Algorithm" In ICCC, 2019.
  - Khoa T.D. Nguyen et al. "An Intelligent Parallel Algorithm for Online Virtual Network Embedding". In CITS, 2019.
  - Khoa Nguyen et al. "Efficient Virtual Network Embedding with Node Ranking and Intelligent Link Mapping". In CloudNet, 2020.
  - Khoa Nguyen et al. "Joint Node-Link Algorithm for Embedding Virtual Networks with Conciliation Strategy". In GLOBECOM, 2021.
- Ant Colony Optimization
  - N/A

### Heuristics-based Solvers

| Name                           | Command       | Type         | Mapping      | Title                                                        | Publication | Year | Note |
| ------------------------------ | ------------- | ------------ | ------------ | ------------------------------------------------------------ | ----------- | ---- | ---- |
| PL (Priority of Location)      | `pl_rank`     | `heuristics` | `two-stage`  | [Efficient Virtual Network Embedding of Cloud-Based Data Center Networks into Optical Networks](https://ieeexplore.ieee.org/document/9415134) | TPDS        | 2021 |      |
| NRM (Node Resource Management) | `nrm_rank`    | `heuristics` | `two-stage`  | [Virtual Network Embedding Based on Computing, Network, and Storage Resource Constraints](https://ieeexplore.ieee.org/document/7976281) | IoTJ        | 2018 |      |
| GRC (Global resource capacity) | `grc_rank`    | `heuristics` | `two-stage`  | [Toward Profit-Seeking Virtual Network Embedding Algorithm via Global Resource Capacity](https://ieeexplore.ieee.org/document/6847918) | INFOCOM     | 2014 |      |
| RW-MaxMatch (NodeRank)         | `rw_rank`     | `heuristics` | `two-stage`  | [Virtual Network Embedding Through Topology-Aware Node Ranking](https://dl.acm.org/doi/10.1145/1971162.1971168) | ACM SIGCOMM Computer Communication Review     | 2011 |      |
| RW-BFS (NodeRank)              | `rw_rank_bfs` | `heuristics` | `bfs_trials` | [Virtual Network Embedding Through Topology-Aware Node Ranking](https://dl.acm.org/doi/10.1145/1971162.1971168) | ACM SIGCOMM Computer Communication Review     | 2011 |      |


### Exact Solvers

| Name                                 | Command     | Type      | Mapping   | Title                                                                                                                                               | Publication | Year | Note |
| ------------------------------------ | ----------- | --------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ---- | ---- |
| MIP (Mixed-Integer Programming)  | `mip` | `exact` | `joint` | [ViNEYard: Virtual Network Embedding Algorithms With Coordinated Node and Link Mapping](https://ieeexplore.ieee.org/document/5951812?arnumber=5951812) | TON         | 2012 |      |
| D-Rounding (Deterministic Rounding) | `d_rounding`   | `exact` | `joint` | [ViNEYard: Virtual Network Embedding Algorithms With Coordinated Node and Link Mapping](https://ieeexplore.ieee.org/document/5951812?arnumber=5951812) | TON         | 2012 |      |
| R-Rounding (Random Rounding)        | `r_rounding`   | `exact` | `joint` | [ViNEYard: Virtual Network Embedding Algorithms With Coordinated Node and Link Mapping](https://ieeexplore.ieee.org/document/5951812?arnumber=5951812) | TON         | 2012 |      |

### Simple Baseline Solvers

| Name                                          | Command             | Mapping      |
| --------------------------------------------- | ------------------- | ------------ |
| Random Rank                                   | `random_rank`       | `two-stage`  |
| Random Joint Place and Route                  | `random_joint_pr`   | `joint_pr`   |
| Random Rank Breath First Search               | `random_bfs_trials` | `bfs_trials` |
| Order Rank                                    | `order_rank`        | `two-stage`  |
| Order Joint Place and Route                   | `order_joint_pr`    | `joint_pr`   |
| Order Rank Breath First Search                | `order_bfs_trials`  | `bfs_trials` |
| First Fit Decreasing Rank                     | `ffd_rank`          | `two-stage`  |
| First Fit Decreasing Joint Place and Route    | `ffd_joint_pr`      | `joint_pr`   |
| First Fit Decreasing Rank Breath First Search | `ffd_bfs_trials`    | `bfs_trials` |


## To-do List

### Environment Modeling

- [ ] `ADD` `Scenario` Window Batch Processing
- [x] `ADD` `Environment` Check Attributes of p_net and v_net
- [x] `ADD` `Environment` Latency Constraint
- [x] `ADD` `Controller` Check graph constraints
- [x] `ADD` `Controller` Multi-commodity flow
- [x] `ADD` `Environment` QoS level Constraints
- [x] `ADD` `Recorder` Count partial solutions' information
- [x] `ADD` `Enironment` Early rejection (Admission control)
- [x] `ADD` `Environment` Multi-Resources Attributes
- [x] `ADD` `Environment` Position Constraint
- [x] `ADD` `Recorder` Count Running physical network nodes

### Algorithm Implementations

| Name            | Command          | Type         | Mapping     | Title                                                        | Publication | Year | Note |
| --------------- | ---------------- | ------------ | ----------- | ------------------------------------------------------------ | ----------- | --------------- | --------------- |
| PG-Conv-QoS-Security | `pg_cnn_qs` | `learning`   | `joint`     | [VNE Solution for Network Differentiated QoS and Security Requirements: From the Perspective of Deep Reinforcement Learning](https://arxiv.org/pdf/2202.01362.pdf) | arXiv        |         | Security |
| DDPG-Attention* | `ddpg_attention` | `learning`   | `joint`     | [A-DDPG: Attention Mechanism-based Deep Reinforcement Learning for NFV](https://research.tudelft.nl/en/publications/a-ddpg-attention-mechanism-based-deep-reinforcement-learning-for-) | IWQOS       | 2021   |  |
| MUVINE          | `mu`        | `learning`   | `joint`     | [MUVINE: Multi-stage Virtual Network Embedding in Cloud Data Centers using Reinforcement Learning based Predictions](https://arxiv.org/pdf/2111.02737.pdf) | JSAC        | 2020    | Admission Control |
| TD      | `td`      | `learning`   | `two-stage` | [VNE-TD: A virtual network embedding algorithm based on temporal-difference learning](https://www.sciencedirect.com/science/article/pii/S138912861830584X?via%3Dihub) | CN          | 2019      |  |
| RNN          | `rnn`         | `learning`   | `two-stage` | [Boost Online Virtual Network Embedding: Using Neural Networks for Admission Control](https://mediatum.ub.tum.de/doc/1346092/1346092.pdf) | CNSM        | 2016    | Admission Control |

### Module Testing

#### config

- [x] `config`

#### data

- [x] `data.attribute`
- [x] `data.network`
- [x] `data.physical_network`
- [x] `data.virtual_network`
- [x] `data.v_net_simulator`

#### solver

- [x] `base.recorder`
- [x] `base.controller`
- [x] `base.enviroment`
- [x] `solver.rank.node_rank`
- [x] `solver.rank.link_rank`
- [x] `solver.heuristic`
- [x] `solver.learning.mcts`
- [ ] ...

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "virne",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "Network Virtualization,Virtual Network Embedding,Reinforcement Learning",
    "author": "",
    "author_email": "GeminiLight <wtfly2018@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/77/b4/e6274476669f92a7f1b774c479ce8850488e34e8f6bda461de670964a1a4/virne-0.5.0.tar.gz",
    "platform": null,
    "description": "# Virne | <img src=\"https://img.shields.io/badge/version-0.5.0-blue\" />  <img src=\"https://img.shields.io/pypi/v/virne?label=pypi\" />\n\n<p align=\"center\">\n  <a href=\"https://virne.readthedocs.io\">Documentation</a> |\n  <a href=\"https://github.com/GeminiLight/sdn-nfv-papers\">SDN-NFV Papers</a> |\n  <a href=\"https://github.com/GeminiLight/virne#license\">License</a>\n</p>\n\n--------------------------------------------------------------------------------\n\n**Virne** is a simulator for **resource allocation problems in network virtualization**, mainly for **virtual network embedding (VNE)**. \nIt also is adaptable to VNE's variants, such as **service function chain deployment (SFC Deployment)**, **network slicing**, etc. \nSpecifically, it provides a unified interface for various VNE algorithms, and provides a variety of network topologies, network attributes, and RL environments.\n\nIts main characteristics are as follows.\n\n- **Rich Implementations**: Provide 20+ solvers, including exact, heuristic, meta-heuristic, and learning-based algorithms.\n- **Extensible Development**: Provide a variety of network topologies, network attributes, and RL environments, which can be easily extended.\n- **Light-Weight**: Implement concisely with less necessary dependencies, and can be extended easily for specific algorithms.\n        \n\n![](resource/figures/workflow.jpg)\n\n> Virne is still under development. If you have any questions, please open a new issue or contact me via email (wtfly2018@gmail.com)\n> \n> - Completing the documentation\n> - Implementing more VNE algorithms\n\n\n### Citation\n\nPlease cite our papers if you use Virne in your research.\n\nOur Related Papers\n\n**[ICC, 2021] DRL-SFCP**\n\n```bibtex\n@INPROCEEDINGS{tfw-icc-2021-drl-sfcp,\n  author={Wang, Tianfu and Fan, Qilin and Li, Xiuhua and Zhang, Xu and Xiong, Qingyu and Fu, Shu and Gao, Min},\n  booktitle={ICC 2021 - IEEE International Conference on Communications}, \n  title={DRL-SFCP: Adaptive Service Function Chains Placement with Deep Reinforcement Learning}, \n  year={2021},\n  volume={},\n  number={},\n  pages={1-6},\n  doi={10.1109/ICC42927.2021.9500964}\n}\n```\n\n**[TSC, Reviewing] HRL-ACRA**\n\n### Table of Contents\n\n- [Quick Start](#quick-start)\n  - [Installation](#installation)\n    - [Install with pip](#install-with-pip)\n    - [Install with script](#install-with-script)\n  - [Minimal Example](#minimal-example)\n- [VNE Problem](#vne-problem)\n- [Supported Features](#supported-features)\n- [Implemented Algorithms](#implemented-algorithms)\n  - [Exact Algorithms](#exact-algorithms)\n  - [Heuristic Algorithms](#heuristic-algorithms)\n  - [Meta-Heuristic Algorithms](#meta-heuristic-algorithms)\n  - [Learning-Based Algorithms](#learning-based-algorithms)\n\n## Quick Start\n\n### Installation\n\n#### Install with pip\n\n```bash\npip install virne\n```\n\n#### Install with script\n\n```bash\n# only cpu\nbash install.sh -c 0\n\n# use cuda (optional version: 10.2, 11.3)\nbash install.sh -c 11.3\n```\n\n### Minimal Example\n\n```Python\nfrom virne.base import BasicScenario\nfrom virne import Config, REGISTRY, Generator, update_simulation_setting\n\n\ndef run(config):\n    print(f\"\\n{'-' * 20}    Start     {'-' * 20}\\n\")\n    # Load solver info: environment and solver class\n    solver_info = REGISTRY.get(config.solver_name)\n    Env, Solver = solver_info['env'], solver_info['solver']\n    print(f'Use {config.solver_name} Solver (Type = {solver_info[\"type\"]})...\\n')\n\n    scenario = BasicScenario.from_config(Env, Solver, config)\n    scenario.run()\n\n    print(f\"\\n{'-' * 20}   Complete   {'-' * 20}\\n\")\n\n\nif __name__ == '__main__':\n    config = Config(\n        solver_name='nrm_rank',\n        # p_net_setting_path='customized_p_net_setting_file_path',\n        # v_sim_setting_path='customized_v_sim_setting_file_path',\n    )\n    Generator.generate_dataset(config, p_net=False, v_nets=False, save=False)\n    run(config)\n```\n\n## VNE Problem\n\n### Brife Defination\n\n![](resource/figures/vne-example.p_net)\n\n### Main Objectives\n\n- Acceptance rate\n\n$$\n\\text{Acceptance Rate} = \\cfrac{\\sum_{t=0}^{t=T} \\text{Number}(VNR_{accept})}{\\sum_{t=0}^{t=T} \\text{Number}(VNR_{reject})}\n$$\n\n- Long-term revenue\n\n$$\n\\text{Long-term Revenue} = \\sum_{n_v \\in N_v}{Revenue(n_v)} + \\sum_{e_v \\in E_v}{Revenue(e_v)}\n$$\n\n- Revenue-to-cost Ratio\n\n$$\n\\text{Long-term Revenue} = \\cfrac{\\text{Long-term Revenue}}{\\text{Long-term Cost}}\n$$\n\n- Running Time\n\n$$\n\\text{Running Time} = \\frac{\\text{Time consumption of solving }N\\text{ instances}}{N}\n$$\n\n- Load Balancing\n\n- Latency Garentee\n\n\n### QoS Awarenesses (Additional Constraints/ Objectives)\n\n- [x] Position (Node level)\n- [x] Latency (Graph, Node and Link level)\n- [x] Security (Graph, Node and Link level)\n- [ ] Congestion (Graph, Node and Link level)\n- [ ] Energy (Graph, Node and Link level)\n- [x] Reliability (Graph, Node and Link level)\n- [ ] Dynamic (Graph, Node and Link level)\n- [ ] Parallelization\n- [ ] Privacy\n\n### Mapping Strategy\n\n- Two-Stage\n  - In this fromework, the VNE solving process are composed of Node mapping and Edge Mapping.\n  - Firstly, the node mapping solution is generate with node mapping algorithm, i.e., Node Ranking\n  - Secondly, the BFS algorithm is employed to route the physical link pairs obtained from the node mapping solution. \n- Joint Place and Route\n  - The solution of node mapping consists of a sequential placement decision.\n  - Simultaneously, the available physical link pairs are routed by BFS algorithm.\n- BFS Trails\n  - Based on breadth-first search, it expands the search space by exploiting the awareness of restarts.\n\n## Supported Features\n\n- **Adaptation to VNE Variants**\n  - Service Function Chain Deployment (SFC Deployment)\n  - Network Slicing\n- **Diverse Network Topologies**\n  - Star Graph: Data Center Network\n  - 2D-grid Graph: Grid Network\n  - Waxman Graph: General Network\n  - Path Graph: Chain-style Network\n  - Edge Probabilistic Connection Graph\n  - Customlized Topology \n- **Graph/ Node / Link-level Attributes**: \n  - For resources/ constraints/ QoS\n  - Graph Level: e.g. the global requirements of virtual network\n  - Node level: e.g. Node resource, node position\n  - Link level: e.g. Link resource, link latency\n- **Multiple RL Environments**\n  - Provide serval RL Environments in gym.Env-style\n- **Various Simulation Scenarios**\n  - Admission control: Reject Early some not cost-effective virtual networks\n  - Time window: Developping\n\n\n## Implemented Algorithms\n\n**Virne** has implemented the following heuristic-based and learning-based algorithms:\n\n### Learning-based Solvers\n\n| Name                           | Command                | Type         | Mapping  | Title                                                        | Publication    | Year | Note |\n| ------------------------------ | ---------------------- | ------------ | ------------------------------------------------------------ | -------------- | ---- | ---- | ------------------------------ |\n| PG-CNN2 | `pg_cnn2` | `learning`   | `two-stage` | [A Virtual Network EmbeddingAlgorithm Based On Double-LayerReinforcement Learning](https://ieeexplore.ieee.org/document/9500964) | The Computer Journal | 2022 |  |\n| A3C-G3C-Seq2Seq* | `a3c_gcn_seq2seq` | `learning` | `joint_pr`   | [DRL-SFCP: Adaptive Service Function Chains Placement with Deep Reinforcement Learning](https://ieeexplore.ieee.org/document/9500964)     | ICC         | 2021 |             |\n| PG-CNN-QoS | `pg_cnn_qos` | `learning`   | `two-stage` | [Resource Management and Security Scheme of ICPSs and IoT Based on VNE Algorithm](https://arxiv.org/pdf/2202.01375.pdf) | IoTJ | 2021 |  |\n| PG-Seq2Seq      | `pg_seq2seq` | `learning`   | `joint_pr` | [A Continuous-Decision Virtual Network Embedding Scheme Relying on Reinforcement Learning](https://ieeexplore.ieee.org/document/8982091) | TNSM   | 2020 |  |\n| GAE-Clustering                    | `gae_clustering`          | `learning`   | `bfs_trials` | [Accelerating Virtual Network Embedding with Graph Neural Networks](https://ieeexplore.ieee.org/document/9269128) | CNSM           | 2020 | Clustering |\n| PG-MLP                | `pg_mlp`   | `learning`   | `joint_pr` | [NFVdeep: adaptive online service function chain deployment with deep reinforcement learning](http://ieeexplore.ieee.org/document/9068634/). | IWQOS          | 2019 |  |\n| Hopfield-Network          | `hopfield_network` | `learning`   | `two-stage` | [NeuroViNE: A Neural Preprocessor for Your Virtual Network Embedding Algorithm](https://mediatum.ub.tum.de/doc/1449121/document.pdf) | INFOCOM   | 2018 | Subgraph Extraction |\n| PG-CNN | `pg_cnn`          | `learning`   | `two-stage` | [A Novel Reinforcement Learning Algorithm for Virtual Network Embedding](https://bura.brunel.ac.uk/bitstream/2438/17673/1/FullText.pdf) | Neurocomputing | 2018 |  |\n| MCTS                   | `mcts`              | `learning`   | `two-stage` | [Virtual Network Embedding via Monte Carlo Tree Search](https://www.researchgate.net/profile/Ljiljana-Trajkovic/publication/313873926_Virtual_Network_Embedding_via_Monte_Carlo_Tree_Search/links/5ac0386945851584fa7404f4/Virtual-Network-Embedding-via-Monte-Carlo-Tree-Search.pdf?_sg%5B0%5D=IbJ7vUDENmXiBbfMTzU7pe38Z0gve9tpmZe8Z0178rNWQVa5y6AFGJksV2UA1gPa2Fiohm7X1HzI-1rdAPT5Jg.Edi8Rb3R7d-SAgZ4Jl6Z-AnccOosuWHRn2EFIt8dcGLqnDdaw8vBfh1mKV-HieWT8lpuArIMwCjnyAg4CflgVw.cWgci1nNGkvx6bRqmirSaRRk-bi80Q0gMjvmyL49gbkiYRuKU6Zu1Aswe4xTxC99BNyBH7dYbFH3YyQTzUJczg&_sg%5B1%5D=XE66L-R7TPh36UxeMPExdBq5KyXxwAikDWvZbhvLjlAdwbBQ3MNiZbmBZzwQ0L1ntkXedGL1rZZYqX6LhuHdgQbg5Xi8I7phGNSAPGvh1OJv.Edi8Rb3R7d-SAgZ4Jl6Z-AnccOosuWHRn2EFIt8dcGLqnDdaw8vBfh1mKV-HieWT8lpuArIMwCjnyAg4CflgVw.cWgci1nNGkvx6bRqmirSaRRk-bi80Q0gMjvmyL49gbkiYRuKU6Zu1Aswe4xTxC99BNyBH7dYbFH3YyQTzUJczg&_iepl=) | TCYB           | 2018 | MultiThreading Support |\n\n> `*` means that the algorithm only supports chain-shape virtual networks embedding\n\n\n### Meta-heuristics Solvers\n\n| Name                           | Command       | Type         | Mapping      | Title                                                        | Publication | Year | Note |\n| ------------------------------ | ------------- | ------------ | ------------ | ------------------------------------------------------------ | ----------- | ---- | ------------------------------ |\n| NodeRanking-MetaHeuristic          | `**_**`         | `meta-heuristics`   | `joint` | [Virtual network embedding through topology awareness and optimization](https://www.sciencedirect.com/science/article/abs/pii/S1389128612000461) | CN         | 2012 | MultiThreading Support |\n| Genetic-Algorithm          | `ga`         | `meta-heuristics`   | `two-stage` | [Virtual network embedding based on modified genetic algorithm](https://link.springer.com/article/10.1007/s12083-017-0609-x#:~:text=Virtual%20network%20embedding%20is%20a,nodes%2C%20the%20goal%20of%20link) | Peer-to-Peer Networking and Applications         | 2019 | MultiThreading Support |\n| Tabu-Search          | `ts`         | `meta-heuristics`   | `joint` | [Virtual network forwarding graph embedding based on Tabu Search](https://ieeexplore.ieee.org/document/8171072) | WCSP         | 2017 | MultiThreading Support |\n| ParticleSwarmOptimization          | `pso`         | `meta-heuristics`   | `two-stage` | [Energy-Aware Virtual Network Embedding](https://ieeexplore.ieee.org/document/6709811) | TON         | 2014 | MultiThreading Support |\n| Ant-Colony-Optimization  | `aco`          | `meta-heuristics` | `joint`     | [Link mapping-oriented ant colony system for virtual network embedding](https://ieeexplore.ieee.org/document/7969445) | CEC         | 2017 | MultiThreading Support |\n| AntColony-Optimization  | `aco`          | `meta-heuristics` | `joint`     | [VNE-AC: Virtual Network Embedding Algorithm Based on Ant Colony Metaheuristic](https://www.gta.ufrj.br/ensino/cpe717-2011/VNE-ICC-1.pdf) | ICC         | 2011 | MultiThreading Support |\n| Simulated-Annealing  | `sa`          | `meta-heuristics` | `two-stage`     | [FELL: A Flexible Virtual Network Embedding Algorithm with Guaranteed Load Balancing](https://ieeexplore.ieee.org/abstract/document/5962960) | ICC         | 2011 | MultiThreading Support |\n\n**Other Related Papers**\n- Particle Swarm Optimization \n  - Xiang Cheng et al. \"Virtual network embedding through topology awareness and optimization\". CN, 2012.\n  - An Song et al. \"A Constructive Particle Swarm Optimizer for Virtual Network Embedding\". TNSE, 2020.\n- Genetic Algorithm\n  - Liu Boyang et al. \"Virtual Network Embedding Based on Hybrid Adaptive Genetic Algorithm\" In ICCC, 2019.\n  - Khoa T.D. Nguyen et al. \"An Intelligent Parallel Algorithm for Online Virtual Network Embedding\". In CITS, 2019.\n  - Khoa Nguyen et al. \"Efficient Virtual Network Embedding with Node Ranking and Intelligent Link Mapping\". In CloudNet, 2020.\n  - Khoa Nguyen et al. \"Joint Node-Link Algorithm for Embedding Virtual Networks with Conciliation Strategy\". In GLOBECOM, 2021.\n- Ant Colony Optimization\n  - N/A\n\n### Heuristics-based Solvers\n\n| Name                           | Command       | Type         | Mapping      | Title                                                        | Publication | Year | Note |\n| ------------------------------ | ------------- | ------------ | ------------ | ------------------------------------------------------------ | ----------- | ---- | ---- |\n| PL (Priority of Location)      | `pl_rank`     | `heuristics` | `two-stage`  | [Efficient Virtual Network Embedding of Cloud-Based Data Center Networks into Optical Networks](https://ieeexplore.ieee.org/document/9415134) | TPDS        | 2021 |      |\n| NRM (Node Resource Management) | `nrm_rank`    | `heuristics` | `two-stage`  | [Virtual Network Embedding Based on Computing, Network, and Storage Resource Constraints](https://ieeexplore.ieee.org/document/7976281) | IoTJ        | 2018 |      |\n| GRC (Global resource capacity) | `grc_rank`    | `heuristics` | `two-stage`  | [Toward Profit-Seeking Virtual Network Embedding Algorithm via Global Resource Capacity](https://ieeexplore.ieee.org/document/6847918) | INFOCOM     | 2014 |      |\n| RW-MaxMatch (NodeRank)         | `rw_rank`     | `heuristics` | `two-stage`  | [Virtual Network Embedding Through Topology-Aware Node Ranking](https://dl.acm.org/doi/10.1145/1971162.1971168) | ACM SIGCOMM Computer Communication Review     | 2011 |      |\n| RW-BFS (NodeRank)              | `rw_rank_bfs` | `heuristics` | `bfs_trials` | [Virtual Network Embedding Through Topology-Aware Node Ranking](https://dl.acm.org/doi/10.1145/1971162.1971168) | ACM SIGCOMM Computer Communication Review     | 2011 |      |\n\n\n### Exact Solvers\n\n| Name                                 | Command     | Type      | Mapping   | Title                                                                                                                                               | Publication | Year | Note |\n| ------------------------------------ | ----------- | --------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ---- | ---- |\n| MIP (Mixed-Integer Programming)  | `mip` | `exact` | `joint` | [ViNEYard: Virtual Network Embedding Algorithms With Coordinated Node and Link Mapping](https://ieeexplore.ieee.org/document/5951812?arnumber=5951812) | TON         | 2012 |      |\n| D-Rounding (Deterministic Rounding) | `d_rounding`   | `exact` | `joint` | [ViNEYard: Virtual Network Embedding Algorithms With Coordinated Node and Link Mapping](https://ieeexplore.ieee.org/document/5951812?arnumber=5951812) | TON         | 2012 |      |\n| R-Rounding (Random Rounding)        | `r_rounding`   | `exact` | `joint` | [ViNEYard: Virtual Network Embedding Algorithms With Coordinated Node and Link Mapping](https://ieeexplore.ieee.org/document/5951812?arnumber=5951812) | TON         | 2012 |      |\n\n### Simple Baseline Solvers\n\n| Name                                          | Command             | Mapping      |\n| --------------------------------------------- | ------------------- | ------------ |\n| Random Rank                                   | `random_rank`       | `two-stage`  |\n| Random Joint Place and Route                  | `random_joint_pr`   | `joint_pr`   |\n| Random Rank Breath First Search               | `random_bfs_trials` | `bfs_trials` |\n| Order Rank                                    | `order_rank`        | `two-stage`  |\n| Order Joint Place and Route                   | `order_joint_pr`    | `joint_pr`   |\n| Order Rank Breath First Search                | `order_bfs_trials`  | `bfs_trials` |\n| First Fit Decreasing Rank                     | `ffd_rank`          | `two-stage`  |\n| First Fit Decreasing Joint Place and Route    | `ffd_joint_pr`      | `joint_pr`   |\n| First Fit Decreasing Rank Breath First Search | `ffd_bfs_trials`    | `bfs_trials` |\n\n\n## To-do List\n\n### Environment Modeling\n\n- [ ] `ADD` `Scenario` Window Batch Processing\n- [x] `ADD` `Environment` Check Attributes of p_net and v_net\n- [x] `ADD` `Environment` Latency Constraint\n- [x] `ADD` `Controller` Check graph constraints\n- [x] `ADD` `Controller` Multi-commodity flow\n- [x] `ADD` `Environment` QoS level Constraints\n- [x] `ADD` `Recorder` Count partial solutions' information\n- [x] `ADD` `Enironment` Early rejection (Admission control)\n- [x] `ADD` `Environment` Multi-Resources Attributes\n- [x] `ADD` `Environment` Position Constraint\n- [x] `ADD` `Recorder` Count Running physical network nodes\n\n### Algorithm Implementations\n\n| Name            | Command          | Type         | Mapping     | Title                                                        | Publication | Year | Note |\n| --------------- | ---------------- | ------------ | ----------- | ------------------------------------------------------------ | ----------- | --------------- | --------------- |\n| PG-Conv-QoS-Security | `pg_cnn_qs` | `learning`   | `joint`     | [VNE Solution for Network Differentiated QoS and Security Requirements: From the Perspective of Deep Reinforcement Learning](https://arxiv.org/pdf/2202.01362.pdf) | arXiv        |         | Security |\n| DDPG-Attention* | `ddpg_attention` | `learning`   | `joint`     | [A-DDPG: Attention Mechanism-based Deep Reinforcement Learning for NFV](https://research.tudelft.nl/en/publications/a-ddpg-attention-mechanism-based-deep-reinforcement-learning-for-) | IWQOS       | 2021   |  |\n| MUVINE          | `mu`        | `learning`   | `joint`     | [MUVINE: Multi-stage Virtual Network Embedding in Cloud Data Centers using Reinforcement Learning based Predictions](https://arxiv.org/pdf/2111.02737.pdf) | JSAC        | 2020    | Admission Control |\n| TD      | `td`      | `learning`   | `two-stage` | [VNE-TD: A virtual network embedding algorithm based on temporal-difference learning](https://www.sciencedirect.com/science/article/pii/S138912861830584X?via%3Dihub) | CN          | 2019      |  |\n| RNN          | `rnn`         | `learning`   | `two-stage` | [Boost Online Virtual Network Embedding: Using Neural Networks for Admission Control](https://mediatum.ub.tum.de/doc/1346092/1346092.pdf) | CNSM        | 2016    | Admission Control |\n\n### Module Testing\n\n#### config\n\n- [x] `config`\n\n#### data\n\n- [x] `data.attribute`\n- [x] `data.network`\n- [x] `data.physical_network`\n- [x] `data.virtual_network`\n- [x] `data.v_net_simulator`\n\n#### solver\n\n- [x] `base.recorder`\n- [x] `base.controller`\n- [x] `base.enviroment`\n- [x] `solver.rank.node_rank`\n- [x] `solver.rank.link_rank`\n- [x] `solver.heuristic`\n- [x] `solver.learning.mcts`\n- [ ] ...\n",
    "bugtrack_url": null,
    "license": "Apache License, Version 2.0",
    "summary": "A unified framework for virtual network embedding.",
    "version": "0.5.0",
    "project_urls": {
        "Bug Report": "https://github.com/GeminiLight/virne/issues",
        "Documentation": "https://virne.readthedocs.io",
        "Homepage": "https://github.com/GeminiLight/virne",
        "Repository": "https://github.com/GeminiLight/virne"
    },
    "split_keywords": [
        "network virtualization",
        "virtual network embedding",
        "reinforcement learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d15f2e8c7d6004a5c134f26b26477f4952365437ecebd77b07184a700165deaa",
                "md5": "19a50f8134705103af4b9d4b80a15fc0",
                "sha256": "95c801f30796f0c263837af83e06541b2a70310cb707b38b6b6c9f6b21cfa0b4"
            },
            "downloads": -1,
            "filename": "virne-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "19a50f8134705103af4b9d4b80a15fc0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 180117,
            "upload_time": "2023-08-11T08:12:08",
            "upload_time_iso_8601": "2023-08-11T08:12:08.559417Z",
            "url": "https://files.pythonhosted.org/packages/d1/5f/2e8c7d6004a5c134f26b26477f4952365437ecebd77b07184a700165deaa/virne-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "77b4e6274476669f92a7f1b774c479ce8850488e34e8f6bda461de670964a1a4",
                "md5": "2f30b3c4b1c705fc27457b7623c3f440",
                "sha256": "2eae0e6146d681f24cbfb30b5f32496ea572788845efbf5aee7550fefb3e716e"
            },
            "downloads": -1,
            "filename": "virne-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2f30b3c4b1c705fc27457b7623c3f440",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 136588,
            "upload_time": "2023-08-11T08:12:11",
            "upload_time_iso_8601": "2023-08-11T08:12:11.084522Z",
            "url": "https://files.pythonhosted.org/packages/77/b4/e6274476669f92a7f1b774c479ce8850488e34e8f6bda461de670964a1a4/virne-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-11 08:12:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "GeminiLight",
    "github_project": "virne",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "virne"
}
        
Elapsed time: 0.19736s