Do Organizational Virtues Enhance Work Well-being? The Mediator Role of HRM Practices Theoretical-empirical Article

Context: over the last decades, positive psychology has brought up the need for research on positive emotions and attitudes, such as organizational virtues and well-being at work. Moreover, there is evidence that virtues may influence the perception about human resource management practices, constituting a driver of well-being in work context. However, literature signalizes the gap regarding research models covering the relation between these three variables. Objective: this study aimed to evaluate the relation between organizational virtues and well-being at work, mediated by the perception of HRM practices. Methodology: the research is classified as quantitative, carried out through a survey, with 286 participants, using structural equation modeling through the JASP software. Results: results confirmed the partial mediation played by HRM practices in the proposed model, bringing a theoretical contribution by joining the three variables into a single model, with psychometric evidence of the strong prediction of organizational virtues on HRM practices and well-being at work. Conclusion: as a managerial implication, our findings compose a diagnosis that shed light on the relevance for managers in organizations to prioritize organizational virtues and HRM practices in order to enhance healthier work environments.

INTRODUCTION INTRODUCTION
The organizational context and the changes in the labor market require the worker to be flexible and able to adapt to new demands and difficulties (Ribeiro, Mattos, Antonelli, Canêo, & Goulart, 2011). Consequently, challenges arise for researchers and managers, highlighting the need for broadening the understanding of human behavior and social interactions in the workplace context (Estivalete, Costa, & Andrade, 2014), since people have essential competences that provide strategic organizational differentiation (Horta, Demo, & Roure, 2012).
The Positive Organizational Studies theoretical movement has gained prominence in the last decade as a research stream focused in improving organizations, using their internal strengths and turning their attention to the study of variables such as virtues and well-being at work (Cunha, Rego, & Lopes, 2013). Studies on organizational behavior with positive guidance aimed to investigate and understand the potential of employees and enable the development of strengths and capabilities of each worker (Luthans, 2002).
The healthy and effective functioning of organizations and their workers cannot be achieved solely through corrective actions to prevent undesirable results (Marujo, Neto, Caetano, & Rivero, 2007). In this context, there is consensus on the importance of well-being for individuals and organizations. Among the variety of conceptual definitions, there has been a tendency in the scientific literature to approximate the terms well-being and happiness (Warr, 2007).
Researchers have developed theories about the relevance of organizational virtuosity, with reference to the organizational context where virtues are supported, practiced, disseminated, and preserved, both individually and collectively (Bright, Cameron, & Caza, 2006). From the individual perspective, virtue is a moral power or potency; a stable disposition to behave morally in a positive way (Oliveira & Tamayo, 2008).
In organizational terms, virtues strengthen organizations by providing a clear representation of what is desirable and honorable at individual and collective levels (Cameron, Bright, & Caza, 2004). Although it is still an underexplored variable, Moore and Beadle (2006) emphasize the importance of investigating virtues in the work context, since they can act as well-being boosters (Ryff & Singer, 1998). Likewise, Gomide, Vieira, and Oliveira (2016) argue that constructs from positive psychology, such as organizational virtues and well-being at work, should be studied in a more complex model, including organizational culture variables, as much as organizational practices.
As a central element of the organizational culture core (Hofstede, Neuijen, Ohayv, & Sanders, 1990), organizational practices, in which human resources management practices are included, have gained an important highlight on the agenda of organizational scholars (Yang et al., 2018). The reason for this is the patent influence on such practices on employees attitudes, behaviors, and emotions (Tamayo, Mendes, & Paz, 2000), as well as the impact on organizational results, like effectiveness and performance (Demo, Fogaça, & Costa, 2018;Guest & Conway, 2011;Nusrat, 2018).
The role of human resource management (HRM) in organizations nowadays is strategic, and its management should be in line with organizational planning and strategy (Legge, 2006). According to this author, strategic human resource management explores the way organizations manage work relationships in order to achieve goals, build healthier work environments and provide well-being to employees.
Therefore, the present study intends to evaluate the relation between organizational virtues (OV) and well-being at work (WBW), mediated by the perception of human resource management (HRM) practices. The relevance of our proposal lies in its contribution to the advance of organizational behavior research, from the positive psychology perspective, through the employees' potential in leading organizations to better results. We do that by investigating the unexplored relation between the three constructs simultaneously in a complex model, including mediation, highlighting the effects from organizational culture elements on workers' perceptions and emotions (Gomide, Vieira, & Oliveira, 2016).
Moreover, this research addresses other literature gaps. First, there is the identification of both antecedents and consequents of HRM practices in a same model, testing its role as a mediator (Armstrong & Taylor, 2017;Pires & Nunes, 2018;Singh, David, & Mikkilineni, 2018). Secondly, we address virtues in the work context as a predictor variable in organizational studies (Moore & Beadle, 2006).

Well-being at work
Considering people spend a good part of their lives in the workplace, or are working remotely, it is essential they feel good about it (Siqueira & Padovam, 2008). Deci and Ryan (2008) indicate that employees who feel good at In this context, scholars call for discussions and studies regarding well-being at work, since it is a broad area needing conceptual comprehension (Paschoal et al., 2013;Paschoal & Tamayo, 2008;Siqueira & Padovam, 2008). Luthans (2002) corroborates this perspective highlighting that most of the studies in academic literature focus on the understanding of negative psychological experiences of the worker and dysfunctional behaviors or results. Nevertheless, since the 1990s, a movement with the objective of fulfilling this gap of studies investigating positive phenomena related to individuals and groups started to consolidate and gain strength in the academic field, enabling a revaluation of human potentials and virtues (Paludo & Koller, 2007).
Under the organizational perspective, there seems to be a trend of incorporating intervention programs from positive psychology in stress management in the workplace (Tetrick & Winslow, 2015). To the authors, such programs can be successful for employees ' health promotion. Similarly, to Hirschle, Gondim, Alberton, and Ferreira (2019), stress level control in the work environment can help the workers preserve well-being at work by a better use of their regulatory processes. This was confirmed when Scheibe and Zacher (2013) highlighted that the ability of dealing with negative emotions in the workplace is an essential condition to reduce potentially adverse outcomes, like tensions, anxiety, and emotional exhaustion.
General well-being is divided into two main streams. First, subjective well-being addresses the subjective state of happiness (hedonic well-being) and represents a field of study that seeks to understand people's evaluation of their own lives (Albuquerque & Troccoli, 2004). Second, psychological wellbeing investigates human potential (eudemonic well-being) and is centered on personal expressiveness and self-realization experiences, known as central and defining elements of happiness (Deci & Ryan, 2008;Waterman, 1993).
In short, well-being configured in hedonic vision is an affective state, so positive affects predominate over negative ones. On the other side, well-being as personal fulfillment is characterized by the perception of development of potentials and progress in life purposes, representing the cognitive aspect of well-being (Waterman, 1993).
In this context, Paschoal (2008) defines well-being at work (WBW) as "the prevalence of positive emotions at work and the individual's perception that, in his work, he expresses and develops his potential and advances in the attainment of his life goals" (Paschoal, 2008, p. 23). This concept was validated in Brazil and brings together both cognitive and affective aspects of well-being. Since it embraces the hedonic and eudemonic perspectives, it is the concept adopted in the present study. Along with this definition, the scale validated by Demo and Paschoal (2016)in the United Statespreviously developed and validated in Brazil by Paschoal and Tamayo (2008), the Well-being at Work Scale (WBWS) -is the most recent scale in scientific literature and, for this, it is the instrument chosen for this research.
Regarding literature reviews on WBW, Paschoal et al. (2013) indicated the lack of studies on this topic, especially in Brazil, where the need for academic production about WBW in business and psychology journals is patent. Furthermore, scholars point out the relevance of the theme for contemporary organizations and the trend to encourage workers' positive experiences in the WBW study field (Warr, 2007). Nonetheless, theoretical and empirical advances are not resulting in effective changes in organizations (Bertoncello & Borges-Andrade, 2015). Based on this, Hirschle et al. (2019) reaffirm the need for acting toward the prevention and the offer of better physical and psychological conditions in the organizational environment.
Likewise, empirical developments indicated, over the years, the influence of several organizational factors on WBW, such as social climate, justice perception, and organizational support (Paschoal, 2008); organizational power (Dessen & Paz, 2010); turnover, absenteeism, and performance (Warr, 2007); and adaptive and functional strategies (Hirschle, Gondim, Alberton, & Ferreira, 2019). Besides these, other investigations must be underscored: Dose, Desrumaux, Sovet, and De Bosscher (2018) examined the relation between career success and WBW, mediated by psychological needs satisfaction, indicating they predict WBW. Mellor, Dufoix, Saunder, Albert, and Collange (2018) investigated factors that reinforce well-being at work, evaluating the mediator role of social support perception. As a result, they observed that positive situations at work, where social support is perceived, are associated with well-being increase. Braga, Andrade, Estivalete, Oliveira, and Costa (2017) studied the influence of organizational values on WBW perception, revealing a positive relation between variables, corroborating other papers in the same direction, like the works of Silva, Porto, and Paschoal (2010) and Souza (2012). Therefore, we understand that studies about WBW have composed the positive psychology agenda since its inauguration. Besides, we foresee a tendency for further investigation when the agenda is the promotion of healthier organizational environments. Regarding empirical studies on well-being, literature shows overall that organizational and labor variables are the main predictors of well-being at work (Paschoal et al., 2013), indicating the importance of studies including positive psychology constructs, such as organizational virtues (Magnier-Watanabe, Uchida, Orsini, & Benton, 2017).

