# The Effect of Welding on the One-Dimensional Cutting-Stock Problem: The Case of Fixed Firefighting Systems in the Construction Industry

Authors: Kolos Csaba Ágoston
Journal: Advances in Operations Research
 (2019)

---

## Abstract

Safety is paramount in the construction industry and the fixed sprinkler and water spray systems used in firefighting involve networks of pipes of various lengths. Manufacturers of such fixed firefighting systems need to either cut the existing stocks to length—a (one-dimensional) cutting-stock problem—or lengthen the existing stocks or leftover segments through welding, a (one-dimensional) cutting-stock problem with welding. Best industry practice safety requirements allow only one weld per length of pipe. The case of a Hungarian manufacturer of fixed firefighting systems motivates this article, which argues that the cutting-stock problem with welding (with single- or multiple-size stocks) may be converted to an equivalent cutting-stock problem (with multiple-size stocks). Readily available algorithms and software may then be used to generate an optimal cutting plan for the equivalent cutting-stock problem. Subject to certain restrictions, the optimal cutting plan for the equivalent cutting-stock problem may then be converted to cutting patterns for the original cutting-stock problem with welding.


---

## Body

## 1. Introduction

Safety is paramount in the construction industry and the fixed sprinkler and water spray systems used in firefighting are integral to a wide variety of buildings ranging from warehouses, through supermarkets, to educational establishments. Integrating fixed firefighting systems is in many cases mandatory, governed in the EU member countries by the European Standard EN 12845, currently incorporated, for example, in standards MSZ EN 12845:2015 in Hungary and BS EN 12845:2015 in the UK.Fixed firefighting systems are assembled on site and involve networks of pipes (henceforth,pipes) of various lengths (henceforth,sizes) manufactured from the pipes in stock (henceforth,stocks). More often than not, manufacturers need to either cut the existing stocks to size (for example, from 6 meters to 4 meters from one stock, with a 2-meter leftover segment) or lengthen the existing stocks or leftover segments through welding (for example, from 6 meters to 8 meters from two stocks, with a 4-meter leftover segment). Leftover segments may be welded to other stocks or to each other, but best industry practice safety requirements allow only one weld per pipe.In the case of a Hungarian manufacturer of fixed firefighting systems, the company uses single-size, 6-meter stocks to produce pipes; Table1 illustrates the sizes (14, in total) and quantities (31, in total) required for a particular network. Only one pipe size coincides with the stock size; 11 others are shorter and two are longer.Table 1
Illustrative pipe sizes and quantities for the case of a Hungarian manufacturer of fixed firefighting systems.
Stock size (S1, in mm) 6000 Pipe sizes (si, in mm) Pipe quantities (ni) 2000 1 4000 1 4500 4 4660 2 4680 11 5000 1 5096 1 5250 1 5260 1 5500 1 5660 1 6000 2 7000 2 7200 2Manufacturing pipes for fixed firefighting systems is a one-dimensional cutting-stock problem with single- or multiple-size stocks and welding restricted to one weld per pipe (henceforth,cutting-stock problem with welding). This article sets out to find its optimal solution (that is,optimal cutting-and-welding plan) and argues that the readily available algorithms and software for the cutting-stock problem with multiple-size stocks (henceforth,cutting-stock problem) may be used for the cutting-stock problem with welding. Numerical testing found the algorithm suggested in this article (see Section 5) adequate for the case of a Hungarian manufacturer of fixed firefighting systems.Following this brief introduction, Section2 reviews the relevant literature and positions this article in the ongoing debate fuelling research in the cutting-stock problem. Section 3 formulates the cutting-stock problem and the cutting-stock problem with welding as a mixed integer linear program, discusses cutting-and-welding pattern properties, and proves that optimal cutting-and-welding plans consist of minimal cutting-and-welding patterns. This characteristic of optimal cutting-and-welding plans is fundamental to the algorithm suggested in the next section. Section 4 discusses the practical difficulties caused by high cutting-and-welding stock quantities and nonsequential cutting-and-welding patterns. The ensuing need to limit the number of cutting-and-welding stocks and thus restrict the cutting-stock problem with welding shapes the algorithm suggested in this section. Generating minimal cutting-and-welding patterns and optimal cutting-and-welding plans pose possible difficulties, also explored in this section, alongside program running times, sequential patterns, and decision maker preferences. In Section 5 we apply the algorithm suggested in the previous section to the case of a Hungarian manufacturer of fixed firefighting systems with satisfactory results. Finally, Section 6 summarises the findings and suggests directions for further research.


## 2. Background

The cutting-stock problem—the question of how to optimise stock or how to cut stock to minimise cost—was first investigated by Kantorovich [1] and Kantorovich [2]. The column-generation algorithm suggested by Gilmore and Gomory [3] and Gilmore and Gomory [4] more than twenty years later became widely used by researchers and practitioners alike; Gilmore and Gomory [3] and Gilmore and Gomory [4] ‘were the first to present techniques practically applied to difficult real-world problems’ (Sweeney and Paternoster [5]). Complex cutting-stock problems generate complex cutting plans with very large numbers of feasible cutting patterns. Instead of attempting to generate and investigate them all at once, the Gillmore and Gomory algorithm first generates and investigates only a few. Subsequently generated cutting patterns replace existing ones if proven more efficient upon investigation, and through the iterative process the algorithm arrives at an optimal solution.The strength of the Gillmore and Gomory algorithm lies in its ability to generate an optimal solution; its weakness in its inability to generate an optimal cutting plan where cutting pattern weights are integers. More often than not, rounding decimal cutting pattern weights to the nearest integer results in infeasible or suboptimal cutting plans and/or overproducing some orders and underproducing others. Generating an optimal cutting plan for the cutting-stock problem thus became the focus of further research; Roodman [6], Wäscher and Gau [7], and Gradisar and Trkman [8] suggested heuristic methods, while Dyckhoff [9], Scheithauer and Terno [10], Vance et al. [11], Vanderbeck [12], and Belov and Scheithauer [13] proposed further algorithms. Sweeney and Paternoster [5] and Wäscher et al. [14] provided comprehensive literature reviews of these and other—usually heuristic—methodologies.The cutting-stock problem therefore stayed in operations research focus even in its simplest, original, one-dimensional definition; in recent years, for example, Levine and Ducatelle [15] and Araújo et al. [16] used evolutionary algorithm for the cutting-stock problem. Particularly relevant to this article though are the works of Cui and Yang [17], who investigated leftover segment recycling.Cutting stock is a nondeterministic polynomial-time- (NP-) hard problem (Cheng et al. [18]), which may require exponential software running times; nonetheless, in practice, even large samples may be investigated for optimal solutions (see Goulimis [19]; Belov and Scheithauer [13]). Therefore this article assumes that there are algorithms and software for obtaining the exact (global) solution of a cutting-stock problem as defined in Section 1 (see Wäscher et al. [14] for typology, including MSSCSP). If the goal is to design business applications where suboptimal solutions are acceptable, then exact (global) solutions are not necessary, because good (heuristic) solutions are sufficient.Zak [20] defines the skiving stock problem, a counterpart to the cutting-stock problem, as “find the maximum number of items with minimum length L that can be constructed by connecting a given supply of smaller item lengths” (Martinovic and Scheithauer [21]).In the skiving stock problem, the number of connected items is not limited. In our case, it is crucial that every item can be constructed from two pieces at most. The investigated cutting-and-welding problem is a combination of the cutting-stock problem and the skiving stock problem. Tanir et al. [22] examined the possibility of welding in a cutting-stock problem and suggested a heuristic method. There were no restrictions on the number of welds per pipe, while in this paper the number of welds per pipe is restricted to one.


## 3. Theory

### 3.1. Formulating the Cutting-Stock Problem

The cutting-stock problem consists of generating the optimal—minimal cost—cutting plan.I pipes of various sizes si (i = 1, 2, …I) need to be cut in various quantities ni from J stocks of various sizes Sj (S1, S2, …SJ). Feasible cutting patterns may be represented by sets of integers (j, u1, u2, …uI), where j is the stock index and ui is the number of pipes of size si produced from stock Sj. Evidently, ∑i=1I‍uisi≤Sj and ∑i=1I‍ui≥1.For example,s1=2-, s2=3-, and s3=4-meter pipes could be cut from single-size, S1=6-meter stocks in various feasible patterns (j, u1, u2, u3). Figure 1 illustrates five such cutting patterns: the 6-meter stocks are cut into one 2-meter pipe and one 4-meter pipe (6=2+4), in pattern A (1, 1, 0, 1); into three 2-meter pipes (6=2+2+2), in pattern B (1, 3, 0, 0); into one 2-meter pipe, one 3-meter pipe, and one 1-meter leftover segment (6=2+3+1), in pattern C (1, 1, 1, 0); into one 2-meter pipe, one 3-meter pipe, and two 0.5-meter leftover segments (6=0.5+2+3+0.5), in pattern C′ (1, 1, 1, 0); and into one 2-meter pipe and one 4-meter leftover segment (6=2+4), in pattern D (1, 1, 0, 0). Cutting patterns reflect what is produced, not how is produced; as such, patterns C and C′ are equivalent and pattern D is wasteful.Figure 1
Some feasible patterns for cutting 2-, 3-, and 4-meter pipes from single-size, 6-meter stocks.IfP represents all the feasible cutting patterns, then cutting pattern pl∈P produces uil pipes of size si at the pattern price πl, the stock price, that is, if the cutting cost is ignored as insignificantly small.Thus the cutting-stock problem may be formulated as the following mixed integer linear program:(1)minb∑l:pl∈Pblπls.t.∑l:pl∈Pbluil≥ni∀ibl∈N, where every feasible solution represents a cutting plan, an optimal cutting plan is a feasible solution with minimal cost, and the decision variable bl∈N indicates how many times a cutting plan uses cutting pattern pl.Due to its exponential size, solving the mixed integer linear program is not practical for large instances. In practice, this should be done with a combination of branch-and-bound and column-generation (see Belov and Scheithauer [13] for branch-and-price and column-generation).Optimal cutting plans do not exclude wasteful cutting patterns like patternD in Figure 1; and a cutting-stock problem may have more than one optimal cutting plan. For example, if four 2-meter pipes need to be cut from single-size, 6-meter stocks, then one optimal cutting plan could use two patterns to cut one 6-meter stock in three 2-meter pipes (6=3×2) and another 6-meter stock in one 2-meter pipe and one 4-meter leftover segment (6=2+4). Another optimal plan could use the first pattern twice to cut two 6-meter stocks in six 2-meter pipes (2×6=6×2), two 2-meter pipes too many. Subject to additional considerations such as number of cuts, amount of waste and size of overproduction, decision makers may prefer one optimal cutting plan to another.


