This paper discusses the problems associated with the implementation of Real Time Optimization/Model Predictive Control (RTO/MPC) systems, taking as reference the hydrogen distribution network of an oil refinery involving eighteen plants. This paper addresses the main problems related to the operation of the network, combining data reconciliation and a RTO system, designed for the optimal generation and redistribution of hydrogen, with a predictive controller for the on-line implementation of the optimal policies. This paper describes the architecture of the implementation, showing how RTO and MPC can be integrated, as well as the benefits obtained in terms of improved information about the process, increased hydrocarbon load to the treatment plants and reduction of the hydrogen required for performing the operations.