1 Introduction

Twenty-first-century manufacturers faced accelerated knotty requirements on-demand from their customers with customer expectations for prompt product delivery under changeable markets (Bennett and Lemoine 2014). To respond efficiently to customer demand, especially when demand is uncertain and machines are prone to failure, considering market fluctuations, production planners are compelled to be resilient to changes and to guarantee production targets with periodic revisions and adjustments to their production plans (Kriett et al. 2017). This requirement has steered manufacturers to meet customer demand and seek methods to reduce production lead times (Kriett et al. 2017). Therefore, manufacturers establish their production strategies based on the nature of the demand and its occurrence.

These production strategies include make-to-order, in which the shop floor produces orders and sells them to the customer if orders are required by customers immediately. The make-to-stock strategy stores finished products in a warehouse as inventory buffers before selling them (Lu and Chen 2018). A hybrid of both strategies is considered by shop-floors when it produces semi-finished products, among other variations of products (Kim and Min 2021). These production strategies involve operational and demand constraints, such as shop-floor capacity, warehouse requirement, and customer behaviour, limiting production schedulers from generating reliable production schedules (Georgiadis et al. 2019). This is attributed to the challenges these operational and demand constraints impose, which prevent forming a flexible and viable production schedule plan.

In the make-to-stock strategy, the production schedulers generate their schedules based on the shop-floor capacity (Costa et al. 2020), uncertain customer demand (Adediran and Al-Bazi 2018), warehouse capacity (Stanzani et al. 2018), raw materials availability (Györgyi and Kis 2018), machine availability (Tamssaouet et al. 2018), workers availability (Van Den Eeckhout et al. 2019), number of changeovers between products (Osman 2020), setup time and number of products (Bouazza et al. 2019), demand forecast (Biçer and Seifert 2017), and the worker skill and abilities (Özder et al. 2019). Moreover, to some extent, these constraints were individually considered while generating a production schedule.

Therefore, this paper aims to develop an agent-based heuristic optimisation model that considers combined operational and demand constraints in a make-to-stock environment to generate a reliable production schedule. Including warehouse capacity, customer demand, shop floor, and the availability of the raw materials will generate a reliable production plan for best customer demand satisfaction and optimised-replenished stocks. This work will benefit production schedulers and warehouse managers of make-to-stock manufacturing systems to satisfy customer and warehouse requirements efficiently. In addition, it assists in achieving the best customer demand satisfaction and stock control practices and increasing the efficiency of both the operators and machines.

The contribution of this work entails the following:

  • An innovative agent-based heuristics optimisation model for best scheduling practice of make-to-stock manufacturing systems.

  • A new heuristics algorithm encapsulates combined constraints of the customer demand, the operational constraints, including materials availability, and the warehouse storage requirements.

  • Achieving the best customer satisfaction, a reliable and sustainable production schedule, resource utilisation, inventory control, and raw materials usage.

The paper is organised as follows: Section II reviews the literature on production scheduling practices in make-to-stock manufacturing systems. The development of an agent-based model and a heuristics optimisation algorithm for best practices of production scheduling and inventory control of products is discussed in Section III. In Section IV, numerical simulations based on a real-life case study evaluate the impact of combined demand and operational constraints. Section V presents a comparison study with the relevant approaches, followed by the main conclusions and recommendations for the last section.

2 Problem statement

This paper investigates a problem that originated in one of the UK manufacturers that produces a wide range of connector steel parts used in the construction industry, such as metal web and nail plates of different sizes. The company works on a make-to-stock basis, and they face a challenge in replenishing their stocks and satisfying customer demand without delay. This is attributed to the erratic customer demand, a wide range of product varieties and the shop floor & warehouse limitations.

The company’s production team creates a daily plan (spreadsheet) for the factory to replenish the stocks to cover a one-week minimum up to a two-week maximum worth of products. The warehouse capacity limits the maximum levels as the company has a small warehouse that keeps many product varieties. The company works on a “make-to-stock” basis. The production team only produces for that customer order or manufactures additional parts to the minimum stock level to keep at the warehouse. At the same time, the stock products are manufactured to replenish the stocks at the warehouse. The inconstant customer demand for the stock products influences how the schedule seeks to place certain products to be manufactured first, and it is subject to failure due to uncertainty. The shop floor is limited in size and only can fit the four large hydraulic machines and their extended packing areas that consist of conveyor belts and rollers, a sealing station and a caged pallet loader. The tacit experience helps the planner to speculate the demand by having the best runners (of products) at the beginning of the schedule and after checking the existing amounts of raw material. Hence the schedule is pushed to be ready for the factory to adopt. The warehouse manager will then arrange the logistics with the customers if stock shortages occur, and the customer is ready to receive the order or the rest whenever the shop flow produces it.

However, there is still a need to optimise the company’s scheduling plan for inventory replenishment, considering demand, raw materials availability, shop floor capacities such as machines’ downtimes, packers’ availability, and the machine setup time requirements. Therefore, an appropriate inventory strategy that leads all inventory levels of stock products to be replenished/maintained enough to face any potential and unexpected customer demand needs to be proposed. Figure 1 shows shop floor and warehouse operational and demand constraints affecting the scheduling plan.

