Machine Tool Transition from Industry 3.0 to 4.0: A Comparison between Old Machine Retroﬁtting and the Purchase of New Machines from a Triple Bottom Line Perspective

: The emerging scenario designed by digital technologies connected to Industry is push-ing towards increasingly sustainable companies. Access to the multiple beneﬁts of digitalization (such as increased productivity, ﬂexibility, efﬁciency, quality, lower consumption of resources, and the improvement of worker safety) is possible by purchasing new-generation machinery. However, thanks to smart retroﬁtting processes, companies can extend the shelf life of machinery without replacing it entirely. This work aims to present a framework to assess the sustainability of implementing a smart retroﬁtting process in old machines as an alternative to replacement from a triple bottom line (economic, environmental, and social) perspective. Due to the multidimensional and multidisciplinary variables that the proposed framework must consider, a multicriteria decision-making process is developed to identify the best transition solution from Industry 3.0 to 4.0. Then, we analyze a case study in which, thanks to the previously proposed methodology, two types of smart retroﬁtting on a column drill are compared with three replacement options for the same machine tool. In conclusion, the case study shows that retroﬁtting in the context of Industry 4.0 (or smart retroﬁtting), despite its high acquisition cost, is the best solution in terms of sustainability, and that this is because the smart retroﬁtting solution not only positively inﬂuences all parameters of digitization but also has a strong impact on the safety criterion.


Introduction
Industry 4.0 paradigms lead manufacturing companies to rethink their processes and organization, and prepare their structure for radical digitalization through technologies such as the Internet of Things, cloud computing, augmented reality, and artificial intelligence, etc. In order to remain competitive, companies are forced to adapt their machinery by first considering economic aspects, and more recently by also taking into consideration environmental and social aspects [1]. This is a new business model that allows companies to aim for a circular economy capable of self-renewal and the spread of sustainability principles [2].
Despite these business needs, the costs and time needed to replace old machines may be economically unsustainable for many SMEs [3]. In this context, developing a program for retrofitting old machinery to make it ready for the Industry 4.0 context may represent an alternative to replacement in terms of time, cost, and environmental impact. A smart and highly connective retrofitting program can allow company managers to reintroduce old plants in Industry 4.0. In addition to the classical retrofitting features, smart retrofitting involves implementing AI tools and other technologies provided by Industry 4.0.
The retrofitting of different types of machines can be carried out from an Industry 4.0 perspective to give a second life to machine tools that would otherwise be discarded. In this way, there will be a double environmental benefit: (1) the reduction of waste; and (2) increased energy efficiency and availability of retrofitted machine tools. Now the question is: Should an old machine be retrofitted or is it better to buy a new one?
Existing research does not propose a general framework for answering this question and understanding the sustainability of an alternative in terms of machine adjustment, but it does deal with individual environmental or economic analyses without a systematic approach.
The present work aims to address this research gap by defining a general framework to assess the sustainability of an adaptation process of production systems in terms of smart retrofitting and the purchase of new machines.
The sustainability assessment is carried out, in this work, according to the triple bottom line (TBL) point of view. The TBL consists of three pillars (social, economic, and environmental), whose objective is to meet the resource needs of current and future generations without hampering the environment [1]. Stock and Seliger [2] suggested that Industry 4.0 could provide immense opportunities for sustainable production. With a smart retrofitting process it is possible to extend the service life of machinery [3][4][5], avoiding wasting material and money on new machines and thus generating environmental and economic benefits [6]. In addition, the use of Industry 4.0 technologies allows for the optimization of processes, increased efficiency, the reduction of pollution and waste in the production system resulting in cost savings, an improvement in company budgets, and a lower environmental impact. Opportunities linked to technological innovation can also have positive impacts on health and safety management in the workplace [7].
Due to the multidimensional and multidisciplinary economic, environmental, and social variables that the proposed framework must consider, a multicriteria decisionmaking process has been developed to identify the best trade-off among these aspects. In particular, the analytic hierarchy process (AHP) technique is proposed for quantifying the weights of decision criteria and analyzing the different solutions for retrofitting and replacing old machines. This technique has been selected because we need a comprehensive and rational tool for defining a decision problem, for representing and quantifying its variables, for connecting those variables to overall goals, and for analyzing alternative solutions rather than prescribing a "correct" decision.
In particular, the Analytic Hierarchy Process (AHP) technique is proposed for quantifying the weights of decision criteria and analyzing the different solutions for retrofitting and replacing old machines. This technique has been selected because we need a comprehensive and rational tool for defining a decision problem, for representing and quantifying its variables, for connecting those variables to overall goals, and for analyzing alternative solutions rather than prescribing a "correct" decision.
In order to explain in detail the proposed framework, the paper is structured as follows.
In Section 2 the results of the review of the literature are presented. Section 3 explains the research approach adopted to assess the sustainability of operations related to retrofitting and machine replacement. In Section 4 a case study of retrofitting on a drill is presented.
In Section 5 the discussion, concluding considerations, and future research routes are given.

