Next Article in Journal
Guided Particle Swarm Optimization for Feature Selection: Application to Cancer Genome Data
Previous Article in Journal
Korovkin-Type Theorems for Positive Linear Operators Based on the Statistical Derivative of Deferred Cesàro Summability
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Comparing an Artificial Intelligence Planner with Traditional Optimization Methods: A Case Study in the Dairy Industry

by
Felipe Martins Müller
1,2,*,
Vanessa Andréia Schneider
2,
Olinto Cesar Bassi de Araujo
2,
Claudio Roberto Scheer Júnior
2 and
Guilherme Lopes Weis
2
1
DCOM—Department of Applied Computing, Federal University of Santa Maria, Building 07, Santa Maria 97105-900, RS, Brazil
2
PPGEP—Post-Graduate Program in Production Engineering, Building 07, Santa Maria 97105-900, RS, Brazil
*
Author to whom correspondence should be addressed.
Algorithms 2025, 18(4), 219; https://doi.org/10.3390/a18040219
Submission received: 2 March 2025 / Revised: 3 April 2025 / Accepted: 7 April 2025 / Published: 11 April 2025
(This article belongs to the Section Algorithms for Multidisciplinary Applications)

Abstract

:
Automated Planning and Scheduling (APS) is an area of artificial intelligence dedicated to generating efficient plans to achieve goals by optimizing objectives. This case study is based on a middle-mile segment of the dairy supply chain. This article focuses on applying and analyzing APS compared to the following classical optimization methods: mathematical modeling based on Mixed-Integer Programming (MILP) and the Genetic Algorithm (GA). The language supported for APS modeling is Planning Domain Definition Language (PDDL), and the temporal solver used is the OPTIC planner. Optimization methods are guided by a mathematical model developed specifically for the research scope, considering production, inventory, and transportation conditions and constraints. Dairy products are highly perishable; therefore, the main optimization objective is to minimize Tmax, i.e., the total time to meet demand, ensuring that the products are available at the distribution center with a viable shelf life for commercialization. The APS application showed limitations compared to the other optimization approaches, with the Exact Method proving the most efficient. Finally, all algorithms, models, and results are available on GitHub, aiming to foster further research and enhance operational efficiency in the dairy sector through optimization.

1. Introduction

Humans consume numerous types of products daily for various purposes, such as personal fulfillment, leisure, safety, clothing, hygiene, or to satisfy the most basic need—food. For the consumer to meet their needs or desires, there is a manufacturing industry that seeks to meet market demand and maximize its profits, minimizing its costs.
In the raw material processing industry, it is paramount that the planning sectors take into account as many processes as possible so that decisions are made assertively. This is because the final product will result from good supply chain management, which must consider all parties directly or indirectly involved in meeting a customer’s request; beyond the manufacturer, there are suppliers, transporters, warehouses, retailers, and even customers themselves [1].
Milk is a nutritious product that found on the table of most consumers worldwide, presenting itself in many different forms. According to the FAO (Food and Agriculture Organization of the United Nations), Brazil is the third largest milk producer in the world, behind only the United States and India [2]. The milk production chain is one of the main economic activities in Brazil, with a substantial effect on employment and income generation [3]. Besides all of milk’s nutritional benefits, it is economically relevant. It promotes the income and survival of the population involved in obtaining the raw material, transporting the processed products, handling the final product, retailing, and after-sales activities.
The dairy industry is fundamental to supplying the classical demand of the world’s population. Consequently, it impacts the economy, given the significant number of marketed milk products corresponding to the great diversity of tastes and consumer trends. This industry faces great challenges across various situations, such as demand forecasting, price fluctuations, lead time, orders’ batches, inflated orders, and the difficulties associated with climatic conditions and traffic, appropriate storage, and shipping areas [4].
Dairy industry management has received significant attention due to its structural characteristics, such as products with limited shelf life, which restricts the storage duration and delivery conditions [5]. Recent studies have demonstrated the search for optimization in different prisms of the dairy production chain.
A case study seeking to optimize a distribution network of four products, whose application of the concept of Milk Run is aligned with the Traveling Salesman Problem to reduce the transport cost [6]. The proposal is to determine the optimal decisions of production and inventory of the dairy supply chain through a multi-objective study with three functions from different directions as follows: minimize total costs; minimize environmental impacts, and maximize social impacts [7]. The problem was solved using non-linear models, linear models, and heuristics.
Planning orders for a supply chain with multiple suppliers, multiple distribution centers, multiple customers, and perishable raw materials is the research topic of [8]. The authors propose a mathematical model for the problem, using Ant Colony Optimization (ACO) and Particle Swarm Optimization (PSO) for its solution.
A Brazilian study seeks to optimize the integration of supply decisions, production planning, and stock decisions to minimize the total costs of the dairy industry, proposing a mathematical formulation that considers the costs of milk collection, inventory maintenance, installation, and waste [9]. The same authors suggest considering new models that involve more than one factory, routing finished products to distribution centers or retailers, and scheduling milk collection time.
Using the Cascaded Deep Learning model, the authors proposed a mathematical model of mixed integer and bi-objective programming for short life cycle products, whose goal is to minimize transport costs by modeling and analyzing the network path in three levels (supplier, manufacturer, and distribution center and retailer) and intuitively finding the minimum cost path [10].
Studies highlight artificial intelligence as a key tool for optimization. The Polar Fox Optimization Algorithm (PFA), inspired by the hunting behavior of polar foxes, enhances search space exploration with fast convergence and fewer parameter adjustments, excelling in engineering challenges [11]. In aquaculture, integrating the Adaptive Artificial Multiple Intelligence System (AAMIS) with the Design of Experiments (DOE) optimizes growth, costs, and environmental impact in Nile tilapia production [12].
Another research presented a mixed integer programming model to minimize the total CO2 emissions associated with milk collection vehicle routes. It was based on the total fuel consumption rate, using the load-dependent emission factor and heterogeneous fleet [13].
In a research work involving the dairy supply chain, they applied multi-objective modeling to maximize profits from three levels satisfying the environmental, economic, and social criteria defined in terms of costs. Environmental costs are associated with effluents generated in the production of dairy and emissions of CO2 due to energy consumption and the transportation of raw materials and products, and social costs are related to employees hired to perform activities [14].
Other authors proposed a mixed integer multi-objective mathematical model to maximize the total value of the supply chain, minimize greenhouse gas emissions, and minimize resource consumption. The study was based on a real case of a dairy plant in Iran, aiming to solve issues in production distribution and consider environmental problems. Due to the complexity of the problem, the CPLEX solver did not solve the set of instances within reasonable time. Then, they proposed a heuristic mixing Genetic Algorithms and Fuzzy Self-Learning named Fuzzy Self-Learning NSGA-II (FSL-NSGA-II) [15].
A study examined a case in the dairy supply chain, aiming to maximize total profit by reducing waste, meeting service levels, and optimizing inventory, while balancing production and distribution, integrating a MILP model for production and inventory decisions with Monte Carlo simulation to assess demand uncertainty [16].
The recent review examines the challenges of the dairy supply chain and explores how artificial intelligence addresses issues such as demand forecasting, logistics optimization, and inventory management. Although the study discusses statistical and heuristic techniques applied to AI, it does not mention APS or report any specific studies on the middle-mile in the analyzed literature [17].
In previous studies involving the dairy production chain, the focus of optimization on costs and financial impacts predominates and, in some cases, includes environmental issues. Research efforts typically address situations that seek to improve performance between milk production sites and factories or between factories and retail, allowing for the observation of a gap in addressing challenges between factories and distribution centers, which are essential to business logistics.
To carry out this research, we made several technical visits to milk processing industries, where it became evident that planning and optimizing the dairy production chain presents itself as a challenging task. What drew our attention were the high perishable products, precedence relations between products, processing times, and product release. Processing often occurs in factories distant from each other, and semi-finished products are transported between them.
The impacts of these factors also extend to inventory and transportation management, which must be agile. Shelf life is directly linked to time, and the greater the time gap between production and retail, the less time this product will have to be purchased and consumed. Food quality, especially for fresh foods, is not constant and tends to decline until it reaches zero [18]. Perishable products may deteriorate during transport, and the permitted storage time is shortened [19]. Because it is challenging, planning involving temporality related to production, transportation, and storage directly impacts the product’s valuable life.
Techniques to combine decisions in an integrated way, focusing on improving solutions, such as Product Inventory Routing Problems (IRP), have motivated several types of research that grow in importance by including issues involving perishability [20].
After this brief report about what happens in the milk production chain, we propose investigating a practical problem by applying Automated Planning and Scheduling (APS). As this Artificial Intelligence (AI) tool is relatively new, we aim to understand its ability to optimize the supply chain management of perishable products.
The real-world problem inspired the problem we will discuss here is as follows: industrial milk processing plants in different cities have independent production capacities and can produce different products. There is also the possibility of product processing starting in one production plant and finishing in another. The selection of final products are perishable and must go through a quarantine period, after which they will go to a geographically dispersed distribution center within their useful life. The connections between plants and distribution centers use a heterogeneous truck fleet.
One question stands out as follows: how can we optimize production planning, inventory management, and transportation to meet demand and consider the perishability of dairy products?
We developed three distinct models to address the problem, one formulated in PDDL (Planning Domain Definition Language), another implemented a Genetic Algorithm using the DEAP framework (Distributed Evolutionary Algorithms in Python), and a third based on MILP (Mixed-Integer Linear Programming). The solution strategies comprise Automated Planning and Scheduling (APS), solved by a temporal planner, applying a Genetic Algorithm, and resolving the MILP model through a commercial optimization solver, representing the exact method.
Another essential factor that is part of the scope of the problem is transportation, since there is a need to move products from one point to another. Many perishable materials and products are transported daily, and the limited shelf life of dairy products impacts operational and transport costs, environmental concerns, time constraints, stock relations, and high transporting frequency [7]. Transportation models related to the dairy industry have a distinct appeal from the point of view of supply chain logistics in general, and companies invest heavily in freight transport [21].
After understanding the dairy supply chain and its peculiarities in the issues of stretching and transport, this research applied optimization methods to the problem of inventory routing, coupled with the dairy production chain, with active production in 4 (four) processing plants, one distribution center, designating a mix of six products in a heterogenic fleet of 20 combustion vehicles and four electric forklifts. We developed a PDDL (Planning Domain Definition Language) and mathematical models to help solve the problem. The solving methods applied are Automated Planning and Scheduling, and we also implement a Genetic Algorithm and ran the mathematical model in a commercial solver.
The main objective is minimizing the makespan of the processes during the middle-mile stage, reducing the total time required to complete all operations. Consequently, this minimization affects product perishability, aiming to deliver products as early as possible, thereby reducing the risk of deterioration.
We intend to collaborate through this research to improve the milk supply chain by contributing to the academic evolution of research on perishable products, the dynamics of the dairy production chain, inventory management, and optimization methods with the support of artificial intelligence. This study fills an existing gap by examining middle-mile logistics, a less-explored area. It advances the state of the art by employing Automated Planning and Scheduling (APS) as an optimizer, comparing it with classical methods, an approach not previously explored in the literature.
After the introduction presented here, the structure of the article is the following: Section 2 presents the motivation of the study; Section 3 presents the description of the case study and the data used in the construction of the problem instance, such as factories, distribution centers, products, demand, production capacity, quarantine, transport and perishability; Section 4 describes the methodology adopted and the case study design; Section 5 presents the results obtained by the implemented methods; Section 6 analyses and discusses these results; and Section 7 presents the conclusions and future work. The appendices present some additional information.