### 3.2. Formulating the Cutting-Stock Problem with Welding

Similarly to the cutting-stock problem, the cutting-stock problem with welding consists of generating the optimal—minimal cost—cutting-and-welding plan. The number of feasible cutting-and-welding patterns is just larger than the number of feasible cutting patterns. For example, if 4-meter pipes need to be produced from single-size, 6-meter stocks, then only one cutting pattern is feasible in the cutting-stock problem as opposed to two cutting-and-welding patterns feasible in the cutting-stock problem with welding. In the cutting-stock problem, the 6- meter stocks can only be cut into 4-meter pipes and wasteful 2-meter leftover segments. In the cutting-stock problem with welding, the ‘wasteful’ 2-meter leftover segments may be welded together, in additional 4-meter pipes (see patternsA and B in Figure 2). However, whether pattern B is preferable to pattern A depends on the price per weld relative to the price per stock, if higher, then pattern A prevails.Figure 2
Patterns for producing 4-meter pipes from single-size, 6-meter stocks through cutting and cutting and welding.In the cutting-stock problem with welding, feasible cutting-and-welding patterns may be represented by sets of integers(U,u)=(U1,U2,…,UJ,u1,u2,…,uI) and unique assignment matrices A with ∑j=1J‍Uj rows, ∑i=1I‍ui columns, and only zero and one as elements. Uj represents the number of stocks of size Sj, j=1,…,J, used to produce ui pipes of size si, i=1,…,I, through cutting and welding. Thus, the first row represents the first stock of size S1, the second row the second stock of size S1,…, and the U1th row the U1th stock of size S1. Similarly, the (U1+1)th row represents the first stock of size S2, the (U1+2)th row the second stock of size S2,…, the (U1+U2)th row the U2th stock of size S2, and so on. Also, the first column represents the first pipe of size s1, the second column the second pipe of size s1,…, and the u1th column the u1th pipe of size s1. Similarly, the (u1+1)th column represents the first pipe of size s2, the (u1+2)th column the second pipe of size s2,…, the (u1+u2)th column the u2th pipe of size s2, and so on. If rows are indexed by r, columns by c, and elements by arc, then arc=1 implies that at least some segment of pipe c is produced with at least some segment of stock r. This article assumes that no stock size and no stock is redundant and that therefore arc=1 at least once in every row and once in every column. Since any one stock may be assigned to any number of pipes, but any one pipe may only be produced from two stocks at the most, arc=1 no more than twice in every column.The set of integers (U,u) and assignment matrix A represent a feasible cutting-and-welding pattern if an equal-size welding matrix W can be found to offer a feasible welding option. If rows are indexed by r, columns by c, and elements by wrc, then wrc>0 if and only if arc=1. Also, if S(r) is the size of the stock represented by row r and s(c) is the size of the pipe represented by column c, then the sum of all the elements in any one row is less than S(r) and the sum of all the elements in any one column is equal to s(c). Furthermore, ∑j=1J‍Uj≥1 and ∑i=1I‍ui≥1. In addition, one has the following:(i)
A pipe size shorter than the sum of all the stock sizes is insufficient in itself. For example, ifS1=1 meter, S2=6 meters, and s1=4 meters, then (U1,U2,u1)=(4,0,1) requires three welds and is not a valid cutting-and-welding pattern.(ii)
Cutting-and-welding patterns reflect what is produced, not how is produced. For example, from a cutting-stock problem with welding point of view, patternsC and C′ in Figure 1 have identical sets of integers (U1,u1,u2,u3)=(1,1,0,1) and assignment matrices A=(11) and welding matrices W=(20003000)) (see Section 3.1).For another example, 3.6-meter pipes can be produced from single-size, 6-meter stocks in various cutting-and-welding patterns, for example, by cutting one stock in one 3.6-meter pipe and one 2.4-meter segment (6=3.6+2.4), by cutting another stock in one 3.6-meter pipe and two 1.2-meter segments (6=1.2+3.6+1.2), by welding the 2.4-meter segment with one of the two 1.2-meter segments (2.4+1.2=3.6), with (U1,u1)=(2,3), A=110011, and W=360024000012003600, by cutting each of two stocks in one 3.6-meter pipe, one 1.8-meter segment, and one 0.6-meter leftover segment (2×6=2×3.6+2×1.8+2×0.6), and by welding the two 1.8-meter segments (1.8+1.8=3.6), with identical (U1,u1)=(2,3) and A=110011 as before, but different W=360018000018003600, and so on.(iii)
Redundancies can appear in cutting-and-welding patterns, but these do not affect optimal solutions.For example, by cutting each of two 6-meter stocks in one 3.6-meter pipe, one 1.8-meter segment, and one 0.6-meter leftover segment (2×6=2×3.6+2×1.8+2×0.6), one in three 3.6-meter pipes is welded. Six identical sets of integers—(U1,ui)=(2,3)—and six different assignment matrices—A1=110011, A2=110101, A3=101110, A4=011110, A5=011101, and A6=101011—correspond to six different cutting-and-welding patterns with identical practical outcomes.(iv)
Welding is not a compulsory component of cutting-and-welding patterns. For example, two 5-meter pipes can be produced from two 6-meter stocks by cutting each of the two 6-meter stocks in one 5-meter pipe and one 1-meter leftover segment (2×6=2×5+2×1), with (U1,u1)=(2,2) and A=1001 as if the cutting patterns (U1,u1)=(1,1) and A=(1) were used twice.(v)
The number of cutting-and-welding patterns is finite, since the number of pipes and the number of stocks are both finite.(vi)
Any one pipe can only be produced from two stocks at the most, but a cutting-and-welding pattern may involve more than two stocks, which may be cut and welded in various ways.For example, six 5-meter pipes can be produced from five 6-meter stocks by cutting each of two 6-meter stocks in one 5-meter pipe and one 1-meter segment (2×6=2×5+2×1), by cutting each of two 6-meter stocks in one 4-meter segment and one 2-meter segment (2×6=2×4+2×2), by cutting one 6-meter stock in two 3-meter segments (6=2×3), by welding each of the two 1-meter segments to one of the two 4-meter segments (2×1+2×4=2×5), and by welding each of the two 2-meter segments to one of the two 3-meter segments (2×2+2×3=2×5) (see Figure 3). This cutting-and-welding pattern is therefore represented by (U1,u1)=(5,6),(2)A=110000011000001100000110000011,W=500010000000040002000000003000300000000200040000000010005000Figure 3
Patterns for cutting-and-welding six 5-meter pipes from five 6-meter stocks.IfQ represents all the feasible cutting-and-welding patterns, then cutting-and-welding pattern ql produces uil pipes of size si at the pattern price πl, the stock and welding prices, that is, if the cutting cost is ignored as insignificantly small.Similar to the cutting-stock problem, the cutting-stock problem with welding may be formulated as the following mixed integer linear program:(3)minb∑l:ql∈Qblπls.t.∑l:ql∈Qbluil≥ni∀ibl∈N, where every feasible solution represents a cutting-and-welding plan, an optimal cutting-and-welding plan is a feasible solution with minimal cost, and the decision variable bl∈N indicates how many times a cutting-and-welding plan uses cutting-and-welding pattern ql.Similar to the cutting-stock problem, due to its exponential size, this method is not practical for solving large instances. In practice, this should be replaced with a combination of branch-and-bound and column-generation techniques (see Belov and Scheithauer [13], for example, for branch-and-price and column-generation techniques).


### 3.3. The Relation between Optimal Cutting-and-Welding Plans and Minimal Cutting-and-Welding Patterns

Proposition 1.
Every optimal cutting-and-welding plan can be constructed using cutting-and-welding patterns where the number of welds involved is one fewer than the number of stocks used. We call these cutting-and-welding patterns minimal.Proof.
Let us prove this proposition by contradiction and assume that there exists an optimal cutting-and-welding plan with a cutting-and-welding pattern withk stocks (rows r1,r2,…,rk in the assignment matrix A) and w welds, where w≥k. This cutting-and-welding pattern may be represented as a graph—a network of nodes and linking edges, where the nodes represent the stocks and the edges represent the welds—where there may be no edge, one edge, or two or more edges between any two nodes. If w≥k, then the network is cyclical; let r1,r2,…,rm be the stocks that form the cycle r1→r2→⋯→rm→r1. Corresponding indices (columns c1,c2,…,cm in the assignment matrix A) need to be found so that all the cyclical matrix elements ar1c1, ar1c2, ar2c2, ar2c3, ar3c3, ar3c4…, arm-1cm, armcm, and armc1 are one. If ε is the smallest among wr1c1, wr2c2,…, wrmcm elements in the corresponding welding matrix W, then subtract ε from all of these elements and adding ε to all the elements wr1c2, wr2c3,…, wrm-1cm, and wrmc1 results, among others, in a zero element, in other words, a pipe without welding and a cutting-and-welding pattern with one fewer welds. Modifications in W lead of course to modifications in A; if wrc>0, then arc=1; if wrc=0, then arc=0; and if w-1≥k, then the process requires as many iterations as necessary to obtain a cycle-free graph, a tree or a forest. A contradiction is that since a tree where the number of welds involved is one fewer than the number of stocks used represents a minimal cutting-and-welding pattern.This characteristic of optimal cutting-and-welding plans plays a fundamental role in the algorithm suggested in this article (see Section4.1).Important to note that Proposition1 does not state that welds are always necessary. If we avoid welds, the number of used stock is 1, and the number of welds is 0, so Proposition 1 holds.


## 3.1. Formulating the Cutting-Stock Problem