Methodologies for Assessing the Sustainability of Production System Adaptation Solutions
The analysis of the literature highlights a strong interconnection between the practice of retrofitting and the building sector due to increasing sensitivity regarding a sustainable approach. The focus of the research is, however, oriented to the manufacturing sector and specifically to the retrofitting of machine tools and its assessment in terms of triad sustainability.
It should be noted that (to the best of the authors' knowledge) there are no articles that offer economic, environmental, ergonomic, and safety analyses while at the same addressing the retrofitting of a machine.
Enparantza et al. [4] presented a life cycle cost calculation and management program for machine tools but did not apply this methodology to the retrofitting of machine tools. Bengtsson and Kurdve [5] used Life Cycle Costing (LCC) to evaluate three different alternatives: purchasing a new machine (lathe), reconditioning existing machines, or operating existing machines with increased costs and risks. Kianian et al. [6] proposed an LCC analysis for the manufacturing process of cylindrical gear. Gontarz et al. [7] based their work on an economic analysis of the retrofitting of a machine tool component, and Lima et al. [8] developed a cost-effective retrofitting solution for SMEs, which are often excluded from the Industry 4.0 paradigm.
Regarding environmental analysis, Velasquez et al. [9] compared energy consumption and CO 2 emissions during the life cycle of a CNC milling machine and a machining center. Wyatt et al. [10] and Faludi et al. [11] performed Life Cycle Assessment (LCA) analysis to compare the impacts of double-arm robotic instruments made of different materials and those of two machines for additive production compared to a CNC milling machine. Kianinejad et al. [12] performed a more comprehensive study with the objective of helping companies to make more sustainable economically and ecologically sound decisions in the field of regeneration, adaptation, and upgrading of obsolete milling machines.
Lins and Oliveira [13] and Ayani et al. [14] assessed the benefits of retrofitting processes performed on a robotic arm and obsolete machines, respectively. Lins and Oliveira [13] argued that retrofitting is a fast and low-cost solution which allows companies to keep up with the development of Industry 4.0 and enables improvements in terms of energy efficiency.
Ayani et al. [14] presented a retrofitting project of obsolete machines in which a Digital Twin was realized and from which benefits in terms of costs, time, and respect for the environment emerged thanks to lower energy consumption.
Lombardi Netto et al. [15] proposed a multiple-criteria decision analysis (MCDA) model for evaluating the sustainability programs of six companies using both the AHP and the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) technique.
Jasiulewicz-Kaczmarek et al. [16] presented an empirical study on the impact of maintenance function on multiple sustainable production processes. After identifying the most important maintenance factors, fuzzy AHP and fuzzy TOPSIS were used to determine the correct judgment of maintenance factors influencing sustainable production based on the company's specific requirements.
Publications in the literature tend to provide a partial and highly sectoral view as they focus on either retrofitting, economic analysis, or a study of environmental impacts. In addition, the AHP technique has been used to evaluate the sustainability of companies, but not in terms of machinery adaptation.
This research aims to overcome this gap by providing a general approach that simultaneously evaluates the retrofitting process with regard to its economic, environmental, and social aspects of sustainability in the manufacturing field (Table 1).