2. Motivation

Due to the inherent perishability of its products, the dairy supply chain faces time-sensitive challenges, requiring strategies that optimize the production and distribution process to ensure products reach consumers as quickly as possible while maintaining commercial viability.
As pointed out in the introduction, previous studies highlight the importance of operational efficiency in this sector, yet a gap remains in the literature regarding the application of artificial intelligence to enhance middle-mile management in the stage between the production and distribution centers, which is a strong motivation for this study.
This paper supports this perspective by academically investigating a problem within a globally relevant market, aiming to benefit both theoretical and practical applications because milk and its derivatives are globally relevant commodities found worldwide. One of the main motivations is to study a real-life case to enhance practical applicability.
Given this scenario, this study explores and evaluates an AI tool to solve this challenge, aiming to reduce the makespan in the dairy production chain problem with a design based on the sector’s reality. This study adopts Automated Planning and Scheduling (APS) as the AI approach, recognizing it as a branch of artificial intelligence [22] that remains unexplored in this context. The use of APS for solving problems from industry is encouraged through in the context of the International Conference on Automated Planning and Scheduling [23]. APS performance is evaluated against classical methods, including the Genetic Algorithm (GA) and mathematical modeling based on Mixed-Integer Linear Programming (MILP), to identify the most promising approach for solving this problem.
The practical perspective of the presented problem considers real conditions and constraints observed in the dairy processing industry, aiming to make the implemented models tools of academic and practical interest for addressing issues related to the production, inventory, and logistics of dairy products.
In summary, the main contributions of this research are the following:
I. Proposal of a PDDL formulation for the Artificial Intelligence (Automated Planning and Scheduling) approach, integrating the features and constraints of the presented case study.
II. Proposition of a GA and MILP formulation as classical approaches.
III. Comparative analysis of the applied methods and identification of the best-performing approach for the studied problem.
IV. Academic contributions to a problem of global relevance.

3. Case Study: Dairy Industry

The case study contributes to investigations related to factual and present situations in daily life, with the opportunity to be evaluated and improved. Its main purpose is to analyze and solve problems in various fields. Despite being strongly related to social research, all areas use the case study method, whether associated with issues of the industrial or economic sector, since, regardless of the area of interest, the case study arises with the objective of understanding and investigating real-world situations in a more focused way [24].
The milk production chain has to address the question of the degree of perishable products very carefully, which can vary from days (milk in nature) to months (hard cheeses). A perishable product presents at least one of the following conditions: (1) its physical condition deteriorates visibly; (2) its internal or external value decreases in the customer’s perception; (3) the reduction in its functionality can lead to serious consequences [25].
The milk produced, respecting the appropriate conditions imposed by sanitary regulations, is stored in chillers on the properties or in community tanks. Trained professionals should perform its collection, performing several product quality tests before transporting it to the processing industries.
In Brazil, the person in charge of collection at the property measures the temperature, alkalinity, and acidity of milk [26]. If the milk passes the sanitary requirements, it is transported in isothermal tanks that cool the raw material in conditions suitable for processing. When arriving at the industrial plant, the raw material undergoes inspection, and again, tests are made to ensure that the milk has not undergone changes. In the processing industry, the raw material is stored properly at low temperatures to maintain its quality.
The dairy processing plant must coordinate the following three primary processes: (1) the transformation of raw materials into intermediate products, (2) the filling and packaging operations of final products, and (3) the transport of end products to distribution centers [27].
After the inspection approves the milk, it begins its transformation steps until each final product is produced. The dairy processing plants are segmented according to the final product to be produced. It is important to note that before any other process is performed, the milk is pasteurized. Depending on the production purpose, raw materials may suffer nutritional repairs of fat and protein, always from milk.
Each industry has peculiarities related to the organization of production and meeting demands. For example, some products can start production in one factory and end up in another, such as cheese that can be produced in one place and sliced in another. For the development of this research, interviews and technical visits were conducted in an important industry, with units in Brazil and around the world, aiming to understand the dynamics related to the production and transportation of dairy products.
Figure 1 represents dairy products’ production, quarantine, and destination at the distribution center. After production is completed, products enter a quarantine period, except for dependent products. During this time, they remain in storage until released. Once released, dependent products undergo an additional processing stage at the original facility or another plant with available capacity. Final products released from quarantine are then transported to the distribution center. The objective of Figure 1 is to provide basic knowledge of the production dynamics of the entire milk chain since each derivative has a specific way of being produced.
The data used are adaptations of accurate information from the dairy production chain. The scope of the research concerns four dairy processing plants and one distribution center. We studied the behavior of six products as follows: four requiring refrigeration ( p 1 , p 2 , p 5 , p 6 ) and two dry ( p 3 , p 4 ). The problem seeks to meet all demands from the distribution center in the shortest time possible. The demands are monthly, allowing adjustments.

3.1. Dairy Plants

The case study relates to four geographically dispersed dairy plants ( F = { f 1 , , f 4 } ) and one distribution center (named f 5 for modeling’s sake, then F = { f 1 , , f 5 } ).
The processing units have production capacity according to each product type, see Table 1. There are six products produced ( p 1 , , p 6 ) by the four dairy plants; the relationship between products and plants is as follows:
f 1 produces p 1 , p 2 , and  p 3 .
f 2 produces p 5 .
f 3 produces p 1 and p 2 .
f 4 produces p 3 , p 4 , and  p 6 .
The dairy plants f 1 , f 3 , and  f 4 can receive products from other units for completion; considering the entry of the unfinished product as input for a new one, they maintain the following relationships (see also Table 2):
f 1 can accept p 1 from f 3 and produces p 2 .
f 3 can accept p 1 from f 3 and produces p 2 .
f 4 can accept p 3 from f 1 and produces p 4 .
All factories can send finished products to f 5 (distribution center). In this case study, we have only one distribution center (DC), also called f 5 , for notation’s sake.

3.2. Distribution Center

The case study works with only one distribution center (DC), where all finished products are shipped. The distribution center is a factory f with a production capacity equal to zero and belongs to the set F , called f 5 . As the planning horizon used in the case study is thirty days, we consider the storage capacity of f 5 unlimited for cold chamber storage and dry deposit storage.

3.3. Dairy Products

Dairy industries rely on diversifying dairy products and brands, which plays a key role in offering a wide range of nutritional options that meet multiple needs and preferences, meeting the growing demand for variety in consumers’ diets.
In this case study, the mix of dairy products involves products with distinct characteristics and different relationships between production plants to approximate the defined scope of the dairy industry context. Considering products with high demand, the diversity in quarantine times, the need for refrigerated storage or not, production precedence between products, products with the possibility of completion in more than one plant, and the need for refrigerated transport or not, the selected products are defined in the following set ( p i P , i = 1 , , n P , where n P is the number of dairy products).

3.4. Dairy Product Demand

Production tries to meet the demand ( D M p i ) of each milk product ( p i ) required in the distribution center ( f 5 ). The planning horizon for meeting demand is monthly.

3.5. Production Capacity

The production capacities of the dairy plants are shown in Table 1, which refers to the production volume in tonnes that each factory can produce during one day of regular operation. Capacities do not limit the amount of resources needed for production and consider the installed infrastructure and efficiency of production processes.
We can also see in Table 1 the initial inventory of each product ( I O f , p ) existing in each factory and the DC.

3.6. Quarantine Time

The quarantine of products in the food industry is a safety procedure used to isolate and temporarily retain food products. Only after this period can dairy products be released for further steps, such as transformation into a new product or transport to another industrial plant or distribution center.
Although strategies such as quarantine are not a requirement for perishable food processing industries, international standards recommend adopting measures focused on risk management, food safety, and minimizing risks to ensure compliance with regulations [28].
One of the main objectives of quarantine is to guarantee the quality of the product through additional tests, such as analysis, to detect microbiological, chemical, or physical contamination. It seeks to ensure food safety, minimize public health risks, and protect a brand’s reputation.
In this study, quarantine is mandatory after production in the first factory is completed, even if the product is shared and finished in another factory plant. For example, if factory f 3 produces product p 2 using product p 1 from factory f 1 as raw material, quarantine must take place obligatorily in f 1 . From Table 1, it is possible to identify significant variations between each product’s quarantine times ( T Q p ). The products p 4 and p 5 do not require quarantine because they have a precedence relation, i.e., the previous product has already passed through quarantine.

3.7. Transportation Time