Fig. 1
figure 1

Problem statement diagram

Three key performance indicators reflecting the generated schedule's performance will be considered, including the number of missed/unsatisfied orders, resource utilisation, and stock levels. All floor shop resources, including the machines and packers, are fully utilised, indicating a reliable production schedule. Additionally, the stock levels at the warehouse do not show any critical levels. If there are no delayed customer orders for stock products (right from the warehouse), that is considered a healthy plan.

3 Previous work on scheduling in the make-to-stock production environment

This section presents a systematic and up-to-date literature review of production scheduling in the Make-To-Stock (MTS) environment. The scope of this review is made explicitly within this sort of manufacturing environment in which only a few studies are presented. The review addresses customer demand and other operational constraints while generating production schedules. This review presents the work of several scholars, including but not limited to Tubilla and Gershwin (2021), who studied production scheduling in a multi-item, failure-prone machine with setup times to minimise long-run average inventory and backlog costs. Adediran and Al-Bazi (2022) developed an innovative framework that embeds agent-based simulation, heuristic algorithm, and inventory replenishment strategy is proposed to tackle these disruption problems.

Firat et al. (2022) proposed a production planning approach with a make-to-order (MTO) convention for a job shop manufacturing company. A Mixed Integer Linear Programming (MILP) model was proposed to find workload-dependent planning horizons by making order acceptance decisions. The model ensured that the desired resource capacity levels were achieved regardless of the product mix in the order set. Chen et al. (2020) developed a Mixed Integer programming model to select a set of potential customer orders in an MTO environment manufacturing system to maximise the operational profit such that all the selected orders are fulfilled by their deadline. Constraints, including the capacity limit on each source for each resource type, regular time, overtime, and outsourcing as the sources for each resource type, were considered while generating the scheduling plan. Rahman et al. (2015) considered the length of a production cycle, the batch size of each product, and the order of the products in each cycle to generate an efficient production schedule with a minimum sum of the setup and holding costs while assuming that there was no disturbance of any kind. Rinaldi et al. (2023) developed a simulation model to manage the inventory level of spare parts, analysing heterogeneous items and producing a new procedure implemented to improve the current inventory management. Sanajian et al. (2010) analysed a production/inventory system modelled as an M/G/1 make-to-stock queue producing different products requiring different general production times. They developed scheduling policies where different product types were completed for sharing the same production resource to find the optimal inventory control policy and cost. Yue et al. (2022) proposed a heuristic approach based on the drum-buffer-rope (DBR) method to overcome the problem of order releasing and multi-item scheduling in factories with make-to-order (MTO) production systems. The production schedule was generated considering the dynamic demand of customers, constrained resources, and limited profits. Hutter et al. (2018) considered production planning and control systems as constraints impacting production schedules in a make-to-stock environment. They implemented an order release mechanism based on workload control to improve production scheduling to meet order due dates. Youssef et al. (2009) analysed the impact of the scheduling policy on the overall inventory costs under customer lead-time service level constraints. The scheduling plan considered two policies: the classical FIFO policy and a Priority Policy (PR), which prioritises low-volume products over high-volume ones. Özer et al. (2004) established optimal policies for a capacitated inventory system with advanced demand information. Although the performance of a capacitated system with respect to advance demand information, capacity, and cost parameters were quantified, other operational constraints, including raw materials availability, were not considered in the developed model. Alnahhal et al. (2021) used a mixed-integer programming (MIP) model to solve the lot-sizing problem in order to reduce the ordering and the total inventory holding costs, focusing on discrete delivery time, where demand is seasonal. Ben Ali et al. (2014) integrated sales and operations planning and order promising for a commodity market characterised by prices and demand seasonality. They considered different factors, including differentiated demand segments, different products, and multiple sourcing locations in a multi-period context. Albrecht (2021) considered an alternative assumption on inventory reservation with different prioritisation rules applied in make-to-stock assembly systems if orders for multiple finished products are in a backlog or occur in the same period. The warehouse requirements regarding the number of required products were considered. Pang et al. (2014) considered an inventory rationing problem of a continuous review make-to-stock system with batch production and multiple demand and classes. The inventory rationing control for each demand time-dependent critical stock level characterises class. Economopoulos et al. (2011) studied threshold-type admission and inventory control policies for a single-stage, make-to-stock production system with impatient customers. The system employs a base stock policy to maintain an inventory of finished items and cope with random demand to determine the base stock and backlog that maximises the system's mean profit rate. Allon and Zeevi (2010) addressed the simultaneous determination of pricing, production, and capacity investment decisions in a make-to-stock system by a monopolistic firm in a multi-period setting under demand uncertainty, given the production capacity constrains the inventory replenishment process, no inventory carry-over is allowed, and pricing is restricted to markdowns. Hodge and Glazebrook (2011) considered optimal policies for a production facility where several products are made to stock to satisfy exogenous demand for each. The production problem was formulated as one involving the dynamic allocation of a key resource that drives the manufacture of all products under an assumption that each additional unit of resource allocated to a product achieves a diminishing return of increased production rate. Xu et al. (2010) considered the stock rationing problem of a single-item make-to-stock production/inventory system with multiple demand classes. The facility can produce a batch up to a specific capacity simultaneously. It is assumed that the batch demand can be partially satisfied. Somarin et al. (2017) investigated a repairable service parts inventory system in a Manufacturing Operating System (MOS) environment with a central repair facility and several locations storing inventory called bases. A heuristic technique for the stock allocation problem based on relative value function and average backorder cost at a single base was proposed to minimise the expected cost. Lorenz et al. (2021) proposed a process mining procedure that identifies capacity constraints, variability, and waste in make-to-stock manufacturing systems. Li and Arreola-Risa (2020) studied the problem of finding the base‐stock level that minimises total cost conditional value‐at‐risk or total cost for short. The impact on optimal base‐stock levels of changes in risk aversion, manufacturing capacity, inventory‐holding and back‐ordering costs, and planning horizon length was also identified. Dinh (2021a, b, c, d) suggested various optimisation algorithms for image fusion, including MPA and GOA for base layer fusion, EOA for low-frequency component fusion, and MPA for multi-modality medical image fusion. In 2022, Dinh developed an adaptive fusion rule using MPA for low-frequency components. Dinh and Giang (2022) proposed a novel algorithm to enhance medical image quality. In 2023, Dinh presented a new approach for image synthesis based on MPA, developed an MPA-based algorithm to improve the quality of brain MRIs, and created an efficient fusion rule using CSA for base layers.

