*Article* **New Algorithm to Solve Mixed Integer Quadratically Constrained Quadratic Programming Problems Using Piecewise Linear Approximation**

**Loay Alkhalifa 1,\* and Hans Mittelmann <sup>2</sup>**


**Abstract:** Techniques and methods of linear optimization underwent a significant improvement in the 20th century which led to the development of reliable mixed integer linear programming (MILP) solvers. It would be useful if these solvers could handle mixed integer nonlinear programming (MINLP) problems. Piecewise linear approximation (PLA) is one of most popular methods used to transform nonlinear problems into linear ones. This paper will introduce PLA with brief a background and literature review, followed by describing our contribution before presenting the results of computational experiments and our findings. The goals of this paper are (a) improving PLA models by using nonuniform domain partitioning, and (b) proposing an idea of applying PLA partially on MINLP problems, making them easier to handle. The computational experiments were done using quadratically constrained quadratic programming (QCQP) and MIQCQP and they showed that problems under PLA with nonuniform partition resulted in more accurate solutions and required less time compared to PLA with uniform partition.

**Keywords:** mixed integer nonlinear programming; piecewise linear approximation; branch and bound

## **1. Introduction**

The rapid advances of Linear Programming (LP), Non-Linear Programming (NLP), and Mixed Integer Linear Programming (MILP) techniques and algorithms in the 20th century led to the development of robust MILP solvers that can easily handle problems with millions of variables. On the other hand, methods that deal with Mixed Integer Non-Linear Programming (MINLP), which is the most difficult class of optimization, started to improve recently. Even with the current improvements in the MINLP solvers, it would be a great step forward if MINLP problems could be solved globally by MILP solvers. In principle, this can be done by approximating the MINLP problem by an MILP one, but solving this approximation by an MILP solver will probably be harder than solving the original problem by an MINLP solver. Recent discussions about software solvers and their development can be found in [1,2]. More detail about MINLP and their algorithms can be found in [3–6], and a recent general survey was introduced by [7]. For some real life optimization applications, we refer to [8–11].

One of the methods to remodel MINLP as MILP is the piecewise linear approximation (PLA) ([7]). This method takes an advantage of the fact that any continuous function can be approximated by a piecewise linear one. Replacing every nonlinear function in the MINLP model by their PLAs will yield an MILP model. Because of the size of the new approximated model, the PLA was not introduced to do full approximations to the MINLP models. Instead, it was used mostly to find linear under/over estimators to some of the functions involved in the models.

The procedures of approximating a nonlinear function *<sup>f</sup>*(*x*), where *<sup>x</sup>* <sup>∈</sup> [*xl*, *xu*] <sup>⊆</sup> <sup>R</sup>, by a piecewise Linear (PL) function are simple. First, the domain of the variables *x* is

**Citation:** Alkhalifa, L.; Mittelmann, H. New Algorithm to Solve Mixed Integer Quadratically Constrained Quadratic Programming Problems Using Piecewise Linear Approximation. *Mathematics* **2022**, *10*, 198. https://doi.org/10.3390/ math10020198

Academic Editors: Humberto Rocha and Ana Maria Rocha

Received: 23 November 2021 Accepted: 4 January 2022 Published: 9 January 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

divided into *n* intervals by introducing the breakpoints *x*<sup>0</sup> = *xl* < *x*<sup>1</sup> < *x*<sup>2</sup> < ··· < *xn* = *xu*. Then the function *f* is evaluated at each breakpoint, and the lines that connect the points (*xi*, *f*(*xi*)) and (*xi*+1, *f*(*xi*+1)) form the desired PL function, denoted by *f* . The PLA idea was also extended to higher dimensional functions.

Increasing the number of breakpoints will increase the accuracy of the approximation, but it will result in problem size growth. This major drawback may restrict the PLA benefits to functions of only few dimensions. Ref. [12] discuss minimizing the number of breakpoints needed to approximate a nonlinear function up to a given tolerance. This subject will not be discussed here. When doing PLA, introducing breakpoints requires adding both binary and continuous variables to the optimization problem in addition to new constraints. This is done by setting the binary variables to be SOS1 or SOS2 (please see [13]). The number of the new variables and constraints may increase exponentially with the number of dimensions of the function and it varies depending on the model used to do the PLA.