The cost of transportation is calculated in days, considering the total time required to complete the operation of moving products between the factories of origin and the destination ( T T f , f ). We can observe those distances in Figure 2.
The transport time is calculated based on the kilometers traveled and converted into days.

3.8. Transportation Capacity

The transport of products between factories and even the distribution center f 5 is carried out through a heterogeneous fleet of vehicles with different capacities for dry or refrigerated cargo ( C T k , t ).
Dry cargo vehicles transport various products with less stringent conservation requirements but are still subject to quality and safety standards. Refrigerated transport, or refrigeration, is essential for preserving perishable products sensitive to ambient temperature. Vehicles equipped with refrigeration systems prevent teh spoilage of food in transit. We consider the following four types of vehicles in the case study:
Type 1: Refrigerated van.
Type 2: Refrigerated truck.
Type 3: Dry cargo van.
Type 4: Electric forklifts.
Each factory, in each period, has a specific number of vehicles available for use, contracted to meet the demands; see Table 3. The choice of vehicles respects the specificity of the transported product.
The vehicle is available for the factory when it is empty and not in transport. The vehicle is in use by the factory when it is attending to the operation of product transport, that is, a displacement between the origin factory (f) and the destination factory ( f ). As soon as the vehicle finishes its task, it is available at the factory of origin.

3.9. Perishability

One of the key consequences of makespan reduction in the case study is its impact on product perishability. Therefore, products should be placed in the distribution center as soon as possible. The shelf life of the products presented in Table 1 refers to the period during which each item maintains its quality and safety characteristics for consumption. Several factors influence products’ perishability, including hygiene manufacturing, adequate storage, and correct transport.
Therefore, with agile and appropriate planning, it is possible to guarantee the quality of the products. Thus, the product must be available in the distribution center before the demand meeting date, ensuring it is available for retail with a viable consumption life.

4. Case Study Design

Optimization problems are composed of inherent specificities and complexities. Thus, the adequacy of approaches based on sound theoretical principles provides support for the appropriate and necessary adaptation to solve these problems.
Basing the present research on the methodology of operational research, we adapted the phases of the study suggested by the authors of [29,30] to the case study of the dairy industry. Figure 3 demonstrates the methodological path adopted.
It is important to note that several technical visits and meetings with industrial plant employees were held to study the scope of the problem and understand the dynamics of the milk processing industry.
  • Problem definition: The objective of the study is to optimize the dairy production chain, involving decisions on production, inventory, and transportation, taking into account perishability and environmental effects in the considered stages. The problem studied is limited to four dairy plants and one distribution center, whose production mix is processed in the factories and transported to the distribution center according to demand.
  • Design and solution of the problem model: The challenge is to model the problem according to the industries’ characteristics, restrictions, and final goals. Through the data collected from the real problem, we present a mathematical model, which is the basis for the other computational models, as follows:
    In the Automated Planning and Scheduling context, problem modeling occurs in files that define the domain and the problem. These files include the actions, preconditions, and effects that may occur, determining the rules and possible operations that the planner can perform. We use PDDL (Planning Domain Definition Language) as the language standard for modeling the problem, which is supported by the planner in this study [11,22,31,32]. The tuple I , G , A defines the problem, generating plans that lead from the initial state I to objectives G through the application of sequence actions of A [33,34]. The model will be optimized using Automated Planning and Scheduling, whose solver is a planner. We use OPTIC (Optimising Preferences and Time-Dependent Costs), an artificial intelligence planner that optimizes planning problems involving complex preferences and costs that vary with time [35].
    We used the framework Distributed Evolutionary Algorithms in Python (DEAP 1.0) to model and solve the genetic algorithm [36].
    We use the ZIMPL language to write the mathematical model [37]. ZIMPL allows the description of the MILP (mixed linear integer programming program) that represents the problem. This model will serve as an input for a commercial solver, in the case of IBM ILOG CPLEX Optimization Studio [38].

5. Computational Experiments

5.1. Mathematical Model

This subsection presents a single-objective model based on Mixed-Integer Linear Programming (MILP) to minimize the number of days required to satisfy total demand.
The mathematical model representing the problem aims to formally describe the elements involved, their constraints, and their objective. Table 4 presents the notation used by the mathematical model.
The model is formalized as follows.
Min T m a x
s . a I f , p , d = I f , p , d 1 + Q f , p , d + f F f t T f k K f , t x ^ f , p , d , f , t , k f F f k K f x f , p , d , f , k p P p y ^ f , p , p , d f F , p P f , d D : d > 0
y f , p , d = Q f , p , d + T Q p + 1 f F , p P f , d D
y ^ f , p , p , d = Q f , p , d + T Q p + 1 f F , p P , p P p P f , d D
x f , p , d , f , t , k = x ^ f , p , d + T T f , f , f , t , k f F , p P f , d D , f F f , t T f , k K f , t
x f , p , d , f , t , k C T t , p z f , p , d , f , t , k f F , p P f , d D , f F f , t T f , k K f , t
z f , p , d , f , t , k + p P f d D : d < d d + T T f , f f F f z f , p , d , f , t , k 1 f F , p P f , d D , f F f , t T f , k K f , t
I D C , p , d = I D C , p , d 1 + f F p P f t T f k K f , t x ^ f , p , d , D C , t , k d D : d > 0
d D w p , d = 1 p P
I D C , p , d D M p w p , d p P , d D
d w p , d T max p P , d D
I f , p , 0 = I 0 f , p f F , p P
I f , p , d 0 f F , p P , d D
Q f , p , d 0 f F , p P f , d D
0 y f , p , d C F f , p f F , p P f , d D
0 y ^ p , f , p , d C F f , p f F , p P , p P p P f , d D
x f , p , d , f , t , k 0 f F , p P f , d D , f F f , t T f , k K f , t
x ^ f , p , d , f , t , k 0 f F , p P f , d D , f F f , t T f , k K f , t
z f , p , d , f , t , k { 0 , 1 } f F , p P , d D , f F f , t T f , k K f , t
w p , d { 0 , 1 } p P , d D
T m a x 0 d D
The objective, represented in Equation (1), is to minimize the total execution time of a demand response plan at the distribution center.
Equation (2) represents the stock conservation constraints, where the first part represents the sum of the previous day’s production, the stock of products available after quarantine, and the products arriving from other factories. The second part of Equation (2) represents the decrease in stock, subtracting the products that are sent to other factories and also subtracting the stock benefited in dependent productions, reducing the amount of product input. Equations (3) and (4) define the quantity of products released for transport to the distribution center or benefiting in another dairy plant on the day after the end of quarantine. Equation (4) refers to the production of a product that depends on previous production.
Equation (5) indicates that the quantity of product transported between factories must be equal to the quantity arriving at the factory destination after the transportation time. Equation (6) indicates that the load carried in the selected vehicle must not exceed its maximum capacity.
Equation (7) imposes a constraint that ensures the k-th vehicle of type t is assigned to only one transit operation between an origin factory f and a destination factory f within the defined period. This restriction prevents a vehicle from being used in multiple transits concurrently. The formulation accounts for all product flows from factory f, represented by the summation over p P f . Additionally, the summation over d D considers the feasible arrival days, ensuring that any vehicle arriving at f on day d must have departed earlier, respecting the required travel time T T f , f . During this interval, the vehicle remains in transit and cannot be allocated to any other trip, preventing scheduling conflicts. The summation over f F f includes all potential destination factories that receive products from f.
Equation (8) updates the stock in the CD, and the demand response constraint is Equation (10). Equation (9) determines that all products will have their demands satisfied sometime within the planning horizon, guaranteeing a feasible solution. Equations (10) and (11) define the value of T m a x . Equation (10) determines when each product meets its demand, and Equation (11) indicates when all products meet the demand, i.e., the maximum amount of time to satisfy the demand. Equation (12) defines each factory’s initial stock.
Equations (13)–(21) define the variables’ domain. Equations (15) and (16) represent the capacity constraints in the model, establishing the relationship between production variables and factory capacity. These equations ensure that the quantity of manufactured products does not exceed production capacity, which, in turn, implicitly limits the supply to the DC, reflecting the real constraints of the supply chain.
The variables expressed in Equations (19) and (20) are binary, representing discrete decisions related to vehicle allocation for transportation and demand fulfillment on a given day. The variable T m a x is defined within the domain of non-negative real numbers, as established by constraint (21). However, since the objective function is formulated as a minimization problem and in conjunction with constraint (11), T max assumes only integer values in the optimal solution. The remaining variables (see Equations (13), (14), (17), and (18)) are continuous because demand is expressed in tons, with a precision of up to four decimal places, ensuring an accurate approximation in the modeling of production, inventory, and transportation.

5.2. Automated Planning and Scheduling (APS)