The previous literature addressed a few studies in production scheduling of make-to-stock systems that considered several constraints (individually) that impact on scheduling practices of such systems. Among these constraints, machine failure, setup times, inventory and backlog costs, batch size and order of products, holding costs, production times and resources, the order’s due date, inventory costs under customer lead-time service level constraints, prices and demand seasonality, warehouse capacity, differentiated demand segments, different products, and multiple sourcing locations in a multi-period context, stock levels, production capacity, no inventory carry-over is allowed restriction, demand uncertainty, multiple demand classes requirement, facility operational capacity, process variability, waste, risk aversion, manufacturing capacity, inventory‐holding and back‐ordering costs, and planning horizon length. However, the combined impact of the customer demand, including its different behaviour types, and other operational constraints, including operators, machines and materials availability, and warehouse capacity for make-to-stock manufacturing systems, has not been given enough attention. Hence, the focus of this paper is this paper was established.

4 Research methodology

4.1 Agent-based heuristic optimisation framework

The proposed agent-based heuristic optimisation framework consists of two main core modules. The first agent-based module mimics the shop floor operations and warehouse requirements. The second heuristic optimisation module generates the best production schedule by measuring the impact of combined constraints such as expected maximum demand based on a historical sales report, the current stock level and the difference between it and the expected demand, the available raw material measured by weight, number of available machines and operators, the number of daily shifts along with its length, the warehouse maximum capacity limit, and the setup time of the product families. Figure 2 shows the agent-based optimisation model architecture.

Fig. 2
figure 2

Agent-based optimisation model architecture

In Fig. 2, there are three inputs for the process to start. The first group contains the production parameters, an essential input group. These parameters include the number of workers with their skills, the number of machines and their types, process time, and setup times. The second inventory and material levels input group consist of the number of coils with their types and weights and the stock level of each product, including their minimum and maximum. The third group is the customer order information. This group contains the predicted demand, the customer order quantity, type and due date, and other information.

The core process consists of two modules, the agent-based module integrated with the heuristic optimisation module. The heuristics module encapsulates all the demand and operational constraints and reflect their impact on the production schedule. The agents’ interaction is modelled using the Python programming language. These agents are loosely coupled, and each agent could be run in a different virtual machine and solely communicate with others through a local wireless network. The binder between the agents in the message broker is hosted on a different virtual machine. This distributed system allows agents to be plug-and-play ready.

There are four different groups of outputs. The first group includes the best production schedules, which is the sequence of the orders to be processed by the factory. The working time group contains the total production time, the total waiting time, and the worker idle times. The performance group involves the total number of produced items over time, consumed materials, missed orders, the total replenished stocks and completed orders. The last group utilises machines, workers, and other resources in the production facility.

A user GUI is developed to provide management of multiple functionalities, such as a quick run of the heuristics algorithm to generate and present the production schedule after configuring the proper parameters of the algorithm, such as machines and operators’ schedules, workings shifts and the available raw materials. The GUI also gives access to run the agent-based simulation model on the generated production schedule to animate the floor shop showing the flow of shop activities. Additional access to create different reports of the simulation outputs, such as resource utilisation and incomplete orders.

The GUI of the developed multi agent-based optimisation model consists of 9 components linked to produce the production schedule, replenishment plan and shop floor visualisation. Figure 3 shows the GUI and how the developed multi agent-based heuristics model works.

Fig. 3
figure 3

GUI of the developed multi-agent-based optimisation model

