Added output of averages to simulation type 3.