The cutting-stock problem consists of generating the optimal—minimal cost—cutting plan.I pipes of various sizes si (i = 1, 2, …I) need to be cut in various quantities ni from J stocks of various sizes Sj (S1, S2, …SJ). Feasible cutting patterns may be represented by sets of integers (j, u1, u2, …uI), where j is the stock index and ui is the number of pipes of size si produced from stock Sj. Evidently, ∑i=1I‍uisi≤Sj and ∑i=1I‍ui≥1.For example,s1=2-, s2=3-, and s3=4-meter pipes could be cut from single-size, S1=6-meter stocks in various feasible patterns (j, u1, u2, u3). Figure 1 illustrates five such cutting patterns: the 6-meter stocks are cut into one 2-meter pipe and one 4-meter pipe (6=2+4), in pattern A (1, 1, 0, 1); into three 2-meter pipes (6=2+2+2), in pattern B (1, 3, 0, 0); into one 2-meter pipe, one 3-meter pipe, and one 1-meter leftover segment (6=2+3+1), in pattern C (1, 1, 1, 0); into one 2-meter pipe, one 3-meter pipe, and two 0.5-meter leftover segments (6=0.5+2+3+0.5), in pattern C′ (1, 1, 1, 0); and into one 2-meter pipe and one 4-meter leftover segment (6=2+4), in pattern D (1, 1, 0, 0). Cutting patterns reflect what is produced, not how is produced; as such, patterns C and C′ are equivalent and pattern D is wasteful.Figure 1
Some feasible patterns for cutting 2-, 3-, and 4-meter pipes from single-size, 6-meter stocks.IfP represents all the feasible cutting patterns, then cutting pattern pl∈P produces uil pipes of size si at the pattern price πl, the stock price, that is, if the cutting cost is ignored as insignificantly small.Thus the cutting-stock problem may be formulated as the following mixed integer linear program:(1)minb∑l:pl∈Pblπls.t.∑l:pl∈Pbluil≥ni∀ibl∈N, where every feasible solution represents a cutting plan, an optimal cutting plan is a feasible solution with minimal cost, and the decision variable bl∈N indicates how many times a cutting plan uses cutting pattern pl.Due to its exponential size, solving the mixed integer linear program is not practical for large instances. In practice, this should be done with a combination of branch-and-bound and column-generation (see Belov and Scheithauer [13] for branch-and-price and column-generation).Optimal cutting plans do not exclude wasteful cutting patterns like patternD in Figure 1; and a cutting-stock problem may have more than one optimal cutting plan. For example, if four 2-meter pipes need to be cut from single-size, 6-meter stocks, then one optimal cutting plan could use two patterns to cut one 6-meter stock in three 2-meter pipes (6=3×2) and another 6-meter stock in one 2-meter pipe and one 4-meter leftover segment (6=2+4). Another optimal plan could use the first pattern twice to cut two 6-meter stocks in six 2-meter pipes (2×6=6×2), two 2-meter pipes too many. Subject to additional considerations such as number of cuts, amount of waste and size of overproduction, decision makers may prefer one optimal cutting plan to another.


## 3.2. Formulating the Cutting-Stock Problem with Welding

Similarly to the cutting-stock problem, the cutting-stock problem with welding consists of generating the optimal—minimal cost—cutting-and-welding plan. The number of feasible cutting-and-welding patterns is just larger than the number of feasible cutting patterns. For example, if 4-meter pipes need to be produced from single-size, 6-meter stocks, then only one cutting pattern is feasible in the cutting-stock problem as opposed to two cutting-and-welding patterns feasible in the cutting-stock problem with welding. In the cutting-stock problem, the 6- meter stocks can only be cut into 4-meter pipes and wasteful 2-meter leftover segments. In the cutting-stock problem with welding, the ‘wasteful’ 2-meter leftover segments may be welded together, in additional 4-meter pipes (see patternsA and B in Figure 2). However, whether pattern B is preferable to pattern A depends on the price per weld relative to the price per stock, if higher, then pattern A prevails.Figure 2
Patterns for producing 4-meter pipes from single-size, 6-meter stocks through cutting and cutting and welding.In the cutting-stock problem with welding, feasible cutting-and-welding patterns may be represented by sets of integers(U,u)=(U1,U2,…,UJ,u1,u2,…,uI) and unique assignment matrices A with ∑j=1J‍Uj rows, ∑i=1I‍ui columns, and only zero and one as elements. Uj represents the number of stocks of size Sj, j=1,…,J, used to produce ui pipes of size si, i=1,…,I, through cutting and welding. Thus, the first row represents the first stock of size S1, the second row the second stock of size S1,…, and the U1th row the U1th stock of size S1. Similarly, the (U1+1)th row represents the first stock of size S2, the (U1+2)th row the second stock of size S2,…, the (U1+U2)th row the U2th stock of size S2, and so on. Also, the first column represents the first pipe of size s1, the second column the second pipe of size s1,…, and the u1th column the u1th pipe of size s1. Similarly, the (u1+1)th column represents the first pipe of size s2, the (u1+2)th column the second pipe of size s2,…, the (u1+u2)th column the u2th pipe of size s2, and so on. If rows are indexed by r, columns by c, and elements by arc, then arc=1 implies that at least some segment of pipe c is produced with at least some segment of stock r. This article assumes that no stock size and no stock is redundant and that therefore arc=1 at least once in every row and once in every column. Since any one stock may be assigned to any number of pipes, but any one pipe may only be produced from two stocks at the most, arc=1 no more than twice in every column.The set of integers (U,u) and assignment matrix A represent a feasible cutting-and-welding pattern if an equal-size welding matrix W can be found to offer a feasible welding option. If rows are indexed by r, columns by c, and elements by wrc, then wrc>0 if and only if arc=1. Also, if S(r) is the size of the stock represented by row r and s(c) is the size of the pipe represented by column c, then the sum of all the elements in any one row is less than S(r) and the sum of all the elements in any one column is equal to s(c). Furthermore, ∑j=1J‍Uj≥1 and ∑i=1I‍ui≥1. In addition, one has the following:(i)
A pipe size shorter than the sum of all the stock sizes is insufficient in itself. For example, ifS1=1 meter, S2=6 meters, and s1=4 meters, then (U1,U2,u1)=(4,0,1) requires three welds and is not a valid cutting-and-welding pattern.(ii)
Cutting-and-welding patterns reflect what is produced, not how is produced. For example, from a cutting-stock problem with welding point of view, patternsC and C′ in Figure 1 have identical sets of integers (U1,u1,u2,u3)=(1,1,0,1) and assignment matrices A=(11) and welding matrices W=(20003000)) (see Section 3.1).For another example, 3.6-meter pipes can be produced from single-size, 6-meter stocks in various cutting-and-welding patterns, for example, by cutting one stock in one 3.6-meter pipe and one 2.4-meter segment (6=3.6+2.4), by cutting another stock in one 3.6-meter pipe and two 1.2-meter segments (6=1.2+3.6+1.2), by welding the 2.4-meter segment with one of the two 1.2-meter segments (2.4+1.2=3.6), with (U1,u1)=(2,3), A=110011, and W=360024000012003600, by cutting each of two stocks in one 3.6-meter pipe, one 1.8-meter segment, and one 0.6-meter leftover segment (2×6=2×3.6+2×1.8+2×0.6), and by welding the two 1.8-meter segments (1.8+1.8=3.6), with identical (U1,u1)=(2,3) and A=110011 as before, but different W=360018000018003600, and so on.(iii)
Redundancies can appear in cutting-and-welding patterns, but these do not affect optimal solutions.For example, by cutting each of two 6-meter stocks in one 3.6-meter pipe, one 1.8-meter segment, and one 0.6-meter leftover segment (2×6=2×3.6+2×1.8+2×0.6), one in three 3.6-meter pipes is welded. Six identical sets of integers—(U1,ui)=(2,3)—and six different assignment matrices—A1=110011, A2=110101, A3=101110, A4=011110, A5=011101, and A6=101011—correspond to six different cutting-and-welding patterns with identical practical outcomes.(iv)
Welding is not a compulsory component of cutting-and-welding patterns. For example, two 5-meter pipes can be produced from two 6-meter stocks by cutting each of the two 6-meter stocks in one 5-meter pipe and one 1-meter leftover segment (2×6=2×5+2×1), with (U1,u1)=(2,2) and A=1001 as if the cutting patterns (U1,u1)=(1,1) and A=(1) were used twice.(v)
The number of cutting-and-welding patterns is finite, since the number of pipes and the number of stocks are both finite.(vi)
Any one pipe can only be produced from two stocks at the most, but a cutting-and-welding pattern may involve more than two stocks, which may be cut and welded in various ways.For example, six 5-meter pipes can be produced from five 6-meter stocks by cutting each of two 6-meter stocks in one 5-meter pipe and one 1-meter segment (2×6=2×5+2×1), by cutting each of two 6-meter stocks in one 4-meter segment and one 2-meter segment (2×6=2×4+2×2), by cutting one 6-meter stock in two 3-meter segments (6=2×3), by welding each of the two 1-meter segments to one of the two 4-meter segments (2×1+2×4=2×5), and by welding each of the two 2-meter segments to one of the two 3-meter segments (2×2+2×3=2×5) (see Figure 3). This cutting-and-welding pattern is therefore represented by (U1,u1)=(5,6),(2)A=110000011000001100000110000011,W=500010000000040002000000003000300000000200040000000010005000Figure 3
Patterns for cutting-and-welding six 5-meter pipes from five 6-meter stocks.IfQ represents all the feasible cutting-and-welding patterns, then cutting-and-welding pattern ql produces uil pipes of size si at the pattern price πl, the stock and welding prices, that is, if the cutting cost is ignored as insignificantly small.Similar to the cutting-stock problem, the cutting-stock problem with welding may be formulated as the following mixed integer linear program:(3)minb∑l:ql∈Qblπls.t.∑l:ql∈Qbluil≥ni∀ibl∈N, where every feasible solution represents a cutting-and-welding plan, an optimal cutting-and-welding plan is a feasible solution with minimal cost, and the decision variable bl∈N indicates how many times a cutting-and-welding plan uses cutting-and-welding pattern ql.Similar to the cutting-stock problem, due to its exponential size, this method is not practical for solving large instances. In practice, this should be replaced with a combination of branch-and-bound and column-generation techniques (see Belov and Scheithauer [13], for example, for branch-and-price and column-generation techniques).


