[simulation] final simulation scripts
This commit is contained in:
parent
b664339baf
commit
d42da3fbff
@ -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" &
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user