The characterization of Automated Planning and Scheduling makes use of the following three parts: (1) models—composed of the structure of the domain, actions, objective, and initial state; (2) language—the chosen way to express the model to be understood by the planner, is the language PDDL; (3) planner—the algorithmic search strategy for navigating and optimizing the model [39]. The modeling of APS problems occurs in domain and problem files.
The actions define the rules that govern the behavior of objects; they are related to the changes in state that may occur in the modeled problem. The action modeling indicates how the environment can change from one state to another, and the goal is to find a sequence of actions that leads from an initial state to the state of the goal or objective state. In the problem file, the initial state defines the available resources and conditions necessary to start the plan, whose goal state formalizes the objectives.
The file with the domain description defines the rules governing the behavior of objects, while the problem file defines the addressed problem, including the initial conditions and objectives.
OPTIC was the planner solver for resolving the model, aiming to minimize the makespan [35]. Time planning deals with actions related to time. Those actions can also occur simultaneously, and the duration of actions may vary. Actions may also have complex interdependencies that determine what combinations are possible [39].
The OPTIC planner uses the Simple Temporal Network (STN) and the Single-Source Shortest Path (SSSP) algorithm to adjust the objective function and ensure the fulfillment of cost functions in time. It employs the following admissible heuristics: one based on plan relaxation, which simplifies the search while maintaining feasibility; and another to eliminate unfeasible branches, refining the solution. The tree search starts with the high cost of quickly discarding suboptimal paths, gradually reducing it with additional cuts. For its execution, it is necessary to install a solver, such as Coin-or Linear Programming (CLP).
The goal is to find a sequence of actions that transforms the initial state into the desired goal state. The tuple used is as follows:
(a)
Initial state (I)
Demand: Demand f of each dairy product D M p .
Dairy Plants: The factories producing each product P f and daily production limits C F f , p .
Quarantine Time: Quarantine time for each product T Q p .
Initial Stock: Stock, in tons, of each product at each factory I 0 f , p when optimization starts.
Vehicles: Vehicles that are available at each factory for transport K f , respecting the transport capacity C K k , p . Furthermore, this informs the possible routes that each vehicle can travel F f .
Distances: The distance between source and destination dairy plants, measured in days T T f , f .
(b)
Goal state (G):
Demand fulfillment: The goal state of the model seeks that the DC meets the demand for all products. It means that the available stocks of each product in the distribution center are equal to or greater than the respective demands I D C , p , d D M p .
(c)
Action (A):
Produce: The production quantity of each product produced in a dairy plant (respecting its capacity) will increase the quarantine stock or the available stock if the product does not require quarantine. The duration of this action is set to one time unit (one day).
Sharing: This allows a product released from quarantine to be transported to a factory that will transform this input into a derivative product, as is the case of p 2 and p 4 production, which need p1 and p3, respectively, (see Section 3.1). The action increases the destination factory’s available stock.
Quarantine: The quarantine stock receives finished products and respects each product’s quarantine time. At the end of the quarantine action, it moves the products to the available stock so that other actions, such as transportation, occur.
Send: The send action represents the transport of products between factories and between factories and the DC. This action considers the availability of vehicles and the distance in days between origin and destination. The effect of this action is the increase of products in the destination factory and the subtraction of the stock in the origin factory.
(d)
Metrics: The objective of the model is to minimize a function that considers the total cost associated with production, transportation, and storage time. Thus, the APS aims to find a solution that satisfies the conditions of the goal state, seeking to minimize the makespan.

5.3. Plan Found by OPTIC

Executing the OPTIC planner for the problem modeled in PDDL generates a complete solution plan, whose steps in finding the best possible solution are documented and available in the GitHub repository (see Section 6.2).
The solution obtained through the methods used to solve the problem is graphically displayed in a unified structure over the time horizon. Figure 4 shows the legend used in the graph, which depicts the actions that occur during the production process. The activities depicted include production, quarantining, transportation, and demand fulfillment (at the DC). The representation excludes days when there was no relevant activity observed.
The color scheme of Figure 4 represents different stages of the supply chain as follows: blue indicates input production, dark red represents the quarantine period, purple corresponds to derived production, and green signifies available stock. In transportation, the color varies according to the vehicle type (t), as follows: light blue for t 1 , light orange for t 2 , light green for t 3 , and yellow for t 4 . The arrival transport at the destination factory ( f ) follows the same color scheme but is enclosed in [ ] to distinguish it from departure transport.
Figure 5, Figure 6, Figure 7, Figure 8, Figure 9, Figure 10, Figure 11, Figure 12, Figure 13, Figure 14, Figure 15, Figure 16, Figure 17, Figure 18 and Figure 19 show the activities of the solution found by APS for this case study.
We can observe that the solution proposed by APS starts production on the last day of quarantine of a previous production. As a consequence of this decision, there may be a delay in meeting the demand for inputs and/or dependent products.
When a product is released from quarantine stock, the solution process aims to use it immediately for dependent production or transportation. However, as in production, transportation is always carried out with the maximum capacity, leaving in stock the quantity that cannot be transported or used as an input for a dependent product.
We observed that the production of p 1 starts on d 1 in both f 1 and f 3 (see Figure 5 and Figure 7). From the initial stock of p 1 in f 1 , 21.4200 tons are sliced on d 1 (producing p 2 ), while 54.4320 are sent to the DC on d 2 (see Figure 5 and Figure 6).
In f 3 , almost all the initial stock of p 1 is transported to the DC on d 1 , as well the stock available at d 22 , causing p 2 production to start only on d 42 and delaying all production planning (see Figure 7 and Figure 8).
Due to p 2 ’s dependence on p 1 production and APS’s prioritization of first meeting all demands for p 1 (which happens on d 44 ), the satisfaction of the demand for p 2 only occurs on d 65 , quite far from the desired horizon of 30 days (see Figure 9 and Figure 10).
For p 3 and p 4 , demand is met within the planning horizon, d 10 and d 16 , respectively, (see Figure 7, Figure 8, Figure 9, Figure 10, Figure 11, Figure 12, Figure 13, Figure 14 and Figure 15). The APS trend to meet demand remains, but as the quarantine period is shorter, the demand service takes place within the planning horizon. However, for products p 5 and p 6 , the demands were not satisfied within the planning horizon, occurring only on d 38 and d 47 , respectively (see Figure 16, Figure 17, Figure 18 and Figure 19).
We observed that APS has difficulties efficiently organizing production and using transport vehicles. These difficulties are inherent to a MILP like this, so we will see how the problem is solved using the CPLEX solver (Exact Method) and the GA.
After the execution of the APS model, the system found a production plan but did not find a plan solution that was considered optimal. A critical point identified was the absence of production during the period in which the quarantine action was taking place. Nothing in the modeling restricts actions to co-occur with the quarantine period. This situation resulted in the underutilization of factories on the 30-day planning horizon, compromising the productive flow and efficiency of actions and impacting the non-fulfillment of demand.
The state of the goal (b) requires that I D C , p , d D M p . Due to this, the production was interrupted only when we it fulfilled the demand in D C , which resulted in the generation of stocks in the factories already producing. Table 5 shows the quantity of each product, in tons, that remains stored in the factories. An example of the planner’s wrong decisions is that the demand for p 1 is satisfied on d 44 . However, as  p 2 needs p 1 , the production of p 1 continues until it supplies the demand for p 2 , generating unnecessary stock.
Note that the production plan of OPTIC needs 65 days to satisfy all the demands in the D C ; in the following sections, we will see that this is more than twice the solutions obtained by the other methods. All files related to the modeling and execution of the planner are available on GitHub; see Section 6.2.

5.4. Genetic Algorithm (GA)

The development of Genetic Algorithm (GA) code uses the DEAP (Distributed Evolutionary Algorithms in Python) library, which provides a robust and flexible framework for implementing evolutionary algorithms for optimization problems.
The GA modeling was adapted to the problem studied, respecting all the conditions and restrictions previously presented.

5.4.1. GA Pseudocode

To better understand the GA, we present the additional notation in Table 6 together with the corresponding pseudocode (see Algorithm 1).
Algorithm 1 GA for the case study in dairy plants
  1:
Input: demands D M p , initial stocks I 0 f , p , production capacities of each dairy plant C F f , p , vehicle capacities C K k , p , quarantine times T Q p and stocks in the distribution center I D C , p , d .
  2:
Initialize P G A with random individuals representing the delivery days for each product.
  3:
while (number of generations ≤ 20) do
  4:
      for (each individual i in P G A ) do
  5:
            Calculate production, quarantine and transport phases of i using the function ‘calculate_phases’.
  6:
            Assess the feasibility of i using the function ‘is_feasible’, applying penalties if necessary.
  7:
            Compute T m a x of i considering the time to fulfill the demand at DC.
  8:
      end for
  9:
      Select the individuals for crossover.
10:
      Apply Two-point crossover in 80% of selected individuals.
11:
      Apply mutation in the individuals of the new population with a probability of 30%.
12:
      for (each individual j of new population) do
13:
            Reevaluate phases of j with function ‘calculate_phases’
14:
            Check and correct precedence between products with ‘repair_individual’
15:
            Evaluate j.
16:
      end for
17:
      Update population.
18:
end while
19:
Identify the individual with the lowest T m a x (best fitness) between generations.
20:
Output: best individual.

5.4.2. Example of GA Individual and Operators

Below is an example of the operations performed on the individuals generated for this problem, as follows:
(a)
Individual: Each individual is randomly generated, with each gene representing the total delivery time for a product at the Distribution Center (DC), within a time window ranging from 1 to 30 days. For example, individual1 = [5, 2, 15, 20, 13, 7] indicates that the total delivery time for the first product is scheduled for day 5, the second product on day 2, and so on. The size of the vector corresponds to the number of products (six products in this case). Similarly, individual2 = [6, 12, 14, 18, 9, 21] represents another set of delivery days for the same products.
(b)
Crossover: We use the two-point crossover operator to combine two individuals and generate two new individuals. This operation exchanges segments between the two parents, creating hybrid offspring.
Example:
  • offspring1 = [5, 2, 14, 18, 13, 17]
    offspring2 = [6, 12, 15, 20, 9, 21]
(c)
Mutation: Mutation uses the mutFlipBit operator, which randomly changes the delivery date of products on the DC with a probability of 30%. This operation introduces variations, exploring different solutions in the search space.
Example:
  • offspring1_after_mutation = [7, 2 14, 18, 13, 17]
(d)
Repair: The repairing function ensures that individuals respect all the constraints, rules of precedence, and dependence between products.
Example:
  • offspring1_after_repair = [7, 8, 14, 18, 13, 17]
(e)
Selection: We employ the elitism method, where the best individuals from the current population are retained for the next generation without modification. The Hall of Fame (hof) structure is used to store these individuals, ensuring that the best solutions found across generations are preserved.
(f)
Fitness: The objective function seeks to minimize the maximum time of service of all demand in the DC ( T m a x ). Therefore, the best individual is the one with the lowest value of T m a x .
Example:
  • offspring1 = [5, 2, 14, 18, 13, 7] T m a x = 60 (Given that this individual is infeasible and requires correction.)
    offspring1_after_repair = [7, 8, 14, 18, 13, 17] T m a x = 18
    offspring2 = [6, 12, 14, 18, 9, 21] T m a x = 21
