#!/usr/bin/env bash

router=${1:-hcbf}
shed=${2:shed1}

epoch=$((7*24*60*60))
community="louvain"
ticks_per_packet=$((60*120))
time_to_live=$((3*$epoch))
buffer_size=$((3*7*24*60*60))
duty=300

time python main.py \
    --router "${router}" \
    --community "${community}" \
    --community-args \
        "epoch=${epoch}" \
    --trace "csv" \
    --trace-args \
        "path=shed/data/pp_${shed}_reduced.csv" \
    --node-args \
        "tick_time=${duty}" \
        "buffer_size=${buffer_size}" \
    --packet-args \
        "ticks_per_packet=${ticks_per_packet}" \
        "time_to_live=${time_to_live}" \
        "start_delay=${epoch}"


# send slack notification if the script exists
status=$?
notify=$HOME/dev/slack-notifier/send_notification_via_slack.py
[[ -e "$notify" ]] && $notify "\`khadija done: exit($status)\`"