Organizational virtues
In a context of deteriorating trust in organizations, resulting from corruption and lack of business ethics, among other factors (Bright et al., 2006;Cameron et al., 2004), it is crucial to rethink organizational performance (Peterson & Park, 2006). In this sense, the Positive Organizational Studies movement, which assumes health as opposed to disease (Scorsolini-Comin, Fontaine, Koller, & Santos, 2013), has proposed investigations at the organizational level with the objective of understanding the highest human potential, such as the virtues, promoting progress for people, communities, and institutions (Paludo & Koller, 2007).
Virtues are described as dignifying behaviors and results, the best of the human condition, the essence of humanity, and the highest human aspiration (Bright et al., 2006;Cameron, 2003). Virtues promote health, happiness, transcendence, meaning, and resilience (Ryff & Singer, 1998). However, even with the robustness of such conception, scientific literature still lacks a consensus regarding an exact number of virtues (Hamrahi, Najafbagy, Musakhani, Daneshfard, & Delavar, 2015).
Several studies have shown the role of virtues, at the individual level, in different aspects, for example, in the creation of love and empathy (Ribeiro & Rego, 2010); moral strength, determination, and tolerance toward difficulties (Baumeister & Exline, 1999); health and resilience to adversity (Ryff & Singer, 1998); and happiness and engagement at work (Singh et al., 2018). From this, we observe a scientific gap concerning studies investigating the importance of virtues in the organizational arena (Ahmed, Rehman, Ali, Ali, & Anwar, 2018;Liu, Wang, & Chen, 2019;McLeod, Moore, Payne, Sexton, & Evert, 2018).
In organizational terms, virtues strengthen organizations by providing a clear representation of what is desirable and honorable, at individual and collective levels . According to Zhang and Liu (2019), organizational virtue is an aggregate construct composed by a set of virtues. To these authors, the representation of a virtuous organization is not connected only to the virtues of its members, being linked to a unified organism with its own systems, structures, processes, and culture.
In addition, virtues in the work context are understood as qualities representing employees' belief in ethical and moral conducts (Ferrell, Fraedrich, & Ferrell, 2001). Virtues are also habits, desires, and actions that carry personal and social good (Cameron, Dutton, & Quinn, 2003) and positively influence the organization's ability to deal with adverse situations that could be harmful (Bright et al., 2006). According to Caza, Barker, and Cameron (2004), when organizations face uncertainty, virtues can play the role of guiding the organization to better performance through two attributes. The first one is the amplification of qualities that can favor and reinforce behaviors, attitudes, and positive contexts. The second is buffering qualities that protect the organization from negative consequences and create resilience, enabling the organization to recover faster from trauma -for example, in changing environments and market ambiguity. With reference to the collective level, Bright, Cameron and Caza (2006) present virtues by two ways: virtues in organizations and virtues through organizations. The first concerns individual behavior in the organizations and the second is related to the facilitators promoting and stimulating virtues in their members. Park and Peterson (2003) also divide organizational virtues in two types: (a) tonic virtues, a general condition, existing in any given time; and (b) phasic virtues, dependent on an external event, occurring only when a situation raises its need. In the same direction, Seligman and Csikszentmihalyi (2000) concluded that virtues play an important role in fighting psychological stress, addictions, and dysfunctional behaviors.
For Bright et al. (2006), in the organizational scenario, groups demonstrate virtues including actions that would be more difficult to be accomplished individually. Additionally, the effect of collective virtues may support a condition in which the drive to pursue excellence becomes part of the organization's culture . The authors add that, at the aggregate level, virtues have been associated with organizations, communities, and cultures, arguing that economic prosperity and the society longevity depend on them, since their existence implies the internalization of moral norms necessary to stability and social harmony.
With the purposed of increasing the number of studies on OVs, Gomide et al. (2016) developed, with evidence of validity, a measurement instrument for organizational virtues perception, with three factors: organizational good faith, organizational trust, and organizational generosity. This is the measure adopted in the present study, since it is the only scale validated in the Brazilian context, besides its good psychometric indices. Consequently, the concept for OV of this paper is "employee's set of beliefs that the employing organization has the ability to govern its relationships truthfully, to fulfill future commitments and to sacrifice its interests to reach the interests of its employees" (Gomide et al., 2016, p. 305).
Along these lines, Meyer, Stanley, Herscovitch, and Topolnytsky (2002) affirm that the individual's moral bond with the organization can be affected by the OVs, making it a pertinent and necessary subject for future studies on organizational behavior. Shahid and Muchiri (2019) proposed in a theoretical model the value of positive organizational behavior in the workplace, suggesting new roots to the development of studies relating OVs with leaders' authentic behaviors, psychological capital, prosperity, and performance. Notwithstanding the advances, OV researches are still incipient (Dawson, 2018;Hamrahi et al., 2015;Kooshki & Zeinabadi, 2015;Meyer, 2018), confirming it is a fertile field for forthcoming studies. In addition, Shahid and Muchiri (2019) highlight the need for more investigations regarding the antecedents and consequents of OVs.
In addition, recent studies related OVs to HRM and organizational structure (Hamrahi et al., 2015), organizational citizenship (Kooshki & Zeinabadi, 2015;Malik & Naeem, 2016), corporate social responsibility and organizational identity , ethical leadership and employee engagement for environmental protection (Zhang & Liu, 2019), performance and subjective wellbeing (Magnier-Watanabe et al., 2017), a specific interest for the present study. Hypothesis 1 derives from this discussion.
Hypothesis 1: Organizational virtues are positively related to well-being at work. Gomide et al. (2016) argue that constructs recently studied by positive psychology, such as organizational virtues and well-being at work, should be studied in a more complex model, including important variables of the organizational culture, as much as organizational practices.