Criteria for Assessing the Sustainability of Production System Adaptation Solutions
A preliminary search of the extant scientific literature was performed to analyze the reasons for the adaptation of old machines and the most important criteria considered for assessing the sustainability of this adaptation.
The literature search was set according to the research protocol, using Scopus as a database. The search was limited to English-written documents published between 1992 and 2021, with the keywords "(machine) AND (retrofitting)".
The literary review limited the search to the keyword "retrofitting" and excluded the following keywords because they are related to the topic of retrofitting buildings and are therefore not relevant to this research: "Buildings", "Building Characteristics", "Buildings Retrofits", "Building Retrofit", "Building Simulation", "Building Stocks", "Arch Bridges", "Building Blockes", "Building Codes", "Building Database Enrichment", "Building Energy", "Building Energy Conservation", "Building Energy Consumption", "Building Performance Simulations", "Building Retrofitting", "Building Stakeholders", and "Building-specific Information". The search process returned 32 documents. (Figure 1). Of the 32 articles identified, 10 were relevant (Table 1). These 10 papers were used to extract the criteria to be used in the AHP matrixes during the decision-making process. Table 2 summarizes the criteria used in these works for justifying the retrofitting process. Abd-Alrazzaq et al. [17] selected a conventional center lathe machine as a good candidate for the CNC retrofit; this is a low-cost solution that can ensure the high quality of the parts. Siedlecki et al. [18] analyzed retrofitting of a farm tractor with a universal particle filter with the size chosen relative to engine displacement, finding that this alternative saves money and reduces emissions. Quatrano et al. [19] retrofitted a CNC machine, considered obsolete due to high maintenance costs, by using low-cost off-the-shelf components and through open-source software to reduce the amount of electronic and industrial wastes. Metzger and Kness [20] retrofitted an industrial gas turbine, increasing reliability and making the configuration of the entire system more user-friendly.
Ayani et al. [14] applied emulation for machine reconditioning. The advantages of this operation are: extended machine shelf-life with reduced investments and shorter times, positive impacts on the quality of the delivery and working conditions, and reduced energy consumption.
Lucke et al. [21] applied machine retrofitting in a real-world scenario based on the needs of SMEs to improve production on the shop floor and to lower the barriers for SMEs to enter the paradigm of Industry 4.0. Epple et al. [22] presented retrofitting for small stationary machines through which safety was guaranteed; the processes improved in terms of reproducibility and accuracy and the times required to perform the operations decreased. Hassan Al-Maeeni et al. [23] offered the smart retrofitting of a rotary draw bending machine in order to upgrade machine performance and make it smarter. Therefore, the user could individually visualize information and have the right machine at the right time.
Some other interesting information to identify the criteria for evaluating the sustainability of the solutions for adapting production systems comes from articles concerning the retrofitting of process plants.
Di Carlo et al. [24] considered the smart retrofitting of a process plant for improving safety and maintainability from an Industry 4.0 perspective through the use of artificial intelligence tools.
May Tan et al. [25] analyzed the retrofitting of a palm oil milling process realized to cope with increased production capacity.

Materials and Methods
The framework proposed in this paper aimed to provide the most sustainable machine tool retrofitting solution through a clear set of steps to be followed.
The literature review considered articles addressing machine retrofitting. Scopus was selected as the database, the search string adopted was "machine AND retrofitting" by focusing on titles, abstracts, and keywords. Only papers written in English and published between 1992 and 2021 were evaluated. The resulting documents were further screened in order to use only those that performed retrofitting that improved one criterion of the sustainability triad.
For the case study, the "retrofitting analysis" section was based on the study by Di Carlo et al. [24], with the addition of an economic evaluation of the proposed solutions for retrofitting machine tools.
In the step "selection of the best solution through the AHP" the options of "market analysis" and "retrofitting analysis" were compared with the AHP technique [26]. The evaluation of the weights of the criteria and alternatives was carried out using the Delphi method [27][28][29].

General Framework
The proposed approach aimed to create a general methodology to assess the convenience of retrofitting an obsolete machine as compared to the purchase of new machines, taking into consideration the economic, environmental, and social aspects of sustainability ( Figure 2). This is extremely useful for companies that need to meet specific requirements in terms of the safety, reliability, and/or availability of a machine, level of connectivity, energy consumption, and emissions.
This framework can be divided into five stages: • Objectives analysis; • Market analysis; • Retrofitting analysis; • Collecting information; • Selection of the best solution through the AHP.
The following subsections explain these 5 stages in detail. Selection of the best solution through the AHP.
The following subsections explain these 5 stages in detail.

