This project simulates deployment and migration of Service Function Chains (SFC) in data-centers.
The problem and the solution implemented here are described in the following papers:
[1] I. Cohen, C.F. Chiasserini, P. Giaccone, and Gabriel Scalosub, Dynamic Service Provisioning in the Edge-cloud Continuum with Bounded Resources, IEEE Transactions on Networking, early access, 2023.
[2] I. Cohen, P. Giaccone, and C.F. Chiasserini, Distributed Asynchronous Protocol for Service Provisioning in the Edge-Cloud Continuum IEEE International Conference on Software, Telecommunications and Computer Networks (SoftCom), 2023.
The projects includes:
- Parsing of real-world antenna location files.
- Simulating users mobility using SUMO.
- Implementation of a provably-optimal CPU allocation algorithm (GFA).
- Implementation of several greedy VM placement algorithms (first-fit, CPVNF, MultiScaler).
- Formulating and solving the a Linear-Program relaxation for the VM placement problem (which is NP-hard) using either Python's default pulp solver, or Gurobi.
- A wide range of statistics and performance analysis tools.
Runs a Traci SUMO simulation, and generates .loc files. The .loc file details the location of each vehicle at each time period. It is also possible to run the simulation for collecting general statistics, such as the total number of distinct vehicles within the simulated area, or the average speed, during a given time period. The .loc files are written to the directory 'res/loc_files/'. The .loc files can be later converted to .poa files using loc2poa_c.py (see below). It is also possible to directly generate .poa files. Example of main:
my_Traci_runner = Traci_runner (sumo_cfg_file='myLuST.sumocfg')
my_Traci_runner.simulate (verbose = [VERBOSE_LOC]) # generate a .loc file
my_Traci_runner.simulate_gen_poa_file (verbose = [VERBOSE_LOC]) # generate .poa file
my_Traci_runner.simulate_gen_poa_file (warmup_period=7.5*3600, sim_length_in_sec=3600, len_of_time_slot_in_sec=0.050, num_of_output_files=1, verbose = [VERBOSE_LOC])
# generate a .poa file while assigning several non-default parameters for the run-time, warmup period, etc.
Takes a .loc file, generated by run_Traci.py, and generate from it a .poa file, which details the association of vehicles to PoAs (points-of-access) at each time slot. It is possible to assume either an arbitrary iterative partitioning of the simulated areas into quadrants (that is, having in total 4^k cells, for some positive integer k); or use the real-world data of antennas locations. It is also possible to calculate statistics, such as the average number of vehicles in each cell.
A simulator that reads a .poa file line-by-line; allocates to each user the minimal CPU it needs for being successfully served within its time constraints; and and runs either a placement algorithm, or an ILP optimization tool, for finding a minimal-cost feasible placement of all the chains. The typical output of the simulation is a .res file, containing data about the status of the solution (fail/sccs), its cost, the overall number of users, the number of critical users (users whose chains must be migrated), etc.
To simulate, the input .poa file should be found in '/res/poa_files/", and the input .poa2cell file should be found in '/res/poa2cell_files'. The output files are typically written to '/res/.
Gets as input the output of a simulation run by SFC_mig_simulator.py (typically, a .res file), and generates from it either .pcl files to store all the data in a memory-efficient way, plots, or tables.
Under /res/ directory of this project you will find antenna_locs files, detailing real-world locations of antennas in Luxembourg and in Monaco, extracted from OpenCellId, and poa2cell_files, that map the antennas into cells, when assuming that the simulated area is iteratively partitioned into quadrants.
To run a SUMO simulation, you need also the relevant configuration files. Here are the configuration files for LuST (Luxembourg Sumo Traffic project), and for MoST (Monaco Sumo Traffic project).
To use the Gurobi LP solver, install Gurobi and uncomment-out the line "import Gurobi" in SFC_mig_Simulator.py.
To use SUMO and Traci, install these tools.