Skip to content

Commit

Permalink
Fix seed column in a preprocessing script in CCOD
Browse files Browse the repository at this point in the history
  • Loading branch information
m-wojnar committed Feb 10, 2024
1 parent e648e65 commit 5951999
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/ns-3-ccod/outputs/preprocess_csma_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
df = pd.read_csv(file, header=None)

file = os.path.basename(file)
_, scenario, n_wifi, _ = file.split('_')
_, scenario, n_wifi, run = file.split('_')

new_df = pd.DataFrame(columns=['agent', 'scenario', 'nWifi', 'seed', 'time', 'throughput'])
new_df['time'] = df[1]
new_df['throughput'] = df[2] * THR_SCALE
new_df['agent'] = 'CSMA'
new_df['scenario'] = scenario
new_df['nWifi'] = n_wifi
new_df['seed'] = 300
new_df['seed'] = int(run[3:-4]) - 1 + (400 if scenario == 'convergence' else 300)
new_df.to_csv(os.path.join(args.output, file), index=False, header=False)

0 comments on commit 5951999

Please sign in to comment.