Objectives Analysis
This phase consists in defining the objectives that lead a company to decide to replace or retrofit a machine. Typical objectives concern operator safety, machine reliability and/or availability, energy consumption, and emissions. Furthermore, considering the

Objectives Analysis
This phase consists in defining the objectives that lead a company to decide to replace or retrofit a machine. Typical objectives concern operator safety, machine reliability and/or availability, energy consumption, and emissions. Furthermore, considering the current technological transition to Industry 4.0, it is useful to consider these objectives in terms of adapting to this new paradigm.
Safety is certainly a frequent issue that leads companies to replace or retrofit machines they have, since a company's work equipment must comply with specific rules and regulations. In addition, there are other obligations for the employer such as the choice and adoption of technical measures for risk minimization, the search for compliance with ergonomic principles in working environments, the carrying out of the first installation and periodic checks, the carrying out of suitable maintenance to ensure overtime compliance with the original technical and operating characteristics, the provision of education for use and maintenance, and the updating of preventive measures concerning organizational and productive changes which are relevant for the health and safety of workers or regarding the degree of the technical evolution of prevention and protection.
Reliability and availability are other fundamental aspects related to business needs regarding the possibility of replacing or retrofitting an old machine. Reliability can be defined as the probability that an element (machine, subsystem, or component) will function without breaking down for a certain time from start-up and under predetermined environmental conditions. Availability can instead be defined as the percentage of good operating time compared to the total time in which the operation of the element itself is required (machine, subsystem, or component). The availability of a machine can be calculated as the ratio of Up Time to the sum between Up Time and Down Time.
Furthermore, the reduction of environmental impact is becoming an increasingly pressing priority for companies. It should be emphasized that companies that take a balanced approach to sustainability by reducing energy consumption and emissions derive economic and environmental benefits, and in the medium to long term they will have the possibility of enjoying greater growth prospects.
The transition to Industry 4.0 positively affects most of the above aspects but implies investment and the development of data protection measures.

Market Analysis
This concerns the execution of market analysis involving the search for new machines with the same functions as the retrofitted machine and that have the required characteristics.
Furthermore, a competitor analysis is carried out where, through the comparison of technical characteristics, purchase prices, maintenance costs, and the performance of the various machines available, the most suitable machines will be chosen.
It should be stressed that the "market analysis" phase must be done in any case, and it is always necessary for the choice of the final assessment. In fact, the option of buying new machines (which emerges from the market analysis) will be compared with retrofitting when this latter option is possible. Otherwise, we will proceed with the only possible alternative, which is a comparison among the new machines chosen thanks to market analysis.

Retrofitting Analysis
This step involves the evaluation of the retrofitting process starting from a preliminary analysis which consists of a technical analysis related to legislation constraints. In this step, the company questions whether through retrofitting it is possible to achieve the standards required by technical specifications and in terms of safety, reliability and availability, energy consumption, and emissions, as defined in the first phase "objectives analysis".
According to the definition of the objectives, it is assessed whether it is possible to achieve the minimum requirements previously established through a non-substantial modification of the machine in order to avoid the need to re-certify the machine. Following Machinery Directive 2006/42/EC [25], a non-substantial modification refers to a construction modification that does not fall within ordinary or extraordinary maintenance, an intervention that does not change the function and/or performance of the machine, or the installation of programmed logic or operations not contemplated by the manufacturer. This type of retrofitting is called "light retrofitting" while that which provides for a substantial change is called "strong retrofitting". The case of strong retrofitting includes adaptation in terms of Industry 4.0 and is known as "smart retrofitting" [22].
If it is not possible to perform any kind of retrofitting, this option will be automatically excluded in favor of the evaluation of n different possible new machines identified in the "market analysis" phase.
When it is possible to carry out any type of retrofitting, a feasibility analysis (a more in-depth type of technical analysis) will be carried out in which the following aspects are evaluated:

•
All the necessary technical interventions both at the hardware and software level; • All related costs (design, acquisition, installation, operation, maintenance, and disposal); and • Development and installation time (machine downtime).

Collecting Information
In this phase, data from the market analysis and the retrofitting analysis are collected. The "collecting information" phase is concluded once the results of the market analysis and the retrofitting analysis are received. Two possibilities may emerge from these analyses:

