Enforce maxrate
Swap rec and nid loop nesting, underplot logmean