Figure 3 presents the overall GUI of the developed multi-agent-based optimisation model. Once the GUI is launched, the scheduler needs to be prepared, and the main input data needs to be initialised by clicking on the Press Downtimes component if there are any future downtimes on any of the press machines. The Materials handling component is used to update/amend the remaining volume of plates. The Product Catalogue component is used to update and retrieve the received orders. The Pressing Machines’ Shifts component adjusts all machines' shift start and end times. The component responsible for configuring the system, including the number of hours per shift, shift type (day/night), coil ratio etc., is called Software Configuration. The Retrieval Catalogue component retrieves the relevant information from any integrated ERP system. The Production Schedule component generates the production schedule based on the received information. The Warehouse component includes the proposed heuristic algorithm used to generate the replenishment plan and provide the relevant visualisation. The last component is the Shop floor Visualiser which visualises all the involved machines and shows the progress of orders across the shop floor. To have an idea of how the developed multi-agent-based heuristics model works, a Video is uploaded on YouTube and can be found at: https://www.youtube.com/watch?v=nLGggP5jEKo

The following section discusses the core components of the developed agent-based heuristics model.

4.1.1 Agent-based module

4.1.1.1 Multi-layer agents’ organisation

In this section, all agents in the manufacturing system with their attributes and actions are defined and explained. A multi-layer agents’ organisation is developed to depict the arrangement and communication of all agents in the system. This organisation contains various independent agents in nature, goals, and knowledge base.

Eight agents are defined, and their actions are discussed in detail. The first agent is the Demand Agent, which represents the demand coming from the customer as external demand and/or requests from internal inventory demand in response to the warehouse replenishment requirements. This agent involves two sub-agents named customer and inventory. In some cases, the Customer sub-agent is absent and linked to customers' requests or demands. The Customer Sub-Agent represents an incoming customer request for goods. This request will usually be logged into the company’s system for processing and tracking. It has attributes such as order number, due date, quantity, and product type. While the Inventory Sub-Agent keeps up-to-date data about the stock’s levels of final products (predominantly stock products). This sub-agent provides information regarding the required quantities of items the production facility produces for replenishment. Attributes of this agent include final product type, quantity, size, weight, and other specifications.

The second Material Agent represents the raw material needed by the production facility. The agent’s attributes include the current raw material type and weight. The third Schedule Agent is the super agent (master agent) that controls generating the production schedule plan. Its primary responsibility is to combine demand and operational constraints by communicating with each demand, material, machine, worker and packing agent to generate a reliable and viable production schedule. This schedule includes orders that need to be processed first, considering multiple objectives such as minimising the number of changeovers, reducing the setup time, satisfying the customer orders on time, and achieving the best replenishment inventory stocks. Additionally, this agent follows up on the production work by receiving update messages from the facility agents. It also raises alerts in case of running out of raw materials, low inventory levels, etc.

The fourth Machine Agent represents the inter-machines that consume the raw materials and produce the required items. It does multiple functionalities (operations) and collaborates with other production facilities/shop floor agents, including Worker and Packing Agents. This agent receives a production schedule from the Schedule Agent and then processes it accordingly. It pulls the Materials Agent's raw material and pushes it afterwards to the Packing Agent as produced items. The attributes of this agent include type, capacity, model, and other technical specifications. The fifth Worker Agent involves information about operators working at the production, including name, job title, capacity, experience, and skills. When available, it would only accept an allocation request from the Machine Agent or the Packing Agent and acquire matching skills to do the job. The last agent is the Packing agent, representing the Packing area in the production facility. As a labour-intensive area, this Packing area is part of the production facility, and it always requires a worker(s) or a robot to do the sorting and packing. The finished products will be packed before being transporting to the inventory area. Figure 4 shows how the agents are organised in a multi-layer layout.

Fig. 4
figure 4

Agents organisation in layers

Figure 4 represents the organisation of the agents in layers in two layers. The first layer shows the key agents: Demand, Packing, Schedule, Worker, Machine, and Materials in a holonic way where agents can communicate and share neighbouring knowledge. The second layer shows another holon of sub-agents: Inventory and Customer inherited from the Demand Agent. Layers separate agents based on shared or similar goals and only allow communication within that environment. For example, the key agents share the goal of producing products, and on the other layer, it seek to consume the products. Additionally, the Customer Agent in layer two does not communicate with the Machine or Schedule Agent in layer one, but it inherently updates the Demand Agent with any outputs. The same applies to the Inventory Agent and the other agents in layer one.

The agent-based simulation model works on multithreading technology; every agent runs on a thread, and the agents communicate over a message broker. An agent can be installed in a different virtual machine and a separate physical machine. This gives the system the ability to be extended.

4.1.2 The messaging sequence model

Developing this messaging sequence model presents the system agents with their interactions among themselves, from consumer to production control to production facility. See Fig. 5 for the overall messaging sequence.

Fig. 5
figure 5

The messaging sequence diagram

