Online Production Scheduling and Re-Scheduling in Autonomous, Intelligent Distributed Environments

The search for the automation of continuous production systems that are widely distributed, such as: electricity, oil production, water and others, is a complex problem due to the existence of multiple production units, transport and distribution systems, multiple points of delivery that must be coordinated, the presence of constant changes in the demand and restrictions in the production units. Automation includes constant changes in the production goals that must be captured by the system and every production must self-adjust to these new goals. The production re-scheduling is imperatively on line because it implies evaluating the conditions of every unit in order to know the available capacity and how feasible it is to establish physical connections amongst the different units. In order to achieve one production goal and follow the process on line, in the event of a change in demand or a failure in any unit, an adjustment in the different assignment could be reached and comply with the new conditions of the system. In order to determine the scheduling of every unit, it is important to know its available capacity, production costs and how they should work with each other in order to obtain a product. Once the scheduling is obtained, it must be monitored constantly in order to know its progress and detect when the goal cannot be reached, so a new scheduling is done. The organizational structure of the production process must allow to maintain a knowledge in every production unit, where the acquisition of information and its processing may be centralized and distributed, establishing different approaches to determine the scheduling.


Introduction
The search for the automation of continuous production systems that are widely distributed, such as: electricity, oil production, water and others, is a complex problem due to the existence of multiple production units, transport and distribution systems, multiple points of delivery that must be coordinated, the presence of constant changes in the demand and restrictions in the production units.Automation includes constant changes in the production goals that must be captured by the system and every production must self-adjust to these new goals.The production re-scheduling is imperatively on line because it implies evaluating the conditions of every unit in order to know the available capacity and how feasible it is to establish physical connections amongst the different units.In order to achieve one production goal and follow the process on line, in the event of a change in demand or a failure in any unit, an adjustment in the different assignment could be reached and comply with the new conditions of the system.In order to determine the scheduling of every unit, it is important to know its available capacity, production costs and how they should work with each other in order to obtain a product.Once the scheduling is obtained, it must be monitored constantly in order to know its progress and detect when the goal cannot be reached, so a new scheduling is done.The organizational structure of the production process must allow to maintain a knowledge in every production unit, where the acquisition of information and its processing may be centralized and distributed, establishing different approaches to determine the scheduling.
Among the different organizational approaches in manufacturing control Giebels et al. (2001); Heragu et al. (2002), there are the hierarchical approach, the heterarchical approach and the holarchical approach.The hierarchical approach is where the decision flow in the organization is vertical.Cooperation between units is a decision of the immediate superior level.The heterarchical approach is where the decisions are taken horizontally and intelligence is distributed conceptually speaking.The holarchical approach is a mix of the previous approaches.It has the reactivity of the heterarchical approach and the coordination of the hierarchical approach and evolves towards the handling of different transformation activities in order to achieve a goal.
Conventional production systems establish a hierarchical architecture, where decision-making activities, also known as functional coordination calls, include in a superior level production planning and operations management.The immediate lower level includes production scheduling and optimization.In the following level, in descendent order, it is found the process supervision, where it is possible to consider production re-scheduling when disturbances are encountered.After these levels, the production execution levels are found, where the basic control and process functions are.The functions of the three superior levels are centralized, while now there is a tendency to have decentralized controllers in the execution level.Zapata (2011) Hierarchical systems typically have a rigid structure that prevent them to react in an agile way to variations.In hierarchical architectures, different levels cannot take initiatives.Modifying automated structures in order to add, drop or change resources is difficult, because it requires updating every level in order to recognize the state of the whole system.Furthermore, failures occurred in inferior levels spread to superior levels, invalidating in some cases the planning and affecting the operation of other tasks inherent to the automation, making the system vulnerable to disturbances and its autonomy and reactivity to these disturbances are weak.The resulting architecture is therefore very expensive to develop and difficult to maintain Montilva et al. (2001).
On the other hand, heterarchical systems have a good performance towards changes, and can auto-adapt continuously to its environment.Nonetheless, heterarchical control does not provide a predictable and high performance system, especially in heterogeneous complex environments, where resources are scarce and actual decisions have severe repercussions in the future performance.For this reason, heterarchical control is rarely used in industries.
The objective of this paper is to show how it is possible to implement a scheduling and re-scheduling mechanism based on intelligent autonomous units.These units are capable of knowing in every moment its state, which ensures reactivity of the system towards internal changes and cooperation among different units for scheduling and rescheduling activities.
The chapter is organized as follows: An introduction that corresponds to this Section.The second Section has the features of distributed production systems in the decision-making sense.Section 3 describes the holonic approach and the configuration of holarchies in this approach.Section 4 establishes the scheduling and re-scheduling algorithms.In Section 5 a study case associated with electrical generation is shown.Section 6 comprises conclusions and future works.

