Assignment CO2011 CSE241 Team 91
Assignment CO2011 CSE241 Team 91
UNIVERSITY OF TECHNOLOGY
FACULTY OF COMPUTER SCIENCE AND ENGINEERING
Assignment
Assignment for Mathematical Modeling - Academic year 2022 - 2023 Page 1/14
University of Technology, Ho Chi Minh City
Faculty of Computer Science and Engineering
Contents
Member list & Workload 1
2 Acknowledge 4
2.1 Cutting-Stock Problem (CSP) Overview . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 CSP Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Mathematical Formulation of CSP . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4 Integer Linear Programming (ILP) for Cutting-Stock Problem . . . . . . . . . . . 5
3 Algorithm 5
3.1 Genetic Algorithm (GA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.2 Advantages and Disadvantages for 2D Cutting Problems . . . . . . . . . . 6
3.2 Column Generation Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2.2 Advantages and Disadvantages for 2D Cutting Problems . . . . . . . . . . 7
3.3 Greedy Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4 Modeling 7
4.1 Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4.2 Integer Linear Programming (ILP) Model . . . . . . . . . . . . . . . . . . . . . . 8
4.2.1 Decision Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.2.2 Objective Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4.2.3 Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5 Case Study 9
5.1 Real-World Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.2 Model and Solution Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.2.1 Problem Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.2.2 Algorithm Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
5.3 Results and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
6 Analyze Results 10
6.1 Metrics for Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6.2 Results from Best-Fit Algorithm and Genetic Algorithm . . . . . . . . . . . . . . 10
6.2.1 Best-Fit Algorithm Results . . . . . . . . . . . . . . . . . . . . . . . . . . 10
6.2.2 Genetic Algorithm Results . . . . . . . . . . . . . . . . . . . . . . . . . . 11
6.3 Comparison of Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
6.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
7 Conclusion 12
7.1 Achievements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
7.2 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
7.3 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Assignment for Mathematical Modeling - Academic year 2022 - 2023 Page 2/14
University of Technology, Ho Chi Minh City
Faculty of Computer Science and Engineering
1.3 Conclusion
The Cutting-Stock Problem is a critical optimization challenge in industries that rely on cutting
raw materials into smaller pieces. Solving this problem efficiently allows companies to reduce
Assignment for Mathematical Modeling - Academic year 2022 - 2023 Page 3/14
University of Technology, Ho Chi Minh City
Faculty of Computer Science and Engineering
waste, lower costs, and improve operational efficiency. Given the NP-hard nature of CSP, devel-
oping efficient algorithms and heuristics is essential for solving large-scale practical problems in
operations research and industrial engineering.
2 Acknowledge
2.1 Cutting-Stock Problem (CSP) Overview
The **Cutting-Stock Problem (CSP)** is a classical optimization problem in operations research.
It involves cutting standard-sized pieces of raw material (stock material), such as rolls of paper,
sheet metal, or steel bars, into smaller pieces of specified sizes while minimizing the waste mate-
rial. This problem arises in many industrial applications, including the paper, textile, and metal
industries, where raw materials are produced in standard sizes, and cutting them into smaller
pieces is necessary to meet specific production or customer demands.
Where:
• W is the total waste.
• xi represents the number of cuts made from stock piece i.
• li is the length or size of stock piece i.
• dj is the number of pieces required for demand j.
• wj is the size of the demand piece j.
Constraints:
n
X
aij xi ≥ dj
i=1
Where:
Assignment for Mathematical Modeling - Academic year 2022 - 2023 Page 4/14
University of Technology, Ho Chi Minh City
Faculty of Computer Science and Engineering
• aij is the number of pieces of demand j that can be obtained from stock piece i.
• dj is the demand for size j, ensuring that the required pieces are met.
• Decision Variables: xi represents the number of times stock piece i is cut, and xi must
be an integer.
• Objective Function: Minimize the waste of material.
• Constraints: Ensure that all demands are met, and the cuts do not exceed the stock
dimensions.
Subject to:
n
X
aij xi ≥ dj (satisfy demand for each piece size)
i=1
Where:
• aij represents the number of pieces of size j that can be obtained from stock piece i.
• xi represents the number of cuts made from stock piece i.
3 Algorithm
3.1 Genetic Algorithm (GA)
3.1.1 Overview
The Genetic Algorithm (GA) is an optimization technique inspired by the process of biological
evolution. Each feasible solution to a problem is treated as an individual in a population. The
algorithm evolves the population through three main mechanisms: natural selection, crossover,
and mutation, as detailed below:
• Encoding: Solutions (e.g., cutting patterns) are encoded as binary strings or other suitable
formats. For example, in a 2D cutting problem, an individual might be represented as a
matrix depicting the arrangement of pieces on a large sheet of material.
• Population Initialization: A population of individuals is generated either randomly or
based on some initial feasible solutions.
Assignment for Mathematical Modeling - Academic year 2022 - 2023 Page 5/14
University of Technology, Ho Chi Minh City
Faculty of Computer Science and Engineering
• Fitness Evaluation: Each individual is assessed using a fitness function. For the material
cutting problem, the fitness function can be defined as:
Total area of pieces cut
Fitness =
Area of the large sheet
The goal is to maximize material usage efficiency.
• Selection: The best-performing individuals (with higher fitness values) are selected as
parents to produce the next generation. Common selection methods include roulette wheel
and tournament selection.
• Crossover: Combines information from two parents to produce new offspring. For example,
this might involve merging cutting patterns from two different individuals.
• Mutation: Randomly alters some genes of an individual to increase diversity. For example,
changing the position of a piece within the cutting pattern.
• Iteration: Selection, crossover, and mutation are repeated over multiple generations until
a good solution is found or a maximum number of iterations is reached.
Assignment for Mathematical Modeling - Academic year 2022 - 2023 Page 6/14
University of Technology, Ho Chi Minh City
Faculty of Computer Science and Engineering
• Pricing Problem: Identifies additional cutting patterns (columns) that can improve the
solution.
Procedure:
• Initialization: Start with a basic set of patterns, e.g., cutting one piece per sheet.
• Solve Master Problem: Find the optimal solution based on the current pattern set.
• Solve Pricing Problem: Identify a new pattern that improves the objective function
(e.g., reducing waste).
• Update: Add the new pattern to the master problem and repeat until no improving pattern
can be found.
4 Modeling
4.1 Problem Description
The 2D cutting stock problem involves optimizing the arrangement of smaller pieces on a large
material sheet to maximize resource utilization, minimize waste, and fulfill demand for each
piece.
Inputs:
Assignment for Mathematical Modeling - Academic year 2022 - 2023 Page 7/14
University of Technology, Ho Chi Minh City
Faculty of Computer Science and Engineering
– hi : Height of piece i.
– di : Number of pieces i required.
• A set of feasible cutting patterns j (manually created or generated automatically).
Outputs:
• A list of cutting patterns j, each detailing the positions of pieces cut from the large sheet.
• The number of times each pattern j is used.
Objective: Optimize material usage by minimizing the number of large sheets used and
reducing waste area.
Assumptions:
• Pieces do not overlap.
• Pieces cannot be rotated (fixed width and height).
4.2.3 Constraints
• Demand Satisfaction: Ensure the total number of pieces i cut across all patterns j meets
or exceeds the demand di : X
xij ≥ di ∀i
j
• Pattern Size Limitation: Ensure the total area of pieces in each pattern j does not
exceed the large sheet’s area:
X
wi · hi · xij ≤ W · H ∀j
i
• Linking Variables: If pattern j is used (yj > 0), the total number of pieces cut from this
pattern must not exceed the maximum capacity of the pattern:
xij ≤ Cij · yj ∀i, j
where Cij is the maximum number of pieces i that can fit in pattern j.
• Integer Variables:
xij ∈ Z+ , yj ∈ Z+ ∀i, j
Assignment for Mathematical Modeling - Academic year 2022 - 2023 Page 8/14
University of Technology, Ho Chi Minh City
Faculty of Computer Science and Engineering
5 Case Study
5.1 Real-World Scenario
In furniture manufacturing, companies often need to cut large wooden sheets (e.g., 240 cm x 120
cm) into smaller pieces for assembling products like tables, chairs, and cabinets. For instance:
• 60 cm x 40 cm: Demand d1 = 50
• 80 cm x 60 cm: Demand d2 = 30
• 120 cm x 60 cm: Demand d3 = 20
In this scenario, the goal is to efficiently arrange the smaller pieces on the large sheets while
minimizing waste and fulfilling the demand for each piece size.
• Encoding: Each individual represents a way to cut pieces from the sheet.
• Fitness Function: Evaluate solutions based on material usage and waste reduction.
• Execution: Evolve solutions over generations to find the most efficient cutting pattern.
Conclusion: Applying algorithms like Genetic Algorithm and Column Generation in the two-
dimensional cutting-stock problem improves efficiency, reduces waste, and optimizes production
processes in real-world applications.
Assignment for Mathematical Modeling - Academic year 2022 - 2023 Page 9/14
University of Technology, Ho Chi Minh City
Faculty of Computer Science and Engineering
6 Analyze Results
6.1 Metrics for Evaluation
To evaluate the performance of the Best-Fit Algorithm and Genetic Algorithm, we used
the following key metrics:
• Material Utilization: This metric measures how efficiently the stock material is used by
the algorithm. The formula is:
Total Area of Pieces Cut
Utilization Rate = × 100
Total Area of Stock Used
A higher utilization rate signifies better material efficiency.
• Waste Percentage: The waste percentage is the complement of the material utilization
rate and shows the unused portion of the stock material.
• Memory Usage: Measures the memory consumed by the algorithm during its execution.
It’s important to consider, especially when dealing with large datasets or in environments
with memory constraints.
Assignment for Mathematical Modeling - Academic year 2022 - 2023 Page 10/14
University of Technology, Ho Chi Minh City
Faculty of Computer Science and Engineering
6.4 Conclusion
Based on the analysis of the Best-Fit Algorithm and Genetic Algorithm:
Thus, for real-world applications involving larger and more complex cutting problems, Ge-
netic Algorithm should be preferred despite its higher computational cost, as it offers better
overall performance in terms of material usage and waste minimization. On the other hand,
Assignment for Mathematical Modeling - Academic year 2022 - 2023 Page 11/14
University of Technology, Ho Chi Minh City
Faculty of Computer Science and Engineering
Best-Fit Algorithm is more appropriate for simpler, smaller problems where speed is more
important than perfect optimization.
7 Conclusion
The Cutting-Stock Problem (CSP) is a critical optimization challenge faced by various
industries, requiring effective methods to minimize material waste and optimize material utiliza-
tion. In this assignment, we explored two key algorithms—Best-Fit Algorithm and Genetic
Algorithm (GA)—to solve the problem.
7.1 Achievements
Through this study, we successfully:
• Compared the Best-Fit Algorithm and Genetic Algorithm in terms of their ability to
optimize material usage, minimize waste, and scale with larger datasets.
• Demonstrated that the Best-Fit Algorithm is highly efficient for small to medium-sized
problems where speed and simplicity are important.
• Showed that the Genetic Algorithm provides superior results for larger and more complex
problems, significantly reducing waste and optimizing material utilization.
• Applied these algorithms to a real-world case study in the furniture manufacturing industry,
validating their practical use in improving operational efficiency and reducing costs.
• Integrated optimization techniques like Integer Linear Programming (ILP) and heuris-
tic methods to automate the decision-making process in industrial applications, highlight-
ing their potential for real-world use.
7.2 Limitations
While the study provided valuable insights, there are several limitations:
• Best-Fit Algorithm struggles with larger, more complex problems, as its performance
deteriorates, leading to higher waste and inefficient material usage.
• Genetic Algorithm (GA), while effective, requires significant computational resources
and time, especially with larger populations and multiple generations.
• The models focused primarily on two algorithms and did not explore other potential meth-
ods such as Column Generation or Dynamic Programming, which could offer further
optimization opportunities.
• Real-world complexities, such as piece rotation or machine constraints, were not fully con-
sidered in the models, which could affect the feasibility and accuracy of the results in
certain industrial settings.
Assignment for Mathematical Modeling - Academic year 2022 - 2023 Page 12/14
University of Technology, Ho Chi Minh City
Faculty of Computer Science and Engineering
• Parameter Tuning for GA: Improving the performance of the Genetic Algorithm
by refining parameters such as population size, mutation rate, and crossover methods to
balance execution time and solution quality.
• Incorporating Additional Constraints: Introducing more real-world constraints, such
as piece rotation, irregular shapes, or dynamic demand, to make the model more robust
and applicable across different industries.
• Case Studies Across Industries: Evaluating the algorithms in diverse real-world sce-
narios, such as textile manufacturing or metalworking, to validate their performance and
adaptability in various contexts.
• Real-Time Optimization: Developing real-time optimization tools for the CSP, inte-
grating both heuristic and exact optimization methods, to facilitate automated, efficient
decision-making in operational settings.
Overall, this assignment demonstrates the importance of combining computational techniques
and mathematical modeling to address complex, real-world challenges like the Cutting-Stock
Problem. The findings lay the foundation for the continued development of advanced solutions
that can significantly improve material utilization, reduce waste, and optimize production pro-
cesses in diverse industrial applications.
Assignment for Mathematical Modeling - Academic year 2022 - 2023 Page 13/14
University of Technology, Ho Chi Minh City
Faculty of Computer Science and Engineering
References
[1] Holland, J. H. (1975). Adaptation in Natural and Artificial Systems. University of Michigan
Press.
[2] Goldberg, D. E. (1989). Genetic Algorithms in Search, Optimization, and Machine Learning.
Addison-Wesley.
[3] Mitchell, M. (1998). An Introduction to Genetic Algorithms. MIT Press.
[4] Eiben, A. E., & Smith, J. E. (2003). Introduction to Evolutionary Computing. Springer.
[5] Whitley, D. (2010). A genetic algorithm tutorial. Statistics and Computing, 4(2), 65-85.
[6] Banzhaf, W., Nordin, P., Keller, R. E., & Francone, F. D. (1998). Genetic Programming:
An Introduction. Morgan Kaufmann.
[7] Michalewicz, Z. (1996). Genetic Algorithms + Data Structures = Evolution Programs.
Springer.
[8] Vose, M. D. (1999). The Simple Genetic Algorithm: Foundations and Theory. MIT Press.
[9] Rechenberg, I. (1973). Evolutionsstrategie: Optimierung technischer Systeme nach Prinzip-
ien der biologischen Evolution. Frommann-Holzboog.
[10] Schwefel, H.-P. (1995). Evolution and Optimum Seeking. Wiley-Interscience.
[11] Barnhart, C., Johnson, E. L., Nemhauser, G. L., Savelsbergh, M. W. P., & Vance, P. H.
(1998). Branch-and-price: Column generation for solving huge integer programs. Operations
Research, 46(3), 316-329.
[12] Desaulniers, G., Desrosiers, J., & Solomon, M. M. (Eds.). (2005). Column Generation.
Springer.
[13] Lübbecke, M. E., & Desrosiers, J. (2005). Selected topics in column generation. Operations
Research, 53(6), 1007-1023.
[14] Gilmore, P. C., & Gomory, R. E. (1961). A linear programming approach to the cutting-stock
problem. Operations Research, 9(6), 849-859.
[15] Gilmore, P. C., & Gomory, R. E. (1963). A linear programming approach to the cutting-stock
problem—Part II. Operations Research, 11(6), 863-888.
[16] Vanderbeck, F. (1999). Computational study of a column generation algorithm for bin pack-
ing and cutting stock problems. Mathematical Programming, 86(3), 565-594.
[17] Coffman, E. G., Garey, M. R., Johnson, D. S., & Tarjan, R. E. (1984). Performance bounds
for level-oriented two-dimensional packing algorithms. SIAM Journal on Computing, 9(4),
808-826.
[18] Johnson, D. S. (1973). Near-optimal bin packing algorithms. PhD Thesis, Massachusetts
Institute of Technology.
[19] Garey, M. R., & Johnson, D. S. (1979). Computers and Intractability: A Guide to the Theory
of NP-Completeness. W. H. Freeman.
[20] Burke, E. K., Kendall, G., & Whitwell, G. (2004). A new placement heuristic for the or-
thogonal stock-cutting problem. Operations Research, 52(4), 655-671.
Assignment for Mathematical Modeling - Academic year 2022 - 2023 Page 14/14