Figure 5 shows that the messaging sequence starts when the Customer Agent sends an order request for finished goods to the Schedule/master Agent. The latter agent will then verify the currently available quantities with the Inventory Agent and check for the availability of the raw materials. This availability could trigger the production cycle by sending a message to the Machine Agent about what is required if the Inventory Agent confirms insufficient levels of products required to satisfy the Customer Agent's request.

The Schedule Agent deals with the incoming orders and executes the heuristics optimisation to generate reliable production schedules, considering shop floor capacity, inventory level and raw materials statuses. The Machine Agent would most likely request worker(s) to do machine setup of materials and startup. This is presented with X time as a change over time in the system, a predefined value linked to the material type. If the Machine Agent’s steel type is already mounted, there would be no changeover for the reel. That can be considered a time-saving choice for production.

The Machine Agent interacts with the Worker Agents by dispatching a message publicly. All Worker Agents (presumably n available on the production floor) receive the message from the machine. Whichever is available and can do the requested job (for example, mounting new material) will reply with the agent’s name and capacity. The Machine Agent will wait until the needed number of workers are ready to take on the job. If an extra Worker Agent replied to the machine on the same job, the Agent would reply to the Worker Agent with a release message. This message would go privately.

Once the Machine Agent starts production, it will send a private message to the Assembly Agent. The Assembly Agent is likely to receive such a request from the Machine Agents, which means requests will pile up for the Assembly Agent. The message queue works on a FIFO basis. The agent would execute the first incoming message to it. The Assembly Agent requires Worker Agents to do the assembly job. Thus, the latter agent sends a message publicly to distribute the message to all Worker Agents. As explained, the Worker Agents will reply to the Assembly Agent who can do the assembly job. The Assembly Agents take the necessary time for the job calculated by a defined effort value multiplied by the quantity of that Schedule Agent.

The Packing Agent's role is to inform the Schedule Agent of the finished goods by sending a message. The latter Agent will update the inventory levels and amend the raw materials' remaining volume. At the outset, the Schedule Agent will only be informed of the finished order if it is the affixed production cycle. Otherwise, it will update the next cycle day with the stock.

4.1.3 The Operational and Demand Constraints of Connector Plates Manufacturing Systems

This section discusses the operational and demand constraints and their impact when generating the production schedule.

Operational Constraints.

The shop floor constraints:

[1-O] Number of available machines constraint is the number of press machines in a single facility.

[2-O] Number of changeover constraint on any press machine, including coil change, splitter change and pitching change.

[3-O] Number of available packers’ constraints assigned to the press machine.

[4-O] Number of available workers constraint to do the changeover on any press machines.

[5-O] The constraint of the shop floor working hours is the sum of all work shifts.

[6-O] Packing speed constraint of any packer, including man and robot assigned to a single packing area.

The Raw Material Constraints:

[1-R] Raw material availability constraint for all types of products in both facilities in the form of steel coil.

[2-R] Coil L/W ratio constraint measures the expected length in m2 out of x KG of a steel coil.

The Warehouse Constraints:

[1-W] Space constraint measures the available shelves in the warehouse dedicated to a specific product.

[2-W] Number of products constraint for the varieties of product types the manufacturer produces.

The demand constraints:

[1-D] Delivery date is the date of replenishing stock or an independent order.

[2-D] Order sequence constraints prioritise the manufacturing of products based on the sales report.

[3-D] Stock level constraint measures the current level and yields the number of parts produced.

Only a few constraints have a significant impact on the rest. The relationship among those constraints is not mutual, and one constraint can impact more than a single constraint at once negatively or positively when it changes. For example, the raw material availability constraint negatively affects the delivery date constraint but not the stock level constraint when it is increased. In contrast, when the raw material availability constraint decreases, the delivery date constraint will go positively (more delay), and stock levels will be negative (stocks not replenished). Another example is that the raw material availability constraint would positively affect the number of changeovers and order sequence when it decreases. Still, it has no effects when it goes positively (increases).

Regarding the order sequence constraint, prioritise the manufacture of products based on the sales report [2-D]; it is worth mentioning that the sales forecast pattern is obtained by looking at the sales from the previous year for the period that covers the next 30 days. This pattern is then analysed by focusing on each product sales volume and sorting it from the highest to the lowest. The historical sales data is then used in the proposed heuristics algorithm in Sect. 4.1.4 to indicate the most and least demanded product, thus being one of the factors that help determine demand and priority for production.

The proposed heuristics algorithm will be discussed in detail in the next section.

4.1.4 Heuristics algorithm

This section discusses the proposed step-by-step algorithm to achieve the best scheduling practice in make-to-stock environments considering the demand and operational constraints of both the shop floor and warehouse. Similar approaches were developed considering only stock requirements and warehouse capacity with non-instantaneous replenishment (Adediran et al. 2019; Al-Bazi and Adediran 2020), deteriorating items with a quantity discount (Ai et al. 2021), stock-dependent demand (Bardhan et al. 2019), and joint-pricing replenishment for non-instantaneous deteriorating items (Li et al. 2019). It is worth mentioning that some of these approaches would not have direct comparison factors with our problem settings, as they only considered a few individual shop-floor constraints rather than the combined impact of the customer demand, along with its different behaviour types, operational constraints, including operators, machines and materials availability, and warehouse capacity and hence these approaches and others become impractical in terms of use and might give a biased and inaccurate judgement.

