The manufacturing of sand castings, particularly under a single-piece and small-batch production model, constitutes a significant segment of the foundry industry. This mode is characterized by high product variety, complex process routes, and fluctuating demand, posing substantial challenges for production planning and scheduling. A critical bottleneck lies in the formulation of the melting and pouring charge plan. Traditionally, this task relies heavily on the experience of planners, leading to suboptimal solutions characterized by inefficient furnace capacity utilization, prolonged scheduling time, and a lack of systematic optimization considering multiple production objectives. This manual approach severely restricts the operational efficiency and profitability of foundries specializing in sand castings. Therefore, establishing a mathematical model for the charge plan, designing effective solution strategies, and developing an intelligent scheduling system are of paramount practical importance for advancing the competitiveness of these enterprises.

The charge plan problem for sand castings can be abstracted as a complex batching and scheduling problem. It involves grouping various casting orders (batches) into “charges” or “heats” to be melted and poured in a furnace, subject to a multitude of constraints. Key decisions include determining the alloy type for each furnace charge and selecting the specific sand castings from the pool of pending orders to be included in that charge. The objective is to optimize production goals such as meeting deadlines, satisfying important customers, and maximizing equipment utilization.
Challenges and Current State in Sand Castings Scheduling
In a typical job-shop environment for sand castings, orders arrive with diverse specifications, including different alloy grades, weights, geometries, and due dates. The melting department, often equipped with furnaces of limited and sometimes degrading capacity, must process these orders efficiently. The planner’s task is to decide: which sand castings should be grouped together for a single melt? Which alloy should be prepared? And in what sequence should these charges be processed? Relying on manual methods makes it difficult to balance competing priorities. A planner might prioritize a pressing order but fail to pack the furnace to its optimal capacity, or they might maximize furnace load but delay a high-priority customer’s sand castings. Furthermore, other constraints like mold availability (sand boxes), pattern life, and daily production limits add layers of complexity that are hard to manage heuristically. This results in underutilized assets, potential delays, and ultimately, dissatisfied customers.
Constructing a Priority Model for Sand Castings
To systematically guide the charge planning process for sand castings, a quantitative priority model is essential. This model translates key production drivers into a single, comparable score for each pending casting order. For sand castings production, three primary factors are considered: delivery urgency, customer importance, and production load.
1. Delivery Urgency Priority (P_id)
For make-to-order sand castings, meeting the promised delivery date is crucial. The urgency is inversely proportional to the remaining days until the deadline. To normalize this across all orders, the following formula is used:
$$P_{id} = \frac{\max(d) – d_i}{\max(d) – \min(d)}$$
Here, \(d_i\) is the number of days until the due date for casting \(i\), \(\max(d)\) and \(\min(d)\) are the maximum and minimum values among all pending sand castings, respectively. \(P_{id}\) ranges from 0 to 1, where a value closer to 1 indicates a more urgent casting.
2. Customer Credit Priority (P_ix)
Not all customers are equal. Foundries often classify customers into credit tiers (e.g., A, B, C, D, E) based on historical collaboration, strategic importance, and payment reliability. To incorporate this qualitative factor quantitatively, fuzzy set theory is employed. Each credit grade is assigned a membership function over the interval [0,1]. The centroid method is then used to defuzzify these intervals into precise numerical values. A sample mapping is shown in Table 1.
| Credit Grade | Fuzzy Interval | Precise Value (P_ix) |
|---|---|---|
| A | [0.8, 1.0] | 14/15 ≈ 0.933 |
| B | [0.6, 0.8] | 11/15 ≈ 0.733 |
| C | [0.4, 0.6] | 8/15 ≈ 0.533 |
| D | [0.2, 0.4] | 1/3 ≈ 0.333 |
| E | [0.0, 0.2] | 2/15 ≈ 0.133 |
Higher \(P_{ix}\) signifies a more valuable customer, whose sand castings should be prioritized.
3. Production Load Priority (P_it)
Certain sand castings may have a large number of pending pieces. Given constraints like limited pattern capacity (molds per day), producing these castings can span multiple days, creating a “load” on the production system. The load \(t_i\) for casting \(i\) is defined as the minimum number of days required for its molding, calculated by:
$$t_i = \text{ceil}\left(\frac{U_i}{b_i}\right)$$
where \(U_i\) is the total pending quantity of casting \(i\), and \(b_i\) is the maximum number of that casting that can be molded per day per pattern. The \(\text{ceil}()\) function rounds up to the nearest integer. This load is then normalized:
$$P_{it} = \frac{t_i – \min(t)}{\max(t) – \min(t)}$$
A higher \(P_{it}\) indicates a casting with a larger inherent production load, suggesting potential benefits from scheduling it earlier.
4. Composite Priority Score (P_i)
The final priority score for a sand casting \(i\) is a weighted sum of the three normalized factors:
$$P_i = w_1 \cdot P_{id} + w_2 \cdot P_{ix} + w_3 \cdot P_{it}$$
Subject to: \(w_1 + w_2 + w_3 = 1\) and \(w_1, w_2, w_3 > 0\).
The weights \(w_1, w_2, w_3\) reflect the strategic emphasis of the foundry on due date adherence, customer relationship, and production smoothing, respectively. They can be adjusted by management based on current business objectives. This composite score \(P_i\) provides a holistic measure for ranking and selecting sand castings during charge planning.
Mathematical Model for the Charge Plan of Sand Castings
Based on the priority model, a formal Integer Programming (IP) model is constructed for the daily melting and pouring charge plan of sand castings. The model assumes a known number of furnace heats (\(L\)) to be scheduled for the planning day.
Sets and Indices:
- \(i = 1…N\): Index for pending casting types (sand castings).
- \(l = 1…L\): Index for furnace charges/heats.
- \(k = 1…K\): Index for alloy/material families. Castings within the same family \(S(k)\) can be melted together.
- \(w = 1…W\): Index for sand box/flask types.
Parameters:
- \(P_i\): Composite priority score of casting \(i\).
- \(m_i\): Total poured weight (dross weight included) of one piece of casting \(i\).
- \(cap_k\): Effective capacity of a furnace when melting alloy family \(k\).
- \(aw_{iw}\): Number of type-\(w\) sand boxes required for one piece of casting \(i\).
- \(C_w\): Total available quantity of sand box type \(w\).
- \(b_i\): Maximum number of casting \(i\) that can be molded in one day (pattern capacity).
- \(U_i\): Total pending order quantity for casting \(i\).
Decision Variables:
- \(x_{il}\): Non-negative integer. Number of pieces of casting \(i\) assigned to charge \(l\).
- \(Y_{kl}\): Binary variable. Equals 1 if charge \(l\) uses alloy family \(k\); 0 otherwise.
Objective Function:
The goal is to maximize the total prioritized weight scheduled for the day. This combines the aim of producing high-priority sand castings with the aim of utilizing furnace capacity efficiently.
$$\max \sum_{l=1}^{L}\sum_{i=1}^{N} P_i \cdot m_i \cdot x_{il}$$
Constraints:
- Furnace Capacity and Alloy Consistency: The total weight in a charge must not exceed the furnace capacity for the chosen alloy family, and all sand castings in a charge must belong to the same family.
$$\sum_{i \in S(k)} m_i \cdot x_{il} \leq cap_k \cdot Y_{kl}, \quad \forall l, \forall k$$ - Single Alloy per Charge: Each charge is dedicated to one alloy family.
$$\sum_{k=1}^{K} Y_{kl} = 1, \quad \forall l$$ - Sand Box Availability: The total sand boxes of each type used by all scheduled sand castings cannot exceed available stock.
$$\sum_{l=1}^{L}\sum_{i=1}^{N} aw_{iw} \cdot x_{il} \leq C_w, \quad \forall w$$ - Daily Molding Capacity: The scheduled quantity of a casting cannot exceed its daily molding limit.
$$\sum_{l=1}^{L} x_{il} \leq b_i, \quad \forall i$$ - Order Fulfillment Limit: The scheduled quantity cannot exceed the total pending order quantity.
$$\sum_{l=1}^{L} x_{il} \leq U_i, \quad \forall i$$ - Variable Domain:
$$x_{il} \in \mathbb{Z}^+, \quad Y_{kl} \in \{0,1\}$$
This model explicitly addresses the core trade-offs in planning for sand castings production within a single day’s horizon, focusing on batch composition rather than detailed timing.
Solution Strategy: An Improved Binary Bat Algorithm (IBBA)
The formulated model is an NP-hard combinatorial optimization problem. Exact solvers struggle with real-scale instances involving dozens of sand castings and multiple charges. Therefore, a metaheuristic approach based on an Improved Binary Bat Algorithm (IBBA) is proposed. The standard Bat Algorithm (BA) is inspired by the echolocation behavior of microbats and is known for its strong exploration and exploitation capabilities. The IBBA adapts it for discrete binary search spaces.
1. Encoding and Population Initialization
The algorithm solves the charge plan problem for one alloy family \(S(k)\) at a time, following a greedy rule: it sequentially plans for the alloy family that can yield the highest objective value. For a family with \(N\) sand castings, a solution (bat) is encoded as a binary string of length \(N\): \(x_j = (x_{j1}, x_{j2}, …, x_{jN})\). Here, \(x_{ji}=1\) means casting \(i\) is selected for the current charge; \(x_{ji}=0\) means it is not. A probability vector \(P_j = (p_1, p_2, …, p_N)\) is associated with each bat, where \(p_i\) is the probability of \(x_{ji}=1\). Initially, all \(p_i\) are set to 0.5 to ensure a uniform search start.
2. State Vector-Based Global and Local Search
A key innovation is the introduction of a “state vector” \(L_j(t) = (l_{j1}, l_{j2}, …, l_{jN})\) for each bat \(j\) at generation \(t\). The value \(l_{ji} \in [0,1]\) represents the probability that the corresponding decision variable \(x_{ji}\) will be 0. The population is updated based on this state vector:
$$x_{ji}(t) = \begin{cases} 1, & \text{if } rand > l_{ji}(t) \\ 0, & \text{otherwise} \end{cases}$$
where \(rand\) is a random number from a uniform distribution [0,1].
The state vector evolves to guide the search. The global search update is inspired by the movement towards the best solution found so far, \(x^*\):
$$l_{global}(t) = \beta_1 x^*(t) + \beta_2 (1 – x^*(t))$$
$$l_j(t+1) = (1 – f_j) \cdot l_j(t) + f_j \cdot l_{global}(t)$$
Here, \(\beta_1\) and \(\beta_2\) are control constants (\(\beta_1+\beta_2=1\)). \(f_j \in [f_{min}, f_{max}]\) is the frequency of bat \(j\), controlling the pace of movement. This mechanism allows bats to learn from the global best while retaining their own search history.
For local search around a selected bat (simulating a bat’s fine-tuning near a prey), a perturbation is applied to a subset of its state vector:
$$c = \min(N, round(\bar{A} \cdot rand \cdot N))$$
$$sub = randperm(N, c)$$
$$s_{ji} = l_{ji} + rand \cdot \bar{A}, \quad \text{for } i \in sub$$
$$x_{ji}(new) = \begin{cases} 1, & \text{if } rand > s_{ji} \\ 0, & \text{otherwise} \end{cases}$$
where \(\bar{A}\) is the average loudness of the population, \(c\) is the number of bits to perturb, and \(sub\) contains their indices.
3. Enhanced Solution Acceptance and Hybridization
The standard BA accepts a new solution only if it is better than the current best AND a random number is less than the bat’s loudness. This can slow convergence. The IBBA adopts a simpler, more aggressive rule: a new solution replaces the current one if it has a better fitness. This accelerates convergence.
Furthermore, IBBA is hybridized with a strategy from the Cuckoo Search (CS) algorithm. A fraction \(p_a\) of the worst solutions in the population are discarded and regenerated. Instead of random generation as in CS, the new solutions are created by performing a logical OR operation between the discarded solution and the global best solution \(x^*\). This operation, shown in Table 2, efficiently transfers “good genes” from the best solution, promoting the inclusion of high-priority sand castings into new candidate charges.
| Bit in Current | Bit in Best (x*) | Result (OR) |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
The complete workflow of the IBBA-based greedy solver for sand castings charge planning is illustrated in the following algorithm structure:
- Input: All pending sand castings orders, alloy families, furnace data, constraints.
- Calculate priority \(P_i\) for each casting.
- For the planning day with L furnace heats:
- For each alloy family, use IBBA to find the best possible charge (maximizing \(\sum P_i m_i x_i\) within capacity).
- Select the alloy family and its corresponding best charge that gives the highest objective value. Fix this as the next charge plan.
- Update pending orders and resource counts (sand boxes, etc.).
- Repeat steps a-c until L charges are planned or no feasible charges remain.
- Output: The sequence of L charges, each specifying the alloy and the list of sand castings with quantities.
System Development and Application for Sand Castings Production
The proposed model and algorithm form the core engine of an Intelligent Melting and Pouring Charge Plan System. The system is designed with a Client/Server (C/S) architecture, seamlessly integrated with the foundry’s existing Enterprise Resource Planning (ERP) system through dedicated APIs. This ensures real-time data synchronization for orders, inventory, and capacities related to sand castings.
System Modules
The system comprises two main functional modules:
- Alloy Family Management Module: This module maintains the knowledge base of which specific sand castings (by material specification) can be combined into a single melt. It allows planners to define, modify, and manage different alloy grouping rules, which is crucial for the feasibility of the charge plan.
- Intelligent Charge Planning Module: This is the primary user interface and decision-support tool. Key components include:
- Task Panel: Displays all pending sand castings orders with their attributes (weight, due date, customer, priority score).
- Planning Console: Allows the user to set planning parameters (number of furnaces/charges \(L\), furnace capacities, priority weights \(w_1, w_2, w_3\)).
- Optimization Engine: Executes the IBBA-based greedy algorithm in the background.
- Result Display: Presents the recommended charge plan in a clear, tabular format showing each furnace charge, its alloy, the list of assigned sand castings, total weight, and utilization rate.
Case Application and Performance Analysis
The system was deployed in a foundry specializing in single-piece, small-batch sand castings. An analysis was conducted comparing the system’s performance against the manual planning method.
Scenario: Planning for a day with 4 furnace charges. The pool contained 44 different alloy families with pending sand castings. The effective furnace capacity was set at 4,000 kg. The system’s IBBA solver was configured with parameters like population size=40, generations=100, \(p_a=0.25\). The priority weights were set empirically to \(w_1=0.5, w_2=0.3, w_3=0.2\), emphasizing due dates.
Results: The system generated a 4-charge plan within seconds. A summary is shown in Table 3.
| Charge # | Alloy Family | Total Weight (kg) | # of Casting Types | Comp. Time (s) |
|---|---|---|---|---|
| 1 | CZJ033 | 3,990 | 8 | 2.20 |
| 2 | CZJ001 | 3,870 | 5 | 2.21 |
| 3 | CZJ034 | 3,940 | 8 | 2.19 |
| 4 | CZJ028 | 3,998 | 13 | 2.19 |
Performance Comparison:
- Plan Quality: The system’s plan consistently achieved high furnace utilization (97-100% of 4,000 kg capacity) while automatically selecting sand castings with higher composite priority scores. Manual plans, while often achieving good weight, were less consistent in systematically prioritizing orders based on the multi-criteria score.
- Scheduling Efficiency: The manual process for planning a single charge for complex sand castings mixes took experienced planners 6-8 minutes on average. The system reduced this to approximately 2.2 seconds per charge, a speed-up of over 200 times, dramatically improving planner productivity.
- Furnace Utilization: A longitudinal study compared the average poured weight per charge before and after system implementation. Data from months using manual planning (e.g., Dec 2018, Jan 2019) was compared to months using the intelligent system (e.g., Feb, Mar 2019). The results, shown in Table 4, indicate a clear and sustained improvement.
Period (Manual) Avg. Weight/Charge (kg) Period (System) Avg. Weight/Charge (kg) Dec 2018 3,506.8 Feb 2019 3,657.1 Jan 2019 3,486.3 Mar 2019 3,678.8 The average utilization increased by approximately 5%, translating directly into higher throughput and better asset use for the sand castings production line.
Conclusion
This research addresses a critical operational challenge in foundries producing sand castings under a single-piece, small-batch regime. By developing a quantitative priority model that synthesizes delivery urgency, customer value, and production load, the approach provides a structured basis for decision-making. The formal integer programming model precisely captures the constraints and objectives of the melting and pouring charge plan problem for sand castings. The proposed Improved Binary Bat Algorithm (IBBA), enhanced with a state-vector mechanism and hybridized with Cuckoo Search strategies, offers an effective and efficient metaheuristic solution capable of handling real-world problem scales. The implementation of these models and algorithms into an intelligent planning system demonstrably shifts the planning paradigm from experience-based to optimization-driven. The application results confirm significant benefits: the generation of higher-quality charge plans that balance multiple objectives, a drastic reduction in scheduling time, and a measurable improvement in furnace capacity utilization. This intelligent approach provides a solid foundation for enhancing the competitiveness and operational excellence of enterprises specializing in the complex production of sand castings.