The following section will present a brief literature review on the PLA modeles. The remainder of the paper is organized as follows: in Section 2, few approaches on how to improve the PLA models are introduced. One approach shows how to take an advantage of a local solution to choose the breakpoints by nonuniform partitioning, and our contribution will be using this partitioning to produce better PLA. The other approach is to apply the PLA on only a part of the optimization problem. The computational results are given in Section 3, where the tests are applied to continuous and discrete problems.

## *Literature Review*

PLA dates back to the 1950s (see, for example, [14–16]), and since then, many PLA models were introduced. The convex combination model (CC) (also called the *λ*-model in some sources) is one of the most common PLA models and it was introduced by [15]. Another model that was introduced by [14] is the incremental model. The incremental model requires one less binary variable and one less continuous variable compared to the CC model, but it needs nearly twice the number of new constraints. Modifications were done to the CC model and the incremental model resulting in the disaggregated convex combination model ([16,17]) and the multiple choice model ([18]), respectively. Piecewise linear relaxation techniques are widely used by many algorithms, and these techniques are different from PLA, even though they share some steps. In this paper, we are interested only on PLA, and we refer to [19–21], for further reading about piecewise linear relaxations.

The efficiency of MILP solvers will be affected if the PLA is done using many breakpoints, especially for higher dimensional functions. More accurate PLA can be obtained by increasing the number of breakpoints, but in all models mentioned above, the introduced binary variables will be almost as many as the breakpoints. Therefore the MILP solvers might not be able to deal with the size of the resulting MILP problem. Introducing less breakpoints will result in small approximated problems but it might lead to a bad approximation.

Many attempts have been made to deal with the size issues, but these attempts do not resolve the problem completely. A major improvement in this area took a place when [22,23] introduced a technique that allows PLA models to use dramatically fewer binary variables. They applied the technique to both versions of the convex combination model and denoted it by logarithmic model, and it was later applied to other PLA models. To do the PLA with *n* + 1 breakpoints using the logarithmic model, only log2 *n* binary variables are required, instead of approximately *n* required by other PLA models. In this paper, we will use the CC and logarithmic disaggregated convex combination (LOG) models to do the computational experiments on quadratically constrained quadratic programming (QCQP) and Mixed Integer QCQP (MIQCQP).

A good overview of the models mentioned in this section is presented by [24], and it was shown that they are equivalent in terms of the feasibility of their solutions. In term of tightness, it is desired for a PLA model to be locally ideal (the vertices of its LP relaxation satisfy the integrality constraints of the original MINLP problem). Ref. [25] shows that the incremental model is superior to the CC model since the incremental model is locally ideal (this is supported by the computational comparison that will be discussed below). Ref. [23] proves that all PLA models mentioned earlier are locally ideal except the CC model. However, the CC model has the sharpness property, i.e,. the projection of the vertices of the model onto the original set of the variables is exactly the convex hull of the set. Moreover, it can be shown that any locally ideal model is sharp. More recent theoretical comparison between the models was given by [26].

In the computational experiments made by [23], they approximated functions with one variable in 100 test instances, and used CPLEX to solve the PLAs. It was observed that for less than 10 breakpoints, all models performed well with the multiple choice model being slightly better. As the number of breakpoints increases, the logarithmic models started to gain the upper hand. When 33 breakpoints were used, the logarithmic models are almost 20 times faster than the incremental model, which is more than two times faster than the CC and multiple choice models. The disaggregated convex combination is much slower than the rest. Similar outcomes resulted from testing 100 problems where the approximated functions have two variables. A less extensive experiment was done by [27], and it was concluded that in some cases, it is better to use the incremental model rather than the logarithmic one, even though the latter has smaller size.

## **2. Improving PLA Models**