Human resource management practices
Changes in the economic environment, the pursuit of people for better life quality at work, and the growing need for achieving results at individual and organizational levels have led companies to adapt to new contexts, seeking continuous innovation and advocating for healthier environments through investments in human capital (Demo et al., 2018). In this sense, HRM has evolved having people as an essential competency in achieving objectives and goals (Legge, 2006). In fact, before producing results, organizations should privilege the promotion of superior satisfactions in all their relationships (Demo et al., 2018).
According to Armstrong and Taylor (2017), HRM in the contemporary world should have as main characteristics: strategy with emphasis on integration; focus on entrepreneurship and business values; and the treatment of people as valuable resources for the organization (human capital), in order for them to be a competitive differential benefit. These arguments are in line with the resource-based view proposed by Barney (1991), the guiding theory of the present study. In this direction, HRM should follow coherent and consistent theories, aligned with organizational planning (Demo et al., 2018). Besides, HRM must play an active role in strategic choices, especially in the preparation of human talents for change (Bagnoli & Vedovato, 2014).
As stated by Legge (2006), there are differences between the classic personnel management and the current HRM, known as conservative (hard) and modern (soft), respectively. In the first one, the focus lies on integrating human resources practices with business strategy, emphasizing quantitative aspects, context in which people are considered an economic resource (Armstrong, 2014). The current perspective maintains the human resource (HR) activities and business strategies integration, proposed by the hard perspective (Legge, 2006). However, it considers employees as a valuable organizational inventory, as they propel production and knowledge management in organizations, translating it into better results: innovation and competitive advantage for private organizations; and productivity, speed, and transparency for public institutions (Legge, 2006).
Following this perspective, strategic human resource management (SHRM) is the rethinking of policies, practices, and activities of human resource management, taking into account contextual variables and multiple actors, assuming the role of HRM is internal cohesion (Buren, Greenwood, & Sheehan, 2011;Jackson, Schuler, & Jiang, 2014). These authors recognize that SHRM proposes an integration with organizational objectives in order to facilitate organizational plans establishment, to leverage results and their capacity for resilience.
In addition, Huselid (1995) and Pfeffer (1998) agree that the practices implemented by SHRM allow an increase in the knowledge, skills, and assertive attitudes of employees (KSAs). Hence, HRM should be seen as the ability to manage human resources through practices to gain and maintain competitive advantage (Mathis & Jackson, 2003). Oliveira and Oliveira (2011) define HRM as an integrated set of strategies, policies, and practices designed and planned to manage people in organizations.
To clarify the differences between the concepts of 'strategies, ' 'policies,' and 'practices,' Martín-Alcázar, Romero Fernández, and Sánchez-Gardey (2005) indicate that HRM strategies set the guidelines for work force management, while policies seek to coordinate practices so they are coherent and move in the same direction. Practices are at the end of the operation, assuming the lowest level among the three concepts, as they represent individual actions. Moreover, strategies are developed through policies, which, in turn, are implemented through practices, constituting the operational definition of policies (Demo, 2016). In such a way, practices assume the meaning of habit, routine, or policy component activities (Legge, 2006). Furthermore, HRM practices encompass the activities that collaborators actually deploy and experienced, enabling its objective verification and measurement by research instruments (Oliveira & Oliveira, 2011). The referred authors emphasize there must be an integration between HRM practices and organizational internal and external contingencies. Bringing together this perspective and the resource-based view, as well as the soft version of human resource management, HRM organizational practices are important when they are aligned with the goals of the organization, so they promote the conditions for employees to effectively contribute to results optimization, regardless of how they are measured (Legge, 2006). Thus, organizations should strive to focus on employee engagement through the implementation of successful HRM practices (Aktar & Pangil, 2018).
Nonetheless, there is a lack of research proposing validated scales that evaluate employees' perception of HRM practices in the workplace (Huselid, 1995). These scales, according to the referred author, need to be comprehensive, including the highest number of practices cited in the literature; and need to present good internal validity indices, as well as external validity and high reliability.
Therefore, the HRM practices model adopted in the present research was based on the proposal developed by Demo (2016), and in the study of Demo, Neiva, Nunes, and Rozzett (2014), who developed and validated the Human Resource Policy and Practice Scale (HRPPS), with crosscultural validation in Brazil and the United States, obtaining good internal validity and reliability indices. The HRPPS covers the six groups of practices most cited in the literature, namely: recruitment and selection; involvement; training, development, and education (TD&E); work conditions; performance and competency assessment; and rewards and remuneration.
With respect to the relationship between HRM practices and other organizational behavior variables, in order to identify antecedents and consequents, studies indicated positive relationships between HRM practices and constructs such as commitment, productivity, profitability, and quality (Guest & Conway, 2011); organizational learning (Li, Rees, & Branine, 2019); and organizational performance (Fuenzalida & Riccucci, 2019;Nusrat, 2018). Regarding recent empirical production, research has advanced in terms of testing HRM practices mediation models (Sánchez, Marín, & Morales, 2015), while other studies have filled the gap concerning HRM practices background investigation (Demo, Fernandes, & Fogaça, 2017). There are studies that have confirmed established relationships, such as HRM practices and organizational commitment (Nassar, 2018) and organizational performance (Nusrat, 2018;Otoo, 2019).
Thus, it is fundamental to acknowledge the variables that affect and are affected by HRM practices for the advancement of human resource management academic literature, as well as recognizing their strategic role in organizations (Demo et al., 2018), demonstrated by the patent growth of studies in the area (Yang et al., 2018).
Indeed, organizations can improve results at individual and organizational levels by offering specific HRM practices (Veth, Korzilius, Heijden, Emans, & Lange, 2019). In this sense, special attention has been paid by researchers to the possible influences of HRM practices on well-being at work (Demo & Paschoal, 2016;Horta et al., 2012), laying the groundwork for Hypothesis 2.
Hypothesis 2: Human resource management practices are positively related to well-being at work.
Furthermore, an important agenda is the need to focus on the antecedents of HRM practices, as the construct has traditionally been investigated as an independent variable (Demo et al., 2018). Hence, the authors point out that testing positive psychology variables as predictors of HRM practices would strengthen the line of studies of these antecedents, especially concerning organizational culture elements, such as values and virtues. Likewise, some works have signalized the possibility of positive associations between virtues and HRM practices (Hamrahi et al., 2015;Malik & Naeem, 2016;Pires & Nunes, 2018), inspiring the proposition of the third research hypothesis.
Hypothesis 3: Organizational virtues are positively related to HRM practices.
Finally, in addition to the proposed hypothesis regarding the relationship between each pair of variables, the main contribution of this study lies in presenting a mediation model to test relationships among the organizational behavior variables that might influence HRM, as requested by Armstrong and Taylor (2017), including variables from the positive psychology perspective (Singh et al., 2018). Besides, Moore and Beadle (2006) emphasize the importance of exploring virtues in the work context and Paschoal et al. (2013) suggest investigations on the prediction role of HRM practices on well-being at work in more sophisticated models, including mediation.
Additionally, studies have found that, when perceiving organizational variables and HRM practices, employees tend to present an increase in well-being and health, promoting a general improvement in the overall performance of organizations (Fuenzalida & Riccucci, 2019;Ryff & Singer, 1998). Therefore, we propose the fourth and last hypothesis to be tested.

Hypothesis 4:
Human resource management practices can mediate the relationship between organizational virtues and well-being at work.

Instruments and sample
Participants responded to an instrument/ questionnaire composed by three scientifically validated scales with psychometric indices that confirm these instruments' reliability: (a) Perception Scale of Organizational Virtues (Gomide et al., 2016); (b) Human Resources Management Policy and Practice Scale (Demo, Neiva, Nunes, & Rozzett, 2014); and (c) the Well-being at Work Scale -WBWS (Demo & Paschoal, 2016). We also included demographic variables to characterize the sample.
The Organizational Virtues Perception Scale (Gomide et al., 2016) was the measure chosen to evaluate the independent variable of this study, organizational virtues. The scale is composed by 30 items distributed in three factors (organizational good faith, organizational trust, and generosity), with composite reliability indices greater than 0.95 (Coura, Demo, & Scussel, 2020).
For the mediating variable, the Human Resources Policy and Practice Scale was chosen to measure participants' perception of HRM practices regarding the organization in which they work. The scale consists of 32 items divided into six factors: (a) recruitment and selection; (b) involvement; (c) training, development, and education; (d) working conditions; (e) competency-based performance appraisal; and (f ) compensation and rewards. The scale has evidence of validity obtained by samples in the US and Brazil and composite reliability indices greater than 0.70 (Costa, Demo, & Paschoal, 2019;Coura et al., 2020;Demo et al., 2018).
Lastly, Demo and Paschoal (2016) presented crosscultural validity for the Well-being at Work Scale, which has 29 items in its final version, with good psychometric indices and composite reliability values above 0.91. Reliability indices were measured by Joreskog's rho (Demo & Paschoal, 2016). Exploratory factor analyses were performed to assess whether the initial structure of the three instruments was reproduced in this sample. Data shows the initial structures with signs of validity follow the same pattern previously found.
The sampling process was characterized as nonprobabilistic and by convenience. The instrument was applied and answered in person, on a voluntary basis, guaranteeing participants' anonymity. A ballot box was available in the researched companies for people to drop answered questionnaires. Four hundred questionnaires were distributed and 286 were answered, a return of 71.5%. The questionnaire also covered questions related to demographic information for sample characterization purposes, such as age, sex, schooling, and time working in the company.
The sample was composed most by adults from 29 to 39 years old (39%), reaching an average of 36 years old. Twenty eight percent of the respondents fell on the range from 18 to 28 years old, 23% from 40 to 50 years old, and, finally, 10% from 51 to 66 years old. Regarding gender, the sample had exactly 50% of male and 50% of female participants, after data treatment. Concerning schooling level, a question was included in the questionnaire for the participants to indicate their completed schooling, ranging from elementary school to doctoral level. Results indicated the majority of participants has higher education (73.4%), followed by those with high school education (22.3%), master's degree (3.8%), and only one individual with PhD, representing 0.5% of the sample. Regarding time working for the company, 38% of participants stated they have been working in their respective organizations for more than 10 years, 33% between 1 and 5 years, 19% between 5 and 10 years, and, lastly, only 10% less than 1 year.