Distributed production systems
Production systems widely distributed make one category, where every production unit is independent in its decision-making regarding its internal control, and its connection with other systems is based on the product supply with a quality and a flow that is set before hand.The allocation of this compromise of quality and flow is the result of an evaluation that determines the scheduling for that period of time.The product quality and the flow that is supplied, assuming that input availability is reliable (in quality and flow), depend only on the internal conditions of the unit.The connection between distinct units is what allows their reconfiguration in order to obtain a product of any kind.
Among the classic examples of continuous production systems, it is possible to mention oil extraction and electricity generation, which are characterized by the complexity in operations as well as in management, because coordination amongst different subsystems (units) and its reconfiguration are linked to its real-time execution, which guarantees the flexibility in the operation.

Oil production
In an oilfield, coexist different ways of extraction.A direct way extracts oil by pressure difference in the oilfield and an indirect way extracts oil by pumping oil, raising gas artificially and injecting steam.In-distinctively of the type of extraction from the oil inlet to the oil-crude separator, the oilfield is characterized by having a specific quality of oil.When it reaches the surface, oil brings mud and gas.Every well is connected to a manifold, which picks up the mix in order to make the first liquid/gas separation that takes two different directions.In the first one, gas goes to another manifold that picks the gas coming from other separators.From this collection manifold it goes to a compression center.The compression center discharges the gas in a pipe or tank that has as an input compressed gas coming from compression centers (QP, QI), and outputs like depleted gas (QM) for every compression center, gas that is going to be exported or sold (QE) and gas available for wells (QD).In the second direction, oil passes through a second liquid separation manifold where mud and oil are separated.Oil is sent to a tank farm for another mix with other oil qualities for its distillation.See Figure 1.Where: QM: Gas depletes QF: Gas from oilfield QP: Gas discharging for compressors QV: Gas sent to the atmosphere QE: Gas exported or sold QI: Gas imported from other sources QD: Gas available in wells QT: Total Gas QS: Gas for suction QL: Oil plus mud Qli: Oil produced by well i Qgi Gas to well i QC: Total oil produced This system is considered a complex system due to the number of subsystems and the number of interactions among subsystems.There might be more than one oilfield, a liquid/gas separating manifold may be connected to an oilfield or several oilfields or more than one separating manifold can be connected to one oilfield.In the first direction, a compression center feeds one or more liquid/gas separators.The distribution of compressed gas is done as indicated in the previous paragraph, returning a quality of gas to the wells.In the second direction, when the fluid goes to the oil/mud separation, it is considered that a liquid-liquid separator may be fed by one or more liquid-gas separators.These separators liquid-gas feed one or more mud tanks and one or more tank farms.

