Contention-resolving model predictive control for coupled control systems with shared resources