[simulation] final simulation scripts

This commit is contained in:
giomba 2019-12-16 19:20:41 +01:00
parent b664339baf
commit d42da3fbff
2 changed files with 7 additions and 2 deletions

View File

@ -3,13 +3,13 @@
REPOSITORY=$(pwd)
CONTIKI=/home/giomba/workspace/uni/contiki/
SIMULATION=/home/giomba/workspace/uni/anaws-proj/cooja/simulation-prng.csc
REPEAT=20
REPEAT=30
# Setup environment
mkdir -p "$REPOSITORY/simulation/results"
# Setup simulation parameters
for KAPPA in 5; do
for KAPPA in 1 2 3 4 5; do
for I_MIN in 20 18 16; do
I_MAX=$((22 - I_MIN)) # 22 =~ 70 minutes
@ -21,6 +21,9 @@ for KAPPA in 5; do
# Run simulation
for (( i = 0; i<=$REPEAT; i++ )); do
cd "$REPOSITORY/cooja"
sed -i "s_<randomseed>.*<\\/randomseed>_<randomseed>$i<\\/randomseed>_g" simulation-prng.csc
cd "$CONTIKI/tools/cooja"
ant run_nogui -Dargs="$SIMULATION" &

View File

@ -31,6 +31,8 @@ handles = []
for i in df['i_min'].unique():
handles.append(mpatches.Patch(color=getcolor(i), label='Imin = ' + str(i)))
plt.ylim([0, 1400])
plt.legend(handles=handles)
plt.show()