Home

Awesome

<h1 align="center">Virne</h1> <div align="center"> <img src="https://img.shields.io/badge/version-0.5.0-blue" /> <img src="https://img.shields.io/pypi/v/virne?label=pypi" /> <img src="https://img.shields.io/badge/license-Apache--2.0-green" /> </div> <p align="center"> <a href="https://virne.readthedocs.io">Documentation</a> | <a href="https://github.com/GeminiLight/virne?tab=readme-ov-file#citations">Citations</a> | <a href="https://github.com/GeminiLight/sdn-nfv-papers">SDN-NFV Papers</a> </p>

Virne is a simulator designed to address resource allocation problems in network virtualization. This category of problems is often referred to by various names, including:

The main goal of Virne is to provide a unified and flexible framework for solving these problems. Its main characteristics are as follows.

Virne is still under development. If you have any questions, please open a new issue or contact me via email (wtfly2018@gmail.com)

Citations

:sparkles: If you find Virne helpful to your research, please feel free to cite our related papers:heart:

[IJCAI, 2024] FlagVNE (paper & code)

@INPROCEEDINGS{ijcai-2024-flagvne,
  title={FlagVNE: A Flexible and Generalizable RL Framework for Network Resource Allocation},
  author={Wang, Tianfu and Fan, Qilin and Wang, Chao and Ding, Leilei and Yuan, Nicholas Jing and Xiong, Hui},
  booktitle={Proceedings of the 33rd International Joint Conference on Artificial Intelligence},
  year={2024},
}

[TSC, 2023] HRL-ACRA (paper & code)

@ARTICLE{tfwang-tsc-2023-hrl-acra,
  author={Wang, Tianfu and Shen, Li and Fan, Qilin and Xu, Tong and Liu, Tongliang and Xiong, Hui},
  journal={IEEE Transactions on Services Computing},
  title={Joint Admission Control and Resource Allocation of Virtual Network Embedding Via Hierarchical Deep Reinforcement Learning},
  volume={17},
  number={03},
  pages={1001--1015},
  year={2024},
  doi={10.1109/TSC.2023.3326539}
}

[ICC, 2021] DRL-SFCP (paper & code)

@INPROCEEDINGS{tfwang-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},
  pages={1-6},
  doi={10.1109/ICC42927.2021.9500964}
}

Table of Contents

Quick Start

Installation

Install with pip

pip install virne

Install with script

# only cpu
bash install.sh -c 0

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

Minimal Example

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)

Supported Features

Implemented Algorithms

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

Mapping Strategies

Learning-based Solvers

NameCommandTypeMappingTitlePublicationYearNote
PG-CNN2pg_cnn2learningtwo-stageA Virtual Network EmbeddingAlgorithm Based On Double-LayerReinforcement LearningThe Computer Journal2022
A3C-G3C-Seq2Seq*a3c_gcn_seq2seqlearningjoint_prDRL-SFCP: Adaptive Service Function Chains Placement with Deep Reinforcement LearningICC2021
PG-CNN-QoSpg_cnn_qoslearningtwo-stageResource Management and Security Scheme of ICPSs and IoT Based on VNE AlgorithmIoTJ2021
PG-Seq2Seqpg_seq2seqlearningjoint_prA Continuous-Decision Virtual Network Embedding Scheme Relying on Reinforcement LearningTNSM2020
GAE-Clusteringgae_clusteringlearningbfs_trialsAccelerating Virtual Network Embedding with Graph Neural NetworksCNSM2020Clustering
PG-MLPpg_mlplearningjoint_prNFVdeep: adaptive online service function chain deployment with deep reinforcement learning.IWQOS2019
Hopfield-Networkhopfield_networklearningtwo-stageNeuroViNE: A Neural Preprocessor for Your Virtual Network Embedding AlgorithmINFOCOM2018Subgraph Extraction
PG-CNNpg_cnnlearningtwo-stageA Novel Reinforcement Learning Algorithm for Virtual Network EmbeddingNeurocomputing2018
MCTSmctslearningtwo-stageVirtual Network Embedding via Monte Carlo Tree SearchTCYB2018MultiThreading Support

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

Meta-heuristics Solvers

