A two-level approach for the control of freeways