In this section, a few approaches to improve the PLA models will be presented. Since PLA requires introducing many binary and continuous variables and constraints, it was not studied as a stand-alone method to solve MINLP problems until recently. It is usually used as a tool in optimization algorithms to find local solutions or to under/over estimate some of the nonlinear functions. For PLA models to completely transform an already hard MINLP problem and produce an MILP problem that is easier than the original to be handled, more improvements on these models are needed. Note that even if the targeted problems in this paper have many variables, the PLA models will be applied separately only to functions of two variables or less.

One approach to improve the models is to choose the breakpoints such that the variable domain is nonuniformly partitioned. This approach was motivated by the desire to produce an accurate approximation with reasonable problem size. Unfortunately, this is rarely possible since an accurate approximation requires many breakpoints. One of the methods to overcome this issue is to study how to partition a domain. Most existing PLA models choose the locations of breakpoints based on a uniform partitioning of the domain. The approach proposed in this section, namely a nonuniform partitioning, leads to a better PLA model than the one produced by uniform partitioning with the same number of breakpoints. The details are given in Section 2.1.

Another approach that will be presented in this section is applying the PLA partially to problems with many nonlinear functions. Given a complicated MINLP problem, applying the PLA to only some of its nonlinear constraints will not make the problem solvable by an MILP solver, but it might make the problem less complicated for MINLP solvers. The idea is to identify complicated nonlinear constraints and approximate some of them by linear ones, then the modified problem is solved using MINLP solvers. An algorithm that identifies these constraints and approximates them will be provided in Section 2.2.

## *2.1. Choosing Breakpoints by Nonuniform Partitioning*

Most PLA models, that are used within the context of optimization, rely on uniform partitioning of variable domains. A few methods to do nonuniform partitioning were introduced within other contexts. For example, [28] used nonuniform partitioning to approximate a one dimensional curve. The idea is to add more breakpoints in the part of the domain where the function has higher curvature. This method is done by solving a shortest path problem, and it was later used within the PLA approach for one and two dimension by [29]. Other methods were introduced to use nonuniform partitioning to get piecewise convex/linear relaxations, such as the one proposed by [30].

The partitioning method suggested in this section is to build the partitioning around a local solution. The density of breakpoints increases as they get closer from both sides to the local solution, which itself is a breakpoint. Assume the local solution of a variable *l* ≤ *x* ≤ *u* is *x*∗, then a possible partitioning is to have a breakpoint in the halfway in the interval from the upper/lower bound to *x*∗, then another point halfway toward *x*∗ and so on. This partitioning can be given by using the formulas

$$\mathbf{x}^\* + \frac{\mathbf{u} - \mathbf{x}^\*}{k^i} \qquad \text{and} \qquad \mathbf{x}^\* - \frac{\mathbf{x}^\* - l}{k^i}, \tag{1}$$

for *k* = 2 and *i* = 1, 2, ... , to get the breakpoint values on both sides of *x*∗, as shown in Figure 1A.

**Figure 1.** Partitioning Using the Formulas *x*<sup>∗</sup> + *<sup>u</sup>*−*x*<sup>∗</sup> *ki* and *<sup>x</sup>*<sup>∗</sup> <sup>−</sup> *<sup>x</sup>*∗−*<sup>l</sup> ki* .

The problem with the case *k* = 2 is that it leaves half of the interval between the upper/lower bound and *x*∗ without any breakpoints, which may affect the accuracy of the PLA. Thus, giving *k* different values between one and two, as in Figure 1B,C, may yield better partitioning. It can be noticed that as *k* gets closer to one, the density of breakpoints shifts away from *x*∗. If *x*∗ happened to be at or very close to one of the bounds, the partitioning will be on one side only. In the case that the approximated function has two variables, the same logic is applied to both domains.

The PLA using this partitioning was tested for many values of 1 < *k* < 2 against PLA with uniform partitioning. The results show that models with nonuniform partitioning were solved faster and yielded better solutions to most of the tested instances. Details about the targeted optimization problems and the test results will be given in Section 3.

## *2.2. Partial PLA*

