This awk script is used to parse the log file from the simulation program and create a data file for I(t).
<project-file type=“source”/> <content> #!/usr/bin/awk -f BEGIN{
FS = ":"; MaxT = 0; col = -1;
} $1 ~ /ODE/ { col = col + 1; } $1 ~ /Run/ { col = col + 1; } $2 ~ /I/ {
t = $1 * 1; if (t > MaxT) MaxT = t; Result[$1 * 1, col] = $3 * 1;
} END{
for (i = 0; i <= MaxT; i++) { printf "%d", i; for (j = 0; j<= col; j++) printf ", %d", Result[i, j]; printf "\n"; }
} </content>