Optimization of a logistics network considering allocation of facilities and taxation aspects

This article analyzes the impacts of operational and tax changes in a logistics network, considering the location of facilities and the following taxes: the Brazilian State Excise Tax on Circulation of Goods and Services, the Import Duty, the Brazilian State Excise Tax in Tax Substitution, the Social Integration Program, the Contribution for the Financing of Social Security and the Brazilian Federal Excise Tax on Industrialized Products. The influence of incorporations and outsourcing of distribution services in solving global localization issues concerning various links in a chain suplly has also been considered. The problem was modeled and solved by the GAMS modeling language using Solver CPLEX. The proposed Mixed Integer Linear Programming model minimizes operating costs taking into account tax benefits and the best use of the credits related to the Tax on Circulation of Goods and Services of a multiproduct network. A real application involving a company in the animal feed production sector was developed. The results showed that the model allowed to evaluate conveniently how the choice of the facilities and the characteristics of the product flows impacted the overall costs of the system. The results also evidenced the need to make decisions based on the existing tax structure, since the scenarios without tax optimization generated substantial losses to the companies. This information added quality to the manager of the company studied.


Introduction
In a competitive business world, companies need to embrace flexible strategies and long-term plans that ensure it will respond to the changing environment. These strategies should be used to allocate company resources to the main development sources in the best manner for expanding activities and services (Badri et al., 2013).
The complexity of facility location problems stems from the existence of many interconnected and sometimes conflicting subsystems, and it is well known that optimizing subsystems in isolation does not guarantee the global chain will be optimal.
Supply Chain Management covers a variety of aspects and business areas, including Logistics, with Linear Programming (LP) being one of the most traditional methods for solving logistics problems related to transportation and routing.
According to Soleimani-Damaneh et al. (2011), LP can be defined as the maximization or minimization of a linear function, subject to linear constraints. Mixed Integer Linear Programming (MILP) can be used to overcome the constraints of LP, which allows a model to evaluate the interconnections of the subsystems that make up the problem in different scenarios (Shapiro, 2001). Using MILP for the optimization of logistics networks can bring advantages and be a great quality for companies (Bhutta, 2004).
An important aspect to be considered in problems with focus on logistics network optimization are taxes. In this sense, Hamad (2006) presented a MILP model for a supply chain considering tax aspects for logistics network problems. Among the logistic-tax optimization models available in the literature, the following stand out: Hodder & Jucker (1985), Min & Melachrinoudis (1996), Hadjinicola & Kumar (2002) and Bhutta et al. (2003). Using a MILP model applied to the optimization of Brazilian logistics networks can bring significant competitive advantages to the industries that adopt this tool (EY, 2013). In addition, a study by PwC (2010) indicates taxation is the major concern for Brazilian entrepreneurs. The operational and tax complexity experienced by Brazilian companies generates the need for exact solutions to support decision-making processes.
In this context, this work intends to answer the following research question: How to model and optimize a multicommodity multilink logistics network, considering the effects of taxation in Brazil?
Along with this research question, the general objective of this paper was to develop a MILP model that would enable analyzing the impacts of operational and tax changes on a multicommodity multilink logistics network, considering the possibility of changing the allocation of facilities. A Brazilian company that produces animal feed was selected as the study object. The specific objectives of the work were: -Using GAMS/CPLEX Language, modeling and optimizing a multicommodity logistics network, associated to a Brazilian animal feed company, considering the effects of taxation; -Identifying the impacts of taxation effects on the optimization of a multicommodity multilink network associated to a Brazilian animal feed company, considering facility allocation.
This paper is organized as follows: location-allocation problems and tax aspects are presented in Section 2; Section 3 describes the research method; Section 4 presents the problem of the Brazilian animal feed company under study and brings a detailed description of the proposed model. Section 5 describes the results of the model optimization for the real case of the feed company and analyzes them; Finally, Section 6 brings the conclusions of the study, followed by the bibliographic references used for the elaboration of this text.