Electricity generation and distribution
In present times, generation of electric current can be done through hydroelectric, thermoelectric, aeolian and nuclear plants and solar panels, among others.Depending on its generating capacity and consumption, these plants must be increasing and decreasing its production in strict real time.Like one source, as theory states, cannot supply all the necessary electric current, these plants must interconnect in a synchronized way in order to supply the consumption needs.In-distinctively of the generating source, the product: electric current, reaches sub-stations, where it amplifies and distributes in high voltage the electric fluid.This fluid in high voltage is transported through distribution networks that transform high voltage in low voltage, towards final users, this is, centers of population, shopping malls, residential complexes, industrial complexes, etc.
The complexity of the operations of this kind of process lies in the generation as well as in the distribution of electric current.Every source of generation is composed of one or more units of generation of the same kind forming a power generation complex.Every generation complex supplies a charge for a determined amount of time and needs to be synchronized in order to be coupled with the system connected with the substation.Substations must distribute to centers of populations as a function of the demanded charge, and this is why the system is considered to be interconnected in a bi-directional way with multiple acceptable paths.See Figure 2.  2008), production processes are described, as a network of production units, that we can call nodes.A network can be made of 3 types of nodes, which are: storage units (raw materials, work in process and final products), transportation nodes and production nodes (transformation), as is shown in Figure 3.This network represents the development of the recipe.The manufacturing of a product is subject to the recipe, which generates a model for fabricating the product, and a model of the product.This recipe specifies the different stages (nodes) where raw materials pass through until it becomes a product.This product model is translated over the physical process of manufacturing, which leads to a configuration of the model in order to follow the product flow according to the recipe.See Figure 4 .This network represents the physical model and its interconnections.It is possible (desirable), that when the product flow is placed over the physical process it will generate more than one acceptable configuration, and from those, one is selected in accordance to a criterion and that configuration is established as a pattern in the manufacturing of the product.Because it is a dynamic evolution, at some point there could be a new event (internal or external) capable of altering the performance of the selected configuration and for this reason a re-scheduling in the plan must be done in order to correct the effects of the occurred event.The event can affect, either the execution (regulation, control), the supervision/coordination/management of the device or unit, or a combination of those.The admissibility of a new configuration is established from the set of admissible configurations that have as an initial state the state obtained from the appearance of the event trying to accomplish its mission objective (availability, capacity, interconnection, etc.) of carrying out the recipe or else, putting the process in a secure condition.See figure 5 Even if it is true that until now only a structure that models the product flow and projects itself over the physical process has been mentioned, it is important to describe how these configurations are obtained from the production units.
The production process management is associated by the knowledge itself, this is, knowing the recipes, inputs and their qualities; and the physical process (transformation, transportation and distribution).In the case of process industries, the Business Model is used to describe the chained stages as the input is acquiring added value.Every one of these stages makes the value chain of the process based on the product flow.CARDILLO et al. (2009); Chacón et al. (2008;n.d.), explains that if a business model and the value chain are used as a global base model of the production process of the company, a production unit can be associated to every link of the value chain.The use of value chains is the base to develop models of different business processes that are specific to the company [26].A graphic representation of value chains is shown in Figure 6.The product flow can be defined as the different transformation stages that a resource takes (or a set of them) until the final product is obtained. .

Generic model for Production Units
Every stage or link of the value chain (entry of inputs, processing/transforming and storing), is seen as a Production Unit (PU).So, a productive process or company is an aggregation of cooperating production units.The typification of every production unit depends on how the resource(s) evolves in it, some of them are: Continuous, batch, manufacturing, hybrid, etc.Additionally, every PU performs a specific operation (transformation or transportation) depending on the specifications of the resource (resources) based on the recipe.
Nonetheless, it is possible to find common or generic elements that are common to any PU.Therefore, a PU is distinguished by having: 1.A process for resource uptake (NA) 2. A process for transformation or transportation (NP, NT) 3. A process for storing the transformed product (NA).
Initially, resources and products are managed by the PU coordinator.This is, resources are located and obtained by the coordinator through a PU and the resulting products are shipped towards another PU or the final customer.This way, the process for resource uptake for the PU (NA) is in charge of guaranteeing resources for a given production recipe.After that, the PU selects which should be the production method for making the required transformations for the raw materials.The selection of the configuration and the production method depends on the properties of the resources that enter the PU as well as the resulting products.Once the transformation process is finished, the transformed resource is stored and waiting for another PU to ask for it to be shipped.
In Figure 7 is shown the structural model of a PU, associated with a link in the value chain.
The PU manages the production methods, the configuration of the unit and the handling 27 Online Production Scheduling and Re-Scheduling in Autonomous, Intelligent Distributed Environments of the resources that intervene on the production process to obtain a product.With this structural description, the bases are placed in order to obtain the necessary information to make the proper negotiations to set a plan.This description allows establishing which are the variables and their respective nominal values, capable of generating the state of the production unit, like: indexes for performance, reliability, product quality, desired quantity of products, production capacity, and storage (maximum and minimum) capacity of the finished product.These values of the state of the PU are key elements to make the negotiations among them, such negotiations are: the production capacity of the PU is given by the capacity of the transformation process, which is determined by the storage capacity, if and only if the raw materials and the rest of the transformation resources are guaranteed.; Muller (1997), where the rectangles represent classes and the lines the relationships among them, using three types of relationships: Generalizations /specializations (arrows), associations (lines) and compositions (arrows with diamonds).In this particular model it is possible to observe the different entities that make and relate with a PU.Particularly, it is shown a special class with the stereotype «association», that is in charge of recording: different resource configurations, productions processes, software for controlling and supervising and its relationship with the production method.It is also shown the classification of resources that are handled by the PU in order to perform the production plan, which supports the planning function.Essentially for space constraints, this structural model is shown in the most concise way; however for every class it is necessary to define attributes, its rules and its operations, in order to support the behavioral model of the PU.