## 3.3. The Relation between Optimal Cutting-and-Welding Plans and Minimal Cutting-and-Welding Patterns

Proposition 1.
Every optimal cutting-and-welding plan can be constructed using cutting-and-welding patterns where the number of welds involved is one fewer than the number of stocks used. We call these cutting-and-welding patterns minimal.Proof.
Let us prove this proposition by contradiction and assume that there exists an optimal cutting-and-welding plan with a cutting-and-welding pattern withk stocks (rows r1,r2,…,rk in the assignment matrix A) and w welds, where w≥k. This cutting-and-welding pattern may be represented as a graph—a network of nodes and linking edges, where the nodes represent the stocks and the edges represent the welds—where there may be no edge, one edge, or two or more edges between any two nodes. If w≥k, then the network is cyclical; let r1,r2,…,rm be the stocks that form the cycle r1→r2→⋯→rm→r1. Corresponding indices (columns c1,c2,…,cm in the assignment matrix A) need to be found so that all the cyclical matrix elements ar1c1, ar1c2, ar2c2, ar2c3, ar3c3, ar3c4…, arm-1cm, armcm, and armc1 are one. If ε is the smallest among wr1c1, wr2c2,…, wrmcm elements in the corresponding welding matrix W, then subtract ε from all of these elements and adding ε to all the elements wr1c2, wr2c3,…, wrm-1cm, and wrmc1 results, among others, in a zero element, in other words, a pipe without welding and a cutting-and-welding pattern with one fewer welds. Modifications in W lead of course to modifications in A; if wrc>0, then arc=1; if wrc=0, then arc=0; and if w-1≥k, then the process requires as many iterations as necessary to obtain a cycle-free graph, a tree or a forest. A contradiction is that since a tree where the number of welds involved is one fewer than the number of stocks used represents a minimal cutting-and-welding pattern.This characteristic of optimal cutting-and-welding plans plays a fundamental role in the algorithm suggested in this article (see Section4.1).Important to note that Proposition1 does not state that welds are always necessary. If we avoid welds, the number of used stock is 1, and the number of welds is 0, so Proposition 1 holds.


## 4. Calculation

By adding their lengths,k single- or multiple-size cutting-and-welding stocks may be converted to one equivalent cutting-stock and the cutting-stock problem with welding may be converted to an equivalent cutting-stock problem. If πw is the price per weld, then the price of the equivalent cutting stock is the price of the k cutting-and-welding stocks plus (k-1)πw. Multiple-size cutting-and-welding stocks (of J sizes) may generate large numbers of equivalent cutting stocks, given by the combination k+J-1k. If ‘+’ represents one stock and ‘/’ the border between two stock sizes, then, for example, ‘++/+//+++’ represents two stocks from the first size, one from the second, none from the third, and three from the fourth. For k cutting-and-welding stocks and J cutting-and-welding stock sizes, there are J-1‘/’ signs and k+J-1 places where the k‘+’ signs could go. In the example above, k=6, J=4, and 96=84.Cutting-and-welding patterns are not necessarily sequential; for example, the first stock could be cut in two segments, one to be welded with a segment from the fourth stock and the other with a segment from the tenth stock. High cutting-and-welding stock quantities and nonsequential cutting-and-welding patterns cause practical difficulties that may be reduced by reducing the cutting-and-welding stock quantities.Let us therefore limitk to κ, and thusbound thecutting-stock problem with welding; the smaller the κ, the smaller the number of equivalent cutting patterns. For single-size cutting-and-welding stocks (as in the case which motivates this article), the equivalent cutting-stock problem tolerates quite large sizes of κ (see Section 4.1). Generally, however, finding the optimal, smallest κ is of obvious importance (see Section 4.3).


### 4.1. An Algorithm for Solving the Bounded Cutting-Stock Problem with Welding

To solve the bounded cutting-stock problem with welding, this article suggests a three-step algorithm that—at the least—is a good heuristic and that—at the best—generates an optimal cutting-and-welding plan:(1)
Convert the bounded cutting-stock problem with welding to anequivalent cutting-stock problem as follows:
(a)
Choosek≤κ single- or multiple-sizebounded cutting-and-welding stocks in all the ways possible; for example, 5- and 6-meter cutting-and-welding stocks and κ= 3 generate two bounded cutting-and-welding stocks for k= 1 (5 and 6 meters); three for k= 2 (5+5= 10, 5+6= 11, and 6+6= 12 meters); and four for k= 3 (5+5+5= 15, 5+5+6= 16, 5+6+6= 17, and 6+6+6= 18 meters).(b)
Add their lengths, to convert the bounded cutting-and-welding stocks to oneequivalent cutting stock.(c)
Add their prices to the(k-1)πw welding price, to obtain the equivalent cutting-stock price.(2)
Solve the equivalent cutting-stock problem (that is, generate the optimal equivalent cutting plan) with the aid of open-source or commercial software (see Section3.1).(3)
Convert each equivalent cutting pattern to abounded cutting-and-welding pattern (henceforth,pattern conversion problem, see Section 4.2).This algorithm poses two possible difficulties.First (see step (1)), multiple-size bounded cutting-and-welding stocks may generate alternative equivalent cutting stocks. For example, if the multiple-size bounded cutting-and-welding stocks consist of 4- and 6-meter stocks, then three 4-meter stocks(3×4=12) with two welds and two 6-meter stocks (2×6=12) with one weld generate two alternative equivalent cutting stocks of identical, 12-meter sizes, but nonidentical prices. To solve the equivalent cutting-stock problem (see step (2)), good practice suggests that the algorithm should consider the cheapest equivalent cutting stock.Second (see step (3)), to generate an (optimal) bounded cutting-and-welding plan, the optimal equivalent cutting plan would need to be converted to minimal bounded cutting-and-welding patterns (see Section4.2). This difficulty is trivial in most cases, but by no means in all. For example, if 10-meter pipes need to be produced from single-size, 6-meter cutting-and-welding stocks, then five 6-meter stocks and four welds would generate a 30-meter equivalent cutting stock and two cuts would generate three 10-meter pipes (5×6=30=3×10). However, since one of the pipes would have two welds instead of the maximum one, this cutting-and-welding pattern is not even feasible let alone minimal. The algorithm would not only need to solve the equivalent cutting-stock problem (see Section 3.1); it would also need to tackle extreme cases, with no minimal bounded cutting-and-welding patterns (see Section 4.2).


### 4.2. Formulating the Pattern Conversion Problem

Let us consider one of the equivalent cutting patterns withK single- or multiple-size stocks and L single- or multiple-size pipes—k=1,2,…,K and l=1,2,…,L—generated at step (2) (see Section 4.1). Also, let Sk be the size of stock k, xlk the decision variable which shows the size of segment of pipe l produced from stock k, and Blk∈{0;1} the binary variable which shows whether xlk is zero or positive.Thus the pattern conversion problem may be formulated as the following mixed integer linear program:(4)∑l=1L∑k=1KBlk⟶mins.t.:xlk-SkBlk≤0l=1…L,k=1…K∑k=1Kxlk=sll=1…L∑l=1Lxlk≤Skk=1…K∑k=1KBlk≤2l=1…Lxlk≥0l=1…L,k=1…KBlk∈0;1l=1…L,k=1…KConverting equivalent cutting patterns to minimal bounded cutting-and-welding patterns may seem trivial and in most cases indeed it is. However, multiple-size stocks and long pipes which all need to be welded complicate conversion and an equivalent cutting pattern might not convert to a minimal bounded cutting-and-welding pattern.The value of the objective function indicates the number of stocks and/or stock segments necessary to produce theL pipes. Each pipe contains at least one stock or stock segment, but not more than two; thus, the value of the objective function is given by the number of pipes and the number of welds:(i)
Thus if the value isL+K-1, then the bounded cutting-and-welding pattern generated is minimal (see Section 3.3).(ii)
If the value is less thanL+K-1, then the software used at step (2) (see Section 4.1) was inadequate, the equivalent cutting plan was suboptimal, and the bounded cutting-and-welding pattern generated is feasible, but not minimal. In practice, albeit with no firm claim to optimality, this feasible pattern may be broken down into smaller, minimal patterns; after all, every pipe can be produced from only two stocks at the most; tree graphs such as those discussed in Section 3.3 are noncyclical even for number of welds smaller than K-1. Since the number of stocks is identical, but the number of welds is smaller, this set of minimal patterns is cheaper than the feasible pattern generated by the pattern conversion problem. However, further theoretical investigation is outside the scope of this article.(iii)
If the pattern conversion problem does not have a feasible solution, then the software used at step (2) (see Section4.1) is not necessarily inadequate. In practice, albeit with no firm claim to optimality, a feasible bounded cutting-and-welding pattern may be obtained through iteration by increasing the number of stocks in the pattern conversion problem from K to K+1 and K+2, and so on. In the case of multiple-size stocks, increasing the number of longest-size stocks will definitely result in a feasible solution; in certain cases, increasing the number of shorter-size stocks may result in a feasible solution too. As before, this feasible pattern with K′ stocks and fewer than K′-1 welds may be broken down into smaller, minimal patterns.


### 4.3. The Relation between Optimal Equivalent Cutting Plans, Optimal Bounded Cutting-and-Welding Plans, and Optimal Cutting-and-Welding Plans