•
A negative outcome of the retrofitting analysis: AHP will be carried out only with the alternatives identified in the market analysis; • A positive outcome of the retrofitting analysis and identification of the possible alternatives of retrofitting: In this situation the AHP will be carried out both with the alternatives of retrofitting and with the new machine solutions identified in the "market analysis" phase.

Selection of the Best Solution through the AHP
This last step considers a methodology for a qualitative study for the choice of the best alternative in terms of sustainability between the options identified in the "collecting information" step. The AHP is used to compare multiple solutions concerning a plurality of criteria and to obtain an overall assessment for each of them. The procedure used in this work was as follows: • Break-down of the decision-making problem into a series of sub-parts that are easier to analyze.
Starting from the bottom of the hierarchy, these aspects were identified: 1.
The alternatives, i.e., the options that the decision-makers have; 2.
The criteria and sub-criteria, i.e., the attributes by which the alternatives considered can be evaluated; and 3.
The goal to be achieved.
For a sustainability study, the criteria can be chosen based on its 3 pillars (As shown in Figure 3): the economic, environmental, and social aspects. The criteria identified in the literature review were grouped into 10 according to the literature proposed in Section 2.2. Table 3 shows the 10 criteria with their description and influence. These are positive characteristics which have a positive influence on the choice of the best solution, and negative characteristics which have a negative influence. Therefore, within the AHP they will work in opposite ways.  Degree of simplicity in the use of the machine by the operator. Autonomy refers to the machine's ability to make decisions. As the user-friendliness parameter increases, the machine will become more and more autonomous (e.g., in the choice of machining parameters) and the operator will find it easier to use.

Level of connectivity
The ability of the machine to be connected to the corporate network. The machine may have different types of connectivity, (wired or wireless).

Positive
Maintainability/Service level This parameter represents how much cheaper it is to have maintenance on one machine as compared to another and how much maintenance affects the service level. This parameter considers the cost, frequency, and timing of maintenance, and whether the machine can predict when maintenance will be carried out.

Shelf-life
The period during which the machine maintains sufficient levels of performance before degradation that affects its functionality occurs.

Positive
Production Waste Waste costs in terms of raw materials, production costs, energy, and disposal costs Negative • Weighing up of the criteria, sub-criteria, and alternatives according to their importance concerning the comparison element.
To assess the value of the criteria, sub-criteria, and alternatives, the Delphi technique is used. This is defined as a several-step survey aimed at reaching an agreement between a group of experts [26].
The basic steps of the Delphi process followed in this work were as follows:

1.
A panel made up of 6 experts from a private company (technical managers, operation managers, maintenance managers) and academic staff was selected; 2.
The panel of experts anonymously expressed its opinion on the matter through a survey or other document; 3.
Opinions were collected and summarized in aggregate form in a single document; 4.
The panel of experts reanalyzed the opinions that emerged by comparing them with the initial opinion.
The cycle was iterated until a satisfactory level of convergence was achieved. At the end of the different rounds, a certain convergence in opinions was usually achieved and taken as a Delphi forecast [27].
In the second step of the AHP, simple pair comparisons are made to determine weights and ratings so that the analyst can focus only on 2 factors at once. The following Saaty semantic scale is used (Table 4).

Reciprocals
If activity i takes on a certain value when compared to activity j, when j is compared with i it will assume the corresponding mutual value.
After developing a judgment matrix, a priority vector is calculated to weigh the elements of the matrix or the normalized eigenvector of the matrix. Furthermore, it determined whether the matrix of pair comparisons is consistent. The main eigenvector has a maximum eigenvalue λ max . In the case of a perfectly consistent reciprocal matrix of order n, the values of λ max and n coincide, while for a not perfectly consistent matrix λ max will be greater than n. Saaty proposes the consistency index (CI) (Equation (1)): Consistency assessment is performed by comparing the CI obtained from the comparison matrix with that equal to the CI mean of many arrays of the same order (n), randomly generated (RI n ), and provided by Saaty himself (Table 5): CR is the consistency ratio and can be calculated as the ratio of the consistency index to RI (Equation (2)): The CR should be less than 0.1 [26]. The result of the AHP returned the best alternative between light and/or strong retrofitting and the purchase of new machines.