PU
With the description of the given PU, Figure 9 describes the internal built-in proposed model in [30] of the PU.This description follows the rule that a process has control loops.The process set of control loops is called Controlled Process and this is the one that coordinates and manages through the supervisor.

Process model
It is possible to observe that the flexibility of the production process is associated to the possibility of having a distributed and cooperating process in the sense of the decision-making that makes the PU.This implies understanding the hierarchical scheme and understanding the relationships between the logic process of the recipe and the physical production process including the support areas.This leads to being able to link together the plant model, the product model and the knowledge model, in order to have a process model that must be managed, as is shown in Figure 10.

Holons and holarchy
The current interest lies on the fact that industrial systems need as much high performance as they need reactivity.The answer to this challenge is found in theories about complex adaptive systems.Koestler Koestler (1967) made the observation that complex systems can only succeed if they not only are composed of stable subsystems, every one of them capable of surviving to disturbances, but also are capable of cooperating to form a stable system that is more complex.These concepts have resulted in holonic systems.
The holonic approach starts with the word Holon that was introduced by Arthur Koestler Koestler (1967), and was based on the Greek word holos that means whole and the suffix on that means part.According to Koestler, a holon is by itself similar, this is, a structure (Holon) that is stable, coherent and that is composed by structures that are topologically equal to it, Holons, and it, by itself can be a part of a bigger holon and this holon can have many parts that are holons.Holonic systems combine the advantages of hierarchical systems and heterarchical systems, and at the same time avoid their disadvantages.In order to avoid the rigid architectures of hierarchical systems, holonic systems give autonomy (freedom of decision) to the individual modules (holons).This allows the system to give a quick response to disturbances and the ability to reconfigure itself when it faces new requirements.Additionally, it allows the integration of system modules and a larger range of fabrication systems Zapata (2011).
Compared with holonic control systems, heterarchical control systems may be unpredictable and uncontrollable.This is due to the inexistence of hierarchies in heterarchical systems.It is for this reason that holonic manufacturing systems possess hierarchies, however these hierarchies are flexible, in the sense that they are not direct impositions (hierarchical case), but agreements negotiated by production capacity and response time.This hierarchy differs from traditional hierarchical control in the following: • Holons can be part of temporal hierarchies, holons do not depend on their own operations but on every holon (associated) in a hierarchy to achieve its goals.
In order to differentiate between strict hierarchies of hierarchical control systems and flexible hierarchies of holonic control systems, the term holarchy has been introduced to identify flexible hierarchies.However, by giving rules and advices, holarchy limits the autonomy of individual holons in order to ensure controllable and predictable performances, unlike heterarchical systems.
The supervision of processes from a holonic perspective possesses properties such as: Autonomy This property is directly related with decision making.A system will be more autonomous than other while it has more power to take its own decisions.From the supervisory control theory point of view, the autonomy of a holon can be understood as the wider space of states where the supervisor can act.
Reactivity Autonomy ensures that every unit follows the evolution of the process under its control, determining when the goal cannot be reached, internally generating every possible adjustment.Reactivity is satisfied through traceability and control mechanisms that are proper to the system.In case that an internal solution is not possible, the system generates a negotiation scheme.
Proactivity In order to anticipate to situations that put at risk the accomplishment of the mission, holonic supervisory systems have mechanisms that determine in advance the presence of failures, degraded operation conditions or probable breaches when these situations occur.Once these conditions are detected the supervisory system must activate fault tolerance mechanisms that will allow the system to reconfigure itself to respond to this new condition.If the breach is imminent, cooperation mechanisms or negotiation mechanisms are activated Cooperation From a supervision point of view, cooperation is seen as the physical and logic interaction among components in order to achieve the production goal; this leads every component to have its own goal based on the production goal.This way, cooperation is seen as an enlargement of the space of states among several holons that can interact between them at the instance of the HPU supervisor.If two or more holons can handle between them a disturbance through some pre-established cooperation mechanisms, the intervention of the supervisor in the superior level will not be required, leading to lower interventions from it.
Based on the features presented for the supervisory system of a holonic production system and the features of the conventional approach for process supervision, in Zapata (2011) a comparative chart of the two approaches is presented.