NameCommandTypeMappingTitlePublicationYearNote
NodeRanking-MetaHeuristic**_**meta-heuristicsjointVirtual network embedding through topology awareness and optimizationCN2012MultiThreading Support
Genetic-Algorithmgameta-heuristicstwo-stageVirtual network embedding based on modified genetic algorithmPeer-to-Peer Networking and Applications2019MultiThreading Support
Tabu-Searchtsmeta-heuristicsjointVirtual network forwarding graph embedding based on Tabu SearchWCSP2017MultiThreading Support
ParticleSwarmOptimizationpsometa-heuristicstwo-stageEnergy-Aware Virtual Network EmbeddingTON2014MultiThreading Support
Ant-Colony-Optimizationacometa-heuristicsjointLink mapping-oriented ant colony system for virtual network embeddingCEC2017MultiThreading Support
AntColony-Optimizationacometa-heuristicsjointVNE-AC: Virtual Network Embedding Algorithm Based on Ant Colony MetaheuristicICC2011MultiThreading Support
Simulated-Annealingsameta-heuristicstwo-stageFELL: A Flexible Virtual Network Embedding Algorithm with Guaranteed Load BalancingICC2011MultiThreading Support

Other Related Papers

Heuristics-based Solvers

NameCommandTypeMappingTitlePublicationYearNote
PL (Priority of Location)pl_rankheuristicstwo-stageEfficient Virtual Network Embedding of Cloud-Based Data Center Networks into Optical NetworksTPDS2021
NRM (Node Resource Management)nrm_rankheuristicstwo-stageVirtual Network Embedding Based on Computing, Network, and Storage Resource ConstraintsIoTJ2018
GRC (Global resource capacity)grc_rankheuristicstwo-stageToward Profit-Seeking Virtual Network Embedding Algorithm via Global Resource CapacityINFOCOM2014
RW-MaxMatch (NodeRank)rw_rankheuristicstwo-stageVirtual Network Embedding Through Topology-Aware Node RankingACM SIGCOMM Computer Communication Review2011
RW-BFS (NodeRank)rw_rank_bfsheuristicsbfs_trialsVirtual Network Embedding Through Topology-Aware Node RankingACM SIGCOMM Computer Communication Review2011

Exact Solvers

NameCommandTypeMappingTitlePublicationYearNote
MIP (Mixed-Integer Programming)mipexactjointViNEYard: Virtual Network Embedding Algorithms With Coordinated Node and Link MappingTON2012
D-Rounding (Deterministic Rounding)d_roundingexactjointViNEYard: Virtual Network Embedding Algorithms With Coordinated Node and Link MappingTON2012
R-Rounding (Random Rounding)r_roundingexactjointViNEYard: Virtual Network Embedding Algorithms With Coordinated Node and Link MappingTON2012

Simple Baseline Solvers

NameCommandMapping
Random Rankrandom_ranktwo-stage
Random Joint Place and Routerandom_joint_prjoint_pr
Random Rank Breath First Searchrandom_bfs_trialsbfs_trials
Order Rankorder_ranktwo-stage
Order Joint Place and Routeorder_joint_prjoint_pr
Order Rank Breath First Searchorder_bfs_trialsbfs_trials
First Fit Decreasing Rankffd_ranktwo-stage
First Fit Decreasing Joint Place and Routeffd_joint_prjoint_pr
First Fit Decreasing Rank Breath First Searchffd_bfs_trialsbfs_trials

To-do List

Environment Modeling

Algorithm Implementations

NameCommandTypeMappingTitlePublicationYearNote
PG-Conv-QoS-Securitypg_cnn_qslearningjointVNE Solution for Network Differentiated QoS and Security Requirements: From the Perspective of Deep Reinforcement LearningarXivSecurity
DDPG-Attention*ddpg_attentionlearningjointA-DDPG: Attention Mechanism-based Deep Reinforcement Learning for NFVIWQOS2021
MUVINEmulearningjointMUVINE: Multi-stage Virtual Network Embedding in Cloud Data Centers using Reinforcement Learning based PredictionsJSAC2020Admission Control
TDtdlearningtwo-stageVNE-TD: A virtual network embedding algorithm based on temporal-difference learningCN2019
RNNrnnlearningtwo-stageBoost Online Virtual Network Embedding: Using Neural Networks for Admission ControlCNSM2016Admission Control