-
Notifications
You must be signed in to change notification settings - Fork 11
/
install.sh
executable file
·59 lines (49 loc) · 1.72 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
echo "Updating apt"
sudo apt-get update --fix-missing
echo "Installing requirements"
sudo apt install libjsoncpp-dev -y
sudo apt install g++ -y
sudo apt install python-setuptools -y
sudo apt install python3-setuptools -y
sudo apt install mercurial -y
sudo apt install python3-virtualenv -y
sudo apt install python3-pip -y
sudo apt install make -y
echo "Downloading NS-3"
if test -f ns-allinone-3.33.tar.bz2
then
echo "File ns-allinone-3.33.tar.bz2 already exists!"
else wget https://www.nsnam.org/releases/ns-allinone-3.33.tar.bz2
fi
echo "Extracting NS-3"
tar xjf ns-allinone-3.33.tar.bz2
echo "Copying additionals files into NS-3"
cp SmartGridSimulator/smartgrid-default-simulator-impl.* ns-allinone-3.33/ns-3.33/src/core/model/
cp tcp-server-and-client/include/* ns-allinone-3.33/ns-3.33/src/applications/model/
cp tcp-server-and-client/src/* ns-allinone-3.33/ns-3.33/src/applications/model/
cp udp-server-client/include/* ns-allinone-3.33/ns-3.33/src/applications/model/
cp udp-server-client/src/* ns-allinone-3.33/ns-3.33/src/applications/model/
echo "Copying modified wscripts into NS-3"
cp wscripts/wscript_applications ns-allinone-3.33/ns-3.33/src/applications/wscript
cp wscripts/wscript_core ns-allinone-3.33/ns-3.33/src/core/wscript
echo "Building NS-3"
cd ns-allinone-3.33/ns-3.33
./waf configure --build-profile=optimized
# ./waf configure --build-profile=debug
./waf
echo "Building NS3Mosaik"
cd ../../NS3Mosaik
make
echo "Creating virtual env"
cd ../../
mkdir virtualenv
virtualenv -p /usr/bin/python3 virtualenv/cosimul
source virtualenv/cosimul/bin/activate
pip install mosaik
# pip install "mosaik<3"
pip install tables
pip install scipy
pip install matplotlib
pip install pandas
pip install co_sim_platform/opendssdirect3.7