Proposition 2.
If every equivalent cutting pattern of the optimal equivalent cutting plan can be converted to a minimal bounded cutting-and-welding pattern, then the algorithm generates an optimal solution for the bounded cutting-stock problem with welding.Proof.
Let us prove this proposition by contradiction and assume that the algorithm does not generate an optimal solution for the bounded cutting-stock problem with welding, although every equivalent cutting pattern of the optimal equivalent cutting plan can be converted to a minimal bounded cutting-and-welding pattern. Then there exists a bounded cutting-and-welding plan cheaper than the bounded cutting-and-welding plan generated by the algorithm. Since all the bounded cutting-and-welding patterns of this bounded cutting-and-welding plan can be converted to equivalent cutting patterns, then the equivalent cutting plan generated is cheaper than the optimal equivalent cutting plan generated by the algorithm; that is a contradiction.Proposition 3.
The optimal solution for the bounded cutting-stock problem with welding is an optimal solution for the cutting-stock problem with welding too ifκ is sufficiently large.Proof.
The algorithm suggested in this article for solving cutting-stock problems with welding relies on limiting the available cutting-and-welding stocks toκ by bounding the cutting-stock problem with welding (see Section 4.1). Since every pipe can be produced from two stocks at the most, κ has an upper limit of 2∑i=1I‍ni.However, this upper bound may still be too large for practical purposes and finding the lowest upper bound is important (the lower the upper bound, the fewer the number of equivalent cutting stocks), but problematic even for single-size cutting-and-welding stocks. Moreover, even the lowest upper bound may be too large for practical purposes. For example, let us consider producingn1 1.001-meter pipes from single-size, 1-meter cutting-and-welding stocks. If n1=1,000, then κ≥2∑i=1I‍ni=2×n1=2× 1,000 = 2,000, but the lowest upper bound is evidently 1,001, if the cutting cost is ignored as insignificantly small. Finding the lowest upper bound is therefore possible, in special cases, but generally problematic, particularly for multiple-size cutting-and-welding stocks.


### 4.4. Algorithm Running Times

The algorithm running time consists of the running time for the equivalent cutting-stock problem (see step (2), Section4.1) and the running time for the pattern conversion problem (see step (3), Section 4.1).To investigate running times for the equivalent cutting-stock problem, the BarCut (version 2.1) program was run on a computer with an Intel Duo 2.33 GHz processor, 6 GB of random access memory (RAM), and Windows 7 Enterprise as operating system. At less than 9 seconds, the running times for the case which motivates this article proved acceptable (see Section5).To investigate running times for the pattern conversion problem, the GLPK (version 4.55) program was run on the same computer (see Table2, where the second column shows the equivalent cutting patterns—generated by a complex, hypothetical solution of the equivalent cutting-stock problem—that need to be converted to feasible cutting-and-welding patterns). If the pattern conversion problem did not have an optimal solution, the running times proved short; if it did, the running times proved very long at times and in obvious need of further analysis.Table 2
Algorithm running times for minimal cutting-and-welding patterns (∗ = no minimal solution).
Pattern Pipes (sl, in mm) Stocks G1 G2 G3 G4 G5 S1 (K) A 2070, 2140, 2210, 2280, 2350, 2420, 4530 3 0.4 0.1 0.1 0.1 0.1 0.1  B 2070, 2140, 2210, 2280, 2350, 2420, 2490, 2560, 2630, 2850 4 > 3600 0.1 0.1 0.1 0.1 0.1  C 2070, 2140, 2210, 2280, 2350, 2420, 2490, 2560, 2630, 2700, 2770, 3380 5 > 3600 0.1 0.1 0.1 0.1 0.1  D 2070, 2140, 2210, 2280, 2350, 2420, 2490, 2560, 2630, 2700, 2770, 2840, 2910, 3630 6 > 3600 0.1 0.1 0.1 > 3600 0.1  E 2070, 2140, 2210, 2280, 2350, 2420, 2490, 2560, 2630, 2700, 2770, 2840, 2910, 2980, 3050, 3600 7 > 3600 0.1 0.1 0.1 > 3600 0.2  F 2070, 2140, 2210, 2280, 2350, 2420, 2490, 2560, 2630, 2700, 2770, 2840, 2910, 2980, 3050, 3120, 3190, 3290 8 > 3600 0.4 0.6 1.7 > 3600 0.2  G 2070, 2140, 2210, 2280, 2350, 2420, 2490, 2560, 2630, 2700, 2770, 2840, 2910, 2980, 3050, 3120, 3190, 3260 8 > 3600 - - - - -  H 10000, 10000, 10000 5 0.1 ∗ - - - - -  I 11000, 11000, 11000, 3000, 3000, 3000 7 86.6 0.0 0.0 1.0 ∗ - 0.1 ∗  J 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 11001, 11001, 11001, 11001, 11001, 11001, 11001, 11001, 11493, 11499 20 > 3600 118.4 > 3600 > 3600 > 3600 > 3600Moderate numbers of pipes (see the second column in Table2) and moderate numbers of single-size, 6-meter cutting-and-welding stocks (see the third column in Table 2) generate feasible solutions in (milli)seconds (see column G1 in Table 2). Large numbers may require long running times, but feasible solutions can generally be generated in (milli)seconds and the actual value of the objective function (∑l=1L‍∑k=1K‍Blk) indicates the existence of a feasible solution (see Section 4.2). The ‘normal’, optimal value of the objective function is L+K-1 (see Section 4.2); however, more efficient cutting-and-welding patterns may be generated, with fewer than K-1 welds (see pattern G in Table 2, with K-2=8-2=6 welds). (Pattern H in Table 2 has no minimal solution.)Even with∑l=1L‍∑k=1K‍Blk=L+K-1 as constraints, where appropriate (see Section 4.4.1), the algorithm running time for the optimal solution is generally a matter of (milli)seconds (see column G2 in Table 2).


#### 4.4.1. Decision Maker Preferences and Sequential Cutting-and-Welding Patterns

Equivalent cutting patterns may convert to alternative cutting-and-welding patterns and decision makers may prefer some to others. Preferences may be easily incorporated by changing the objective function from∑l=1L‍∑k=1K‍Blk (see Section 4.2) to ∑l=1L‍ol∑k=1K‍Blk, where ol represents decision maker’s score point (that is, preference level) for pipe l; lower ol values indicate higher preferences for welding. Since longer pipes are likely to be welded from stocks, not just cut, we may logically attribute an o1=0 to the longest pipe, an o2=1 to the second-longest pipe, …, and an oL=L-1 to the shortest pipe. Without the ∑l=1L‍∑k=1K‍Blk=L+K-1 constraints, the program running times for the pattern conversion problem might be long and an alternative, two-step method preferable. In step one, the program is allowed to run for the few (milli) seconds necessary to calculate the minimal number of welds; arriving at the optimal value of the objective function is a fast process; investigating all the possible alternatives is not.In step two, the objective function is changed from∑l=1L‍∑k=1K‍Blk to ∑l=1L‍ol∑k=1K‍Blk and the ∑l=1L‍∑k=1K‍Blk=L+K-1 constraints or alternative constraints, based on step one, are added to generate a preferred pattern hopefully quickly (see column G3 in Table 2). Pattern J in Table 2 represents an exceptionally difficult case, where a minimal pattern can be generated relatively quickly only if the decision maker’s preferences are disregarded.Understandably, decision makers prefer sequential cutting-and-welding patterns, where pipes are placed in relevant order and the end of one stock is welded to the beginning of the next. In the tree graph discussed in Section3.3, sequential patterns would correspond to paths.When all the pipes are shorter than the shortest stock, sequential patterns are evidently possible; in fact, every permutation yields a sequential pattern. When some of the pipes are longer than the shortest stock, sequential patterns are not always possible. For example, if 4-, 5-, and 9-meter pipes need to be produced from single-size, 6-meter stocks, then the permutation (9, 5, 4) generates a sequential pattern while the permutation (5, 9, 4) does not, because the 9-meter pipe would require two welds. For another example, there is no sequential pattern if three 11-meter and three 3-meter pipes need to be produced from single-size, 6-meter stocks, but there is a minimal, nonsequential pattern involving seven stocks, six welds, and five cuts (see Figure4). (Six stocks, three welds, and three cuts will generate three 11-meter pipes and three 1-meter segments. The seventh stock will be cut in three 2-meter segments, each to be welded to one of the three 1-meter segments to generate three 3-meter pipes.)Figure 4
Nonsequential cutting-and-welding pattern for producing three 11-meter pipes and three 3-meter pipes from seven single-size, 6-meter stocks.Sequential cutting-and-welding patterns may be generated by adding the constraints(5)Bkl+Bkj≤1,l=1…L-3,j=l+2…L,k=1…Kand ∑l=1L‍∑k=1K‍Blk=L+K-1 to the objective function ∑l=1L‍ol∑k=1K‍Blk (see Section 4.2).The number of additional constraints increases quadratically in the number of stocks. If decision maker preferences are ignored, the program generates feasible sequential cutting-and-welding patterns with moderate running times for moderate Ks and possibly large running times for large Ks (see column G4 in Table2). If decision maker preferences are taken into consideration, the program generates minimal sequential cutting-and-welding patterns with running times varying from (milli)seconds to hours (see pattern J in Table 2).


#### 4.4.2. Reformulating the Pattern Conversion Problem for Sequential Cutting-and-Welding Patterns and Decision Maker Preferences

For single-size stocks (6 meters, as in the case which motivates this article, or different), sequential cutting-and-welding patterns may also be generated by formulating an assignment-like problem, a permutation of pipes, wherexlj∈{0,1} represents the place of pipe l in the permutation and where the objective function is arbitrary, because generating one sequential pattern is sufficient:(6)∑l=1Lxlj=1j=1…L∑j=1Lxlj=1l=1…L∑j=1m-1∑l=1Lslxlj≥km6000m=1…L∑j=1m∑l=1Lslxlj≤km+26000m=1…Lxlj∈0;1l=1…L,j=1…Lkm∈Nm=1…L.The∑j=1m-1‍∑l=1L‍slxlj≥km6000 constraints ensure that the aggregate size of the first m-1 pipes in the permutation is at least km6000; in other words, there are at least km stocks for the first m-1 pipes. The ∑j=1m‍∑l=1L‍slxlj≤(km+2)6000 constraints ensure that the aggregate size of the first m pipes in the permutation is (km+2)6000 at the most; in other words, as well as the leftover segment from stock km, an additional stock may be used for producing pipe m. These two sets of constraints ensure that pipe m+1 in the permutation has one weld at the most and that the program generates a minimal sequential cutting-and-welding pattern, albeit one which disregards decision maker preferences (see column S1 in Table 2). The program running times are moderate for all patterns with the exception of J, which does not have a minimal integer solution.Decision maker preferences may be taken into consideration, but the pattern conversion problem formulated as a mixed integer linear program is more cumbersome; ifWj∈{0;1} is the binary variable indicating whether the jth pipe in the permutation is welded or not and wl∈{0;1} is the binary variable which shows whether the lth pipe in the original indexing is welded or not, then (7)∑l=1Lolwl→mins.t.:∑l=1Lxlj=1j=1…L∑j=1Lxlj=1l=1…L∑j=1m-1∑l=1Lslxlj≥km6000m=1…L∑j=1m∑l=1Lslxlj≤km+16000+Wm6000m=1…L∑l=1LWl=K-1xlj+Wj≤wl+1l=1…L,j=1…Lxlj∈0;1l=1…L,j=1…Lkm∈Nm=1…LWm∈0;1m=1…Lwm∈0;1m=1…LThe∑j=1m‍∑l=1L‍slxlj≤(km+1)6000+Wm6000 constraint ensures that pipe km in the permutation is welded if Wm=1. The ‘original’ index of pipe km is unknown, but the xlj+Wj≤wl+1 constraint ensures that pipe l is welded if pipe l is in the jth place in the permutation and the jth pipe in the permutation is welded.Unfortunately, the algorithm running times turn out to be large, longer than seconds just to generate a feasible solution (see column G5 in Table2).In summary, sequential cutting-and-welding patterns may be generated in simple circumstances and possibly complex ones too, while decision maker preferences may be taken into account in simple circumstances, but not in complex ones.