Location problems
The mission of Logistics, according to Ballou (2001), is to make the goods or services requested available at the right time and place, in the exact quantity and under the desired conditions, in an efficient manner to the customer and, at the same time, providing the greatest possible contribution to the company. Only in this way will the product or service have value to the customer, with efficiency in logistics management being the main responsible for achieving this goal. To achieve this efficiency, it is necessary to plan the entire logistics network, which involves troubleshooting localization problems. Smits (2001) and Bhutta (2004) conducted a broad review of academic work on optimization models in the literature. It can be highlighted that Smits (2001) compared about 34 location models, classifying them according to 14 complexity criteria. The considerations raised by these works will be evaluated throughout this article.
Considering that resilient and globalized planning of a supply chain (SC) is essential to guarantee strategic advantages for companies (Fine, 1999), the location of factories, suppliers and/or distribution centers (DC) is a complex problem, especially in companies with international operations.
Optimization models, applied to localization problems, may present different degrees of complexity associated with the number of nodes (facilities such as suppliers, factories, distribution centers, or customers) in the logistics network, the number of links (links between nodes), the number of items or commodities (single or multicommodity problems) that are transported on these links, the modal options (road, rail, waterway, cabotage, airway and pipeline) available, the tax system rules and tax benefits in force in the country, as well as as the ability to install or close network installations (nodes).
Another source of complexity for a network optimization problem may be the existence of multiple planning periods to consider in solving the problem. Figure 1 illustrates the situation of a logistic network (Supply Chain -SC) with four links.