Structure of a holon in production processes
The structural model of a holon used for production processes, is given by a head, a neck and a body.The BODY, is where the transformation/shipping/storage processes are done by a set of physical devices, such as: reactors, compressors, storage units, among others.A HEAD, is where the decision making process regarding production is accomplished, based on the knowledge that it has of the production process and the resources.These processes are developed by intelligent systems: Man and machine.The NECK, is the interface between the two structures explained before and that is composed by all the informatics structure A UML representation is shown on Figure 13 that stores, supports and transports the information.See Figure 11.A UML representation for a holon is shown on Figure 12.As a counterpart, PROSA presents a model of a holon that does not contain a structure associated with the production process, but it contains a description of the elements that make a unit with autonomy be a holon (See Figure 13).These elements are Order, Product and Resource.As it is possible to observe, it does not give information about the interaction between these elements, but it rather helps as a complement to the structural description presented before.These elements are used later on to complete the holonic description presented in Figure 9 that evolves to Figure 11.
One of the most relevant aspects is that until now, several holonic approaches are tied by inheritance to the hierarchical approach Hsieh (2008)  In the HPU shown in Figure 14, there is a hierarchical scheme for decision-making that persists Chacón et al. (2008;n.d.).Being able to break the hierarchical scheme to make decisions, goes through understanding the relationships between elements that are part of the productive process (value chain), support areas and the business process.This leads to being able to link the plant model, the product model and the knowledge model, in order to have a process model that is managed, as it is shown in Figure 10.
In order to being able to have a flat model regarding decision-making, the proposed HPU modelin14istransformedinthemodelshowninFigure15.
The autonomy of the Holon Production unit is declared by self-management, this is conceived from the knowledge model of the production unit, therefore, the self-management is nothing more than the planning based on the knowledge of the unit and the one in charge of performing the task is the management system.This leads to a manager agenda.Every element of the agent, leads to the scheduling of each equipment, based on the knowledge of Fig. 15.Holonic model of a Production Unit every one of them and this is done by the Coordination/Supervision system and its agenda.Every element of the agenda, leads to a set of operations tasks that are based on the knowledge of loops, performed by the control system.
This allows to elucidate that, in general, a Holon Entity, in production processes is an entity composed of head, neck and body; it can be planned, scheduled and execute its production goal.This way, the Head is composed by knowledge models of the production unit, agendas and mechanisms for decision making in order to comply with the agenda, therefore with the production goal.The body is in this case the physical process and the neck that is made of the interfaces that communicate both the head and the body.As it was previously said, it is focused in functions such as entity control and product tracking and not in commercial functions that depend in support areas, as it is shown on Figure 15.

The holon equipment and holon unit
The decision components of a holonic system are: • Planner / Manager that performs planning tasks.It builds different ways to obtain a product, and according to the feasibility of executing activities, it generates an agreement with holons in the superior level • The scheduler receives the different possibilities and evaluates how feasible they are based on the availability of resources.It generates the supervision scheme that is going to be used by the supervisor in real time • The Real -Time supervisor, who monitors the progress of the mission, determines, in real time the mission's completion or the possible failures, in order to inform the scheduler and adjust itself if necessary.
With the previous Holon Entity definition for production processes, it is easily shown that it is possible to have devices (Human-machine) capable of handling the knowledge model, this is, descend more intelligence to the equipment level and this way, make them able to plan, schedule and execute its production goal.These are considered the Holon Entity Base, as it is shown in Figure 16.

Fig. 16. Holon Equipment
The set of Holons equipment are part of the body Holon Production Unit, as it is shown in Figure 17.
A equipment holon has the necessary intelligence to perform control activities in the shop floor or regulatory control in continuous processes.The control algorithms are sent from the scheduler for the control of the execution.These methods generate events that allow monitoring the production progress and the presence of failures.The local supervisor works as an Event Supervisory System.