## 4.1. An Algorithm for Solving the Bounded Cutting-Stock Problem with Welding

To solve the bounded cutting-stock problem with welding, this article suggests a three-step algorithm that—at the least—is a good heuristic and that—at the best—generates an optimal cutting-and-welding plan:(1)
Convert the bounded cutting-stock problem with welding to anequivalent cutting-stock problem as follows:
(a)
Choosek≤κ single- or multiple-sizebounded cutting-and-welding stocks in all the ways possible; for example, 5- and 6-meter cutting-and-welding stocks and κ= 3 generate two bounded cutting-and-welding stocks for k= 1 (5 and 6 meters); three for k= 2 (5+5= 10, 5+6= 11, and 6+6= 12 meters); and four for k= 3 (5+5+5= 15, 5+5+6= 16, 5+6+6= 17, and 6+6+6= 18 meters).(b)
Add their lengths, to convert the bounded cutting-and-welding stocks to oneequivalent cutting stock.(c)
Add their prices to the(k-1)πw welding price, to obtain the equivalent cutting-stock price.(2)
Solve the equivalent cutting-stock problem (that is, generate the optimal equivalent cutting plan) with the aid of open-source or commercial software (see Section3.1).(3)
Convert each equivalent cutting pattern to abounded cutting-and-welding pattern (henceforth,pattern conversion problem, see Section 4.2).This algorithm poses two possible difficulties.First (see step (1)), multiple-size bounded cutting-and-welding stocks may generate alternative equivalent cutting stocks. For example, if the multiple-size bounded cutting-and-welding stocks consist of 4- and 6-meter stocks, then three 4-meter stocks(3×4=12) with two welds and two 6-meter stocks (2×6=12) with one weld generate two alternative equivalent cutting stocks of identical, 12-meter sizes, but nonidentical prices. To solve the equivalent cutting-stock problem (see step (2)), good practice suggests that the algorithm should consider the cheapest equivalent cutting stock.Second (see step (3)), to generate an (optimal) bounded cutting-and-welding plan, the optimal equivalent cutting plan would need to be converted to minimal bounded cutting-and-welding patterns (see Section4.2). This difficulty is trivial in most cases, but by no means in all. For example, if 10-meter pipes need to be produced from single-size, 6-meter cutting-and-welding stocks, then five 6-meter stocks and four welds would generate a 30-meter equivalent cutting stock and two cuts would generate three 10-meter pipes (5×6=30=3×10). However, since one of the pipes would have two welds instead of the maximum one, this cutting-and-welding pattern is not even feasible let alone minimal. The algorithm would not only need to solve the equivalent cutting-stock problem (see Section 3.1); it would also need to tackle extreme cases, with no minimal bounded cutting-and-welding patterns (see Section 4.2).


## 4.2. Formulating the Pattern Conversion Problem

Let us consider one of the equivalent cutting patterns withK single- or multiple-size stocks and L single- or multiple-size pipes—k=1,2,…,K and l=1,2,…,L—generated at step (2) (see Section 4.1). Also, let Sk be the size of stock k, xlk the decision variable which shows the size of segment of pipe l produced from stock k, and Blk∈{0;1} the binary variable which shows whether xlk is zero or positive.Thus the pattern conversion problem may be formulated as the following mixed integer linear program:(4)∑l=1L∑k=1KBlk⟶mins.t.:xlk-SkBlk≤0l=1…L,k=1…K∑k=1Kxlk=sll=1…L∑l=1Lxlk≤Skk=1…K∑k=1KBlk≤2l=1…Lxlk≥0l=1…L,k=1…KBlk∈0;1l=1…L,k=1…KConverting equivalent cutting patterns to minimal bounded cutting-and-welding patterns may seem trivial and in most cases indeed it is. However, multiple-size stocks and long pipes which all need to be welded complicate conversion and an equivalent cutting pattern might not convert to a minimal bounded cutting-and-welding pattern.The value of the objective function indicates the number of stocks and/or stock segments necessary to produce theL pipes. Each pipe contains at least one stock or stock segment, but not more than two; thus, the value of the objective function is given by the number of pipes and the number of welds:(i)
Thus if the value isL+K-1, then the bounded cutting-and-welding pattern generated is minimal (see Section 3.3).(ii)
If the value is less thanL+K-1, then the software used at step (2) (see Section 4.1) was inadequate, the equivalent cutting plan was suboptimal, and the bounded cutting-and-welding pattern generated is feasible, but not minimal. In practice, albeit with no firm claim to optimality, this feasible pattern may be broken down into smaller, minimal patterns; after all, every pipe can be produced from only two stocks at the most; tree graphs such as those discussed in Section 3.3 are noncyclical even for number of welds smaller than K-1. Since the number of stocks is identical, but the number of welds is smaller, this set of minimal patterns is cheaper than the feasible pattern generated by the pattern conversion problem. However, further theoretical investigation is outside the scope of this article.(iii)
If the pattern conversion problem does not have a feasible solution, then the software used at step (2) (see Section4.1) is not necessarily inadequate. In practice, albeit with no firm claim to optimality, a feasible bounded cutting-and-welding pattern may be obtained through iteration by increasing the number of stocks in the pattern conversion problem from K to K+1 and K+2, and so on. In the case of multiple-size stocks, increasing the number of longest-size stocks will definitely result in a feasible solution; in certain cases, increasing the number of shorter-size stocks may result in a feasible solution too. As before, this feasible pattern with K′ stocks and fewer than K′-1 welds may be broken down into smaller, minimal patterns.


## 4.3. The Relation between Optimal Equivalent Cutting Plans, Optimal Bounded Cutting-and-Welding Plans, and Optimal Cutting-and-Welding Plans

Proposition 2.
If every equivalent cutting pattern of the optimal equivalent cutting plan can be converted to a minimal bounded cutting-and-welding pattern, then the algorithm generates an optimal solution for the bounded cutting-stock problem with welding.Proof.
Let us prove this proposition by contradiction and assume that the algorithm does not generate an optimal solution for the bounded cutting-stock problem with welding, although every equivalent cutting pattern of the optimal equivalent cutting plan can be converted to a minimal bounded cutting-and-welding pattern. Then there exists a bounded cutting-and-welding plan cheaper than the bounded cutting-and-welding plan generated by the algorithm. Since all the bounded cutting-and-welding patterns of this bounded cutting-and-welding plan can be converted to equivalent cutting patterns, then the equivalent cutting plan generated is cheaper than the optimal equivalent cutting plan generated by the algorithm; that is a contradiction.Proposition 3.
The optimal solution for the bounded cutting-stock problem with welding is an optimal solution for the cutting-stock problem with welding too ifκ is sufficiently large.Proof.
The algorithm suggested in this article for solving cutting-stock problems with welding relies on limiting the available cutting-and-welding stocks toκ by bounding the cutting-stock problem with welding (see Section 4.1). Since every pipe can be produced from two stocks at the most, κ has an upper limit of 2∑i=1I‍ni.However, this upper bound may still be too large for practical purposes and finding the lowest upper bound is important (the lower the upper bound, the fewer the number of equivalent cutting stocks), but problematic even for single-size cutting-and-welding stocks. Moreover, even the lowest upper bound may be too large for practical purposes. For example, let us consider producingn1 1.001-meter pipes from single-size, 1-meter cutting-and-welding stocks. If n1=1,000, then κ≥2∑i=1I‍ni=2×n1=2× 1,000 = 2,000, but the lowest upper bound is evidently 1,001, if the cutting cost is ignored as insignificantly small. Finding the lowest upper bound is therefore possible, in special cases, but generally problematic, particularly for multiple-size cutting-and-welding stocks.


## 4.4. Algorithm Running Times