In the example above, each gene is evaluated based on the total time required to deliver the product, considering production, quarantine, and transportation times. In the case of offspring1, the delivery time of the second product, which is 2, was considered infeasible, resulting in a penalty of 60. On the other hand, offspring1_after_repair, after being corrected, obtained a T m a x of 18 and was selected as the best individual for the next generation.
(g)
Population: The population size is 50 individuals. The initial population is made up of randomly generated individuals, with each individual representing a solution to the production and transportation scheduling problem. The evolution of the population occurs through crossover and mutation operations, creating new solutions and selecting the best ones to form the next generations
(h)
Stopping Criteria: The GA ran for 20 generations, each composed of a new population of individuals generated by crossover and mutation. The objective was to minimize T m a x and ensure that all products were delivered in the DC in the shortest possible time.

5.4.3. Individual Coding and Decoding

  • First phase—individual coding:
The coding of each individual begins with the definition of the value of each gene, where its locus represents the product and its value represents the day on which the product meets the demand in the D C ( G d , p , D C ) . The value of each gene is randomly selected in the interval between d 1 and d 30 , which corresponds to the planning horizon.
From the definition of the value of the genes, we start to calculate the day of production of each product. The productions are triggered according to the demand of each product ( D M p ), and its production time is taken into account. The initial stocks of each product in the factories ( I f , p , d ) and D C are also considered, along with the production capacity of the factories ( C F f , p ), production time, quarantine time ( T Q p ), and time required for transport. The transport time considers the transport capacity ( C T p ) and transportation cost between the origin factory f and destination factory f . With this information, we can find out how many days we should return to meet all products’ demands.
When the products are dependent P p , the calculation should consider both the demand of the dependent product and its source.
If the production exceeds the transport capacity C T t , p , the transport time will be adjusted to double the standard value T T p , f , f ; otherwise, we use the standard value.
The solution should be repaired if the production start date is less than d 1 . Repair is performed by randomly choosing a new date between the current value of the gene and d 30 . The coding process establishes the necessary parameters for the execution of the production and transport function in the genetic algorithm model, preparing the individual to be evaluated in the following phases of the algorithm.
Example: If the gene corresponding to p 1 receives the value 26 and considering 2 days of production, 20 days of quarantine, and 4 days of transport, the beginning of production of p 1 is computed as follows:
G d , 1 , D C = 26 2 20 4 + 1 = 1
Thus, the production of p 1 will start on d 1 . With the determination of the dates of the beginning and end of production, the dates of beginning and end of quarantine, as well as the beginning and end of transport are defined in sequence, observing the criteria of precedence between products, the stocks available in the factories and the total transport capacity. Notice that these phases are the time windows in which each process begins and ends; however, a detailed description of the solution is not presented at this stage.
In the next step, the generated individuals undergo crossing and mutation operations, generating their offspring. Then, for each gene, it is verified if the beginning of the resulting production is negative, which would indicate the unfeasibility of the delivery date. If this occurs, a repair procedure is applied in which a new number is generated randomly in the range from 1 to 30. If, even after the repair, some gene remains unviable, the solution receives a penalty of 60.
  • Second phase—individual decoding:
Knowing the start of production and transportation dates for each product, the production of each product begins in its respective factories. Then, the product is quarantined, at the end of which the production plan can use it to produce a dependent product or send it to the DC.
The transport respects the constraints on the use of vehicles and their capacities. Then, we adjust the delivery dates of each product in DC. The incumbent solution is updated, and a new cycle begins until the stop criterion is satisfied.

5.4.4. Plan Found by GA

The GA found a solution that meets all demand in the DC in 26 days, a reduction of 60% compared to APS. The figures follow the pattern from APS, using the same legend shown in Figure 4.
According to the representation of the solution, exposed between Figure 20, Figure 21, Figure 22, Figure 23, Figure 24 and Figure 25 (representing p 1 and p 2 , in factories f 1 and f 3 and the D C ), the rest of the production plan is in Appendix A.1. We show f 1 and f 3 and the D C are sufficient, as the total production time depends on them. We observed that the GA solution reduces factory inventories, allocating available production to transport processes or dependent output.
As shown in Figure 21, Figure 23, and Figure 25 and Appendix A.1, the GA seeks to meet the demand of dependent products p 2 and p 4 . In contrast, the input products p 1 and p 3 are served later, as shown in Figure 20, Figure 22, and Figure 24 and Appendix A.1.
Unlike the APS and the Exact Method, in the GA, there is no transport between producing factories; the products are sent directly to the D C . Thus, the product p 3 produced in f 1 is sent directly to the DC, p 3 produced in f 4 is input to produce p 4 , and the remaining stock is sent to the D C . The transport allowed between factories f 1 and f 3 also does not occur. Finally, the mandatory product in the optimization process of the GA is p 1 , which determines the T m a x , finishing d 26 .

5.5. Exact Method

For the solution of the mathematical model presented in Section 5.1, we used the solver IBM ILOG CPLEX. CPLEX found the optimal solution to the proposed problem, respecting the capacity and processing time constraints. All factories start with the stock available according to Table 1.

Plan Found by the Exact Method

The solution shows production planning using the Exact Method that seeks to avoid redundant factory stocks by producing and transporting the exact quantities needed to meet demand in the DC (see Figure 26, Figure 27, Figure 28, Figure 29, Figure 30 and Figure 31 and Appendix A.2).
Note that in some situations, for dependent products, the Exact Method keeps the input products in stock instead of transporting them. This decision guarantees the production of dependent products, improving the production plan.
Through Figure 26 and Figure 28, it is observed that there is transportation of products between f 1 and f 3 , complementing the stock of input products in f 3 , for the production of p 2 . In addition, we note the transport decisions involving the transshipment of p 2 between factories; according to Figure 27 and Figure 29, and this situation would not occur if there were other objectives, such as minimizing CO2.
As in the GA, the product with the longest quarantine time, p 1 , establishes the value of T m a x also on d 26 . However, unlike the solution obtained by APS, the demand for p 2 in the DC is satisfied before p 1 . Another consequence of the long quarantine period of p 1 is that the logistic operations of this product are concentrated in the final periods.
In the first 5 days, the initial stock of p 1 , both in f 1 and f 3 , is fully used as input for p 2 production or transported to the D C (see Figure 26, Figure 27, Figure 28 and Figure 29). As p 1 requires 20 days of quarantine, excluding initial stocks, there are no finished inputs for the production of p 2 until d 21 .
The following comments are anchored in the figures of Appendix A.2. At f 1 , the stock of p 3 shows a sharp reduction in the first 3 days, with dedicated shipments for D C , resuming production again at the end of the time horizon.
It is observed that all p 3 originated from f 1 is transported directly to the D C . Therefore, the production of p 4 , which depends on p 3 , is all carried out in f 4 .
The initial stocks of p 3 and p 4 remain at f 4 until d 5 and d 14 , respectively. The p 3 in f 4 productions are available from d 12 and are used for the production of p 4 or transported to the D C . The demand for p 3 and p 4 is met in d 25 .
Products p 5 and p 6 are produced and transported according to demand as quickly as possible, which happens on d 20 and d 22 , respectively.
All initial stock of p 5 in f 2 goes to the D C on the first day. From this, p 5 is being released, and its transport D C seeks to optimize the capacity of the vehicles (which are type 1 or 2, used simultaneously).
The Exact Method achieved the same result of the GA reaching a maximum completion time of 26 days. Thus, the total horizon of production and distribution of products, including all processes of production, transport, storage, and restrictions was completed in this period and demand was met accurately, with no remaining production.
The significant difference between the Exact Method and the solutions obtained by APS and the GA is that their submitted production plan ensures that finished products are made available in the distribution center with sufficient time for marketing within the shelf life.

6. Discussion of Results

Table 7 shows the dates when each product reaches its demand in the DC and T m a x and the computational effort spent by each method.
When analyzing Table 7, it is observed that the Exact Method met the demand of most products before the other approaches in the shortest computational time. This demonstrates that for a MILP, good mathematical modeling, together with a good solver may have superior performance to other methods, especially in smaller dimensions, such as this case study.
APS required more time to meet the products’ demand requirements. New production cycles for a given product start only after the quarantine period has expired. This behavior resulted in a production plan that extrapolated the predicted time horizon.
The product p 1 , which has the longest quarantine time and is also used as input for the production of p 2 , determines the T m a x . In the Exact Method and in the GA, it was sought to meet the demand of p 2 while the production of p 1 remains in quarantine. However, in the APS, the decision was to prioritize meeting the demand of p 1 before supplying the demand of p 2 , leaving its solution unfavorable.
Among the APS limitations, the computational cost due to solving complex temporal constraints and sequential decisions is worth mentioning, which significantly increases the time required to find a solution compared to the Exact Method and the GA. Since APS models problems using constraint programming, its multiple temporal and conditional dependencies contribute to expanding the search space. These factors impact both the solution time and the quality of the results, making classical approaches more competitive for this type of problem (see Table 7).
In addition, APS has accumulated a large stock of products in the factories. The GA algorithm and the Exact Method do not present residual stocks.
Figure 32, Figure 33 and Figure 34 graphically illustrate the arrival of products in the DC to meet demand.
Figure 32 shows that the decision of the APS to supply the demand of p 1 before p 2 results in a gap of 21 days where no arrival of products occurs in the DC.
Figure 33 and Figure 34 show the increase of products in the D C stock for both the GA and the Exact Method, so one can see that the demands are met within the time horizon at d 26 .
The GA is more flexible in terms of modeling than the APS, although it still depends on adjustments to fit changes. The Exact Method stands out for its flexibility when adaptations are necessary. It demonstrates a more direct and efficient modeling process independent of the size of the problem. We can easily add new products and factories.
APS showed the worst performance among the three methods and did not obtain a solution nor come close to the optimal, evidencing limitations in computational efficiency and the quality of solutions found. These difficulties in obtaining the solution by APS demonstrate its ineffectiveness in treating this combinatorial optimization problem.
Although the GA is an evolutionary algorithm, it achieved the optimal result, demonstrating its capacity to explore the solutions space. The Exact Method performs best, achieving the optimal result in the shortest execution time of the compared approaches. Of course, when the problem dimension grows, achieving the optimal solution in a reasonable time will become more difficult.
It is noteworthy that APS presents a detailed report of the production plan, in addition to being open source, which facilitates its use and adaptation in different contexts. GA stands out for the availability of frameworks that facilitate and streamline the process of modeling the problem-solving algorithm. In the Exact Method, the advantage highlighted is the possibility of finding the optimal solution to the problem, ensuring a more efficient level of decision.
APS, a rigid modeling allied to the selected planner, presents severe limitations that hinder its performance and applicability in complex combinatorial problems like this MILP. The GA requires the precise coding and decoding of individuals, which are challenging and demand extensive experimentation to ensure good results. The presentation of the results obtained by the GA and the Exact Method required additional steps to decode the solutions and make them more understandable.
Finally, the importance of building a mathematical model for the problem studied is highlighted since this allows the situations and needs of the present case study to be better discussed and adequately formalized.