In this section, PLA will be performed only on parts of a given MINLP problem, instead of approximating all nonlinear functions. This is done by targeting complicated nonlinear functions be handled by PLA, leaving the remaining functions unchanged. The goal of this approach is to avoid introducing unnecessary variables that result from approximating simple functions. To test this approach, an algorithm is introduced to deal with problems having many nonlinear constraints by picking one constraint at every iteration and approximating it, until enough constraints are replaced.

Assume the algorithm is applied to an MINLP problem with *x*∗ and *f* ∗ as its global optimal solution and objective function value, respectively. The algorithm starts by solving the problem (before doing any PLA) using an MINLP solver for a few nodes before it stops the solving process when a specified number of nodes, *N*, is reached. Then all nonlinear constraints are identified, and since the solving process was interrupted, using the current node solution will probably result in some of these constraints being violated. Now all nonviolated constraint are considered to be easy since the solver was able to satisfy them within few nodes, so the PLA will not be applied to these constraints.

Now the algorithm picks a constraint from the violated ones to be approximated using a PLA model, and this constraint is suggested to be the most violated one. As a result, the problem now has one less nonlinear constraint. Then the process is repeated until the problem has no violated constraints. Note that some of the nonlinear constraint will not be replaced, so the problem is still an MINLP one. At this point, the problem is solved regularly to produce a solution *x*∗ to the modified problem with a function value *f* ∗ . | *f* <sup>∗</sup> − *f* ∗| is evaluated and the solving times of the original and modified problems are compared. Algorithm 1 shows the steps of the partial PLA approach on MIQCP problems, for some <sup>&</sup>gt; 0 and *<sup>k</sup>* <sup>∈</sup> <sup>N</sup>.

With each iteration, one constraint is replaced by its PLA. Obviously, if *k* is large enough, then all violated constraints will be replaced and the resulting problem will probably be harder to solve because of the size. The computational experiments with large *k* came as expected and produced extremely large problems. Then *k* was set to one, i.e., PLA was applied to only the most violated constraint in the first iteration. For some test instances, both PLA models, that were introduced in the previous section, produced modified problems that were solved faster than the original ones, with similar solution and objective value. As the number of replaced constraints increases, the modified problem gets more complicated. Most of the tested instances appeared to be better off without PLA if *k* ≥ 3. In Section 3, a summary of the test instances will be presented in addition to the main findings on applying PLA to only parts of these instances.

## **3. Computational Experiments**

This section presents detailed reports on computational experiments that target QCQP and MIQCQP problems. The approaches that were introduced in the previous section can be applied to MINLP problems, but they were implemented to test the quadratic problems only. The same procedures can be applied to the MINLP problems by modifying the code that implements the procedures to allow it to identify other non linear functions beside the quadratic ones. Most of the chosen problems are not trivial and are based on different real world applications. The QCQP problems were taken from the kall instances in the MINLPLib library (http://www.minlplib.org/index.html, accessed on 15 May 2021), whereas the MIQCQP problems were taken from both MINLPLib and QPLIB (http://qplib. zib.de/accessed on 15 May 2021). Two dimensional functions are involved in all of the instances, so 2d PLA is required.

The nonlinear functions in the instances are approximated by linear ones using the CC and LOG models. If the breakpoints needed for CC and LOG are determined using nonuniform partitioning, then the models will be called NCC and NLOG. These four models are also used to do partial PLA to the test instances by approximating all the nonlinear functions in one constraint.

The code that implements the PLA models were written using PySCIPOpt (http: //scip-interfaces.github.io/PySCIPOpt/docs/html/index.html, accessed on 15 May 2021), which is a Python interface for the global solver SCIP. The tests were applied to the instances several times before taking the average results. After the instance is read by SCIP, all quadratic constraints (or general nonlinear constraints, in case the instance is an MINLP one) are identified before the domain of every variable involved in a quadratic function is partitioned (uniformly or nonuniformly). Then SCIP adds all necessary variables and constraints needed to replace the targeted function. Finally, any quadratic constraint is deleted from the instance and linear constraints, that approximate the deleted ones, are added. Now the instance is written in a format that can be read by MILP solvers.

The local instance solutions, that are needed for the nonuniform partitioning, are generated using the solver Knitro. The comparison between the uniform and nonuniform partitioning is determined through solving the MILP problems resulting from applying CC, LOG, NCC, and NLOG to the test instances. The MILP problems are solved using CPLEX 12.10 with its default settings, and the computations are done in a Linux machine with Intel Xeon E5-2620 2GHz processor. The time limit for each problem is set to one hour.

The partial PLA tests are done by solving the original instances and the same instances with one constraint replaced. The instances are solved using SCIP Optimization Suite 6.0.0 on a Linux machine with Intel Core i5-7y54 1.2GHz processor. The default solver settings were used with a time limit of two hours. The results of the computational experiments will be described in detail in the following sections.

## *3.1. Continuous Variables*

The computational results that are reported in this section are for the kall instances, where the objective is linear and the constraints are linear and quadratic. The quadratic constraints contain up to two functions with two variables of the forms (*x* + *y*)<sup>2</sup> or *xy*. Moreover, one variable functions of the form *x*<sup>2</sup> appear in the constraints of some of the problems.

Statistics of the instances are given in Table 1, where seq# is the sequential number that will refer to the corresponding instance throughout the section. The number of variables is shown under #v, and #cons (q) represents the total number of constraints including (q) quadratic ones. The best objective values found so far (according to the MINLPLib library) are entered under the obj val column header. All objective values shown in the table are proven to be the global optimum by at least 3 global solvers except instances 2, 3, 5, and 12.

The instances were solved regularly by SCIP, with time limit of 2 h. The solving times are recorded and presented in seconds in the last column of Table 1. For some instances, the limits, machine memory (ML) or time (TL), were reached before the instance is solved to optimality. Moreover, it can be observed from the solving times that some instances are trivial and solved quickly but others took time to be solved. Solving the instances here was not intended to find their global solutions, since the best solutions are already found and listed in the library and no further improvement to the solutions can be done. Instead, they were solved to give an idea about their difficulty levels, and to have a reference when it is needed to compare their results to the modified problems results.


**Table 1.** Statistics of continuous test instances, and the solving time by SCIP.

Before discussing the results of instance PLAs, one important factor about the instances has to be taken into account: the sizes of variable domains. When the variable involved in PLA of a function has a large domain, the domain will need more breakpoints to get a good approximation. However, introducing many breakpoints will affect the size, so the number of breakpoints for the computational tests is set to 10 for all domains. The domain size for each variable in the tested instances ranges between 1 and 18, with average size of 7.25 per domain. Therefore, 10 points should be enough to get good models for test purposes.

To compare between the PLA models with respect to the sizes of the produced problems, the instances were transformed into MILP problems by the models CC and LOG (using nonuniform partitioning would give the same size). Each instance was approximated by these models using 10, 20, and 30 breakpoints. Then the average numbers of constraints and binary/continuous variables per problem is recorded for each set of breakpoints, as shown in Table 2. It is apparent from the table that there is a significant advantage for the model LOG in terms of needed number of binary variables and constraints. Moreover, it will be shown later that this advantage is not outweighed by the CC model's advantage of having many fewer continuous variables.


**Table 2.** Average sizes per problem produced by CC and LOG models using 10, 20, and 30 breakpoints.

While Table 2 gives enough insight on the problem sizes, detailed statistics for every problem approximated using 10 breakpoints is given in Table 3. This table makes it easier to track the detail of every tested problem and compare between its size and computational results. It should be expected that most problems will not be solved easily by CPLEX due to the large number of binaries and constraints.


**Table 3.** The sizes of the instances produced by CC and LOG models with 10 breakpoints.

## 3.1.1. Uniform vs. Nonuniform Partitioning

The computational experiments on solving the MILP problems approximating the selected instances were made by CPLEX with a time limit of one hour per problem. The objective of these experiments is to compare between uniform and nonuniform partitioning. The nonuniform partitioning is done using different values for the parameter *k* in the formulas in Equation (1).

Table 4 compares the results obtained from solving the CC and NCC problems, with *k* = 1.5, 1.7. For each model, the solving time is listed in seconds or as TL if the time limit is reached. The objective value of the best integer solution found within the time limit is listed under BI, and F means the solver failed to find an integer solution. Initially, 10 breakpoints were used by the models, but CPLEX failed to find a solution for most of the problems, so they were regenerated using 7 points. The third column measures the difference, if applicable, between the best integer value, *f* ∗ and the best value of the original instance, *f* <sup>∗</sup>, which can be found in Table 1. Smaller | *f* <sup>∗</sup> − *f* ∗| value indicates that the approximation is acceptable. Note that for problems that reached time limit, the best integer value could keep improving if there is no time limit.

Given the fact that most of the original instances were solved by SCIP to global optimality within less than an hour (Table 1), it can be confirmed that complete transformation of MINLP problems into MILP ones will not make the problems easier, especially when approximating many functions. Nonetheless, this is not the goal of the experiments since the main purpose is to compare partitioning methods for PLA models. The aspects of the comparison between uniform and nonuniform partitioning will be the accuracy of the approximation and the time needed to solve the approximation.


**Table 4.** Results of solving MILP problems produced by CC and NCC models using 7 breakpoints.

The data listed under the time columns indicate that all models are close in terms of the number of problems that were solved within the time limit. However, for problems that reached the time limit, the model with uniform partitioning failed to find an integer solution in eight problems, compared to four problems for the NCC model with *k* = 1.5. This implies that problems generated by CC models with nonuniform partitioning usually find feasible solutions faster than with uniform partitioning. The same outcome resulted when other nonuniform cases were tested for *k* = 1.4, 1.6, 1.8. Even when both uniform and nonuniform cases resulted in a problem that produced an integer solution within the time limit, the gap in the nonuniform case is smaller most of the times. Therefore, it can be concluded that problems produced by NCC models are usually solved faster than the ones produced by CC models.

The quality of the approximation is better tested without the time limit, where the solver runs until the global solution is found, and then the solutions of the original and approximated problems are compared. In spite of that, the table provides enough data to compare the quality of CC and NCC approximations. It can be observed that the integer solution is the same as the solution of the original instance in many problem for both cases of nonuniform partitioning, while the uniform partitioning never produced an identical integer solution to the original one. Moreover, for the cases that the integer solution is not the same as the original one, the difference between the two solutions is mostly less in the NCC cases.

The computational results for solving problems produced by the models LOG and NLOG are summarized in Table 5. The test setting and comparison aspects for these models are the same as the CC and NCC models, except for the number of breakpoints where 11 is used for this test. The outcomes also turned out to be similar: the nonuniform partitioning improved the models in both speed and accuracy. Both NLOG models resulted in more problems that were solved within time limit, compared to LOG models; and when a problem is solved within time limit for all models, almost always the NLOG problem needs less solving time. Moreover, the difference | *f* <sup>∗</sup> − *f* ∗| is mostly smaller in the NLOG cases. It should be mentioned that in nonuniform partitioning, having a local solution as one of the breakpoints helped improving the model's quality.


**Table 5.** Results of solving MILP problems produced with LOG and NLOG models using 11 breakpoints.

Comparing between the data in Tables 4 and 5 makes it clear that the logarithmic models are significantly better than the non logarithmic ones. This confirms the fact that for a PLA model, increasing the number of binary variables has more negative impact than increasing the continuous variables. Even though the logarithmic models used 4 points more (11 compared to 7), which considerably affects the size, the solving times turned out to be much less than the times for the non logarithmic case. Therefore, using logarithmic models allows introducing more breakpoints and, consequently, producing more accurate approximation. For example, the average difference between optimal value of the original instance and approximation, | *f* <sup>∗</sup> − *f* ∗|, per LOG problem is 0.328, while it is 0.667 for CC problems.

The computational experiments in this section have shown that full PLA of MINLP problems will not make the new problems any better, yet they prove that the improvement of PLA models is promising. In addition to the major development of the PLA model caused by logarithmic formulation, different components of the model can also be improved. For example, it was demonstrated that nonuniform partitioning based on local solutions can add more improvement to the models. Finally, the uses of PLA are not limited to the full PLA; it can be useful if applied to only parts of an MINLP problem, as will be shown in the next section.

## 3.1.2. Partial PLA

PLA was applied partially to different QCQP and MIQCQP using Algorithm 1. If the number of approximated constraints is large, then the modified problem gets more complicated and the original problem is better off without this approximation. However, in this section, the algorithm is applied with one iteration to many instances belonging to different groups from the MINLPLib library. Interestingly, this approach worked on some instances, and produced problems that needed shorter solving times. Table 6 summarizes the statistics of some of these instances, in addition to computational results of solving them using SCIP with 2 h time limit.


**Table 6.** Statistics of different test instances, and the solving results by SCIP.

As can be seen in the table, SCIP failed to close the gap when solving instances 1, 2, and 3; but it succeeded for the other problems. The goal of testing these instances is to show that approximating one constraint per instance aids the solver to handle the instance better. For each modified instance Table 7 presents the solving time, the optimal objective value *f* ∗, and the difference between the optimal values of the original and modified instance.


**Table 7.** Computational Results of Problems Produced by Partial PLA Using 10 Breakpoints.

The results table shows that for the first three instances, SCIP was able to solve them and close the gap, except for the third instance, the gap was closed shortly after 2 h (when time limit was disabled) for the CC case, and the gap was ∞% in the LOG case. The solving time of the modified instance is mostly shorter than the original problem.

From instances with | *f* <sup>∗</sup> − *f* ∗| > 0, it can be implied that even if it is only one out of many constraints that was approximated, there will probably be an approximation error. These instances were approximated again with 15, 20, and 25 breakpoints, and that led to better optimal values but longer solving time. For example, when instance 1 was generated by CC with 15 points, SCIP needed 250 s to solve it and the objective value was 0.311; and with 25 points, it needed 440 s, yielding an objective value of 0.334.

An interesting finding is that the solving times of CC problems are shorter than those of LOG problems. This indicates that the models have similar performance when approximating problems with few variables using few breakpoints.

The experimental results suggest that partial PLA can produce less complicated problems with small or zero approximation error. Moreover, it was shown that LOG models have no advantage here in contrary to the case in the previous section. In the following section, similar computational experiments are performed on MIQCP problems.

#### *3.2. Mixed Integer Variables*

The PLA models, that were used in the previous section, were applied to problems where the variables involved in the quadratic terms can be integer. When introducing the breakpoints to an integer variable's interval, every integer value in the interval will be a breakpoint, so the number of breakpoints depends on the length of the interval. If this results in a large number of breakpoints, some integer values can be skipped so the number stays reasonable. Moreover, there is no need to have a convex combination of two

breakpoints since the variable cannot take noninteger values. For all noninteger variables involved in the quadratic functions, the PLA procedures are still the same.

The objective of the computational tests is the same as in the case of continuous variables: to test the uniform against the nonuniform partitioning, and to assess the performance of the partial PLA models. A summary of the test instances' statistics is given in Table 8, where they were solved by SCIP with a time limit of two hours. Instances 1, 2, and 3 were taken from the QPLIB library and the remainder are from MINLPLib instances.


**Table 8.** Statistics of MIQCP test instances, and the solving results by SCIP.

Based on the solving times in Table 8, it can be concluded that half of the tested instances are challenging and the other half are not. It should be mentioned that in instances 1, 2, and 10, only integer variables are involved in the quadratic functions, so no nonuniform partitioning is done for these instances (a breakpoint is introduced at every integer value in the interval). Tables 9 and 10 show the results of solving the problems produced by the convex combination and the logarithmic models with 11 breakpoints. The computations were done using CPLEX with 2 h time limit.

**Table 9.** Results of Solving MILP Problems Obtained from MIQCP Instances, Produced by CC and NCC Models Using 11 Breakpoints.


The results in the tables show that CPLEX failed to find an integer solution to 3 NLOG problems and 4 problems produced by the other models. For problems for which CPLEX found integer solutions, it can be observed that the problems with nonuniform partitioning are solved faster than the uniformly partitioned problems, for both logarithmic and nonlogarithmic models. The data under | *f* <sup>∗</sup> − *f* ∗| columns show that no clear advantage can be confirmed for any of the models in the accuracy of the approximation.

Partial PLA was applied to the same set of instances and the most violated constraint of each challenging instance was approximated using CC and NLOG models. As Table 8 shows, instances 1 and 2 have a relative gap of 305% and 1138%, respectively, after two hours of solving time. After PLA, SCIP reached the time limit and resulted in gaps of 53% and 1862% for the CC problems, and 200% and 774% for the LOG problems. The rest of instances resulted in better performances by the solver without PLA.

**Table 10.** Results of solving MILP problems produced with LOG and NLOG models using 11 breakpoints.


## **4. Discussion**

To summarize the results of the computational experiments, two comparisons will be discussed. The first comparison is between PLA models using uniform against nonuniform partitioning. QCQP and MIQCQP problems were approximated using CC, NCC, LOG, and NLOG models. Most of the MILP problems that resulted from the nonuniformly partitioned model were solved to optimality faster than the problems resulting from the uniform partitioning. For example, out of 20 instances, the nonuniformly partitioned logarithmic model (*k* = 1.5) failed to find an integer solution within the time limit only three times compared to 8 failures in the uniform partitioning case. For the other 12 instances that an integer solution was found by both models, the nonuniformly partitioned model was faster 11 times. Moreover, the optimal solutions are more accurate (closer or identical to the optimal solutions of the original problems) in the nonuniform partitioning models. It is worth mentioning that the both logarithmic models were better than the convex combination models in the continuous variables problems. Despite introducing more breakpoints to LOG and NLOG (which lead to more accurate solutions), their resulting problems were solved faster.

The other comparison is to discuss whether applying PLA partially on an optimization problem can be useful ot not. We tested many QCQP and MIQCQP problems by solving them by SCIP, then we use Algorithm 1 to replace one quadratic constraints by its linear approximation, then we solve it again by SCIP. The results showed that partial PLA led to an easier problem form several instances. For these instances, the average solving time was around 4818 s without PLA, while it was 1573 and 1598 for PLA using CC and LOG models, respectively. Even though more QCQP problems were solved faster without the partial PLA, it was useful for SCIP in many QCQP problems. Improving some of the steps in Algorithm 1 can decrease the difficulty in more instances. For example the violated constraints selection rule can be improved by taking into account other aspects like current feasible solutions, variables bounds, optimal solution bounds, etc.

With the improvement of MINLP solvers, it can be concluded that full transformation of an MINLP problem into an MILP one will not be beneficial. However, doing PLA partially or using it as a supporting tool within MINLP algorithms can be useful, especially after showing that PLA itself can be improved.

## **5. Conclusions**

The computational experiments performed on both continuous and mixed integer problems indicate promising results. It can be concluded that PLA models can be improved by using nonuniform partitioning depending on local solutions instead of uniform partitioning. Moreover, the tests have shown that some challenging QCQP and MIQCQP problems can be less challenging by applying partial PLA and replacing only one constraint by its linear approximation, which is only a small change to the original problem.

Some of the paper subjects can be considered for further research in the future. In this paper, we studied nonuniform against uniform partitioning, but it would be good research of our nonuniform partitioning was tested against other nonuniform partitioning methods. Moreover, it might be useful to do the partitioning depending on the function, so every nonlinear function could have its own domain partitioning. On the other hand, the partial PLA algorithm can be used as a tool of an existing MINLP algorithm. It can be improved by, for example, selecting a violated constraint based on all information that can be brought from the already explored nodes in the branch and bound tree.

**Author Contributions:** Writing—original draft, L.A.; H.M.; Writing—review & editing, L.A.; H.M. All authors have read and agreed to the published version of the manuscript.

**Funding:** The Deanship of Scientific Research, Qassim University.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Acknowledgments:** The researchers would like to thank the Deanship of Scientific Research, Qassim University for funding publication of this project.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**