The Holon aggregation
If the same definition of Holon entity is established in production processes, it is possible to establish in a recursive way the Holon Company, the one whose body is composed of Holons Production Unit, as it is shown in Figure 18.Every holon maintains the information of three activities: planning (evaluation of the feasibility to achieve a goal), scheduling (assigning resources and dates for the execution of a task) and following tasks.The product flow is done over the equipment and is supervised internally by every holon (transformation of products and cooperation among the participants holons).A temporary holon that performs coordination tasks between the units and the coordinator, is created.Every holon has a supervisor, who plans and schedules.When the schedule is generated, the structure of the temporary holon that will perform the tracking of tasks is created.Every unit performs physical tasks in production, such as storage and transformation through a set of resources, owned or negotiated in the moment of scheduling, who are the body of a holon.
The logic components for a particular set and its functions are: • Planner: It selects a method for the set of possible resources and calls for a bid of these resources.It asks the scheduler to calculate the feasibility, and from this information it reserves the selected resources, with the supervision methods that are adequate for the configuration.
• Scheduler: It builds the set of possible configurations, evaluates the configurations and selects the most convenient ones.
• Coordinator: It uses the supervision method determined by the planner and interacts with the body through the supervisors of every equipment or production unit (Holon Resource).
This way, the new holarchy in this holonic conception of Equipment, Units and Company is given by building the body of the holon.

Scheduling and re-scheduling algorithms using holons
The scheduling process is associated with the generation of production and work orders according to what was described in Section 3 and the updating mechanism for the necessary information that allows knowing the state of the resources.In Figure 19 it is shown in detail the information flows that are necessary to perform tasks for production scheduling and re-scheduling.

Scheduling algorithms
The use of holons simplifies the planning process, because every Production Unit knows its available capacity to participate in the production process and the equipments that it has with their physical connections.Every Production Unit has the knowledge to perform a phase of the process and finally obtain the product.
Every PU has the capacity to perform planning, scheduling and tracking functions of the production activities associated with either a phase of the process or its current state.Its state is composed of the agenda, task progress and the state of its own resources, as it is shown in Figure 20 The process to update the agenda (result from planning and scheduling) is as follows: When a production request is received, it is evaluated in order to know if it is feasible to execute.In this process, the Production Unit uses the information from the production method or the product model that is described in terms of a discrete events system Cassandras & Lafortune (2008) (Discrete Events System), similar to the model proposed in ISA 88 and ISA 95 ISA (1995;2000).It also uses the information from its associated resources (available or not), and their capacities and competencies.The result in this part of the process generates a Petri Net.The reachability tree of this Petri Net is used to verify the feasibility of performing a task.If it is feasible to perform the task, it is incorporated in the agenda.If a resource is a Production Unit, internally it performs the same process.Once the order is scheduled, the supervisory system in real time and in terms of a DES Ramadge & Wonham (1989), verifies the fulfillment of the order, generating events that determine its fulfillment, or the need for re-scheduling.See Figure 22.PU, it generates a failure event for the PU that contains it and generates a new re-scheduling mechanism from its current state.

A case study
The concepts presented about scheduling and re-scheduling in a Holonic Production Unit are illustrated in a thermal power plant with a combined cycle in a 4 x 2 arrangement, this is four gas turbines and two steam turbines.As a complex system, energy generation plants have multiple production units (generation units), transportation systems (gas, steam, oil or water and electrical energy) and present constant changes in the demand and restrictions, physical and operations, among production units.A detailed description of the process is shown in [8].In Figure 23  To be able to establish the holons that are part of the HPU, it is taken into account statements presented in 2.3, where it is stated that every holon can be seen as a HPU and has the autonomy to process a product.Thus, "gas turbine-GT" and "Steam turbine ST" are holons.These holons have the ability to negotiate their goals according to their availability and capacity; and have the autonomy and intelligence to perform the process "generate energy".HPUs as resources for services are: boilers, water treatment plants and sub-stations.
Once a process is advancing in the negotiation to reach its production goal and depending on the possible connection among holarchies are formed.The holarchy concept is fundamental to the scheme that responds to of the holonic paradigm, where every holarchy, once is formed, becomes a HPU contained in a superior HPU (thermal power plant).The production re-scheduling is performed initially inside the holarchy.the thermal power plant, possible holarchies are:  The main analysis tool that allows obtaining all of the possible combinations of the resources to reach a goal and determine if it is feasible with the current state of the holons, is the reachability tree Moody & Antsaklis (1988); Zapata (2011).This tree represents a complete state space that a HPU can reach.This space state is of a discrete nature and is obtained through the execution of the PN from its initial marking.Within the holonic conception, the production scheduling method using a reachability tree, allows defining the holarchies that can be grouped in order to perform the mission.In every tree node, capacities of holons and temporary restrictions are added, as it is shown in Figure 28.This tree allows defining the sequence of operations, start and end times, and production plans for every holon and holarchy.
Applying the principles that have been stated, HPUs have a mission, as it is shown in Figure29, where a negotiation between holons and holarchies are done.With the availability of holons, the capacity offered and the costs, as shown in Table 1, mission assignments are presented in Figure 30.Notice that the sum of missions of the different holons is equal to the mission of the HPU.The holarchies formed to perform the mission are given in Table 1: If there is a disturbance in the generation period N o 12 and the holon ST2 presents a failure that takes it out definitely from operations, a re-scheduling mechanism based in PN is applied inside the holarchy H2 in order to resolve the disturbance inside itself.The failed mission of the holon is taken totally by Holon GT3.Table 1.Presentation of offers The PN model used for production scheduling and re-scheduling evaluates on line the conditions of every production unit and has response times that are appropriate for its application in real time.