However, the proposed algorithm encapsulates demand, shop floor, and warehouse operational constraints while generating a reliable production schedule.

The heuristics algorithm steps are as follows:

  • Obtain demand requirements, input and production parameters (Step 1).

  • Use the sales forecast rules to sort the demand in sequence (Step 2).

  • Obtain the current stock level for all stocks. (Step 3).

  • Register the difference between the forecasted demand and the current stock level (Step 4).

  • Generate a list of demands prioritised based on the outcome of the previous step (Step 5).

  • Register the difference between the current and maximum stock levels (Step 6).

  • Generate a list of demands prioritised based on the outcome of the previous step (Step 7)

  • Use raw material and changeover rules to sort the demand in lists (Step 8).

  • Register the processing time for all orders and shortages in raw materials (Step 9).

  • Distribute the workload on the available production lines maintaining the shared characteristics of the stocks (stock families) (Step 10).

  • Inject the urgent demand for non-stock into the available production line according to the order's due date (Step 11).

The scalability of this heuristic algorithm is manifested as it dwells on the varying levels of stock and analysis the status of the extended inventory while considering a forecasted demand and instant demand.

The notations used in the proposed heuristics algorithm are listed below:

4.1.4.1 Heuristic notations

f = forecasted quantity

d = demand quantity

c = customer order quantity

dd = delivery date

i = current inventory level

m = minimum inventory level

M = maximum inventory level

a = number of available packers

p = number of available machines

g = number of working hours

v = packing speed

z = material quantity

w:b = weight/box ratio

S = production schedule

u = unsatisfied orders

U = satisfied orders

e = shortages

r = Replenishment quantity

N = current day

N + 1 = next day

T = total production time

O = setup time

t = process time

s = stocks

k = product family

w = workload

The following steps represent how the heuristic algorithm improves production performance.

The Heuristic Algorithm:

figure a

The above steps explain the heuristic algorithm and present which constraints affect which step of the algorithm. In step 1, all major parameters are initialised with data considered global to the problem, such as the minimum and maximum stock levels. In steps 2 and 3, the algorithm retrieves and obtains the constantly changeable data from outside the algorithm and structurally processes it. In step 4, the algorithm assesses and compares the demand quantities with respect to [2-D] & [3-D] constraints, followed by a cascade of if conditions on the position of the current stock levels concerning [3-D] & [1W]. In this step, the d is negative, which indicates the warehouse is running short on a particular product, and the later conditions locate the distance between the current stock level and the maximum level, thus, identifying the replenishment priority of that product.

Similarly, for step 5, the d is in good status, a positive value. This value will not create urgency for replenishment as in the previous step. Nonetheless, the following conditions locate the distance between the current and maximum level and identify the priority to replenish. Step 6 is executed when d is not present from sales. In this case, the algorithm only executes the multiple if conditions to locate the distance between current and maximum levels and prioritise replenishing the product. Step 4 is given the highest priority of replenishment, followed by steps 5, then 6, and each generates a subset of the production schedule. In step 8, the algorithm groups the products with the same production setup because the number of changeover constraints bounds it. The grouping happened within the same subset, so it does not jeopardise losing the replenishment priority among other subsets if combined. At this point, the algorithm has the complete set of schedules. Step 9 examines the raw material constraint, quantifies the raw materials, and checks whether this schedule can be produced. The schedule would suggest manufacturing with what available material there is. In Step 10, the schedule is distributed on the available production lines regarding the constraints of available resources. The distribution mechanism considers the least loaded machine while the products share the same production setup and characteristics. In step 11, the direct demand of non-stock is injected whilst considering the demand constraint. This step grants uber priority over the rest because of its constraint. Finally, step 13 generates the algorithm output, including the production schedule, production times, and satisfied and unsatisfied orders.

The proposed heuristics algorithm works iteratively based on the production demand list. Additionally, it considers only specific constraints, such as only specific products can be manufactured on the machine. The algorithm forcefully avoids assigning those products to their non-designated machines. The workers' skill was also considered more skilled and faster-packing in products than others. All these constraints caused to some extent, logic identification and coding complexity while developing the proposed heuristics algorithm.

5 Case study

A real-life flow shop is selected as a case study to test the developed model, including the proposed heuristics algorithm. The selected flow shop is a steel-connectors parts production facility based in Midlands. This facility provides connector steel plates to the construction industry. The first reason for selecting this facility is the many product variances that the company produces. The parts have different lengths, widths and thicknesses to the material, and the company reacts to the market demand by designing the size and shape of the part. Some products might be specially designed for a customer, others go obsolete after a period, while others are big runners or standards for the building industry. The second reason is the limited space in the warehouse to store the packed parts. Although there are 4 level racks, the available storage area is small and limited in dimensions.

The facility works on the make-to-stock. The manufacturer works closely with their customers, and they review their stock plan every year. At the beginning of each year, they set up an adjusted minimum and maximum stock level after inventory and after looking at the average sales for each product from the top 3 months of last year. This has formed a unique environment to study scheduling problems and a challenge to model and simulate them.