The algorithm running time consists of the running time for the equivalent cutting-stock problem (see step (2), Section4.1) and the running time for the pattern conversion problem (see step (3), Section 4.1).To investigate running times for the equivalent cutting-stock problem, the BarCut (version 2.1) program was run on a computer with an Intel Duo 2.33 GHz processor, 6 GB of random access memory (RAM), and Windows 7 Enterprise as operating system. At less than 9 seconds, the running times for the case which motivates this article proved acceptable (see Section5).To investigate running times for the pattern conversion problem, the GLPK (version 4.55) program was run on the same computer (see Table2, where the second column shows the equivalent cutting patterns—generated by a complex, hypothetical solution of the equivalent cutting-stock problem—that need to be converted to feasible cutting-and-welding patterns). If the pattern conversion problem did not have an optimal solution, the running times proved short; if it did, the running times proved very long at times and in obvious need of further analysis.Table 2
Algorithm running times for minimal cutting-and-welding patterns (∗ = no minimal solution).
Pattern Pipes (sl, in mm) Stocks G1 G2 G3 G4 G5 S1 (K) A 2070, 2140, 2210, 2280, 2350, 2420, 4530 3 0.4 0.1 0.1 0.1 0.1 0.1  B 2070, 2140, 2210, 2280, 2350, 2420, 2490, 2560, 2630, 2850 4 > 3600 0.1 0.1 0.1 0.1 0.1  C 2070, 2140, 2210, 2280, 2350, 2420, 2490, 2560, 2630, 2700, 2770, 3380 5 > 3600 0.1 0.1 0.1 0.1 0.1  D 2070, 2140, 2210, 2280, 2350, 2420, 2490, 2560, 2630, 2700, 2770, 2840, 2910, 3630 6 > 3600 0.1 0.1 0.1 > 3600 0.1  E 2070, 2140, 2210, 2280, 2350, 2420, 2490, 2560, 2630, 2700, 2770, 2840, 2910, 2980, 3050, 3600 7 > 3600 0.1 0.1 0.1 > 3600 0.2  F 2070, 2140, 2210, 2280, 2350, 2420, 2490, 2560, 2630, 2700, 2770, 2840, 2910, 2980, 3050, 3120, 3190, 3290 8 > 3600 0.4 0.6 1.7 > 3600 0.2  G 2070, 2140, 2210, 2280, 2350, 2420, 2490, 2560, 2630, 2700, 2770, 2840, 2910, 2980, 3050, 3120, 3190, 3260 8 > 3600 - - - - -  H 10000, 10000, 10000 5 0.1 ∗ - - - - -  I 11000, 11000, 11000, 3000, 3000, 3000 7 86.6 0.0 0.0 1.0 ∗ - 0.1 ∗  J 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 11001, 11001, 11001, 11001, 11001, 11001, 11001, 11001, 11493, 11499 20 > 3600 118.4 > 3600 > 3600 > 3600 > 3600Moderate numbers of pipes (see the second column in Table2) and moderate numbers of single-size, 6-meter cutting-and-welding stocks (see the third column in Table 2) generate feasible solutions in (milli)seconds (see column G1 in Table 2). Large numbers may require long running times, but feasible solutions can generally be generated in (milli)seconds and the actual value of the objective function (∑l=1L‍∑k=1K‍Blk) indicates the existence of a feasible solution (see Section 4.2). The ‘normal’, optimal value of the objective function is L+K-1 (see Section 4.2); however, more efficient cutting-and-welding patterns may be generated, with fewer than K-1 welds (see pattern G in Table 2, with K-2=8-2=6 welds). (Pattern H in Table 2 has no minimal solution.)Even with∑l=1L‍∑k=1K‍Blk=L+K-1 as constraints, where appropriate (see Section 4.4.1), the algorithm running time for the optimal solution is generally a matter of (milli)seconds (see column G2 in Table 2).


### 4.4.1. Decision Maker Preferences and Sequential Cutting-and-Welding Patterns

Equivalent cutting patterns may convert to alternative cutting-and-welding patterns and decision makers may prefer some to others. Preferences may be easily incorporated by changing the objective function from∑l=1L‍∑k=1K‍Blk (see Section 4.2) to ∑l=1L‍ol∑k=1K‍Blk, where ol represents decision maker’s score point (that is, preference level) for pipe l; lower ol values indicate higher preferences for welding. Since longer pipes are likely to be welded from stocks, not just cut, we may logically attribute an o1=0 to the longest pipe, an o2=1 to the second-longest pipe, …, and an oL=L-1 to the shortest pipe. Without the ∑l=1L‍∑k=1K‍Blk=L+K-1 constraints, the program running times for the pattern conversion problem might be long and an alternative, two-step method preferable. In step one, the program is allowed to run for the few (milli) seconds necessary to calculate the minimal number of welds; arriving at the optimal value of the objective function is a fast process; investigating all the possible alternatives is not.In step two, the objective function is changed from∑l=1L‍∑k=1K‍Blk to ∑l=1L‍ol∑k=1K‍Blk and the ∑l=1L‍∑k=1K‍Blk=L+K-1 constraints or alternative constraints, based on step one, are added to generate a preferred pattern hopefully quickly (see column G3 in Table 2). Pattern J in Table 2 represents an exceptionally difficult case, where a minimal pattern can be generated relatively quickly only if the decision maker’s preferences are disregarded.Understandably, decision makers prefer sequential cutting-and-welding patterns, where pipes are placed in relevant order and the end of one stock is welded to the beginning of the next. In the tree graph discussed in Section3.3, sequential patterns would correspond to paths.When all the pipes are shorter than the shortest stock, sequential patterns are evidently possible; in fact, every permutation yields a sequential pattern. When some of the pipes are longer than the shortest stock, sequential patterns are not always possible. For example, if 4-, 5-, and 9-meter pipes need to be produced from single-size, 6-meter stocks, then the permutation (9, 5, 4) generates a sequential pattern while the permutation (5, 9, 4) does not, because the 9-meter pipe would require two welds. For another example, there is no sequential pattern if three 11-meter and three 3-meter pipes need to be produced from single-size, 6-meter stocks, but there is a minimal, nonsequential pattern involving seven stocks, six welds, and five cuts (see Figure4). (Six stocks, three welds, and three cuts will generate three 11-meter pipes and three 1-meter segments. The seventh stock will be cut in three 2-meter segments, each to be welded to one of the three 1-meter segments to generate three 3-meter pipes.)Figure 4
Nonsequential cutting-and-welding pattern for producing three 11-meter pipes and three 3-meter pipes from seven single-size, 6-meter stocks.Sequential cutting-and-welding patterns may be generated by adding the constraints(5)Bkl+Bkj≤1,l=1…L-3,j=l+2…L,k=1…Kand ∑l=1L‍∑k=1K‍Blk=L+K-1 to the objective function ∑l=1L‍ol∑k=1K‍Blk (see Section 4.2).The number of additional constraints increases quadratically in the number of stocks. If decision maker preferences are ignored, the program generates feasible sequential cutting-and-welding patterns with moderate running times for moderate Ks and possibly large running times for large Ks (see column G4 in Table2). If decision maker preferences are taken into consideration, the program generates minimal sequential cutting-and-welding patterns with running times varying from (milli)seconds to hours (see pattern J in Table 2).


### 4.4.2. Reformulating the Pattern Conversion Problem for Sequential Cutting-and-Welding Patterns and Decision Maker Preferences

For single-size stocks (6 meters, as in the case which motivates this article, or different), sequential cutting-and-welding patterns may also be generated by formulating an assignment-like problem, a permutation of pipes, wherexlj∈{0,1} represents the place of pipe l in the permutation and where the objective function is arbitrary, because generating one sequential pattern is sufficient:(6)∑l=1Lxlj=1j=1…L∑j=1Lxlj=1l=1…L∑j=1m-1∑l=1Lslxlj≥km6000m=1…L∑j=1m∑l=1Lslxlj≤km+26000m=1…Lxlj∈0;1l=1…L,j=1…Lkm∈Nm=1…L.The∑j=1m-1‍∑l=1L‍slxlj≥km6000 constraints ensure that the aggregate size of the first m-1 pipes in the permutation is at least km6000; in other words, there are at least km stocks for the first m-1 pipes. The ∑j=1m‍∑l=1L‍slxlj≤(km+2)6000 constraints ensure that the aggregate size of the first m pipes in the permutation is (km+2)6000 at the most; in other words, as well as the leftover segment from stock km, an additional stock may be used for producing pipe m. These two sets of constraints ensure that pipe m+1 in the permutation has one weld at the most and that the program generates a minimal sequential cutting-and-welding pattern, albeit one which disregards decision maker preferences (see column S1 in Table 2). The program running times are moderate for all patterns with the exception of J, which does not have a minimal integer solution.Decision maker preferences may be taken into consideration, but the pattern conversion problem formulated as a mixed integer linear program is more cumbersome; ifWj∈{0;1} is the binary variable indicating whether the jth pipe in the permutation is welded or not and wl∈{0;1} is the binary variable which shows whether the lth pipe in the original indexing is welded or not, then (7)∑l=1Lolwl→mins.t.:∑l=1Lxlj=1j=1…L∑j=1Lxlj=1l=1…L∑j=1m-1∑l=1Lslxlj≥km6000m=1…L∑j=1m∑l=1Lslxlj≤km+16000+Wm6000m=1…L∑l=1LWl=K-1xlj+Wj≤wl+1l=1…L,j=1…Lxlj∈0;1l=1…L,j=1…Lkm∈Nm=1…LWm∈0;1m=1…Lwm∈0;1m=1…LThe∑j=1m‍∑l=1L‍slxlj≤(km+1)6000+Wm6000 constraint ensures that pipe km in the permutation is welded if Wm=1. The ‘original’ index of pipe km is unknown, but the xlj+Wj≤wl+1 constraint ensures that pipe l is welded if pipe l is in the jth place in the permutation and the jth pipe in the permutation is welded.Unfortunately, the algorithm running times turn out to be large, longer than seconds just to generate a feasible solution (see column G5 in Table2).In summary, sequential cutting-and-welding patterns may be generated in simple circumstances and possibly complex ones too, while decision maker preferences may be taken into account in simple circumstances, but not in complex ones.


## 4.4.1. Decision Maker Preferences and Sequential Cutting-and-Welding Patterns