Procedures of collection and data analysis
Regarding purpose, nature, means, and time horizon, the present study is characterized as a descriptive and explicative, quantitative, field survey and transversal research, respectively. To analyze the relationship between variables, the research model adopted organizational virtues as independent variable, HRM practices as mediating variable, and well-being at work as the dependent variable. Based on previous research (Demo et al., 2014;Demo & Paschoal, 2016;Gomide et al., 2016), we calculated factor scores (for each scale) and these measures were used to perform structural equation modeling. The second order concepts were used as latent variables in the model tested (organizational virtues, HRM practices and well-being at work). Data were analyzed in the software JASP version 0.14. Structural equation modeling used ML and DWLS (robust options) estimator and lavaan syntax. Mediation analyses were based on maximum likelihood -ML estimator and DWLS estimator (robust options). Considering each scale separately, exploratory and confirmatory factor analysis were performed using Factor and the results showed similar structure used before. The model with all scales together has not presented a good adjustment, so we tried using factor scores and second-order constructs only. In this study, we are showing only reliability measures for this sample.
To perform data processing, the first step was frequency distribution analysis, which was done using the listwise procedure to identify missing values. However, since the application was made and guided by the researchers themselves, there were no blank items. In the next step, we investigated the presence of outliers (Tabachnick & Fidell, 2013), which did not identify any outlier. These analyses considered only factors calculated. We tested the assumptions for the use of multivariate analysis, including normality tests considering JASP procedures. Univariate normality tests accused significance to all variables (factors). Mardia's test (multivariate normality) using R also accused non-normality (significance to skewness and kurtosis). Despite the indices presented, the structural model test was performed and presented a suitable adjustment. To solve problems with non-normality, we performed robust options in JASP software. Thus, the final sample consisted of 286 individuals.
Structural equation modeling was performed in JASP considering the following indicators: χ2 / gl -chisquare in relation to degree of freedom or NC (Watkins, 1989); CFI -comparative fit index (Bentler, 1990), standardized root mean squared residual (SRMR) and RMSEA -root mean square error of approximation (Browne & Cudeck, 1993). The model will be considered suitable for NC ≤ 3; CFI ≥ .95; RMSEA ≤ .08 (Browne & Cudeck, 1993;Kline, 2011). Factor scores and these measures were used to perform structural equation modeling. Second order latent variables were estimated in structural equation model.
This study used only one data source and is therefore subject to the common-method variance problems. Hence, confirmatory factor analysis was applied using one-factor structural equations, as recommended by Podsakoff, MacKenzie, Lee, and Podsakoff (2003). According to the authors, if the one-factor model presents adjustment, there is common-method variance. Nevertheless, results indicated the adjustment of the one-factor model was not acceptable (NFI = 0.52; CFI = 0.49; NNFI = 0.49). Thus, we concluded that the common-method variance alone does not explain the results.

RESULTS RESULTS
Firstly, descriptive analyses (mean, standard deviation, and mode) and reliability analysis by factor of each research variable are summarized in Table 1.  2,4,6,8,9,10,11,12,13,16,17,18,20,23,28,29)  Negative affects (items 2, 5, 6, 7, 9, 10, 12, 14, 15, 16, 18, 20) 2.08 0.90 1.00 0.94 0.94 Secondly, the correlations among variables are showed in Table 2. The factors of well-being, organizational virtues, and human resource management policies and practices are correlated among them. There are correlations also between gender, education level, and factors of the study variables. These correlations do not influence the model results because tests were performed including these variables in the model, but the fit measures were poorly adjusted.  In order to test the model, Mardia's test was performed and we found normality problems. So, we used robust option for ML and DWLS models. All the results are quite the same. Here we are describing ML resultsrobust option. After that, we tested a structural model using second order factors (we calculated factorial scores of all measures). The tested model (Figure 1) was evaluated through structural equations and overall fit (χ 2 = 166.257; df = 51; p < 0.001) was adequate. The proportion between qui-square and degrees of freedom was 3.26, below 5.0, as recommended by Kline (2011). The other adjustment indices that considered the sample size were also adequate (CFI = 0.96; NFI = 0.94; TLI = 0.94), although the residue was considered high (RMR = 0.03; SRMR = 0.04; RMSEA = 0.08; [IC 90% = 0.07, 0.10]). Thus, model fit results were considered quite acceptable. In this study, we tested the direct and indirect effects also through JASP software. Figure 1 illustrated the design of the model tested. The coefficients and variables are shown with indirect effects confirmed using JASP calculations and by comparing the restricted and non-restricted models. The hypothesis test results are shown in Table 3.
The standardized regression coefficient beta (β) indicates the intensity and direction of the correlation between independent variables (IVs) and the dependent variable (DV) (Hair, Anderson, Tatham, Black, & Babin, 2009). Some coefficients were significant, indicating positive and strong associations between variables. In addition, according to the model results, we observed organizational virtues are predictors of human resource management practices (β = 0.70; p < 0.001). Organizational virtues were also presented as drivers of well-being at work (β = 0.34, p = 0.003). This result did not support the second hypothesis of the study. Likewise, human resource management practices proved to be predictors of well-being at work (β = 0.77, p < 0.001). These results corroborate three hypotheses of the study. Additionally, according to the coefficients of determination (R 2 ), the organizational virtues explain 60% of HRM practices (high effect) and the organizational virtues added to HRM practices explain 20% of well-being at work (medium effect) (Cohen, 1992). Table 3 shows the model coefficients of the hypothesis tests. According to Hayes (2018), none of these paths is an essential condition for mediational effects.
Finally, mediation analyses supported Hypothesis 4: human resource management practices act as partial mediator in the relationship between organizational virtues and wellbeing (indirect effects b = 0.74; 0.001). In other words, human resource management practices indeed mediate the relationship between organizational virtues and well-being at work, as illustrated in Table 4.

DISCUSSION DISCUSSION
The objective of this paper was to test a mediational model with organizational virtues perception as an antecedent of well-being at work, a relation mediated by the perception of human resources practices in work organizations. The results have supported almost all hypotheses proposed by the research model. Thus, the predictive power of organizational virtues perception on well-being at work is optimized when this relation is present in organizations where people perceive the presence of polices and, particularly, effective human resources practices.
As theoretical contributions, this study advances by filling a gap regarding the application of moral and ethical aspects in organizational actions. Although these relations have been studied in previous works (Haidt, 2000;Pires & Nunes, 2018), this paper contributes by proposing human resource practices as mediators in an unheard-of model that employs moral virtues as predictors of well-being at work. Morally and ethically well-evaluated organizational policies and practices seem to be good drivers of positive feelings related to work and the employer system itself. Moreover, this study is positioned in the interface of studies about organizational behavior and human resources management, suggesting that in environments perceived as virtuous, organizational management practices tend to be more effective in promoting well-being.
In addition, from a systemic approach in organizational investigations, the results from this study suggest that organizational practices, effectively perceived as more humanistic and with ethical and moral contents, tend to lead workers to perceive the organization as a promoter of virtues that enables positive emotions, guiding them to act proactively in relation to the employer, in conformity with his objectives. Cameron and Winn (2012) and Pires and Nunes (2018) reached similar results when affirmed well-developed policies tend to become part of employees' daily life, facilitating the comprehension of demanded behaviors and their way of thinking, acting, or feeling. It is noteworthy that although Pires and Nunes (2018) have tested HRM practices as predictors of organizational virtues, they claim HRM practices must reflect the moral nature and virtuous aspects of the work context -that is, virtues should precede such practices, in agreement with the logic of our research model. In addition to the empirical evidence we have found, we reaffirm our positioning since the elements constituting the core of organizational culture, such as values and virtues (Hofstede et al., 1990), influence the perception of organizational practices indeed, including the HRM ones, as also shown by Demo (2010).
Likewise, concerning managerial implications, we understand that managers must lead by example, developing an evidence-based management. Hence, our results work as a diagnosis to inspire managers to promote a more strategic human resource management through more effective leadership. In this context, the commitment of leaders with consistent behaviors comprising high levels of honesty, respect, transparency, and reliability would conduct the managerial board and collaborators to internalize and diffuse these behavioral models in daily organizational operations, including conflict resolutions and the search for better resilience.
Furthermore, the presence of a strong leadership tends to influence the organizational culture, specifically HRM practices. According to Pires and Nunes (2018), management strategies, policies, and practices whose contents are guided by altruistic reasons help extract a richer meaning from the functions performed by the employee. In addition, the results generated might inspire managers for an increasingly humanized human resource management, since healthier work environments tend to generate better inter-organizational relationships as a practical implication and consequently better provision of service to customers and society in general, advancing to a social implication.
However, there are limitations in this study. First, we cite its cross section, which inhibits a comprehension of the phenomenon in its temporal complexity. Besides, the quantitative nature of this investigation did not enable the capture of aspects of the model that would be essential to understand the phenomenon in question, such as subjects' conception about the organizational virtues composing the model. Therefore, we recommend future research focus on longitudinal data and multimethod analysis, aiming at a systemic and continuous comprehension of the phenomenon, beyond its measurement. Yet, it would be interesting to compare results obtained in the different sectors researched in this paper, namely, public, private, and third sector.
As an agenda, we propose further research adapt the model from this study, seeking to investigate both the predictive role of organizational virtues and the mediating role of human resources management practices with other criteria-variables like positive leadership, organizational citizenship, and work resilience, suggested by Gomide et al. (2016). Such action could put light into the buffering or amplifying role of virtues, as previously suggested by Caza et al. (2004).