Case Study
The proposed framework was applied by a manufacturing company that uses different machine tools. The latter concerned the sustainability assessment of adaptation options or replacement of a drill press. The machine under consideration is a column drill whose characteristics are shown in Table 6.
The spindle descent is operated manually using a lever by the operator, who can check the lowering level through a mechanical gauge on the lever.
In its initial state, the machine is not equipped with any form of safety measures with regard to the protection of the working area nor in relation to the electrical part ( Figure 4). In fact, the control buttons are connected to the same power supply line as the motor and there is no holding circuit to prevent unexpected start-up. Furthermore, there is no emergency stop button.

Objectives Analysis
After a description of the as-is state of the machine, the company, with the help of a panel of experts, defined the following macro-objectives for adaptation or replacement: • Safety: The machine must comply with the minimum safety standards of the Italian Legislative Decree on safety (Decree 81/08). In addition, solutions that further improve safety conditions are preferred. • Industry 4.0: Although this is not a particularly complex machine, it may be useful to ensure that the machine is connected to the company network in order to monitor the status of the process. In addition, the machine must be equipped at the very least with a system for monitoring process parameters.
In particular, the following standards must be met concerning safety: • Compliance of the machine with UN IEN 12717 standard which specifies the safety measures and requirements to be adopted by those involved in the design, manufacture, and supply (including installation and dismantling, with provisions for transport and maintenance) of stationary drills; • Conformity of the device concerning the electrical part to IEC 60073, which defines the basic and safety principles for man-machine interfaces, and IEC 60447, which describes the operating principles.
In addition, the company wanted to improve process control conditions and possibly also allow remote control of machining parameters such as absorption, spindle speed, and tool descent.
As far as technical specifications are concerned, is necessary to retain the characteristics of the original machine in terms of power, speed, and working area.

Market Analysis
According to the standards mentioned in the "objective analysis" phase, the market analysis identified machine tools that had approximately the same characteristics as the drill in its initial state but that met the safety standards of UN IEN 12717, IEC 60073, and IEC 60447. In addition, in the "market analysis" phase we looked for drills that met Industry 4.0 requirements. The only machines that met these requirements were machines that fulfilled the required functions but were much more complex than necessary (such as CNC machines) and were therefore very expensive and bulky. Table 7 shows the drill presses identified in the "market analysis" phase and their characteristics.

Retrofitting Analysis
After a technical assessment of the original state of the machine and of the objectives, it is possible to carry out both light retrofitting capable of guaranteeing the minimum safety objectives required, and smart retrofitting which, in addition to guaranteeing safety standards, allows the drill to be adapted to the needs of monitoring and control according to Industry 4.0 paradigms.
With regard to light retrofitting, the following interventions were planned: • The installation of a low-voltage (24 V) self-holding circuit to operate the on/off and emergency stop controls ( Figure 5); • Installation of a switch connected to the self-holding circuit inside the belt box ( Figure 6); • Installation of a movable protection screen (with a switch connected to the holding circuit) that prevents the risks of projections, splashes, and catching of clothing during spindle rotation (Figure 7).  In this case, light retrofitting had an approximate cost of €350.
For smart retrofitting, in addition to the light retrofitting, the system was equipped with an electronic variable speed drive (inverter), a control card, and an electronic spindle descent meter. This allowed us to control and monitor process parameters such as speed, torque, and spindle descent more accurately, and to be able to communicate with external systems via the Ethernet port. Specifically, the development of 2 applications was planned: one that can be used directly by the operator on the machine, and the other that is needed by those involved in production control and monitoring. The application available to the operator is an app that can be installed on any Android mobile phone. After the operator logs in, it allows him to enable machine operation and monitor process parameters in real-time. In addition, the app is equipped with a special function that allows the operator to automatically set the machining parameters of a specific tool by accessing a database that scans a bar code located on the tool (Figure 8). The management application is a web-based app that, in addition to monitoring the process parameters in real time, allows operators to visualize the process through a 3D model (Digital Twin), to visualize the trend over time through graphs, and to possibly record the process data and consult them for future analysis (Figure 9). Smart retrofitting has an approximate cost of €1200. Concerning the time required for interventions, smart retrofitting requires more time than light retrofitting.