The agent-based simulation model is developed to mimic the production lines' operation. Also, the model replicates the cycle time, processing time, packing time, and machine setup time per collected data.

Verification and validation procedures are applied to ensure the proposed model can be used for further improvements. The following section discusses how the verification and validation of the developed model are carried out.

5.1 Model verification and validation

For verification purpose, the process flow shows the process of finding materials, assigning new coils on the production line, assigning packers on the packing stations, and stacking the packaged boxes on the pallet loader before the forklift operator moves the pallet to the warehouse was presented to the production team and a key member from other departments. The company’s production manager and planner checked and approved this flow diagram.

For validation purpose, the simulated production time generated by the model was compared with the actual production time provided by the production planner in its Excel sheet format. The trend shows that the throughput time of 15.6 h for the simulated plan is almost similar to the actual plan of 15.9 h, confirming the developed model's validation status.

5.2 Production demand/levels scenarios

Many scenarios are designed to test how the proposed algorithm efficiently responds to customer demands and different inventory and materials availability levels. These scenarios are developed based on selected production and warehousing constraints and their expected impact. For example, customer demand directly impacts the factory production schedule and inventory availability at any given time. The inventory status (low, average, or high) also substantially affects satisfying customer orders. The model also demonstrates the impact of customer demand and the available inventory levels on the production, order borrow and replenishment plans. The raw material availability was also selected in these scenarios since it depends on achieving the required production quantities on time. The experiments considered random combinations of the three types of levels shown below:

Scenario 1: Low Inventory and High Customer Demand.

Scenario 2: Average Inventory and High Customer Demand.

Scenario 3: High Inventory and High Customer Demand.

Scenario 4: Low Materials and High Customer Demand.

Scenario 5: Average Materials and High Customer Demand.

Scenario 6: High Materials and High Customer Demand.

Although the model was tested for high product demand, all the stock levels have been considered for analysis and discussion. The impact of production scheduling on high product demand is investigated for the three categories of inventory and material levels. This demonstrates the proposed solution's impact and illustrates the production plan's performance and inventory levels under random product orders. This study selects the late orders KPI as an output based on the company's requirement.

The experimental data were extracted from the collected production data of a real-life flow shop as a primary data source, as shown in Table 1.

Table 1 Experiment setting parameters

As presented in Table 1, the experiment parameters are based on the production schedule for the weekly production demand plan. They are represented in days as provided by the flow-shop facility.

5.3 Results analysis and discussion

The discussion emphasises the key outcomes of interest, what has been produced by considering production constraints, customer demand and the implications of stock levels. The impact of scheduling, which could be substantial, is measured by the shop-floor productivity and the number of missed orders. Table 2 shows the order number, number of parts, Vs max stock.

Table 2 Number of parts Vs Max stock of scenarios 1–6

Figures 6, 7, 8, 9, 10, 11 demonstrate the implications of the production scheduling on meeting a sustainable inventory level against its maximum threshold.

Fig. 6
figure 6

Scenario 1-high inventory/high demand scenario

Fig. 7
figure 7

Scenario 2-average inventory/high demand scenario

Fig. 8
figure 8

Scenario 3-low inventory/high demand scenario

Fig. 9
figure 9

Scenario 4-low material/high demand scenario

Fig. 10
figure 10

Scenario 5-average inventory /high demand scenario

Fig. 11
figure 11

Scenario 6-high materials/high demand scenario

While keeping the demand level fixed at a high level, Fig. 6 shows a production plan with minimum parts to produce per stock product. The high inventory levels met the demand with little support from the production factory to compensate for the incomplete orders. Figure 7 shows the production schedule under average inventory and high demand scenario.

Figure 7 shows the inability of the inventory to meet the demand. Thus the production exceeded the threshold to compensate for the shortages by producing more parts shown in blue for a larger number of products. What exceeds the threshold goes directly to the customer, not the warehouse. Other products were given less production priority for either high direct demand for other products within a limited time or limitations on available raw materials. Figure 8 shows the production schedule under low inventory and high demand scenarios.

In Fig. 8, the demand is high, and the inventory level is depleted. Therefore, the production schedule shows more product coverage to manufacture more parts to compensate for inventory shortages. In this scenario, more parts were produced for more products. Consequently, this led to an increase in the production time. Figure 9 shows the production schedule under low-material and high-demand scenarios.

In Fig. 9, the level of materials is low, but the demand is high, and the current stock level is high too. The production plan struggles to produce enough parts due to the shortages in the material. The implication of this scenario on the inventory is high, and the inventory is deemed to fail to meet the demand because the flow shop is incapable of manufacturing new parts for almost 50% of the warehouse stocks. Figure 10 shows the production schedule under average materials availability and high demand scenarios.

In Fig. 10, with the availability of the average material against a high level of inventory and demand, the production plan can produce more parts for some of the products leading to above-average inventory status. On this occasion, the products might share the same type of raw material. Therefore, demand for a particular product would lead to material shortages for another product. Figure 11 shows the production schedule under high materials availability and high demand scenarios.