Conclusions
The on line scheduling and re-scheduling of resources in a production system can be achieved in a relatively easy way, if the supervision aspects of the different systems are integrated, as it is proposed by Wohnam-Ramadge, with the scheduling activities.However, it is fundamental that every resource has the autonomy to supervise itself and negotiate with other systems, in order to reach a consensus for the execution of its activities.Every resource must have the knowledge of its capacities, competences and production methods that will allow indicating to the resources that it makes part of, of its available capacity, in the case of scheduling and re-scheduling, and also indicating in an effective and quick way, when it detects that it cannot achieve its goals.
This scheme has been used in the case of manufacturing systems for controlling production shops and in the case of continuous production systems in the generation of electrical energy, as it is shown in the study case.
Now, new schemes are being developed for the description, in an easy way for users, of the physical organization of physical components of the plant and the production units.Software applications are integrated through mechanisms that describe workflows of every unit and the way they cooperate with other units.

43
Online Production Scheduling and Re-Scheduling in Autonomous, Intelligent Distributed Environments Fig. 1.Oil production example

Fig. 2 .
Fig. 2. Generation and distribution of electricityInCARDILLO et al. (2009);Chacón et al. (2008), production processes are described, as a network of production units, that we can call nodes.A network can be made of 3 types of nodes, which are: storage units (raw materials, work in process and final products), transportation nodes and production nodes (transformation), as is shown in Figure3.This network represents the development of the recipe.

Fig. 7 .
Fig. 7. Model for a Production UnitThe structural model that defines the PU in Figure8is made using Unified Modeling Language (UML)Eriksson et al. (2004);Jacobson et al. (n.d.);Muller (1997), where the rectangles represent classes and the lines the relationships among them, using three types of relationships: Generalizations /specializations (arrows), associations (lines) and compositions (arrows with diamonds).In this particular model it is possible to observe the different entities that make and relate with a PU.Particularly, it is shown a special class with the stereotype «association», that is in charge of recording: different resource configurations, productions processes, software for controlling and supervising and its relationship with the production method.It is also shown the classification of resources that are handled by the PU in order to perform the production plan, which supports the planning function.Essentially for space constraints, this structural model is shown in the most concise way; however for every class it is necessary to define attributes, its rules and its operations, in order to support the behavioral model of the PU.

Fig. 8 .
Fig. 8. Structural UML model of a production unit

Fig. 10 .
Fig. 10.Procedure to build a configuration production.The available capability of a resource depends on: a) The need for maintenance and b) tasks assigned to the resource.To the selection of a resource there are other added factors such as reliability and production costs.

•
Holons can belong to multiple hierarchies,

Fig. 11 .
Fig. 11.Structural description of a holon in production processes Holon

Fig. 13 .
Fig. 13.Holon according to PROSA is based on the embedded model that is shown in the Figure where it is highlighted the autonomy and the cooperation due to the entry of a negotiator, as it is shown on Figure 14

Fig. 20 .
Fig. 20.Concepts associated with the Production Plan (a), it is shown a process diagram for a plant with a 2 x 1 arrangement and Figure 23(b), presents a simplified representation of a HPU.

Figure 24 (
Figure 24(a) shows holarchy 2 GT + 1 ST and Figure 24(b) shows holarchy 1 GT + 2 STModels for production scheduling and re-scheduling are built from Petri Nets (PN)David & Alla (2005);Moody & Antsaklis (1988);Murata (1989), which allow having a representation of the state and the availability of resources, holons and holarchies.The advantage of using PN is that the representation is dynamic and allows establishing a new operational condition from its actual state, which is reached after a disturbance.The details to obtain models are explained inZapata (2011) andZapata et al. (2011).About the product