/modeling

Joint Cache Placement and Request Routing Optimization in Heterogeneous Cellular Networks

Primary LanguageHTML

This is an optimal model of cooperative caching policies network-aware to join placement caching problem and mult-hops requests routing problem for the heterogeneous cellular networks. The objective is to decrease delay and increase cache hit. There are constraints of storage and Quality Service requirements defined by SLA(Service Level Agreement).

Install dependencies:

command: cd optimization/ModelingV0/installer/
command: chmod +x installer.sh
command: ./installer.sh

Download Gurobi Optimizer in :

https://www.gurobi.com/downloads/gurobi-software/

ou

command: wget https://packages.gurobi.com/9.1/gurobi9.1.2_linux64.tar.gz

Install Gurobi:

https://www.gurobi.com/documentation/9.1/remoteservices/linux_installation.html

command: tar xvfz gurobi_server9.1.2_linux64.tar.gz
command: cd gurbi912/linux64/src/build
command: make
command: mv libgurobi_c++.a ../../lib
command: cd /home/linux
command: sudo nano .bashrc

Insert in file:

export GUROBI_HOME="/home/linux/gurobi912/linux64" export PATH="${GUROBI_HOME}/bin:${PATH}" export LD_LIBRARY_PATH = "${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"

Warning! /home/linux = pwd

command: pwd

Create Gurobi license in:

https://www.gurobi.com/downloads/free-academic-license/

Active Gurobi license in command/terminal prompt:

command: grbgetkey "pastelicense"

Execute the Model:

Model configuration is in config/config_model.json

command: cd optimization/ModelingV0/config/
command: python3.9 ../application discrete_event_manager.py

Execute the Instance Generator:

Instance generator is in config/config_generator_instance.json

command: cd optimization/ModelingV0/config/
command: python3.9 ../application/generate_new_instance.py

Execute the Locations Generator:

Instance generator is in config/config_generator_locations.json

command: cd optimization/ModelingV0/config/
command: python3.9 ../application/generate_locations.py

Execute the Requests Generator:

Instance generator is in config/config_generator_request.json

command: cd optimization/ModelingV0/config/
command: python3.9 ../application/generate_requests.py

Install Make

command: sudo apt install build-essential

Debug and Build

command: sudo snap install pycharm-professional --classic

Update requirements file

command: pip3 list --format=freeze > requirements.txt

###Install Virtual Environment

command: sudo apt install python3.9-venv
command: python3.9 -m venv <Dir>

###Set python version default

command: which python3
command: sudo ln -sf /usr/bin/python3.9 /usr/bin/python3

###Errors

ImportError: cannot import name '_imaging' from 'PIL'

command: python3.9 -m pip install --upgrade Pillow

NoModule

command: sudo apt-get install tqdm
command: sudo apt-get install seaborn
command: sudo apt-get install -y python-typing
command: sudo pip install tqdm --upgrade
command: sudo pip install seaborn --upgrade
command: sudo pip install python-igraph --upgrade
command: sudo pip install cairocffi --upgrade
command: sudo pip install openpyxl --upgrade
command: sudo pip install gurobipy 
command: sudo python3 -m pip install gurobipy

RuntimeError: This package is deprecated. See the deprecation notice above.

command: sudo apt-get install python-igraph