Collecting Information
From the market analysis and the retrofitting analysis the alternatives in Table 8 emerged and they were evaluated in the next step through the AHP analysis.  Initially, the criteria were compared in pairs according to their contribution towards achieving the objective (Figure 11), and then the 5 alternatives were compared against each of the 10 criteria ( Figure 12). The evaluation was carried out using the Delphi method. A group of experts was set up consisting of personnel from the company itself (technical office manager, operation managers, maintenance manager), the head of the department where the machine was to work, and 2 researchers working in the field of smart manufacturing. The research group met and came up with the following weights (Figures 11 and 12). User-friendliness/autonomy −3  3  0  0  −3  3  3  3 3 - In Figure 11 we see the comparison matrix between the criteria regarding the achievement of the goal. The values are about the rows; therefore, a positive value will be positive for the reference row while a negative value will be positive for the reference column. −3  3  0  0  −3  3  3  3 3 -  Figure 12 shows the matrix comparing the alternatives against the criteria. Concerning the characteristics, the values reported when positive refer to the alternatives in the left column; otherwise, if negative, they refer to the alternatives in the right column.

Production waste
The analysis of the characteristics through the AHP showed that the most influential criteria were cost, service level/maintainability, and technical performance ( Figure 13). It was found that the ideal solution was still the smart retrofitting solution (Figure 14) despite the higher purchase cost compared to the other solutions. This is because the smart retrofitting solution not only positively influences all parameters of digitization but also has a strong impact on the safety parameter.

Discussion and Conclusions
End-of-life management in machine tools is a problem that arises when the machine can no longer guarantee the required functionality in terms of quality, time, reliability, and safety. When these characteristics are no longer met, the choice is made between buying a new machine or retrofitting.
In this paper, a framework for assessing the sustainability of different options for adapting a machine tool was proposed. In particular, the solutions for retrofitting the existing machinery and the solutions for purchasing a new machine to replace the old one were considered. The framework was developed in five stages: "objectives analysis", "market analysis", "retrofitting analysis", "collecting information," and "selection of the best solution through the AHP". The "objectives analysis" phase defined the objectives to be achieved through the adaptation, and the "market analysis" phase identified new machines to be purchased that meet the required specifications. After assessing the feasibility of retrofitting, two types of retrofitting were analyzed in the "retrofitting analysis" phase: one that met the minimum safety requirements and the required specifications, and the other that in addition included adaptation to Industry 4.0. The "collecting information" stage contained the solutions analyzed in the "market analysis" and in the "retrofitting analysis" phases. These solutions were evaluated by a pool of experts through the AHP to find the best solution in terms of sustainability in the "selection of the best solution through the AHP" phase.
The methodology proposed in the framework was to use AHP with a qualitative approach to evaluate the best solution in terms of sustainability. Unlike other techniques, this choice allowed us to carry out the analysis without the need for quantitative data [30]; this is certainly a positive aspect because very often in practical cases we rarely have all the data needed for a quantitative assessment. Moreover, even if these data are available, the quantitative evaluation would take much longer than the proposed solution. For the evaluation carried out (which is qualitative), it was necessary to set up a pool of experts to assign weights to the criteria and alternatives proposed. This implies that the weights assigned are strongly influenced by the people in the pool, making the analysis highly subjective because of the assignment of weights and the comparison of the various options [28,29,31].
The proposed framework was applied to a case study of a drill press. Three purchasing solutions and two retrofitting solutions (light retrofitting and smart retrofitting) were analyzed. The analysis showed that the retrofitting solutions were more cost-effective than the purchasing solutions, and that strong retrofitting in particular was the best in terms of the sustainability triad.
Concerning the case study, although the drill press is a rather simple machine used as a pilot project, the results obtained showed that the most sustainable solution was that of smart retrofitting. It could be very interesting, therefore, to adopt the same approach for more complex machines where smart retrofitting could be even more effective.
As for future avenues, in addition to applying the framework to more complex machines, a quantitative analysis could be carried out and possibly a mixed approach developed to optimally handle the available data. Furthermore, another fundamental part of the analysis will concern data protection and the encryption of messages between the various devices. Funding: This research was funded by INAIL (Istituto Nazionale per l'Assicurazione Contro gli Infortuni sul Lavoro), the Italian National Institute for Insurance against Accidents at Work, under the BRIC 2018 project titled "Sviluppo di soluzioni smart attraverso metodologie Digital Twin per aumentare la sicurezza degli operatori durante i processi di manutenzione degli impianti produttivi"-BRIC ID12.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.