Equivalent cutting patterns may convert to alternative cutting-and-welding patterns and decision makers may prefer some to others. Preferences may be easily incorporated by changing the objective function from∑l=1L‍∑k=1K‍Blk (see Section 4.2) to ∑l=1L‍ol∑k=1K‍Blk, where ol represents decision maker’s score point (that is, preference level) for pipe l; lower ol values indicate higher preferences for welding. Since longer pipes are likely to be welded from stocks, not just cut, we may logically attribute an o1=0 to the longest pipe, an o2=1 to the second-longest pipe, …, and an oL=L-1 to the shortest pipe. Without the ∑l=1L‍∑k=1K‍Blk=L+K-1 constraints, the program running times for the pattern conversion problem might be long and an alternative, two-step method preferable. In step one, the program is allowed to run for the few (milli) seconds necessary to calculate the minimal number of welds; arriving at the optimal value of the objective function is a fast process; investigating all the possible alternatives is not.In step two, the objective function is changed from∑l=1L‍∑k=1K‍Blk to ∑l=1L‍ol∑k=1K‍Blk and the ∑l=1L‍∑k=1K‍Blk=L+K-1 constraints or alternative constraints, based on step one, are added to generate a preferred pattern hopefully quickly (see column G3 in Table 2). Pattern J in Table 2 represents an exceptionally difficult case, where a minimal pattern can be generated relatively quickly only if the decision maker’s preferences are disregarded.Understandably, decision makers prefer sequential cutting-and-welding patterns, where pipes are placed in relevant order and the end of one stock is welded to the beginning of the next. In the tree graph discussed in Section3.3, sequential patterns would correspond to paths.When all the pipes are shorter than the shortest stock, sequential patterns are evidently possible; in fact, every permutation yields a sequential pattern. When some of the pipes are longer than the shortest stock, sequential patterns are not always possible. For example, if 4-, 5-, and 9-meter pipes need to be produced from single-size, 6-meter stocks, then the permutation (9, 5, 4) generates a sequential pattern while the permutation (5, 9, 4) does not, because the 9-meter pipe would require two welds. For another example, there is no sequential pattern if three 11-meter and three 3-meter pipes need to be produced from single-size, 6-meter stocks, but there is a minimal, nonsequential pattern involving seven stocks, six welds, and five cuts (see Figure4). (Six stocks, three welds, and three cuts will generate three 11-meter pipes and three 1-meter segments. The seventh stock will be cut in three 2-meter segments, each to be welded to one of the three 1-meter segments to generate three 3-meter pipes.)Figure 4
Nonsequential cutting-and-welding pattern for producing three 11-meter pipes and three 3-meter pipes from seven single-size, 6-meter stocks.Sequential cutting-and-welding patterns may be generated by adding the constraints(5)Bkl+Bkj≤1,l=1…L-3,j=l+2…L,k=1…Kand ∑l=1L‍∑k=1K‍Blk=L+K-1 to the objective function ∑l=1L‍ol∑k=1K‍Blk (see Section 4.2).The number of additional constraints increases quadratically in the number of stocks. If decision maker preferences are ignored, the program generates feasible sequential cutting-and-welding patterns with moderate running times for moderate Ks and possibly large running times for large Ks (see column G4 in Table2). If decision maker preferences are taken into consideration, the program generates minimal sequential cutting-and-welding patterns with running times varying from (milli)seconds to hours (see pattern J in Table 2).


## 4.4.2. Reformulating the Pattern Conversion Problem for Sequential Cutting-and-Welding Patterns and Decision Maker Preferences

For single-size stocks (6 meters, as in the case which motivates this article, or different), sequential cutting-and-welding patterns may also be generated by formulating an assignment-like problem, a permutation of pipes, wherexlj∈{0,1} represents the place of pipe l in the permutation and where the objective function is arbitrary, because generating one sequential pattern is sufficient:(6)∑l=1Lxlj=1j=1…L∑j=1Lxlj=1l=1…L∑j=1m-1∑l=1Lslxlj≥km6000m=1…L∑j=1m∑l=1Lslxlj≤km+26000m=1…Lxlj∈0;1l=1…L,j=1…Lkm∈Nm=1…L.The∑j=1m-1‍∑l=1L‍slxlj≥km6000 constraints ensure that the aggregate size of the first m-1 pipes in the permutation is at least km6000; in other words, there are at least km stocks for the first m-1 pipes. The ∑j=1m‍∑l=1L‍slxlj≤(km+2)6000 constraints ensure that the aggregate size of the first m pipes in the permutation is (km+2)6000 at the most; in other words, as well as the leftover segment from stock km, an additional stock may be used for producing pipe m. These two sets of constraints ensure that pipe m+1 in the permutation has one weld at the most and that the program generates a minimal sequential cutting-and-welding pattern, albeit one which disregards decision maker preferences (see column S1 in Table 2). The program running times are moderate for all patterns with the exception of J, which does not have a minimal integer solution.Decision maker preferences may be taken into consideration, but the pattern conversion problem formulated as a mixed integer linear program is more cumbersome; ifWj∈{0;1} is the binary variable indicating whether the jth pipe in the permutation is welded or not and wl∈{0;1} is the binary variable which shows whether the lth pipe in the original indexing is welded or not, then (7)∑l=1Lolwl→mins.t.:∑l=1Lxlj=1j=1…L∑j=1Lxlj=1l=1…L∑j=1m-1∑l=1Lslxlj≥km6000m=1…L∑j=1m∑l=1Lslxlj≤km+16000+Wm6000m=1…L∑l=1LWl=K-1xlj+Wj≤wl+1l=1…L,j=1…Lxlj∈0;1l=1…L,j=1…Lkm∈Nm=1…LWm∈0;1m=1…Lwm∈0;1m=1…LThe∑j=1m‍∑l=1L‍slxlj≤(km+1)6000+Wm6000 constraint ensures that pipe km in the permutation is welded if Wm=1. The ‘original’ index of pipe km is unknown, but the xlj+Wj≤wl+1 constraint ensures that pipe l is welded if pipe l is in the jth place in the permutation and the jth pipe in the permutation is welded.Unfortunately, the algorithm running times turn out to be large, longer than seconds just to generate a feasible solution (see column G5 in Table2).In summary, sequential cutting-and-welding patterns may be generated in simple circumstances and possibly complex ones too, while decision maker preferences may be taken into account in simple circumstances, but not in complex ones.


## 5. Results and Discussion

The algorithm suggested in this article (see Section4.1) was applied to the case of a Hungarian manufacturer of fixed firefighting systems (see Section 4.4). The company uses single-size, 6-meter stocks (see Table 1 in Section 1 for illustrative pipe sizes and quantities), the stock price is π1, and the welding price πw is generally low. However, increases in demand lead to increases in both welding time and opportunity cost, which in turn lead to increases in welding price.The software used—BarCut (version 2.1)—was suitable for both single- and multiple-size stocks. The number of stocks per cutting-and-welding pattern was limited toK=10 and, to reflect the opportunity cost, πw was set as a percentage (90%, 49%, and 30%) of π1, assumed invariable; Tables 3, 4, and 5 show the minimal cutting-and-welding patterns for the three welding prices.Table 3
Minimal cutting-and-welding patterns forπw=0.9π1.
Pattern Stock quantities Weld numbers Pipe sizes Repeats 1 1 0 2000+4000 1 2 1 0 4500 2 3 1 0 4680 11 4 1 0 5000 1 5 1 0 5096 1 6 1 0 5250 1 7 1 0 5260 1 8 1 0 5500 1 9 1 0 5660 1 10 1 0 6000 2 11 2 1 7200+4500 2 12 2 1 7000+4660 2Table 4
Minimal cutting-and-welding patterns forπw=0.49π1.
Pattern Stock quantities Weld numbers Pipe sizes Repeats 1 1 0 5260 1 2 1 0 2000+4000 1 3 3 2 4500+4500+4500+4500 1 4 2 1 4680+7200 2 5 2 1 5000+7000 1 6 1 0 4680 8 7 1 0 5096 1 8 1 0 5500 1 9 1 0 5660 1 10 1 0 6000 2 11 2 1 4680+7000 1 12 1 0 5250 1 13 1 0 4660 2Table 5
Minimal cutting-and-welding patterns forπw=0.3π1.
Pattern Stock quantities Weld numbers Pipe sizes Repeats 1 1 0 6000 2 2 2 1 4680+7200 2 3 1 0 2000+4000 1 4 1 0 5660 1 5 1 0 5500 1 6 1 0 5260 1 7 1 0 5250 1 8 2 1 5000+7000 1 9 4 3 4660+4660+4680+4680+4680 1 10 2 1 4680+7000 1 11 3 2 4500+4500+4500+4500 1 12 4 3 4680+4680+4680+4680+4680 1 13 1 0 5096 1Whenπw is high (πw=0.9π1), welding is used only when inevitable, for pipes longer than 6 meters. To generate the optimal equivalent cutting plan, the program running time is 8.45 seconds and involves 30 stocks and 4 welds (see Table 3).Whenπw is moderate (πw=0.49π1), welding is used less restrictively. To generate the optimal equivalent cutting plan, the program running time is 8.47 seconds and involves 29 stocks and 6 welds (see Table 4).Whenπw is low (πw=0.3π1), welding is used more liberally. To generate the optimal equivalent cutting plan, the program running time is 8.76 seconds and involves 27 stocks and 12 welds (see Table 5). Since the aggregate length of the leftover segments is just 5.034 meters, lower welding prices and further investigation—with πw<0.3π1—would be useless.Optimal equivalent cutting plans need to be converted to minimal cutting-and-welding patterns. Since all the pipes in these optimal equivalent cutting plans were either shorter than 6 meters or involved only two stocks, the conversions are easy; more complex cases were analysed in Sections4.2 and 4.4.


## 6. Conclusions

Due to its practical relevance across the entire industrial spectrum, the cutting-stock problem continues to be studied intensively in operations research and to generate sophisticated algorithms solving it. Some of these were translated into open-source or commercial programs, catering to the diverse user needs and circumstances, at various prices and under various terms and conditions.Since the first cutting-stock problems studied in operations research were one-dimensional, increasing dimensionality and diversifying methodology became natural extensions. This article is one of only a handful to focus on the effect of welding on the one-dimensional cutting-stock problem instead; it is also the first of its kind to limit the number of welds to one, to conform to best practice safety requirements for fixed firefighting systems in the construction industry.This article defined the cutting-stock problem with welding (see Section3.2) and argued that it can be converted to an equivalent cutting-stock problem with multiple-size stocks (see Section 4.1), a problem that can be solved with existing algorithms and software (see Section 3.1). For probably the first time in the literature, it also defined the pattern conversion problem, whereby cutting patterns are converted to cutting-and-welding patterns as a mixed integer linear program.Optimal solutions to the bounded cutting-stock problems with welding were investigated with the algorithm suggested in this article and constraints were examined (see Section4.1). The implications for unbound cutting-stock problems with welding could not be ascertained (see Section 4.3); however, the algorithm was found to generate a heuristic solution at the least (see Section 4.4).Converting equivalent cutting patterns to cutting-and-welding patterns is fundamental to the algorithm suggested in this article. For sequential cutting-and-welding patterns and decision maker preferences, this pattern conversion problem was (re)formulated as a mixed integer linear program (see Section4.4.2).The cutting-stock problem with welding studied in this article was one-dimensional; increasing dimensionality is a natural extension. However, two- and three-dimensional cutting-stock problems with welding present further complexities which require further research and algorithms different than the one suggested in this article; more likely than not, large instances cannot be solved to optimality.



---

*Source: 6507054-2019-03-03.xml*