6.1. Computing Resources

The computational experiments were performed on a computer equipped with an Intel(R) Core(TM) i5-7200U processor, which can operate at up to 2.71 GHz, and 8 GB of RAM memory.

6.2. Data Repository

The data repository is available on GitHub and can be accessed through the link: https://github.com/docvanessaschneider/Optimization-Methods-a-Case-Study-in-a-Dairy-Industry.

7. Conclusions

The present research made relevant contributions by comparing different methodologies and tools for the dairy production chain and analyzing the advantages and limitations of each proposed approach. The scope of the optimization problem studied is limited to a case study of the dairy industry composed of four factories, six products, and one DC. The goal is to build a production and transportation plan so that the demand for each product is satisfied in the DC in the shortest possible time ( T m a x ). The following methods were compared: Automated Planning and Scheduling, a Genetic Algorithm, and an Exact Method.
We present a detailed mathematical model of the problem in question and a formulation in PDDL for the application of APS and planner OPTIC.
The high perishability of the products was treated as a central aspect in the modeling and evaluation of the solutions obtained. All products were delivered within their expiration dates. However, the solution generated by APS did not meet the demand for all products within the established planning horizon, causing problems in the retail stages. These facts demonstrate the inadequacy of APS in solving complex combinatorial problems modeled as MILP.
Considering this case study, the Exact Method presented the optimal solution with less computational effort. However, there is no guarantee that this will continue if the scale of the problem increases. The Genetic Algorithm also found the solution, standing out for its flexibility and efficiency in exploring the space of solutions. Thus, we can apply the Exact Method until the size of the problem allows, and then, a metaheuristic can be used to maintain the quality of the solution.

Future Research

For future research in the dairy production chain using Automated Planning and Scheduling, we recommend the development of a dedicated algorithm that uses all the knowledge acquired so far and can work in a hybrid way with exact solvers and metaheuristics.
In addition, the objective of maximizing production capacity in the search for the full use of factories and vehicles and minimizing idleness should be considered. Another issue is to solve the problem as multi-objective, incorporating environmental issues and emissions of C O 2 , as well as avoiding the loss of products that exceed their useful life.

Author Contributions

The authors contributed equally to this work. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data repository is available on GitHub and can be accessed through the https://github.com/docvanessaschneider/Optimization-Methods-a-Case-Study-in-a-Dairy-Industry.

Acknowledgments

The authors are indebted to the editor and three anonymous reviewers for their constructive suggestions that have helped improve the original manuscript.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A

Appendix A.1

Figure 4 shows the legend used in the graph.
Figure A1. Description of the production and transport steps of p 3 at f 1 —GA.
Figure A1. Description of the production and transport steps of p 3 at f 1 —GA.
Algorithms 18 00219 g0a1
Figure A2. Description of the production and transport steps of p 3 at f 4 —GA.
Figure A2. Description of the production and transport steps of p 3 at f 4 —GA.
Algorithms 18 00219 g0a2
Figure A3. Description of the production and transport steps of p 4 at f 4 —GA.
Figure A3. Description of the production and transport steps of p 4 at f 4 —GA.
Algorithms 18 00219 g0a3
Figure A4. p 3 stock behavior at the distribution center—GA. *: corresponds to the moment of meeting the demand.
Figure A4. p 3 stock behavior at the distribution center—GA. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g0a4
Figure A5. p 4 stock behavior at the distribution center—GA. *: corresponds to the moment of meeting the demand.
Figure A5. p 4 stock behavior at the distribution center—GA. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g0a5
Figure A6. Description of the production and transport steps of p 5 at f 2 —GA.
Figure A6. Description of the production and transport steps of p 5 at f 2 —GA.
Algorithms 18 00219 g0a6
Figure A7. p 5 stock behavior at the distribution center—GA. *: corresponds to the moment of meeting the demand.
Figure A7. p 5 stock behavior at the distribution center—GA. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g0a7
Figure A8. Description of the production and transport steps of p 6 at f 4 —GA.
Figure A8. Description of the production and transport steps of p 6 at f 4 —GA.
Algorithms 18 00219 g0a8
Figure A9. p 6 stock behavior at the distribution center—GA. *: corresponds to the moment of meeting the demand.
Figure A9. p 6 stock behavior at the distribution center—GA. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g0a9

Appendix A.2

Figure 4 shows the legend used in the graph.
Figure A10. Description of the production and transport steps of p 3 at f 1 —Exact Method.
Figure A10. Description of the production and transport steps of p 3 at f 1 —Exact Method.
Algorithms 18 00219 g0a10
Figure A11. Description of the production and transport steps of p 3 at f 4 —Exact Method.
Figure A11. Description of the production and transport steps of p 3 at f 4 —Exact Method.
Algorithms 18 00219 g0a11
Figure A12. Description of the production and transport steps of p 4 at f 4 —Exact Method.
Figure A12. Description of the production and transport steps of p 4 at f 4 —Exact Method.
Algorithms 18 00219 g0a12
Figure A13. p 3 stock behavior at the distribution center—Exact Method. *: corresponds to the moment of meeting the demand.
Figure A13. p 3 stock behavior at the distribution center—Exact Method. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g0a13
Figure A14. p 4 stock behavior at the distribution center—Exact Method. *: corresponds to the moment of meeting the demand.
Figure A14. p 4 stock behavior at the distribution center—Exact Method. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g0a14
Figure A15. Description of the production and transport steps of p 5 at f 2 —Exact Method.
Figure A15. Description of the production and transport steps of p 5 at f 2 —Exact Method.
Algorithms 18 00219 g0a15
Figure A16. p 5 stock behavior at the distribution center—Exact Method. *: corresponds to the moment of meeting the demand.
Figure A16. p 5 stock behavior at the distribution center—Exact Method. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g0a16
Figure A17. Description of the production and transport steps of p 6 at f 4 —Exact Method.
Figure A17. Description of the production and transport steps of p 6 at f 4 —Exact Method.
Algorithms 18 00219 g0a17
Figure A18. p 6 stock behavior at the distribution center—Exact Method. *: corresponds to the moment of meeting the demand.
Figure A18. p 6 stock behavior at the distribution center—Exact Method. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g0a18