Allocation-location models
The models most commonly adopted in practice are developed through LP and MILP and, among those found through a bibliographic research conducted on the Web of Knowledge (2018) and Scopus (2018) databases, the following works stand out: Dhaenens-Flipo (2000), Hadjinicola & Kumar (2002) and Verter (2002), who describe less conventional models.
As historical information to be considered, Geoffrion & Graves (1974) presented a location model using MILP, and the first application of this proposed model was in a real case in 1976. Chart 1 was constructed based on Bhutta (2004) and Hamad (2014), presenting a comparison of this article with some of the most referenced location models in the literature. The bibliographic research also identified a number of other authors who worked with models for location problems on a global scale, with a maximum of three SC links: Tong & Walter (1980), Hodder & Dincer (1986), Allen (1991), Haug (1992), Bijayamada & Chakravarty (1994), Meijboom & Vos (1997), Dhaenens-Flipo & Finke (2001) and Hamad (2014).
Particularly in Brazil, researchers have focused on problems of a regional scale, and few authors have included import and export issues in their models (Hamad, 2014). Brito (2004) and Hamad (2006Hamad ( , 2014 are exceptions, since they maintain some variables focused on global-scale problems in their formulations. Shapiro (2001) conducted a survey of previously developed models and highlighted deterministic solutions based on LP (especially MILP) as the most promising for solving location problems at different scales. In the literature consulted there were few developed models that deal with the location of facilities on a global scale, which had already been commented on by Hamad & Gualda (2008).
Facility location-allocation issues involve choosing the best location for one or more facilities, within a set of possible locations, to minimize transportation costs, considering the maximum capacity limits (Lacerda, 2005). This is also a complex problem because it often involves a large number of integer and binary variables and large data volumes.
Geographic Information Systems (GIS) are a valuable tool for solving these problems, for their great ability to store, display and manipulate spatially distributed data and generate graphical results. GIS can be used to feed MILP models with reliable data to address facility location-allocation problems that enable including fixed costs as well as different variable cost levels in the analysis. Hamad (2014) conducted a survey on the use of MILP for location-allocation problems in the universe of Operational Research (OP) tools. It is noteworthy that some researchers, such as Love et al. (1988) and Ballou (1998) already mentioned MILP as the most appropriate option to treat such important problems. Corroborating this, according to Geoffrion & Powers (1995), in the 1990s approximately 90% of the work developed to solve localization problems used MILP as the optimization algorithm.
The bibliographical research conducted found a series of models applicable to the problems of multiple links of a SC on a global scale. Models that deal with problems of this size generally seek to introduce parameters, variables and constraints to increase the effectiveness of decision-making processes in the face of macroeconomic fluctuations, cost of capital and political instability.
This type of situation has become increasingly common due to the demands of companies that seek to define flexible solutions to their logistic-tax networks, that is, the ability of a supply chain to absorb market fluctuations has become an increasingly valued characteristic.
Brazil, for example, is known worldwide for its tax complexity. High taxes coupled with the complex rules that regulate them make the country a big challenge for companies to operate while minimizing their costs. According to Hamad (2014), the political and economic instability present in the country reinforce daily the need to revise the current tax laws.
In line with this, Balaji & Viswanadham (2008) proposed a model to address an issue often discussed in the corporate environment: outsourcing. In working on their formulation, the authors considered tax issues and inventories throughout a computer company's supply chain. Bassett & Gardner (2010) worked to optimize Dow AgroSciences' global logistics network via MILP by disregarding the existence of distribution centers and focusing their analysis on just three links: suppliers, factories and consumers. The contributions of these authors are important and different, as they incorporated the way each country considered in the logistics network deals with import taxes.

Optimization models incorporating tax aspects
Among the tax-logistics optimization models identified in the consulted literature, some works developed for transnational companies have been getting attention for their consistent contributions involving international location of facilities. The following can be highlighted:  (2016) also presented a model focused on the biodiesel production process, which can be considered to have multiple links, with a compilation of factories that integrate to generate oil-biodiesel blends.

Research method
This study can be classified as an applied research since it investigates the veracity of an existing theoretical concept and attests its efficiency for the situation under study. I can also be classified as a normative-empirical research due to its objective of describing the behavior of a multilink logistics-tax network. Moreover, by describing behaviors as a function of the modeled parameters and their interrelationship, the research can be defined as empirical-descriptive (Gil, 2008). The proposed mathematical model, which aims to portray reality, and the results found by the optimization process, supported by a wide variety of data representing a population and behavior, are aspects that characterize this work as a quantitative research. Through modeling and simulation, we sought to analyze multiple scenarios with combinations of mergers between the companies studied and total and partial optimizations of operations. Also, since the study aims to find a mathematical model for analyzing scenarios, research can be more precisely defined as quantitativeempirical (Bertrand & Fransoo, 2002). Figure 2 sums up the classification of the research methods used in this study. To illustrate the application of the model proposed in this study, a food company was used, specifically in the field of animal feed production, which had recently acquired one of its competitors and was interested in evaluating the maintenance of outsourcing its distribution services. Data for the work were collected between 2014 and 2015, by field observations and interviews with company executives, digital file transfers and meetings with employees of the company under study. After data collection, the data was modeled using Excel® in order to ensure their linearity, a necessary condition for the algorithm to work.
A thread of execution is a way of dividing a process into two or more tasks that can be performed concurrently. One thread, for example, allows a program user to use functions of the computater environment while other threads perform other calculations and operations. The use of threads can assist in the resolution of large MILP models, reducing the time required for the optimal solution. This feature was adopted in the solution of the model proposed in this paper.
The software General Algebraic Modeling System GAMS (Brooke et al., 1997) was used for modeling and the optimization system ILOG -CPLEX 12.0 (ILOG, 2007) was used for resolving the real problem.
The scenarios tested with the proposed model were initially worked using only 1 core to find the solutions, which generated programming times of approximately 30 minutes per round on a machine with 8 gigabytes of RAM and an i5 Intel® Core™ processor. Afterwards, it was decided to use 4 threads to process the solutions of the scenarios. In this case, the maximum computation time to obtain the optimal solution was 20 minutes. It should be noted that the results found with more and fewer threads were the same.
The results presented by the optimization model were analyzed by a team of tax and SC professionals, and the authors of this work were responsible for developing the mathematical model, its adjustments and the support used to validate the scenarios obtained during the optimizations. Chart 2 presents the differences between the tested scenarios and Table 1 presents the characteristics of the models used to solve each scenario, in terms of number of real variables, integer variables and constraints. Company A refers to the company under study and Company B to the merged competitor.
Chart 2. Differences between scenarios. 4 Problem description and modeling

Proposed model
The model elaborated for this study was influenced by the one proposed by Geoffrion & Graves (1974) and adapted by Hamad (2014). With a goal function aimed at cost minimization, the idea was to balance production lines by defining where each product would be produced, which factories would make up the production system, which distribution centers would be opened and how distribution and acquisition would be carried out.
Regarding the model by Hamad (2014), the following differences are present: addition of the service exclusivity restriction, present in the model by Geoffrion & Graves (1974), where only one distribution center can serve each customer; Inventory costs are based on historical data and are not calculated by the model; Handling and storage capacity does not use the number of pallet positions, wth the storage flow capacity being defined from historical peak stocks.
In this context, the addition of service-level restrictions and the inclusion of taxes is performed as a function of adding costs to the goal function, not by restrictions; stepwise storage costs, with the possibility of incorporating economies of scale; addition of IPI, ICMS-ST and PIS-COFINS to the taxes considered, considering there is no ad valorem inclusion and the benefit of the drawback to the logic of the model. In other words, there is only one network configuration logic presented, supplier-factory-DC-customer.
The model involves the impact of acquiring a competitor, outsourcing the distribution service and the influence of the aforementioned taxes. As the MILP model was developed to provide a strategic solution for operations, its formulation (Equacion 1 to 12) will take into account the consolidated volumes moved annually and, therefore, daily seasonality will not be considered in the modeling.
The indices, parameters and variables used in the proposed model, as well as the goal function and constraints, are as follows.: Indices − su -refers to the suppliers of raw material to the system; − fa -refers to the factories that can produce the finished product; − line -refers to the production lines available in the factories; − dc -refers to the Distribution Centers that can receive store and distribute products to the final clients; − x -refers to the consumer markets (clients) of the finished products; − fp -refers to the groups of finished products; − rm -refers to the groups of raw materials made available by suppliers; − fx -refers to the storage cost ranges defined by the annual product flow in the DCs; − bs -refers to the Brazilian states through which the products pass; − source, destination -refer to the cities involved in the problem.
-The service level must comply with a tolerance: ( )

Contextualization of the problem
Using MILP for logistics network optimization can be advantageous and make a great difference for companies. Brazilian companies are good examples of companies that would benefit from this process, particularly those that produce animal feed. The Brazilian Ministry of Agriculture (Brasil, 2015) drew attention to a steady and linear growth for the country's livestock. The evolution of meat production and, consequently, the raising of beef cattle is presented in Figure 3.  (Brasil, 2015).
Developing mathematical models for the feed market can have a positive impact on the operations of a large number of companies in the country, considering the size of the existing market.
Despite the growth projections for the market, Brazil's political and economic instability over the period of 2015-2017 makes the development of an operating strategy a highly complex task. To make their supply chains less vulnerable to market fluctuations, business leaders seek to adopt optimization techniques to reduce their operating costs and eliminate waste.

Description of the company and the problem
Considering the context described in the previous section, the company under study is a French cooperative with 60 years of experience in the supply of animal feed for different animals, products for small animal (pets) and animal feed for large animals. The company has been growing linearly worldwide, reaching revenues of over USD 6 billion in 2015, and today has more than 70 production units spread over 4 continents.
Following a recent merger, the company now has 11 manufacturing units spread across 9 states, 8 types of production line and a mix of 10 finished product groups. The new business relationship between the companies started a debate about the excess production capacity of some products and the strategic relevance of the current configuration of the factories.
With demand in all Brazilian states, the company and its distributing partner have a set of 32 distribution centers to ensure the established care and level of service. As for raw material purchase, the company deals with approximately 75 different suppliers, buying a variety of 8 groups of domestic and imported raw materials, most of them commodities.
Production lines have well-defined annual processing capacities, but there are cases where equipment and resources are shared between different lines. It is initially assumed that production companies do not transfer products among themselves, operating independently. The costs associated with transportation, manufacturing, handling and storage operations are known, as are the tax rules and possible tax benefits linked to the Brazilian state excise tax (ICMS).
This study focused on operations conducted in Brazil, where the cooperative held more than 2,000 of its employees, the team responsible for maintaining the 11 manufacturing facilities and 32 distribution centers. With more than 20,000 customers, distributed in approximately 2,500 cities, the company had a turnover of more than 1 billion BRL.
The portfolio of available products can be divided into two broad groups: those considered feedstuffs (premix and products for poultry, pig and fish farming, rearing of horses and ruminants) and consumer products (pet products and treats). The products behave differently in the market, inputs are more expressive in volume, while the consumer products are considered to have higher added value.
The structure of the data presented in this paper refers to a real scenario, but with altered data to preserve the confidentiality of the information provided for the development of this work.
Despite the merger with the competitor, the companies currently operate independently, reporting their results to their holding company. Operational differences can be clearly seen through first contact with the established logistics network. Figure 4 presents, in a simplified manner, the behavior of material flows in the operations of the companies relevant to this study. Company A distributed all its products directly to consumers and each manufacturing facility had its own distribution center to meet customer demand. Seeking to expand its market share on different fronts of animal feed and strengthen itself competitively, Company A had been acquiring various business of the segment in the country. Thus, the company recently acquired one of its rivals in the pet food segment (its products range from standard to super premium, treats, etc.), which was located in the southern region of Minas Gerais, with a manufacturing facility divided into 6 units and with aggregate production capacity of over 400,000 tons of feed per year.
The incorporated company (Company B) stood out due to the business model it adopted, unlike the operation described above, centralizing its production activities in a single city, with direct distributiion of its input products and outsourcing the distribution of its pet products, which resulted in tax gains. To gain access to tax benefits, the incorporated company created a new business that acted as a distributor, independent of the production company, but providing services exclusively for it. This distributor became the institution responsible for the distribution of 93% of the volume of pet products produced by the incorporated company, the 32 DCs spread throughout Brazil guaranteed the level of service required by customers, distributed in more than 2,000 cities.
Working with this volume of destinations in a MILP problem would not be recommended, because computational processing constraints would prevent the optimal solution to be obtained in a timely manner for the decision. Thus, we opted for the clustering of demand, using as a criterion of centralization the representativeness in volume of products distributed to the cities and the distance between them. After using this procedure, the number of destinations (clusters) was reduced to 200 points.
Food industry supply chains are characterized by their operational efficiency because of the expiration date of their products. In the case of the animal feed industry, the level of service required was a maximum of 48 hours, so deliveries should be made within this period to ensure customer satisfaction.
Regarding Company A's manufacturing process, eight different types of production lines stand out. To make the process easier to understand, the production lines have been named after the name of the finished product group they manufacture. Within the group mentioned there is the division of two subgroups of lines: the green and the red. Green lines can produce any kind of product, in contrast red lines can only produce red products (usually export-geared animal products).
In the problem presented, suppliers were clustered into 75 suppliers from 8 national and imported input groups. The inputs considered in the problem were: packaging, liquids, corn, animal source, phosphate, soy and wheat. Products sold by Company A were manufactured in the Company's 10 factory units, distributed in 9 Brazilian states, and sold to distributors and/or end customers.
Regarding taxes, the so-called recoverable taxes are taxes that generate credit to the company and can be deducted from the value of ICMS that the company must pay. Instead of paying the full amount, the company pays the balance between credit and debit. Figure 5 illustrates the relationship between product flow and company-related taxes; Figure 6 shows the relationship between input product flow and taxes related to the merged company; and Figure 7 shows the relationship between the pet products flow and taxes related to the merged company and its distributing partner.
The taxes included in this article were: Brazilian State Excise Tax on Circulation of Goods and Services (ICMS); Import Duty (II); Brazilian state excise tax with Tax Substitution (ICMS-ST); Social Integration Programs (PIS); Contribution for the Financing of Social Security (COFINS); and the Brazilian Federal Excise Tax on Industrialized Products (IPI).   Purchase costs were found to comprise the largest portion of the group's expenses, followed by taxes and transportation. For comparison with future scenarios, the current situation was projected from the baseline for the next 5 years, considering the projected growth in demand presented by the company. The calculation of future capacity considered the plans of physical expansion of the production lines and proposed working hours increase informed by the teams of the companies under study.
The next section presents the results of applying the proposed model to the real situation of the animal feed factory.

Scenario 1
In Scenario 1, without taxes, the solution pointed to the closing of all DCs of the merged company's distributor partner and, therefore, the distribution of all its products would be made directly from the factory to all Brazilian states, and all sales volume would be concentrated in the factory located in Minas Gerais.
The states of MG, SP and RJ represent 86% of the merged company's demand, thus, proximity to the factory is one of the factors that favor direct distribution. Closing all DCs would result in a BRL 12 million drop in intercompany shipping (sales of the merged company to its distribution partner) and a BRL 7 million increase in outbound shipping (cost linked to hiring, planning and monitoring the transportation of finished products to their customers), due to the increase in the distances traveled. Figure 8 shows a comparison of the distance ranges traveled in the Baseline Scenario and Scenario 1. In this proposal, the customer service level, distances traveled in each scenario, was much better, going from an average of 418km in Scenario 1 to 265km in the baseline scenario (approximately 36.6% shorter). Although taxes were not part of the implemented model, the analysis sought to assess the impacts of the reconfiguration of the operating network considering the taxes paid by the companies. Despite the operational savings obtained, Figure 9 shows the tax complications generated due to their exclusion in the decision-making process. As shown in Figure 9, the reduction in ICMS debits, signaled by circle 1, is due to the transfer of the distribution of 26 thousand tons of input feed, taxed at 7.2% in Minas Gerais, to São Paulo, now being taxed at 4.8% in the interstate operation.
The feed destined for pig and/or poultry farming would be distributed within the state of MG directly from the company factory, benefiting from the exemption granted for internal exits. Such changes in production and distribution flows would result in savings of BRL 1.1 million.
Closing the distribution partner branches would have a direct impact on the merged company's ICMS, ICMS-ST, signaled by circle 2. Figure 9a (in Figure 9) shows a difference in ICMS debit between the current scenario and scenario 1 with -2 million. In Figure 9b (in Figure 9), the differences of the current scenario and scenario 1 between PIS and Cofins, ICMS and ICMS-ST debits are, respectively, -7 million, 24 million and 22 million. By adding these values, it was found that, at the end of the plan adopted, there would be a total loss of approximately BRL 37 million for these taxes.

Scenario 2
In Scenario 2, where the taxes were incorporated, the solution pointed to the closing of some DCs of the merged company's distribution partner in the states of São Paulo and Minas Gerais. Consequently, the largest variations in the flow of these companies occurred in the distribution centers of these states.
For the company under study, there would be flow variations on some DCs due to adjustments between transfer and direct sales. Overall, these changes would lead to small increases in the distances traveled for the companies to serve their customers. These increases would not significantly impact the level of service, keeping it within customer specifications.
By closing the distributor partner's branches in Minas Gerais, all demand for pet products of the merged company would be met directly from the factory, throughout the state, and, consequently, there would be an increase in product delivery distances in the region.
In this case, it can be inferred that adopting a cross-docking distribution process, in which the goods are received and redirected without prior storage, would be able to maintain good service levels without adding substantial costs to the system, and could benefit delivery processes in the urban area of Belo Horizonte. Otherwise, crossdocking near the demand could maintain the level of service that would be lost by shutting down a plant and moving away from the demand and production. These flow changes in the state of Minas Gerais would reduce operating cost in BRL 1.9 million.
In São Paulo there was also a recommendation to close the distribution partner's facilities, so that of the 7 facilities previously in operation, 4 would be closed. Thus, only 3 DCs would continue to operate, that is, the merged company's pet products would be distributed by the Cajuru, Guarulhos and Sumaré branches. These changes would generate a small increase in the distances traveled, but not significant to impact the level of service in São Paulo. These changes in the flow of pet products in the state of São Paulo would reduce operating costs in BRL 0.8 million.
As the final balance, Scenario 2 resulted in a gain of around BRL 16 million, reached through reduction of tax and operating costs. The reduction in transfers between the company's factories, the increase in direct sales to several Brazilian states from facilities in the states of São Paulo, Goiás and Paraná are responsible for most of this gain.
The changes related to the adjustments of transfers and direct sales in the company's factories have a potential gain of BRL 6.3 million for the system. Figure 10 shows a comparison between the results of the Baseline Scenario and Scenario 2, and their interpretations are given below.  Among the savings shown in Figure 10, operating savings may be attributed to the adjustments recommended for transportation and storage. Regarding transportation, the proposed model sought to minimize shipping costs across all links in the value chain. As for storage, savings can be attributed to two factors: the closure of facilities and the pursuit of fixed cost reduction and economies of scale, as the model exploited the idleness of facilities.
As shown in Figure 11, the reduction in ICMS rates indicated by circle 1 is justified by the same reason presented in Scenario 1. Still in Figure 11, the increase in ICMS and the reduction in ICMS-ST, signaled by circle 2, is due to the use of the weighted average final consumer prices (PMPF) by the State of Minas Gerais, in order to form the ICMS-ST calculation base.
Thus, the ICMS would be calculated by the sale price, increasing its calculation baseline and consequently its value. If production and delivery levels were maintained, the ICMS-ST to be collected would decrease, leading to an increase in taxation. Figure 11. Details of the tax costs in Scenario 2.

Scenario 3
In Scenario 3, with the inclusion of taxes and the possibility of merging, a new corporate structure was presented, shown in Figure 12, where all companies operate in a unified manner. As in the first scenario, optimization pointed to closing all distribution partner DCs.  Figure 13 presents the new billing proposal adopted by the merged company. Instead of directly selling its products to customers spread throughout Brazil, this new company started to use the structure of the company under study in this work to support its distribution. Approximately 30 thousand tons of feed are now invoiced by the incorporating company structure. The volume consists of 18 thousand tons of pet feed (64% of demand) and 11 thousand tons of animal feed (36% of demand). Although the new structure allows for a higher number of transfer possibilities, the distance ranges traveled for distributing products to end customers had a similar impact to Scenario 1.
In terms of costs and savings, Scenario 3 behaves very similarly to the first, where there are savings due to closing facilities and due to gains in scale in others. The only difference presented was the gain in scale in some facilities of the company under study, due to the additional flow received.
Scenario 3 resulted in a reduction of BRL 5.7 million in total costs compared to the baseline case, due to tax implications generated in the scenario (maintenance of current business rules) and an optimized scenario, both logistically and taxally. The merge, and closing the distributing partner had a direct impact on the merged company's ICMS, ICMS-ST and IPI calculation. Figure 14a (in Figure 14) shows a difference in PIS, ICMS and ICMS-ST rates between the current scenario and scenario 3 of respectively 6 million, 6 million and 8 million. In Figure 14b (in Figure 14), the differences between the current scenario and scenario 03 between the PIS and Cofins, ICMS and ICMS-ST debits are, respectively, -13 million, 20 million and 18 million. By adding these values (differences in rates in Figures 14a and 14b), a reduction of BRL 45 million was found. Concluding this analysis, the results found in this paper evidenced the need to make a decision based on the existing tax structure, since scenarios without tax optimization resulted in substantial losses for companies. It is also clear that any tax reform would lead to the need to revise all the strategies and models used to solve such problems, but this change would have the potential to reduce the harmful practice of tax tourism, that is, reducing the flow generated artificially by certain distribution channel members who benefit from informality.

Conclusions
The general objective of this work was to develop a MILP model to analyze the effects of operational and tax changes in a multicommodity, multilink logistics network, considering the possibility of closing facilities. An application of the model developed from a real case involving a Brazilian feed industry was carried out, and the cost values could be validated with the managers of the company based on the current reality.
The proposed model proved to be of crucial importance to support decision-making processes at the strategic level, showing that considering only one aspect in the optimization process can guide the company to scenarios that will harm it. Thus, the model was interesting to assess how the choice of facilities to be opened, and the characteristics of product flows, may impact overall system costs.
It can be concluded, therefore, that using MILP models, in situations involving multiple links of a SC, is a, advantageous factor for executives who want to make decisions that change the way companies operate, based on a holistic view of the production and distribution units that make up the logistics network.
It should be noted that the evidence of Brazilian tax complexity again proved to be an essential factor for generating solid and resilient operating strategies. In other words, not having a good assessment of taxes and/or purchase processes can be dangerous, and the lack of visibility of the scenario as a whole can lead to significant gains due to plant closures, but tax losses in that go beyond these amounts. Some analyses made possible by the model are interesting, such as: -Regarding unusable credit accumulation, the model proved efficient in seeking flow alternatives to current ones, reducing accumulation rates and simplifying the operations previously performed by the companies.
-Some companies maintain idle storage facilities in certain locations on the grounds of maintaining service level. This proposal becomes unfounded for some cases, as shown in the scenarios studied. Although multiple facilities are closed in all scenarios, the system service level was not substantially affected.
As suggestions for future research, the following topics should be explored further: -Developing more sophisticated models for the raw material purchase process.
-The development of multi-period models would make the approach more interesting for tactical, operational and strategic level decisions.
-Using optimization under uncertainty can provide interesting solutions for dealing with the price fluctuations of a product or raw material.