CONCLUSION CONCLUSION
Finally, despite the limitations, the present study has given new perspectives to different possibilities of relating virtues in organizational context with other variables of organizational behavior, as well as the important mediating role played by HRM practices. This study represented a seminal step in the investigation of the joint relationship between these variables. We aim to inspire new studies for the investigation of the phenomenon in the context of positive psychology, fostering the promotion of healthier organizational environments based on virtues, good organizational practices, and proficient work relationships, which should be translated into better results both at individual and organizational levels.


A novel algorithm for optimal buffer allocation in automated asynchronous unreliable lines

The Buffer Allocation Problem is a well-known optimization problem aiming at determining the optimal buffer sizes in a manufacturing system composed by various machines decoupled by buffers. This problem still has scientific relevance because of problem complexity and trade-off between conflicting goals. Moreover, it assumes industrial relevance in reconfigurable manufacturing lines, where buffer sizes can be easily adapted to the production scenario. This work proposes a novel algorithm integrating performance evaluation and optimization by means of throughput cuts based on a linear approximation. Numerical results show the validity of the proposed approach with respect to the traditional gradient-based method. Moreover, an industrial case study integrating the proposed approach into a decision-support system for the buffer allocation and reallocation is analyzed.

Introduction
Buffer Allocation Problem (BAP) is a well-known optimization problem in manufacturing systems design and operation, aiming at determining the optimal buffer sizes in a manufacturing system composed by various machines decoupled by buffers.
Typically, the BAP problem is addressed once most of the decisions involved in the design of production lines, including the definition of the number of workstations and their efficiency (processing rates and reliability parameters), have already been taken. The BAP problem is relevant because buffers have a double effect on the performance of unreliable production lines: (i) increasing the throughput by decoupling machines in the line and reducing the propagation of disruptions along the line in terms of starvation (no input available) and blocking (no space to move the output); (ii) increasing the total inventory and the average time parts spend inside the system [1,2]. A larger buffer capacity helps to increase the effective production rate of the line, but buffers represent also an additional investment and operating cost, due to storage space and in-process inventory, respectively [3]. Therefore, the BAP deals with determining the right tradeoff between the positive contribution to production rate and additional investments and costs.
The optimal buffer allocation and reallocation becomes even more relevant in automated manufacturing lines that are characterized by high reconfigurability to cope with evolving demand [4] and disruptive production scenarios [5]. The workstations are usually placed along a linear rail serving as buffer throughout the line [6]. Hence, the buffer capacity is given by the distance between stations and it is proportional to the pallet length. Since production managers tend to reduce the buffer sizes, linear rails can be equipped with proximity sensors used as stoppers to limit the buffer capacity between two consecutive stations. Moving the proximity sensors changes the buffer sizes according to the product type and pallet used. At the same time, even workstations may be moved along the linear rail in order to change the distance between them.
Herein, the attention is focused on automated multi-stage assembly systems that are characterized by deterministic or quasi-deterministic processing times, caused by the high repeatability of operations ensured by automation, high efficiency of the single workstations, and asynchronization 1 3 of the operations [7]. These types of systems are employed in high-volume manufacturing sectors such as automotive, components for furniture, and electronics [8]. Technological advances enhanced automated multi-stage assembly systems with controllers and actuators that enable flexibility (i.e., reduced setups of the line to pass from one product type to another) together with frequent and fast reconfiguration [9].
In this work, a novel algorithm for optimally solving the BAP problem for unreliable asynchronous multi-stage serial lines is proposed. The algorithm integrates a stochastic performance evaluation model in a linear programming (LP) problem, by means of a surrogate model for linearized performance expressed as a combination of hyperplanes.
The work is organized as follows. Firstly, an overview of related literature is provided; secondly, the proposed methodology is described with respect to its building blocks. Then, numerical results are provided and the proposed methodology is applied in a real industrial case in the automotive sector. Finally, conclusions and future prospects close the work.

Buffer Allocation Problem
BAP is a well-established topic in the state of the art, drawing attention because of economic and strategical role of the required investment. Nevertheless, given technological and digital evolution for the modeling and optimization of manufacturing systems, contributions on this topic have been increasing lately.
Due to its relevance to real production systems, the buffer allocation problem has been studied for over 50 years, becoming one of the most popular research topics in industrial engineering and operative research fields (see the comprehensive reviews in Papadopoulos et al. [10], Demir et al. [11], and Weiss et al. [3]. The complexity of the problem is due to two main reasons: (1) it is a NP-hard combinatorial optimization problem (MacGregor Smith and Cruz [12]), in case of integrity constraint, and (2) no-closed formulas are available in order to calculate the main performance measures of production lines with more than two machines [13]. Consequently, as the total number of feasible solutions increases exponentially with the buffer size and the number of machines in the line, the complete enumeration through the whole solution space is unaffordable due to computational difficulty and numerical solutions are needed even for small-sized problems [14].
The buffer allocation problem can be classified according to (1) formulation of the objective function, and (2) procedure to solve BAPs, specifically the choice of the Evaluative Method and Generative Method. In literature, the Buffer Allocation Problem has been formulated mainly in three forms [11] according to the objective function: 1. Maximization of the production rate for a given fixed total buffer sizes (primal problem). 2. Minimization of total buffer size which guarantee a minimum throughput rate (dual problem). 3. Minimization of the average work-in-process inventory respecting defined level of total buffer size and desired production rate.
Generally, the last two formulations are appropriate in cases of specified demand and high floor space costs, high inventory, and work-in-progress (WIP) holding costs, respectively. Regarding solution procedures, due to the abovementioned complexity of the problem, the procedure to solve BAP generally consists in an iterative approach that combines evaluative methods, used to obtain the value of the objective function depending on a number of parameters, and generative methods that search for the optimal solution.
In literature, several approaches which leverage different evaluative and generative methods have been proposed. Evaluative methods exploit the characteristics and topologies of the production systems to estimate the system performance which the objective function depends on. If serial lines are considered, as in this work, the main distinctions with respect to the evaluative method and the system characteristics are the type of performance evaluation model (i.e., based on analytical or approximate analytical equations, or simulation as Discrete Event Simulation) and the line modeling assumptions (i.e.. synchronous/asynchronous, and reliable/unreliable lines). The advantage of using simulation is the flexibility in the modeling assumptions, despite requiring higher computational efforts than analytical methods. On the other hand, analytical methods may have quite restricted assumptions, hence the application capabilities of the optimization algorithm directly depend on the modeling technique. However, using analytical models allow evaluative methods to provide fast performance estimates, and to better exploit line properties. Indeed, when analytical methods are used, properties of the performance measures with respect to the buffer allocation are included in the optimization problem, according to the source of uncertainty characterizing the manufacturing line. For instance, in Shi and Gershwin [15], the manufacturing line is characterized by unreliable machines having the same deterministic processing rate (synchronous machines),hence, optimal buffer allocation solutions with respect to different reliability parameters are studied, according to varying cost functions for critical buffers. Properties of the system performance may be exploited also to derive adaptive optimization search algorithms as in Demir et al. [16]. Similarly, when the line assumptions allow it, as in reliable and synchronous manufacturing lines [17], extremely long serial lines can be optimized thanks to the analysis of system properties. An effective approach may combine analytical models and simulation models to enable multi-fidelity optimization approaches, as in Zhang et al. [18], by means of Mixed Integer Linear Programming (MILP). From the viewpoint of generative methods, suboptimal algorithms as genetic algorithms (GAs) are among the most used, to overcome limitations in non-linearity and solution space complexity [19,20].
In general, thanks to more accurate analytical models for performance evaluation of serial lines [14,21], recent works focus on efficient algorithms for optimal buffer allocation based on the combination of analytical models and decomposition-based search algorithms. On the other hand, when more complex topologies or system characteristics are considered, simulation is generally used as evaluative method. It is worth mentioning that BAP is part of a larger manufacturing problem, dealing with the selection of optimal configurations for manufacturing systems. Hence, works in this field include also extended optimization problems with respect to decision variables and objective function, such as joint selection of machine and buffers with productivity performance [22], energy-efficient performance [23], transfer line [24,25] and assembly line [26] balancing, CONWIP policies [27], and time buffers [28] for cost optimization. Since the proposed work deals with BAP in serial lines, a set of relevant works is classified in Table 1.

Properties of the throughput function
In a multi-stage manufacturing system with K machines and K-1 buffers with finite capacity, the throughput function E = f N 1 , N 2 , N k , … , N K−1 represents the response curve of the throughput with respect to capacity of buffers in the line. For instance, Fig. 1 shows the throughput function of a three-machine two-buffer line as a function of the capacity of each buffer, where each machine M k , k = 1, 2, The properties of the throughput function are fundamental for the implementation of the majority of methods used to solve the BAP, for both the evaluative and generative methods. An extensive study on the throughput function has been proposed in Gershwin and Schor [2]. The main properties that shall be exploited are the following ones: 1. Continuity. The throughput function can be considered a continuous differentiable function of buffer size N k , k = 1, … , K − 1 , as stated in [16]. Indeed, a small change in the buffer size causes a small change in the throughput. 2. Monotonicity. The throughput function of the system increases monotonically in each N k , k = 1, … , K − 1 .
Hence, a small change in the buffer size causes a small positive change in the throughput, until the limit is reached.  [29] Primal Simulation Degraded ceiling Unreliable Dolgui et al. [19] Primal Simulation GA Reliable Shi and Gershwin [15] Primal Analytical method Non-linear programming Synchronous unreliable Demir et al. [16] Dual Analytical method Adaptive tabu-search Unreliable Kose and Kilincci [20] Dual Simulation GA + simulated annealing Unreliable Shi and Gershwin [15] Combination Analytical method Segmentation Synchronous unreliable Li et al. [21] Primal Analytical method Decomposed enumeration Synchronous unreliable Xi et al. [14] Combination Analytical method Decomposition-coordination Asynchronous unreliable Kassoul et al. [30] Primal Simulation GA Asynchronous unreliable Zhang et al. [18] Combination Analytical + simulation MILP with benders decomposition Asynchronous unreliable This work Dual Analytical method MILP with throughput cuts Asynchronous unreliable These throughput function properties are exploited also by proposed method presented in the following section.

Method
The proposed method is an iterative algorithm that integrates a stochastic analytical model for performance evaluation of serial manufacturing lines (Sect. 3.1) into a linear programming problem by means of performance linearization (Sect. 3.2). The reference manufacturing serial line of K machines and K − 1 buffers is shown in Fig. 2, based on the notation reported in Table 2.
Each machine M k is modeled as a continuous-time discretestate Markov Chain, characterized by deterministic production rate m k , failure rate f k , and repair rate r k . For each machine M k in the line, the efficiency in isolation e k is defined as: The production rate in isolation k can be derived as: Hence, given the upper limitation on the throughput function, the maximum possible throughput that can be obtained in the line is given by: The proposed algorithm (represented in Fig. 3 and listed in Table 3) starts with the initialization (step 0), i.e., setting of the target throughput (th * ), the maximum capacity of each buffer ( maxcap k ) according the physical constraints of the manufacturing line, and calculating the maximum possible throughput (thmax) based on Formula (2). If the problem is feasible, then the algorithm starts the iterative  buffer of the manufacturing line after stage k , with k ∈ {1, … , K − 1} m k production rate of machine k , equal to 1∕ct k r k repair rate of machine k , equal to 1∕MTTR k f k failure rate of machine k , equal to 1∕MTTF k k production rate in isolation of machine k w system configuration (defined in terms of capacity for each buffer) cb k cost of one slot for buffer k maxcap k maximum capacity for buffer k th * target throughput thmax maximum throughput that can be obtained in the line thapp throughput that can be obtained from the linear approximation th w throughput of configuration w n k,w capacity of buffer k in configuration w th n k | | | w derivatives of throughput w.r.t. capacity of buffer k in configuration w algorithm convergence tolerance loop that consists of solving an optimization model to obtain a candidate system configuration (step 1). The optimization model includes an estimate of the throughput thanks to an approximation based on linear constraints. The candidate system configuration obtained as result of the optimization model is given as input to the performance evaluation model for an accurate estimation of the throughput (step 2). The algorithm proceeds iteratively until convergence, i.e., when the throughput estimated by the performance evaluation is greater or equal to the target throughput, while considering a tolerance (ε). If convergence is not reached, then first-order derivatives are extracted from the performance evaluation model and used to generate a constraint (throughput cut) linearizing the performance that is added to the optimization model (step 3). The idea is to exploit the properties of the throughput function and iteratively calculate hyperplanes approximating the throughput function.
In the following subsections, the evaluative method (Sect. 3.1) and generative method (Sect. 3.2) used in this approach to solve the BAP are presented. The tangent hyperplane formalization is included in an optimization problem to find the optimal buffer capacity allocation for a multistage serial production line.

Evaluative method: approximate analytical model
The stochastic analytical model for the performance evaluation of serial lines decoupled by finite-capacity buffers has been introduced in Magnanini et al. [6]. Decomposition equations based on the system dynamics model the propagation of effect, i.e., blocking and starvation, along the stages. A linear system of differential equations is solved by a numerical algorithm in order to evaluate the system performance in terms of throughput, average buffer level, and steady-state probabilities. The advantage of using an analytical model is that the explicit relation between input parameters and output performance can be obtained. Based on this model, the first derivatives of the system throughput can be derived. The derivatives are then used to write the first-order approximation of the throughput with respect to the system parameters. In fact, as explained in the previous section, performance measures such as system throughput do not depend linearly on the system parameters. For instance, let us consider the throughput variation with respect to the buffer capacity N 1 and N 2 in a three-machine two-buffer line. If the first derivative of the throughput with respect to buffer capacity is known in a certain point corresponding to system configuration w (th w , n w 1 , n w 2 ) , the tangent hyperplane to a given point can be written as:  Table 3 Pseudo code of the algorithm Algorithm: Optimization algorithm for hyperplane-based BAP production rate in isolation k is computed, ∀k;thmax is set to min k ; maxcap k is set Feasibility of the problem is checked The optimization model is solved and system configuration w is stored % Step 2-performance evaluation System configuration w is evaluated and th w is computed % Step 3-linear approximation A throughput cut is generated and added as a constraint to the optimization model end More in general, in a serial line composed of K machines decoupled by K − 1 buffers, the tangent hyperplane of system configuration w (th w , n w 1 , n w k , … n w K−1 ) is defined as: Moreover, considering the properties of the throughput function, it is possible to notice that the tangent hyperplanes are always over the given throughput function; hence: As a consequence, if multiple hyperplanes are built based on an unknown throughput function, the accuracy of the linear approximation of the throughput function increases as additional hyperplanes are added to the envelope of already existing ones, as it is shown in Fig. 4 for the one-dimension case [6].

Generative method: linear programming problem
The optimization model is formulated as a MILP that includes the decision variables defined in Table 4. The (4) th hyp n 1 , n 2 = th w + th Δth = th hyp n 1 , n k , … , n K−1 − th n 1 , n k , … , n K−1 ≥ 0 optimization model returns the system configuration in terms of buffer capacities (n k ) while considering the linear approximation of the throughput (thapp). The goal is to minimize the overall cost (7) given by the purchase of buffer capacity, while satisfying the target throughput (8 ). An upper bound for the throughput (9) can be calculated thanks to a preliminary analysis of the problem and exploiting the properties of the throughput function. Then, each buffer capacity cannot exceed a maximum value (10). Finally, constraint (11) represents the throughput cut that is added after each iteration based on the linearization of the throughput by means of hyperplanes (4).
Subject to:

Numerical results
In this section, the proposed approach (from now on named hyperplane-based BAP, h-BAP) is validated against extensive research and analyzed with respect to the characteristics of various manufacturing systems. Then, the h-BAP is compared with the gradient-based BAP (g-BAP).

Experimental setting
The experimental results have been computed on smalland medium-sized multi-stage manufacturing systems, as defined in Demir et al. [16]. In particular, four-machine three-buffer (4M3B) and nine-machine eight-buffer (9M8B) systems have been analyzed with respect to varying experimental conditions. For each manufacturing system size, four different system settings are considered: 1. Asynchronous homogeneous unreliable lines with identical machines, for which efficiency in isolation e k = e and production rate in isolation k = , ∀k = 1, … , K. 2. Asynchronous homogeneous unreliable lines with machines characterized by decreasing efficiency in isolation e 1 > e 2 > e k > e K and identical production rate in isolation k = , ∀k = 1, … , K.

Asynchronous non-homogeneous unreliable lines
with machines characterized by random efficiency in isolation e K and U-type production rate in isolation

Asynchronous non-homogeneous unreliable lines
with machines characterized by random efficiency in isolation e K and ∩ -type production rate in isolation Then, each system setting is further decomposed into two cases: (a) Low variability: in this case, each machine M k is characterized by frequent failures and fast repairs. Considering that failure rate and repair rate are exponentially distributed, this means that if their mean is small, also their variance is small. Therefore, the failures can be considered micro-stoppages along the line, with fast reaction to the stoppage hence low effect on blocking and starvation. In particular, for this case, the ratio between processing rate and repair rate is always included in the interval m k r k ∈ [6,12].
(b) High variability: in this case, one machine M k is characterized by rare failures and long repairs. Hence, this means that also the variance is large. As a consequence, failures even if rare have serious effect when propagat-ing along the line. The parameters for this set of experiments are obtained by scaling of a factor 10 the repair rate and failure rate parameters of case a). In particular, for this case, the ratio between processing rate and repair rate is always included in the interval m k r k ∈ [60, 120].
As a consequence, experiments with the same system setting 1-4 but in different case (a)-(b) have the same efficiency in isolation and production rate in isolation. This guarantees that results can be pairwise compared to highlight the effect of variability in the availability parameters for machines characterized by similar performance in isolation.
For each experimental condition defined above, the dual problem, i.e., the minimization of allocated buffer spaces to reach a certain target throughput, is solved. Hence, the results are discussed according to the total buffer sizes identified by the algorithm, the actual throughput with respect to the target one (difference due to the integer constraint on the buffer capacity), and the number of iterations used for the optimal solution.

Results and discussion
Numerical results are presented according to various comments and analysis. First, an overview of the validation and results according to the defined experimental setting is provided. Then, the detailed analysis of iterations and explorative strategy used by the proposed algorithm is provided. Finally, some general considerations are derived according to the proposed experimental setting, with respect to the manufacturing system characteristics.

Overview of the results and validation
The proposed hyperplane-based approach has been validated with extensive search of the tested cases. In particular, for each experimental setting, the parameters have been randomly selected from the intervals defined in Table 5. Then, the optimality index has been computed as the percentage of the optimal solutions found by the algorithm with respect to the extensive search. Results are summarized in Table 5, showing a good efficacy of the proposed approach. When the optimal solution is not found, the difference with the optimal one is generally less than two buffer spaces, and may be due to calculation approximation.

Analysis of iterations
This paragraph shows the analysis of the iterations for the proposed algorithm. In particular, the experimental condition 1a (i.e., experimental setting n.1 and case a) with medium-size manufacturing system (9M8B) is considered ( m = 1, f = 0.011, r = 0.125 ). The target throughput th * has been set to 90% of the production rate in isolation of the line = 0.9191 , hence th * = 0.8276. For each iteration, the allocated capacity per buffer n k , k = 1, … , K − 1 , the total buffer capacity N TOT , and the real throughput th w of the evaluated configuration w are shown in Figs. 5 and 6 respectively. The optimal solution n OPT = [8,16,22,19,18,19,17,9] is found in 52 iterations, hence by evaluating 52 different configurations.
As it can be noticed in Fig. 5, the algorithm tests quite different configurations at the beginning, while refining the solution later. Indeed, until iteration 17, there are peaks in the allocated buffer capacity since the algorithm tends to increase quickly the total amount of allocated buffer sizes, which can be noticed also in Fig. 6. At this point, the linear approximation obtained by the envelope of hyperplanes provides an accurate representation of the throughput function; hence, the algorithm moves carefully to identify the optimal configuration. After iteration 30, the total buffer capacity N TOT remains almost constant, while the algorithm makes small changes in the capacity of each buffer to identify the correct buffer allocation guaranteeing the target throughput.
Hence, the algorithm tends to use the initial iterations to cut out areas of the throughput function which do not represent interesting solutions, either because unfeasible or because too expensive. Then, each throughput cut which is added iteratively refines the solution space in promising areas until the target throughput is found.

Effect of variability on BAP
In this paragraph, one detailed example from the mediumsize manufacturing system (9M8B) is analyzed and commented, for each combination of setting (from 1 to 4) and case (a and b). For all the selected manufacturing systems, min = 0.9191 , and the BAP with target throughput th * = 0.75 ⋅ min = 0.6893 is solved for the eight cases. Figure 7 shows the optimal buffer allocation for the homogeneous lines (setting 1 and 2). When all machines are identical (case 1a), it is worth increasing the buffer capacity after the central machine, i.e., M 5 , since it is the most affected by propagation of blocking and starvation phenomena descending from the downstream and upstream part of the line. This is a known result when dealing with buffer allocation in homogeneous lines. A similar reasoning can be found when one machine has a higher variability with respect to the other machines in the line: in case 1b, machine M 1 is characterized by the same performance in isolation than the corresponding machine M 1 in case 1a; however, the failure is rare and the repair rate is low, as defined previously. As a consequence, the optimal buffer allocation should increase the total number of buffer spaces, in order to mitigate the effect of propagating limitations from the upstream part of the line. However, given that the machines are still characterized by the same performance in isolation, i.e., a clear bottleneck cannot be identified, the largest buffer capacity still remains in the middle. Setting 2 is characterized by decreasing efficiency in isolation within the line and same production rate in isolation among machines. Thus, faster but more unreliable machines are placed at the end of the line. Hence, more buffer capacity is allocated in this area, to cope with the effect of microstoppages within the line (case 2a) or is furtherly increased to mitigate the effect of rare, long, and also highly variable failures in machine M 1 (case 2b). Figure 8 shows the optimal buffer allocation for the non-homogeneous lines (settings 3 and 4). In this case, the machines characterized by rare, long, and highly variable failures are the fastest ones, hence machine M 1 in case 3b 9M8B -Case 2a and machine M 5 in case 4b. The goal of this analysis is to show that variability in the availability parameters can be only partially compensated by the production rate. It is interesting to notice that when rare and long failures occur, the buffer allocation strategy may change completely with respect to the same line having only micro-stoppages (cases 4a and 4b). This highlights the importance of such optimization problem in the design and operation of manufacturing systems, taking into account also its characteristics.

Comparison with gradient-based method
In this section, the proposed hyperplane-based method is compared with a gradient-based method. The gradient-based method defines the optimal direction to move given a starting configuration point, by iteratively selecting the buffer that provides a maximal increment in the production rate of the line. The gradient g can be calculated either via finite difference or by analytically calculating the first-order derivatives. In the case of finite differences, Formula (11) is used, where g i are the K − 1 components of the gradient vector g.
Once the gradient has been determined, the step of the increment is estimated. Only the buffer B k with the maximal component of the gradient g k = g max is incremented. Therefore, a new configuration point with buffer capacities n 1 + Δn 1 , n k + Δn k , n K−1 + Δn K−1 is determined and the performance of the line can be evaluated with the analytical method. If the throughput is higher than the throughput requirement, then the optimal configuration has been found; if not, the incumbent configuration point becomes the new starting point for the iterative algorithm.
The comparison between the proposed hyperplanebased approach ( h − BAP ) and the gradient-based approach (12) g k = th n 1 , … , n k + Δn k , … , n K−1 − th n 1 , … , n k , … , n K−1 ( g − BAP ) is illustrated in Table 6, with respect to the number of iterations needed to find the optimum solution. For each manufacturing system size and experimental settings, the minimum and maximum numbers of iterations are provided.
Moreover, the last column shows the mean difference in solution between the two approaches computed as follows, where m is the number of testes cases for each experimental set: This indicator points out if the optimal solution found by the two algorithms differs. If the difference is positive, it means that the h-BAP method found an optimal solution with a higher number of allocated buffer spaces, hence having a higher cost than the optimal solution found by the g-BAP.
Results shown in Table 6 highlights the efficiency of the proposed algorithm with respect to the gradient-based approach. Indeed, the number of iterations to reach the optimum is always lower in the h-BAP, for each experimental set. The difference in the number of iterations, hence in the algorithm efficiency, can be especially appreciated in those problems involving mediumsized manufacturing systems. The two methods find on average similar solutions (the indicator ΔN TOT is relatively small). Moreover, the ΔN TOT is always negative, thus indicating that the solutions found by the h − BAP method imply a smaller number of total buffer spaces, hence a lower cost. This difference, however, occurs quite rarely, in 4% of the cases.
Apparently, both the g-BAP method and the h-BAP method exploit the properties and characteristics of the throughput function. Moreover, the solution reached by the methods is in most of the cases similar. However, the iteration path is very different between the two methods. Figure 9 shows how the configurations tested in each iteration by the two methods perform in terms of throughput, represented by means of iso-throughput areas, in a small-scale problem with three machines and two buffers (3M2B). Parameters and the optimal solution for this example are provided in Table 7.
It can be noticed that the gradient-based method pushes the algorithm in testing configurations on the gradient, as expected (blue line). On the other hand, the hyperplanebased method selects configurations which may seem random, with respect to the selected parameters, but in fact they incrementally increase the accuracy of the linear approximation of the throughput function (red line). As a consequence, the hyperplane-based algorithm tests configurations very far between each other, enhancing the linear approximation of the throughput function in areas which guarantee a fair accuracy. In the end, the hyperplane-based algorithm guarantees a lower number of iterations with respect to the gradient-based method, thus ensuring higher computational efficiency. In addition, it must be stressed that the hyperplane-based algorithm offers a more flexible approach because the optimization model can be further complicated to take into account different types of decisions and planning horizons, while exploiting the linear approximation of the throughput function.

Industrial application
The proposed approach has been applied within a real industrial case, in the automotive sector. The company produces micro gear pumps with metallic bodies (Fig. 10a). The production is done based on lots according to the different product types.

Description of the manufacturing system
The assembly line is composed by seven production areas, decoupled by linear rails serving as buffers, as in Fig. 10b,  where arrows indicate the direction of the production flow. The first area (area 100 in Fig. 10b) loads and assembles the central body and driving gears, then other components such as bushings, magnets, and cups are assembled, as well as the front, rear body, and O-rings (toric joints) in area 200. Then the third area (area 300) is dedicated to the crimping process and test. The second part of the line is dedicated to testing and final operations, such as hydraulic test, pallet cleaning, laser marking, and finally unloading finished pumps (areas 400, 500, and 700). According to the pump variety, additional testing can be performed in the last area (area 600). Due to many reconfigurations of the line within the years, linear rails are longer than needed; hence, proximity sensors (see Fig. 11) are used as stopper to limit the buffer capacity between stations thus limiting the work-in-progress (WIP) and reducing the lead time. Production planning is done weekly according to lots with varying lot sizes. According to setup time, planned maintenance within the week and other planned stoppages, as well as specific operations on the different product types, and availability of production time may vary; hence, the throughput required for alternative product types may differ. This results in the need of understanding the planned maximum production capacity for the given buffer configuration, or to modify it by means of the proximity sensors, in order to be able to achieve the required productivity.

Optimization problem and solution
The proposed algorithm for the BAP has been integrated in an automatic Decision Support System (DSS), internally developed by the research team, to help the company in identifying the correct positioning of the proximity sensors according to the target throughput.
Following the architecture proposed in Magnanini and Tolio [31], the h-BAP is used as plug-in module for the control and operations of the described manufacturing system. The modified architecture which has been used in the analyzed industrial case study is represented in Fig. 12. In particular, the performance evaluation model is parametrically implemented on the real multi-stage manufacturing system, and the configuration parameters are estimated from the real data gathered by means of the MES and the data analytics layer, to maintain the coherence between the evaluation model and the real system. According to the specific production plan, the target throughput th * is derived and provided as input to the DSS for h-BAP. This module corresponds to the proposed optimization algorithm for buffer allocation based on the linear approximation of the system performance by means of hyperplanes. Hence, the DSS uses the Performance Evaluation Model as evaluative model for the linearized performance to be included in the optimization problem.
Once the solution is found, the DSS for h-BAP returns the optimal configuration in terms of allocated buffer spaces   . 11 Proximity sensor used as a stopper to limit buffer capacity on the linear rails within the line and the actuation system of the proximity sensors acts on their position as indicated.
The advantages of the proposed approach are represented by the integration of an advanced and optimal solution method for the BAP within an operating manufacturing system, to support its responsive reconfiguration in different production scenarios. As it can be noticed in Table 8, the optimal buffer configurations may be quite different, leading to a difference of 40% in the total allocated buffer sizes to achieve the desired performance, and a difference of 25% in the circulating WIP. Moreover, the linear approximation of system performance increases the knowledge of the system with respect to the configuration parameters as the buffer capacities, thus allowing prompt reconfiguration actions when needed. The effectiveness of the optimized solution is ensured by the alignment between the performance evaluation model and the real system. Finally, the proposed architecture for the Decision Support in the operation of multi-stage asynchronous manufacturing systems can be easily extended to include more complex optimization problems related also to other configuration parameters.

Conclusion
Buffer Allocation Problem still represents an interesting research problem with respect to existing methodologies. In this work, BAP is solved for asynchronous unreliable multi-stage serial lines, by means of a novel algorithm based on the integration of linearized performance within a MILP. Linearized performances are obtained grounding on a stochastic approximate analytical model where the firstorder derivative of the throughput with respect to the buffer capacities are used to define hyperplanes. These hyperplanes are then iteratively integrated as throughput cuts in the linear programming problem, to minimize the total costs while guaranteeing the target throughput.
The results show that the proposed methodology leads to optimal results in a limited number of iterations, thus guaranteeing a fair efficiency of the algorithm. Insights on optimal buffer allocation solutions are provided according to   [12,20,10,9,6] 18.5 the variability affecting the manufacturing systems. Moreover, the proposed methodology is compared with a similar one in terms of evaluative and generative methods, i.e., the gradient-based approach. This comparison shows that the proposed hyperplane-based methodology outperforms in terms of efficiency of the gradient-based method, while also guaranteeing more flexibility in the overall approach. Indeed, further developments are represented by the extension of the proposed methodology to large manufacturing systems, as well as the joint optimization of machine parameters together with buffer capacity. Challenging research developments are represented by the application of the proposed hyperplane-based approach to more complex system topologies as split and merge, parallel machine configurations, closed-loop networks. In these topologies, the throughput function may have different properties with respect to monotonicity and convexity; hence, the throughput cut based on the linearized performance should be adapted as a consequence. Moreover, the proposed approach can be further extended to consider multi-period decision problems, by means of stochastic programming, in which at the first stage the maximum buffer capacity is found, while at the second stage the actual buffer capacity for the specific demand scenario is obtained.