References

  1. Chopra, S.; Meindl, P.; Kalra, D.V. Supply Chain Management: Strategy, Planning, and Operation; Pearson India Education Services Pvt. Ltd.: Bengaluru, India, 2016; p. 569. [Google Scholar]
  2. Food and Agriculture Organization of the United Nations (FAO). FAO STAT—Livestock Primary, 2019. Available online: http://www.fao.org/faostat/en/#data/QL (accessed on 15 March 2025).
  3. da Rocha, D.T.; Carvalho, G.R.; de Resende, J.C. Cadeia Produtiva do Leite no Brasil: Produção Primária; Technical Report; Embrapa: Brasília, Brazil, 2020. [Google Scholar]
  4. Ali, S.; Barman, H.; Kaur, R.; Tomaskova, H.; Roy, S. Multi-product multi echelon measurements of perishable supply chain: Fuzzy non-linear programming approach. Mathematics 2021, 9, 2093. [Google Scholar] [CrossRef]
  5. Sel, C.; Bilgen, B.; Bloemhof-Ruwaard, J.; van der Vorst, J. Multi-bucket optimization for integrated planning and scheduling in the perishable dairy supply chain. Comput. Chem. Eng. 2015, 77, 59–73. [Google Scholar] [CrossRef]
  6. Mathur, S.; Mittal, V.; Upadheye, N.; Mathur, K.; Singh, V. SCM strategy for sales augmentation using TSP algorithm and time bound marginal discount utility. Int. J. Supply Chain Manag. 2018, 7, 87–94. [Google Scholar]
  7. Shafiee, F.; Kazemi, A.; Jafarnejad Chaghooshi, A.; Sazvar, Z.; Amoozad Mahdiraji, H. A robust multi-objective optimization model for inventory and production management with environmental and social consideration: A real case of dairy industry. J. Clean. Prod. 2021, 294, 126230. [Google Scholar] [CrossRef]
  8. Yaghoubi, A.; Akrami, F. Proposing a new model for location - routing problem of perishable raw material suppliers with using meta-heuristic algorithms. Heliyon 2019, 5, e03020. [Google Scholar] [CrossRef]
  9. Emidio, J.; Lima, R.; Leal, C.; Madrona, G. How can mixed integer linear programming assist dairy manufacturers by integrating supply decisions and production planning? J. Agribus. Dev. Emerg. Econ. 2021, 11, 178–193. [Google Scholar] [CrossRef]
  10. Wang, C. Research on optimal design of short-life cycle product logistics supply chain based on multicriteria decision model. Secur. Commun. Netw. 2021, 2021, 5564831. [Google Scholar] [CrossRef]
  11. Ghiaskar, A.; Amiri, A.; Mirjalili, S. Polar fox optimization algorithm: A novel meta-heuristic algorithm. Neural Comput. Appl. 2024, 36, 20983–21022. [Google Scholar] [CrossRef]
  12. Sriprateep, K.; Pitakaso, R.; Khonjun, S.; Luesak, P.; Jutagate, A.; Kaewta, C.; Srichok, T.; Kosacka-Olejnik, M.; Matitopanum, S. Optimizing Nile Tilapia growth and production costs in earthen ponds using multi-objective adaptive artificial intelligence systems. Aquac. Rep. 2025, 41, 102716. [Google Scholar] [CrossRef]
  13. Lopez-Castro, L.; Solano-Charris, E. Environmental optimization model for a milk collection problem with heterogeneous fleet. In Proceedings of the 2022 8th International Conference on Control, Decision and Information Technologies, CoDIT 2022, Istanbul, Turkey, 17–20 May 2022; pp. 413–418. [Google Scholar] [CrossRef]
  14. Kirilova, E.; Vaklieva-Bancheva, N.; Vladova, R.; Petrova, T.; Ivanov, B.; Nikolova, D.; Dzhelil, Y. An approach for a sustainable decision-making in product portfolio design of dairy supply chain in terms of environmental, economic and social criteria. Clean Technol. Environ. Policy 2022, 24, 213–227. [Google Scholar] [CrossRef]
  15. Majidi, A.; Farghadani-Chaharsooghi, P.; Mirzapour Al-E-Hashem, S. Sustainable pricing-production-workforce-routing problem for perishable products by considering demand uncertainty; a case study from the dairy industry. Transp. J. 2022, 61, 60–102. [Google Scholar] [CrossRef]
  16. Cruz, J.; Salles-Neto, L.; Schenekemberg, C. An integrated production planning and inventory management problem for a perishable product: Optimization and Monte Carlo simulation as a tool for planning in scenarios with uncertain demands. TOP 2024, 32, 263–303. [Google Scholar] [CrossRef]
  17. Serrano-Torres, G.; López-Naranjo, A.; Larrea-Cuadrado, P.; Mazón-Fierro, G. Transformation of the Dairy Supply Chain Through Artificial Intelligence: A Systematic Review. Sustainability 2025, 17, 982. [Google Scholar] [CrossRef]
  18. Osvald, A.; Stirn, L. A vehicle routing algorithm for the distribution of fresh vegetables and similar perishable food. J. Food Eng. 2008, 85, 285–295. [Google Scholar] [CrossRef]
  19. Jouzdani, J.; Govindan, K. On the sustainable perishable food supply chain network design: A dairy products case to achieve sustainable development goals. J. Clean. Prod. 2021, 278, 123060. [Google Scholar] [CrossRef]
  20. Shaabani, H. A literature review of the perishable inventory routing problem. Asian J. Shipp. Logist. 2022, 38, 143–161. [Google Scholar] [CrossRef]
  21. Kumar, S.; Barman, A.; Kumar, V. Study and analysis of milk-run model for minimum cost under upstream supply chain of a dairy plant. In Recent Advances in Manufacturing, Automation, Design and Energy Technologies; Springer: Singapore, 2022; pp. 213–220. [Google Scholar] [CrossRef]
  22. Gerevini, A.E. An Introduction to the Planning Domain Definition Language (PDDL): Book review. Artif. Intell. 2020, 280, 103221. [Google Scholar] [CrossRef]
  23. International Conference on Automated Planning and Scheduling (ICAPS). Welcome to ICAPS, 2025. Available online: https://www.icaps-conference.org/ (accessed on 15 March 2025).
  24. Yin, R.K. Estudo de Caso—5.ed.: Planejamento e Métodos; Bookman Editora: Porto Alegre, Brazil, 2015. [Google Scholar]
  25. Amorim, P.; Meyr, H.; Almeder, C.; Almada-Lobo, B. Managing perishability in production-distribution planning: A discussion and review. Flex. Serv. Manuf. J. 2013, 25, 389–413. [Google Scholar] [CrossRef]
  26. BRASIL. Instrução Normativa Nº 77, de 26 de Novembro de 2018. 2018. Available online: https://www.in.gov.br/materia/-/asset_publisher/Kujrw0TZC2Mb/content/id/52750141 (accessed on 15 March 2025).
  27. Bilgen, B.; Çelebi, Y. Integrated production scheduling and distribution planning in dairy supply chain by hybrid modelling. Ann. Oper. Res. 2013, 211, 55–82. [Google Scholar] [CrossRef]
  28. ISO 22000:2018; Food Safety Management Systems—Requirements for Any Organization in the Food Chain. Technical Report; International Organization for Standardization: Geneva, Switzerland, 2018. Available online: https://www.iso.org/standard/65464.html (accessed on 15 March 2025).
  29. Belfiore, P.; Fávero, L.P. Pesquisa Operacional: Para Cursos de Engenharia; Elsevier: Rio de Janeiro, Brazil, 2013; p. 376. [Google Scholar]
  30. Talbi, E. Metaheuristics: From Design to Implementation; John Wiley & Sons Inc.: Hoboken, NJ, USA, 2009; p. 593. [Google Scholar]
  31. El Kouaiti, A.; Percassi, F.; Saetti, A.; McCluskey, T.L.; Vallati, M. PDDL+ Models for Deployable and Effective Traffic Light Optimization. In Proceedings of the 34th International Conference on Automated Planning and Scheduling (ICAPS 2024), Tainan, Taiwan, 26–30 May 2024; Available online: https://openreview.net/forum?id=kdXB1NXiy7 (accessed on 15 March 2025).
  32. Nyporko, A.; Chrpa, L. Modelling and solving industrial production tasks as planning-scheduling tasks. Data Knowl. Eng. 2025, 157, 102415. [Google Scholar] [CrossRef]
  33. Fikes, R.; Nilsson, N. Strips: A new approach to the application of theorem proving to problem solving. Artif. Intell. 1971, 2, 189–208. [Google Scholar] [CrossRef]
  34. Garrido, A.; Arangu, M.; Onaindia, E. A constraint programming formulation for planning: From plan scheduling to plan generation. J. Sched. 2009, 12, 227–256. [Google Scholar] [CrossRef]
  35. Benton, J.; Coles, A.; Coles, A. Temporal planning with preferences and time-dependent continuous costs. Proc. Int. Conf. Autom. Plan. Sched. 2012, 22, 2–10. [Google Scholar] [CrossRef]
  36. Distributed Evolutionary Algorithms in Python (DEAP). DEAP Documentation. 2025. Available online: https://deap.readthedocs.io/en/master/ (accessed on 15 March 2025).
  37. Koch, T. Rapid Mathematical Programming. Ph.D. Thesis, Technische Universität Berlin, Berlin, Germany, 2004. ZIB-Report 04-58. Available online: http://opus4.kobv.de/opus4-zib/frontdoor/index/index/docId/834 (accessed on 15 March 2025).
  38. International Business Machines (IBM). IBM ILOG CPLEX Optimization Studio. 2025. Available online: https://www.ibm.com/products/ilog-cplex-optimization-studio (accessed on 15 March 2025).
  39. Marrella, A. Automated Planning for Business Process Management. J. Data Semant. 2019, 8, 79–98. [Google Scholar] [CrossRef]