However, in Fig. 11, the high availability of the materials enables the production schedule to produce more parts for more products. The plan can now meet the upper threshold of the maximum stock level for the products. The impact of this is having a better-replenished warehouse.

To test and compare the improvements generated out of the designed scenarios, the mean squared error was calculated for each of the six scenarios to reflect the differences between the total number of available parts and the maximum stock level, as presented in Fig. 12.

Fig. 12
figure 12

Mean squared error for all scenarios

Figure 12 shows that the best production and storage practice is achieved in scenario 4, where the level of materials is low, but demand is high, and the current stock level is high too. The worst scenario is 3 when the demand is high, and the inventory level is low. Both scenarios 2 and 6 have shown similar sustainability in the generated production and replenishment plans when there is high demand for high material availability and average inventory status.

In summary, the developed model, including the proposed algorithm, did not completely meet all the customer orders, and it showed that some of the orders could not be satisfied with their due date. This reflects the impact of some operational constraints in the schedule plan. Nonetheless, it reduced the missed / unsatisfied orders to the minimum, even when the inventory was not fully replenished.

6 Comparison study

In this section, the superiority of the proposed algorithm against other approaches in the literature is justified. It would be impractical for any other algorithm/approach outside this domain/problem setting to satisfy the problem requirements. These approaches include different storage strategies and replenishment constraints that are not suitable to the currently adopted replenishment strategy. However, Sequential replenishment is selected among different replenishment approaches for the inventory for the nature of the current replenishment. The non-instantaneous replenishment approach is considered for this comparison proposed by Adediran et al. (2019), which seeks to replenish products when disruptions occur. The reason for selecting these approaches is that they are flexible, having fewer and easier constraints that restrict the replenishment process; hence, it was easier for the authors to tweak these approaches’ logic and rules and add the related factors to this research problem along with the improved codes. The total number of missed orders for both approaches would define their corresponding impact, as shown in Table 3 and presented in Fig. 13.

Table 3 Missed/Unsatisfied Orders
Fig. 13
figure 13

Comparison of different scheduling approaches

Figure 13 presents the effectiveness of the proposed algorithm over the sequential approach. The number of missed orders is relatively high in the sequential approach. The sequential approach cuts the missed customer orders by 67% throughout the production plan, while the proposed approach achieved better performance, leaving 33% of the customer orders missing their due dates. This shows an improvement of 34% from the proposed approach over the sequential replenishment. On the other hand, the non-instantaneous approach cut customer orders by 78%, explaining how changeover times impacted the production timeline and led to delays.

The sequential approach tends to replenish inventory successively, and this feature resulted in 75 late orders. In contrast, the non-instantaneous approach, where inventory is replenished gradually rather than in lots, resulted in 85 late orders by applying such a replenishment theme. However, the proposed approach replenished inventory based on the predefined rules in Sect. 4.1.4, ensuring a sustainable inventory level for all order types compared with the sequential and non-instantaneous approaches, significantly reducing the late order to only 37 late orders.

7 Conclusion and future work

This paper aimed to develop an agent-based heuristic optimisation for best practices of production and inventory in a make-to-stock connector-plates production system. The proposed heuristic algorithm solved the production-scheduling problem of a manufacturer that produces the products in a make-to-stock environment. The proposed algorithm was justified through a real-life case study to assist one of the manufacturers that operate in a heavy-traffic regime such that a customer order for some products initiates a production order, and the production quantity would exceed the customer order to produce more for future orders without incurring any setup cost.

The model was successfully developed to mimic the complex factory components, including machine, operator, warehouse, raw material and customer order. This model was integrated with the company’s daily activities providing the production planner with a better replenishment plan that reacts to the changeable data. These data were fetched from the company’s existing systems in an automated and integrated manner.

Six scenarios were designed to identify the impact of many constraints on actual schedules, including production and storage. When the level of materials is low, demand is high, and the current stock level is high, too, was proven to be the best scenario with a minimum MSE equal to 29,451. The worst scenario of MSE equal to 649,844 was identified as scenario 3 because demand is high, and the inventory level is depleted. The proposed algorithm minimised the number of unsatisfied customer orders. It increased the levels of stocks, keeping them at their maximum levels with an improvement in reducing the number of missed orders to equal 34%. This approach also increased the utilisation of the machines and materials and the factory's increased productivity.

The cost of holding inventory and unsatisfied orders is significant to performance estimation in the flow-shop setting. The cost function has not been considered in the developed approach. Still, instead, the inventory was utilised as a strategic means of dealing with satisfying customer orders, which is considered the limitation of this work.

Future work is expected to provide insight into new problems where more related manufacturing constraints are considered, such as WIP capacity and machine breakdowns. Other heuristic algorithms could be developed, encapsulating additional constraints such as automation capacity and warehouse size to reflect more accurate production schedules. In addition, meta-heuristic approaches such as Genetic Algorithms could be tailored and used to provide more accurate and realistic schedules under additional challenging production and inventory control scenarios.