## 2 Evolution of Manufacturing Systems  
The interest in optimizing production planning and control has been growing for the past few years. Customers' demands are changing, asking for high quality finished goods at low prices and with a shorter time-to-market. In this scenario, factories can survive and outperform their competitors switching to flexible and reconfigurable manufacturing systems [11]. A Flexible Manufacturing System (FMS) is an integrated and computer-controlled system of automated material handling devices and numerically controlled (NC) machine tools that can simultaneously process medium-sized volumes of part types [12]. It can be considered as a system able to cope with machine failures or breakdowns [13] and able to check its own state as well as the availability of its resources [14]. A reconfigurable manufacturing system is a system designed so as to allow for rapid changes in structure, both hardware and software, in order to rapidly adjust the production capacity and functionality of a part family in response to sudden changes in market or in regulatory requirements [15]. These new manufacturing system characteristics led to significant changes in production control systems supervising systems different activities (e.g., a control action can be applied on the sequence of products that have to be manufactured, on the tuning operations of a production system or on operations aimed at restoring the proper functionality of the process) [16]. From the manufacturing point of view, a control system is used to control the manufacturing process, to set the run-mode to meet market requirements or to set the sequence of tasks that a processing unit has to perform, to optimize the production process [17]. Therefore, the final aim of a control system is coordinating and directing all the production activities [8] and monitoring the production system to prevent undesired functioning [16]. Four types of control architectures have been identified for automated manufacturing systems: centralized control, proper hierarchical control, modified hierarchical control, and heterarchical (or decentralized) control [8]. The centralized control architecture is represented by a mainframe computer that performs all planning and information processing functions [18]. In this case, all control decisions are taken at a unique location. This control architecture is characterized by a single component controlling all manufacturing entities, e.g., robots, production sites, and handling systems [8]. All control architectures have advantages and disadvantages. In centralized control, the advantages lie in the opportunity to identify and reach a global optimization condition and to acquire information about the system from a single component. The disadvantages are slow response and dependence on a single component and restrictions in modifying the control software [8]. The second typology of control architecture is proper hierarchical control. In this case, different control components are organized in a pyramidal structure [19], where every manufacturing entity is controlled by a superior control component, but at the top of the pyramid a single component is responsible for the whole control. The control operations are executed with a top-down strategy, while the reports, deriving from control actions, are supplied with a bottom-up strategy. The advantages of proper hierarchical control are less software restrictions and quicker responses, while some disadvantages are related to the computational restriction of control entities, difficulty in applying unexpected modifications, and the high amount of interrelations between manufacturing entities and control components [8]. The modified hierarchical control is similar, as the name suggests, to proper hierarchical control: the pyramidal structure of control components and the related manufacturing entities to be controlled still exist but the level of autonomy of control components--subordinated to the global control component--is different.