Figure 1. Case study graphic representation.
Figure 1. Case study graphic representation.
Algorithms 18 00219 g001
Figure 2. Distance, in days, between the factories.
Figure 2. Distance, in days, between the factories.
Algorithms 18 00219 g002
Figure 3. Adapted problem methodology [29,30].
Figure 3. Adapted problem methodology [29,30].
Algorithms 18 00219 g003
Figure 4. Legend for the figures that represent the solutions.
Figure 4. Legend for the figures that represent the solutions.
Algorithms 18 00219 g004
Figure 5. Description of the production and transport steps of p 1 in f 1 —APS.
Figure 5. Description of the production and transport steps of p 1 in f 1 —APS.
Algorithms 18 00219 g005
Figure 6. Description of the production and transport steps of p 2 in f 1 —APS.
Figure 6. Description of the production and transport steps of p 2 in f 1 —APS.
Algorithms 18 00219 g006
Figure 7. Description of the production and transport steps of p 1 in f 3 —APS.
Figure 7. Description of the production and transport steps of p 1 in f 3 —APS.
Algorithms 18 00219 g007
Figure 8. Description of the production and transport steps of p 2 in f 3 —APS.
Figure 8. Description of the production and transport steps of p 2 in f 3 —APS.
Algorithms 18 00219 g008
Figure 9. p 1 stock behavior at the distribution center—APS. *: corresponds to the moment of meeting the demand.
Figure 9. p 1 stock behavior at the distribution center—APS. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g009
Figure 10. p 2 stock behavior at the distribution center—APS. *: corresponds to the moment of meeting the demand.
Figure 10. p 2 stock behavior at the distribution center—APS. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g010
Figure 11. Description of the production and transport steps of p 3 in f 1 —APS.
Figure 11. Description of the production and transport steps of p 3 in f 1 —APS.
Algorithms 18 00219 g011
Figure 12. Description of the production and transport steps of p 3 in f 4 —APS.
Figure 12. Description of the production and transport steps of p 3 in f 4 —APS.
Algorithms 18 00219 g012
Figure 13. Description of the production and transport steps of p 4 in f 4 —APS.
Figure 13. Description of the production and transport steps of p 4 in f 4 —APS.
Algorithms 18 00219 g013
Figure 14. p 3 stock behavior at the distribution center—APS. *: corresponds to the moment of meeting the demand.
Figure 14. p 3 stock behavior at the distribution center—APS. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g014
Figure 15. p 4 stock behavior at the distribution center—APS. *: corresponds to the moment of meeting the demand.
Figure 15. p 4 stock behavior at the distribution center—APS. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g015
Figure 16. Description of the production and transport steps of p 5 in f 2 —APS.
Figure 16. Description of the production and transport steps of p 5 in f 2 —APS.
Algorithms 18 00219 g016
Figure 17. p 5 stock behavior at the distribution center—APS. *: corresponds to the moment of meeting the demand.
Figure 17. p 5 stock behavior at the distribution center—APS. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g017
Figure 18. Description of the production and transport steps of p 6 in f 4 —APS.
Figure 18. Description of the production and transport steps of p 6 in f 4 —APS.
Algorithms 18 00219 g018
Figure 19. p 6 stock behavior at the distribution center—APS. *: corresponds to the moment of meeting the demand.
Figure 19. p 6 stock behavior at the distribution center—APS. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g019
Figure 20. Description of the production and transport steps of p 1 at f 1 —GA.
Figure 20. Description of the production and transport steps of p 1 at f 1 —GA.
Algorithms 18 00219 g020
Figure 21. Description of the production and transport steps of p 2 at f 1 —GA.
Figure 21. Description of the production and transport steps of p 2 at f 1 —GA.
Algorithms 18 00219 g021
Figure 22. Description of the production and transport steps of p 1 at f 3 —GA.
Figure 22. Description of the production and transport steps of p 1 at f 3 —GA.
Algorithms 18 00219 g022
Figure 23. Description of the production and transport steps of p 2 at f 3 —GA.
Figure 23. Description of the production and transport steps of p 2 at f 3 —GA.
Algorithms 18 00219 g023
Figure 24. p 1 stock behavior at the distribution center—GA. *: corresponds to the moment of meeting the demand.
Figure 24. p 1 stock behavior at the distribution center—GA. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g024
Figure 25. p 2 stock behavior at the distribution center—GA. *: corresponds to the moment of meeting the demand.
Figure 25. p 2 stock behavior at the distribution center—GA. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g025
Figure 26. Description of the production and transport steps of p 1 at f 1 —Exact Method.
Figure 26. Description of the production and transport steps of p 1 at f 1 —Exact Method.
Algorithms 18 00219 g026
Figure 27. Description of the production and transport steps of p 2 at f 1 —Exact Method.
Figure 27. Description of the production and transport steps of p 2 at f 1 —Exact Method.
Algorithms 18 00219 g027
Figure 28. Description of the production and transport steps of p 1 at f 3 —Exact Method.
Figure 28. Description of the production and transport steps of p 1 at f 3 —Exact Method.
Algorithms 18 00219 g028
Figure 29. Description of the production and transport steps of p 2 at f 3 —Exact Method.
Figure 29. Description of the production and transport steps of p 2 at f 3 —Exact Method.
Algorithms 18 00219 g029
Figure 30. p 1 stock behavior at the distribution center—Exact Method. *: corresponds to the moment of meeting the demand.
Figure 30. p 1 stock behavior at the distribution center—Exact Method. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g030
Figure 31. p 2 stock behavior at the distribution center—Exact Method. *: corresponds to the moment of meeting the demand.
Figure 31. p 2 stock behavior at the distribution center—Exact Method. *: corresponds to the moment of meeting the demand.
Algorithms 18 00219 g031
Figure 32. Stock evolution in the D C to meet demand—APS.
Figure 32. Stock evolution in the D C to meet demand—APS.
Algorithms 18 00219 g032
Figure 33. Stock evolution in the D C to meet demand—GA.
Figure 33. Stock evolution in the D C to meet demand—GA.
Algorithms 18 00219 g033
Figure 34. Stock evolution in the D C to meet demand—Exact Method.
Figure 34. Stock evolution in the D C to meet demand—Exact Method.
Algorithms 18 00219 g034
Table 1. Production characteristics.
Table 1. Production characteristics.
P TQ p CF f , p (Tons) I 0 f , p (Tons) DM p (Tons)
f 1 f 2 f 3 f 4 f 1 f 2 f 3 f 4 DC ( f 5 )DC ( f 5 )
p 1 2080.0000-80.0000-80.0000-80.0000-80.0000420.0000
p 2 021.4200-21.4200-21.4200-21.4200-21.4200200.0000
p 3 350.0000--50.000050.0000--50.000050.0000300.0000
p 4 0---40.0000---40.000040.0000200.0000
p 5 5-16.0000---16.0000--16.0000130.0000
p 6 2---20.0000---20.000020.0000380.0000
-: product p is not produced at factory f.
Table 2. Characteristics of products and factories.
Table 2. Characteristics of products and factories.
FDescriptionPPackaging (kg)PrecedenceLifespan
f 1 Cheese—piece p 1 12.00 Input180
f 1 Sliced cheese p 2 0.15 Dependent on p 1 80
f 1 Milk powder—bag p 3 25.00 Input360
f 2 Brazilian cream cheese p 5 0.20 Input90
f 3 Cheese—piece p 1 12.00 Input180
f 3 Sliced cheese p 2 0.15 Dependent on p 1 80
f 4 Milk powder—bag p 3 25.00 Input360
f 4 Milk powder—fractionated p 4 0.20 Dependent on p 3 360
f 4 Butter p 6 0.20 Input150
Table 3. Availability of vehicles per factory.
Table 3. Availability of vehicles per factory.
Type 1Type 2Type 3Type 4
p 1 p 2 p 5 p 1 p 2 p 5 p 3 p 3 p 4 p 6
C T k , t 21.168022.680017.203212.096012.96009.830425.000050.000050.000050.0000
Vehicles ( K f , t )332254
Factories f 1 , f 3 f 1 , f 3 f 2 f 1 , f 3 f 1 , f 3 f 2 f 1 f 4 f 4 f 4
Table 4. Mathematical model notation.
Table 4. Mathematical model notation.
Index
d: time unit representing a single day within the planning horizon.
f: factory.
f : destination factory for the transport originating from factory f.
p: product.
p : product dependent on p as input.
t: vehicle type.
k: k-th vehicle of type t.
Sets
F: dairy milk plants ( f F = { 1 , , n F } ).
F : extended dairy milk plants ( f F = { 1 , , n F } { ( n F + 1 ) } ), where ( n F + 1 ) is the distribution center (DC).
F f : destinations f departing from plant f.
P: products ( p P = { 1 , , n P } ).
P f : products produced by plant f.
P p : products p produced from product p.
T f : vehicle types available at the factory f.
K f , t : vehicles type t available at the factory f.
D: time periods, in days ( d D = { 1 , , n d } ).
Parameters
n F : number of dairy plants.
( n F + 1 ) o r D C : the distribution center.
n P : number of products.
T Q p : quarantine time of product p.
T T f , f : transportation time between plant f and f .
C T t , p : capacity of vehicle type t transporting product p.
C F f , p : dairy plant f production capacity for product p.
I 0 f , p : inital stock of product p at dairy plant f.
D M p : product p demand.
Decision Variables
I f , p , d : product stock p at dairy plant f on the day d.
Q f , p , d : product stock p at dairy plant f released from quarantine on the day d.
y f , p , d : quantity of product p produced on the day d in the dairy plant f.
y ^ p , f , p , d : quantity of the dependent product p produced on the day d in the dairy plant f from the product p.
x f , p , d , f , t , k : quantity of product p transported from the dairy plant f to f on the day d using the k-th vehicle of type t.
x ^ f , p , d , f , t , k : quantity of the product p received at the dairy plant f from f on the day d using the k-th vehicle of type t.
z f , p , d , f , t , k : it assumes one (1) if the k-th type t is used to transport product p on the day d from dairy plant f to f ; zero (0) otherwise.
w p , d : it assumes one (1) if the demand for the product p is met on the day d; zero (0) otherwise.
T m a x : minimum number of days required to satisfy total demand.
Table 5. Product stock remaining in dairy plants, in tons.
Table 5. Product stock remaining in dairy plants, in tons.
P f 1 f 2 f 3 f 4 DC ( f 5 )
Stock d d Stock d Stock d Stock d
p 1 61.700062--62.204062--424.736044
p 2 24.840063--4.680063--206.100065
p 3 012----40.000014300.000010
p 4 ------015240.000016
p 5 --5.120037----138.880039
p 6 ------040420.000041
Table 6. GA additional notation.
Table 6. GA additional notation.
GA Additional Notation
P G A : population in Genetic Algorithm.
i: initial individuals.
j: next generation individuals.
G d , p , D C : this gene corresponds to the date of the initial production for product p.
G d , p , D C : this gene corresponds to the date of the final transport arrival required to meet the demand for product p.
Table 7. Meeting the demand for each product in days and computational effort in seconds.
Table 7. Meeting the demand for each product in days and computational effort in seconds.
PAPSGAExact Method
p 1 442626
p 2 65812
p 3 102625
p 4 162225
p 5 392622
p 6 412422
T m a x 652626
Time (s)444.64 s24.92 s4.42 s
Bold highlights the best performance.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Müller, F.M.; Schneider, V.A.; de Araujo, O.C.B.; Scheer Júnior, C.R.; Weis, G.L. Comparing an Artificial Intelligence Planner with Traditional Optimization Methods: A Case Study in the Dairy Industry. Algorithms 2025, 18, 219. https://doi.org/10.3390/a18040219

AMA Style

Müller FM, Schneider VA, de Araujo OCB, Scheer Júnior CR, Weis GL. Comparing an Artificial Intelligence Planner with Traditional Optimization Methods: A Case Study in the Dairy Industry. Algorithms. 2025; 18(4):219. https://doi.org/10.3390/a18040219

Chicago/Turabian Style

Müller, Felipe Martins, Vanessa Andréia Schneider, Olinto Cesar Bassi de Araujo, Claudio Roberto Scheer Júnior, and Guilherme Lopes Weis. 2025. "Comparing an Artificial Intelligence Planner with Traditional Optimization Methods: A Case Study in the Dairy Industry" Algorithms 18, no. 4: 219. https://doi.org/10.3390/a18040219

APA Style

Müller, F. M., Schneider, V. A., de Araujo, O. C. B., Scheer Júnior, C. R., & Weis, G. L. (2025). Comparing an Artificial Intelligence Planner with Traditional Optimization Methods: A Case Study in the Dairy Industry. Algorithms, 18(4), 219. https://doi.org/10.3390/a18040219

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop