Loading [MathJax]/jax/output/SVG/jax.js
Research article Special Issues

Enhancing curve smoothness with whale optimization algorithm in positivity and monotonicity-preserving interpolation

  • This study integrated a metaheuristic optimization method, specifically the whale optimization algorithm (WOA), to enhance the positivity and monotonicity-preserving interpolation methods by optimizing the free shape parameter. While this free parameter offers flexibility in modifying the shape of the curve, improper selection can lead to visually unpleasing results. By applying an optimization method, this study introduced a more efficient approach to determine the optimal parameter value. To achieve an optimally smooth curve, three different smoothness metrics, including arc length, strain energy, and curvature variation energy, were minimized as objective functions. The resulting curves were then compared to identify the most effective smoothness metric. Results demonstrated that WOA effectively optimized the free shape parameters, and the curvature variation energy was proven to be the best smoothness metric as it produced the smoothest interpolation. Applications of this technique were demonstrated in preserving positivity for COVID-19 death cases and ensuring monotonicity of cumulative rainfall measurements.

    Citation: Salwa Syazwani Mahzir, Md Yushalify Misro. Enhancing curve smoothness with whale optimization algorithm in positivity and monotonicity-preserving interpolation[J]. AIMS Mathematics, 2025, 10(3): 6910-6933. doi: 10.3934/math.2025316

    Related Papers:

    [1] Salwa Syazwani Mahzir, Md Yushalify Misro, Kenjiro T. Miura . Preserving monotone or convex data using quintic trigonometric Bézier curves. AIMS Mathematics, 2024, 9(3): 5971-5994. doi: 10.3934/math.2024292
    [2] Noor Adilla Harim, Samsul Ariffin Abdul Karim, Mahmod Othman, Azizan Saaban, Abdul Ghaffar, Kottakkaran Sooppy Nisar, Dumitru Baleanu . Positivity preserving interpolation by using rational quartic spline. AIMS Mathematics, 2020, 5(4): 3762-3782. doi: 10.3934/math.2020244
    [3] Pakeeza Ashraf, Ghulam Mustafa, Husna A. Khan, Dumitru Baleanu, Abdul Ghaffar, Kottakkaran Sooppy Nisar . A shape-preserving variant of Lane-Riesenfeld algorithm. AIMS Mathematics, 2021, 6(3): 2152-2170. doi: 10.3934/math.2021131
    [4] Jin Xie, Xiaoyan Liu, Lei Zhu, Yuqing Ma, Ke Zhang . The C3 parametric eighth-degree interpolation spline function. AIMS Mathematics, 2023, 8(6): 14623-14632. doi: 10.3934/math.2023748
    [5] Fengyi Chen . A new GM2(2,1) model based on a C1 convexity-preserving rational quadratic interpolation spline. AIMS Mathematics, 2024, 9(7): 17917-17931. doi: 10.3934/math.2024872
    [6] Young Joon Ahn . G2/C1 Hermite interpolation of offset curves of parametric regular curves. AIMS Mathematics, 2023, 8(12): 31008-31021. doi: 10.3934/math.20231587
    [7] Xue Jiang, Yihe Gong . Algorithms for computing Gröbner bases of ideal interpolation. AIMS Mathematics, 2024, 9(7): 19459-19472. doi: 10.3934/math.2024948
    [8] A. H. Tedjani, A. Z. Amin, Abdel-Haleem Abdel-Aty, M. A. Abdelkawy, Mona Mahmoud . Legendre spectral collocation method for solving nonlinear fractional Fredholm integro-differential equations with convergence analysis. AIMS Mathematics, 2024, 9(4): 7973-8000. doi: 10.3934/math.2024388
    [9] Young Joon Ahn . An approximation method for convolution curves of regular curves and ellipses. AIMS Mathematics, 2024, 9(12): 34606-34617. doi: 10.3934/math.20241648
    [10] Guocheng Li, Pan Zhao, Minghua Shi, Gensheng Li . A hybrid framework for mean-CVaR portfolio selection under jump-diffusion processes: Combining cross-entropy method with beluga whale optimization. AIMS Mathematics, 2024, 9(8): 19911-19942. doi: 10.3934/math.2024972
  • This study integrated a metaheuristic optimization method, specifically the whale optimization algorithm (WOA), to enhance the positivity and monotonicity-preserving interpolation methods by optimizing the free shape parameter. While this free parameter offers flexibility in modifying the shape of the curve, improper selection can lead to visually unpleasing results. By applying an optimization method, this study introduced a more efficient approach to determine the optimal parameter value. To achieve an optimally smooth curve, three different smoothness metrics, including arc length, strain energy, and curvature variation energy, were minimized as objective functions. The resulting curves were then compared to identify the most effective smoothness metric. Results demonstrated that WOA effectively optimized the free shape parameters, and the curvature variation energy was proven to be the best smoothness metric as it produced the smoothest interpolation. Applications of this technique were demonstrated in preserving positivity for COVID-19 death cases and ensuring monotonicity of cumulative rainfall measurements.



    Curve interpolation plays a critical role in data analysis and numerical modeling. It is used to estimate values within the bounds of known data points [1]. Traditional interpolation methods, such as polynomial or spline interpolation, focus on providing a smooth curve that passes through given data points, but they often overlook the important characteristics that may exist in a dataset, such as positivity and monotonicity. Shape-preserving interpolation addresses this gap by ensuring that the interpolated curve not only fits the data points but also maintains these underlying properties of data. For example, positivity-preserving interpolation ensures that the interpolated function does not produce negative values when the original data are strictly positive, whereas monotonicity-preserving interpolation maintains the trend of the data points. This avoids introducing artificial fluctuations that could mislead interpretation and analysis.

    Over the years, positivity and monotonicity-preserving interpolation has received increasing attention and various techniques have been developed. Among these, splines and curves with shape parameters have become popular due to their ability to effectively control the shape of the curves. For example, Hussain et al. [2] developed a GC1 quadratic trigonometric spline with two shape parameters to preserve positivity and monotonicity in data. Although this scheme is simple, the resulting curve is rigid and does not allow for any shape enhancement because both shape parameters are constrained. To address this limitation, a rational cubic Ball curve with four shape parameters was proposed by Tahat et al. [3]. In this method, only one parameter was constrained to ensure monotonicity, and the remaining three are left as free parameters. This approach provided greater flexibility which allows users to modify the final curve's shape. Similarly, Ahmad et al. [4] developed a rational cubic Bézier function, expressed in terms of Ball control points, to preserve positive data. This method also involved four shape parameter but it provided less flexibility than Tahat et al. [3], as it only allowed two free parameters. However, despite the increased flexibility, these methods are limited to C1 continuity, which may result in visually less smooth interpolations.

    Additionally, researchers have explored rational spline based approaches to ensure positivity and monotonicity. Karim & Raju [5] and Abbas et al. [6] implemented rational cubic splines with three shape parameters to preserve the shape of positive and monotone data, respectively. A higher degree alternative, the rational quintic spline with three shape parameters, was introduced by Hussain et al. [7]. These studies achieved shape preservation by developing sufficient conditions on one of the shape parameters. Both Abbas et al. [6] and Hussain et al. [7] proposed C2 continuous interpolants, but the higher-degree approach [7] eliminated the need to solve a tridiagonal system to compute derivative values for C2 continuity as in [6]. However, the increased degree of the rational function raised the complexity. To overcome this issue, a nonrational quintic trigonometric Bézier curve was implemented by Mahzir & Misro [8,9] to preserve positive and monotone data. These studies incorporated two shape parameters, with one being constrained to ensure shape preservation. By employing a nonrational formulation, they reduced the complexity while maintaining the shape of data. Nonetheless, similar to other methods, these approaches relied on manual selection of free shape parameters.

    All of the interpolation techniques discussed [3,4,5,6,7,8,9] ensure positivity or monotonicity of data by imposing constraints on specific shape parameters. In addition, these techniques include free shape parameters which allow users to adjust the final shape of the curves based on their preferences. While this flexibility is advantageous, improper selection of these parameters can lead to interpolations that lack smoothness and visual appeal. Moreover, the selection of these free shape parameters is often based on visual comparison, which can be subject to human bias. This study aims to tackle these drawbacks by incorporating optimization algorithm into the positivity and monotonicity-preserving interpolation techniques. By determining optimal values for free shape parameters systematically, the proposed approach minimizes human error, enhances smoothness, and ensures visually pleasing interpolations while maintaining computational efficiency.

    Optimization algorithm is a procedure used to find the best possible solution to a given problem with minimal effort [10]. Optimization algorithms have been applied across various fields. For instance, Hu et al. [11] and Zheng et al. [12] utilized optimization techniques in curve interpolations, aiming to refine the shapes of rational quartic interpolation splines and quintic generalized Hermite interpolation curves, respectively. Swarm intelligence optimization algorithms, specifically the enhanced tunicate swarm algorithm and improved grey wolf algorithm have been implemented. Swarm intelligence optimization is inspired by biological group behavior; hence, it is simple, fast, and easy to implement into various applications [13]. Hu et al. [11] focused on minimizing strain energy as their objective function, while Zheng et al. [12] focused minimizing arc length, strain energy, and curvature variation energy. However, these studies only produce optimal interpolation curves without preserving the shape of data.

    The study by Li & Li [14] has solved the nonlinear curve fitting problem by incorporating the particle swarm optimization technique. Optimization has been used to find the optimal number of hidden knots, which is the key factor to achieve a good generalization. This method has proven to be effective in accurately fitting various challenging curve fitting tasks, including benchmark datasets, simulated spectral data, and measured data from high energy physics experiments, and has outperformed traditional numerical techniques. Optimization algorithms have also been applied into developable surfaces for shape optimization, such as the study by Hu et al. [15] that optimized the shape of shape-adjustable generalized cubic developable Ball surfaces by using an improved marine predators algorithm. This approach demonstrates superiority in solving shape optimization models for developable surfaces and in achieving precision and robustness in the optimization process. However, as of now, there is still lack of studies on the implementation of optimization in shape-preserving interpolation.

    In this study, whale optimization algorithm (WOA) by Mirjalili & Lewis [16] will be implemented into the positivity and monotonicity-preserving interpolation methods developed by Mahzir & Misro [8,9]. The WOA is a type of swarm intelligence optimization and has been proven to be one of the best in terms of stability when compared to other new swarm intelligence optimization algorithms, such as the moth-flame optimization algorithm, fireworks algorithm, dragonfly algorithm, crow search algorithm, butterfly optimization algorithm and pigeons algorithm [13]. Additionally, Mirjalili & Lewis [16] evaluated the efficiency of WOA by testing it on 29 mathematical benchmark optimization problems and comparing its performance against particle swarm optimization, gravitational search algorithm, differential evolution (DE), fast evolutionary programming, and evolution strategy with covariance matrix adaptation. Despite its simplicity and having fewer parameters, the results demonstrated that WOA is highly competitive with other meta-heuristic optimizers and superior to conventional techniques.

    The WOA has undergone various advancements to enhance its performance, primarily through hybridization with other optimization techniques or improvements in its search strategy [17]. For instance, Mostafa Bozorgi & Yazdani [18] addressed the issue of premature convergence in WOA by hybridizing WOA's exploitation capabilities with the strong exploration abilities of DE to generate better candidate solutions. The proposed algorithms were thoroughly tested against 25 optimization benchmark functions, and it outperformed the original WOA as well as seven other nature-inspired algorithms in terms of solution quality and convergence rate. Similarly, Kaur & Arora [19] improved the slow global convergence and exploration capabilities of WOA by introducing a chaotic WOA. This approach used different chaotic maps to adjust the critical parameters of WOA, which helps in balancing the local and global search abilities of the algorithm and leads to improved optimization results. WOA has also been successfully applied in solving real-world problems. A hybrid WOA was developed in Mafarja & Mirjalili [20] to solve feature selection problems, by combining the global search of WOA with the local search capabilities of simulated annealing (SA). The proposed method demonstrated superior performance than other wrapper-based algorithms. Furthermore, Chen et al. [21] developed a balanced WOA that incorporated Lévy flight and chaotic local search. This modified algorithm was applied to engineering design challenges, including tension or compression spring, welded beam, pressure vessel design, three-bar truss design, and I-beam design. The experimental results showed that this algorithm surpassed other optimization methods in terms of convergence speed.

    Moreover, an enhanced WOA (EWOA) was introduced by Singh et al. [22] to solve clustering problems. This improved version integrates tabu search and neighborhood search mechanisms to enhance search space exploration and accelerate convergence. The algorithm was proven effective through experiments on eight benchmark datasets and comparison with seven existing clustering techniques. Likewise, Zhou and Hao [23] developed an improved WOA (ImWOA) by integrating dynamic elastic boundary optimization strategy, advanced random searching mechanism, and combined mutation technique. Performance evaluations across multiple benchmark functions demonstrated that ImWOA outperformed five metaheuristic algorithms and three WOA variants. Its practical effectiveness was further validated through real-world engineering applications, where it achieved the lowest average manufacturing costs. WOA has also been successfully applied in construction management. Golmaei et al. [24] integrated WOA with building information modeling (BIM) for developing construction schedules. The algorithm utilizes 3D model data, structured within a directed design structure matrix (DSM), to define stability criteria, which are then incorporated into the WOA fitness function. Although the computational time varies depending on input parameters, the algorithm consistently generates fully executable schedules, demonstrating its reliability in construction planning.

    Despite these advancements, this study employs the fundamental WOA to maintain the simplicity of the proposed method. The primary objective is to determine the optimal shape parameter values and solve the smoothness problem arising from the flexibility of the free shape parameter. Additionally, this study seeks to identify the most effective smoothness metric by incorporating and analyzing three different smoothness metrics into the optimization process. This includes arc length minimization, strain energy minimization, and curvature variation energy minimization. Finally, the developed method is compared with conventional shape-preserving techniques to validate its efficiency and effectiveness.

    The rest of this paper is structured as follows: Section 2 presents the interpolation curve, which is the C2 quintic trigonometric Bézier curves with two shape parameters, together with the formula in obtaining the derivative values at knots. Next, the procedure of the WOA will be discussed in Section 3. Section 4 shows the implementation of the WOA optimization method into positivity and monotonicity-preserving interpolation. This section also describes the three smoothness problems that will be solved. After that, the results and discussion are presented in Section 5, and Section 6 concludes the study.

    In this study, the C2 quintic trigonometric Bézier interpolation curve from [9] will be used as the interpolant. Let {(xi,fi):i=0,1,2,,n} be a set of data defined over the interval [x0,xn] with x0<x1<x2<<xn. The C2 quintic trigonometric Bézier curve over each subinterval i=[xi,xi+1] is given by

    s(x)si(x)=P0(1sint)4(1αisint)+P1sint(1sint)3(4+αiαisint)+P2(1sint)2(1cost)(8sint+3cost+9)+P3(1cost)2(1sint)(8cost+3sint+9)+P4cost(1cost)3(4+βiβicost)+P5(1cost)4(1βicost), (2.1)

    where Pi for i=0,1,2,3,4,5 is the control point given by Eq (2.2) as follows:

    P0=fi,P1=fi+2hidi(4+αi)π,P2=fi+hi((4+αi)Dihi+4(3+αi)diπ)3(4+αi)π2,P3=fi+1hi((βi4)Di+1hi+4(3+βi)di+1π)3(4+βi)π2,P4=fi+12hidi+1(4+βi)π,P5=fi+1, (2.2)

    with hi=xi+1xi and t=π(xxi)2hi. The shape parameters αi,βi(4,1] are responsible in controlling the left end and right end of the curve, respectively. Parameters di and Di are the first and second order derivative values at knots calculated from the given data using the arithmetic mean method (AMM) [7] as given in Eqs (2.3) and (2.3), respectively:

    d0=Δ0+(Δ0Δ1)h0h0+h1,di=Δi+Δi12 for i=1,2,,n1,dn=Δn1+(Δn1Δn2)hn1hn1+hn2, (2.3)

    where Δi=fi+1fihi. Now, let Mi=di+1dihi.

    D0=M0+(M0M1)h0h0+h1,Di=Mi+Mi12 for i=1,2,,n1,Dn=Mn1+(Mn1Mn2)hn1hn1+hn2. (2.4)

    The WOA is inspired by the hunting strategy of a group of humpback whales, specifically their bubble-net feeding technique. In this strategy, one or more whales dive deep beneath a large group of prey, such as small fish or krill, and release bubbles in a spiral shape as they swim upward. These bubbles create a net that traps and concentrates the prey into a smaller region. The whales then swim upward through this bubble-net and engulf the prey. Figure 1, taken from [16], illustrates this strategy. For optimization purposes, this feeding mechanism is mathematically modeled into the following three phases:

    Figure 1.  Bubble-net feeding strategy of humpback whales [16].

    The WOA begins by locating the prey and encircling it. Since the exact position of the prey is unknown, WOA implements several search agents, Xi:i=1,2,3,,n, placed at random positions. The best search agent position, X, is identified by evaluating the fitness function. This position acts as the target prey and the positions of the other search agents are updated toward this best position using the following equations:

    D=|CX(t)X(t)|, (3.1)
    X(t+1)=X(t)AD, (3.2)

    where

    A=2ara, (3.3)
    C=2r. (3.4)

    Here, A and C are coefficient vectors, where a decreases linearly from 2 to 0 and r is a random vector in [0,1]. The variable t represents the current iteration, while X and X are the position vectors of the search agents and the best search agent obtained so far. The mathematical symbols | | and represent the absolute value and element-by-element multiplication.

    The bubble-net attacking method is the core of the bubble-net hunting strategy and it represents the exploitation phase in WOA. This phase involves two mechanisms, which are the shrinking encircling mechanism and spiral updating mechanism. These two mechanisms occur simultaneously as humpback whales swim around their prey in a shrinking spiral trajectory.

    The first behavior is modeled by the value of a in Eq (3.2), which decreases linearly within [0,2] over the iterations. This range of a also causes the coefficient vector A to lie within [1,1]. The second behavior is represented by a spiral equation that models the helix-shaped movement of the whales and is given as follows:

    X(t+1)=Deblcos(2πl)+X(t), (3.5)

    where D=|X(t)X(t)| is the distance between the ith search agent and the best solution obtained in the current iteration, b is a constant parameter for the logarithmic spiral, and l is a random number in [1,1].

    Since these two behaviors occur simultaneously, WOA assumes a 50% probability of using either the shrinking encircling mechanism or the spiral updating mechanism to update the search agents' positions. The mathematical representation is as follows:

    X(t+1)={X(t)AD, if p<0.5,Deblcos(2πl)+X(t), if p0.5, (3.6)

    where p is the random numbers in [0,1].

    In addition to updating positions toward the best solution, WOA also includes an exploration phase where the agents search outside the known search space and update their positions toward any random whale. This aims to globally search for other possibly better solutions. Exploration phase occurs when A lies outside the interval [1,1] and is mathematically represented by the following equations:

    D=|CXrandX(t)|, (3.7)
    X(t+1)=XrandAD, (3.8)

    where Xrand is a randomly chosen position vector for current iteration. In the following section, the WOA will be applied into the positivity and monotonicity-preserving interpolation.

    This study implements the positivity and monotonicity-preserving models developed by [8] and [9], respectively. Theorems 4.1 and 4.2 from these studies provide the conditions for the positivity and monotonicity-preserving interpolation that are developed on the shape parameters.

    Theorem 4.1 (Positivity-preserving interpolation [8]). The C2 quintic trigonometric Bézier interpolation curves in Eq (2.1) preserve the positivity of given positive data if the shape parameters αi and βi in each subinterval i satisfy the following conditions:

    βi(4,1]that produce positive and smooth interpolating curve, αi>max{2¯hidiπfi,4π¯hidi3π2fi+¯hi(4πdi+Di¯hi)}

    where ¯hi=hiji and ji>max{0,2dihi+4d2ih2i3Difih2i3πfi}.

    Proof. Refer to [8]

    Theorem 4.2 (Monotonicity-preserving interpolation [9]). The C2 quintic trigonometric Bézier interpolation curves in Eq (2.1) preserve the monotonicity of given monotone data if the shape parameters αi and βi in each subinterval i satisfy the following conditions:

    βi(4,1]which produces monotone curve, αi[li,ui]forli=min{0,2hidiπfi4,4πhidi3π2fi+4πdihi+Dih2i4},ui=max{1,2hidiπfi,4πhidi3π2fi+4πdihi+Dih2i}.

    Moreover, let pj for j=1,2,3,4 be the second terms in Pj, and the parameters ¯hi and ¯hi are determined as follows:

    {¯hi=hiji,ifp1>dfi2orp2>dfi2,¯hi=hiki,ifp3>dfi2orp4>dfi2,¯hi=¯hi=hi,elsewhere,

    where dfi=fi+1fi. Scaling factors, ji and ki, satisfy Eqs (4.1) and (4.2) as follows:

    ji>max{4πhidi(4+αi)πdfi,4(3+αi)hidi+2h2i(8(3+αi)2d2i+3(4+αi)2Didfi)3(4+αi)πdfi}, (4.1)
    ki>max{4πhidi+1(4+βi)πdfi,4(3+βi)hidi+1+2h2i(8(3+βi)2d2i+1+3(4+βi)2Di+1dfi)3(4+βi)πdfi}. (4.2)

    Proof. Refer to [9]

    Note that in both of the studies, only the shape parameter αi is constrained. The shape parameter βi is left unconstrained as long as it lies within interval (4,1]. To ensure smooth shape-preserving interpolation, a trial and error method was used to choose the suitable value for βi. This method is impractical and time-consuming. Moreover, this method does not guarantee an optimal solution because the selection is based only on visual comparison.

    In this current study, we proposed three optimization models to serve as the objective functions that automatically determine the optimal value for βi in producing the smoothest interpolation curves.

    Minimizing the arc length of a curve helps to reduce unnecessary deviations, resulting in smoother and more direct interpolation between data points. The arc length of a parametric curve, si(x)=(x(t),s(t)), over subinterval i for i=1,2,,n1, is given by:

    l(si)=10si(t)dt. (4.3)

    To eliminate the square root, Eq (4.3) can also be approximated by Eq (4.7) below:

    l(si)=10si(t)2dt. (4.4)

    Thus, the optimized positivity or monotonicity-preserving interpolation model with the shortest arc length can be formulated as:

    {minL(βi)=n1i=1l(si),s.t. βi[l,u], (4.5)

    where u and l are the upper and lower bounds for the shape parameter βi that normally lies in (4,1]. However, these bounds may be modified in cases where positivity or monotonicity are not preserved.

    Strain energy measures the bending or twisting of a curve. A high strain energy corresponds to sharp bends, whereas a minimal strain energy results in gradual and smooth transitions of the curve. The strain energy of a parametric curve, si(x)=(x(t),s(t)), over subinterval i is given by:

    e(si)=10si(t)dt. (4.6)

    For simplicity, this can be approximated by:

    e(si)=10si(t)2dt. (4.7)

    Thus, the optimized positivity or monotonicity-preserving interpolation model with minimum strain energy can be approximated by:

    {minE(βi)=n1i=1e(si),s.t. βi[u,l], (4.8)

    The curvature variation energy focuses on the consistency of curvature changes along the curve. Minimizing this energy ensures that the curve changes its curvature gradually and consistently, thereby reducing unwanted oscillations and promoting smoother transitions. The curvature variation energy of a parametric curve, si(x)=(x(t),s(t)), is given by:

    c(si)=10si(t)dt. (4.9)

    Similarly, this can be approximated by Eq (4.13) below:

    c(si)=10si(t)2dt. (4.10)

    Thus, the optimized positivity or monotonicity-preserving interpolation with minimum curvature variation energy can be formulated as:

    {minK(βi)=n1i=1c(si),s.t. βi[u,l], (4.11)

    Figure 2 illustrates the flowchart of the proposed method. In summary, the steps to generate the optimized positivity or monotonicity-preserving interpolation are generalized in Algorithm 1.

    Figure 2.  Flowchart for the optimized positivity or monotonicity-preserving interpolation.

    Algorithm 1 Optimized Positivity or Monotonicity-preserving Interpolation.
      1. Input the data points.
      2. Compute the values of hi, Δi, di, and Di.
      3. For each subinterval, calculate the value of the shape parameter αi based on the conditions in Theorem 4.1 or Theorem 4.2.
      4. Determine the optimal βi value by applying the WOA.
          Start WOA optimization
      5. Select the objective function by choosing one of Equations (4.5), (4.8), or (4.11).
      6. Initialize the whales population (search agents).
      7. Calculate fitness of each search agent and identify the best search agent.
      8. while (i<Maximum iteration)
      9.      Update the coefficient vector A,C and random number l,p.
    10.       if (p<0.5)
    11.           if (|A|<1)
    12.                 Update search agent position by Equation (3.2).
    13.           else
    14.                 Update search agent position by Equation (3.8).
    15.           end
    16.       else
    17.           Update search agent position by Equation (3.5).
    18.       end
    19.       Recalculate the fitness of each search agent.
    20.       Update new best search agent.
    21. end
    22. return X as βi
    23. Using the accumulated values, construct the C2 quintic trigonometric Bézier curves based on Equation (2.1).

    In this section, six shape-preserving interpolation examples from previous schemes are presented. Three of the examples are on positivity-preserving interpolation, taken from [8], where the values for the free shape parameter are selected through visual comparison. The remaining three examples, from [9], involve monotonicity-preserving interpolation, with the free shape parameter values chosen through curvature comparison.

    In this research, the WOA is used to automatically compute the optimal values of the free shape parameter. The optimal βi values for each metric analysis are presented in the figures of each example. Finally, to demonstrate the effectiveness of our proposed scheme, comparisons with the previous studies are presented. Throughout this paper, the algorithmic parameters for the optimization process are kept uniform, with a population size of n=30 and a maximum of t=300 iterations. Each optimization is executed four times to ensure consistency in the results.

    Example 5.1. Table 1 presents positive data based on experimental measurements of lead content in the discharge from five outfalls of the Chenab River. The x-values represent the volume of waste discharged from the drains (gallons), while the y-values indicate the amount of lead in the waste discharged (mg). Both of the data in Tables 1 and 2 are taken from [7].

    Table 1.  Lead contamination in the drains of the Chenab River from [7].
    i 0 1 2 3 4
    xi 20 42 45 47 53
    fi 0.05 0.06 1.5 1.67 1.4

     | Show Table
    DownLoad: CSV
    Table 2.  Blood creatinine levels.
    i 0 1 2 3 4 5
    xi 20 30 32 35 37 39
    fi 1.51 0.18 1.05 0.6 0.51 0.58

     | Show Table
    DownLoad: CSV

    Figure 3 shows the positivity-preserving interpolation from [8] for the positive data in Table 1. In the study, βi was treated as a free parameter, while αi was constrained to ensure positivity. The figure demonstrates the effect of setting different values to βi. As observed, certain values, particularly βi=3.5, result in a wiggly interpolation. For the last subinterval, only βi[1.5,1] values produce smooth curves. Thus, without the aid of an optimization method, obtaining a visually pleasing interpolation curve requires users to manually plot the interpolation for multiple βi values and carefully compare the results to select suitable values of βi.

    Figure 3.  Effect of free shape parameter βi on the existing scheme by [8].

    Figures 4 and 5 depict the optimized positivity-preserving interpolations with the values of βi computed using the WOA. Figures 4(a) and 5(a) show the results of interpolation achieved through optimization by minimizing the arc length. Noticeable wiggles appear in the first and last subintervals of both figures. This indicates that minimizing the arc length does not ensure a smooth curve since it focuses more on reducing the overall length of the curve rather than its smoothness. Minimizing the strain energy often results in smoother curves, as shown in Figures 4(b) and 5(b), where the interpolation curves are smooth and free from wiggles. Similarly, Figures 4(c) and 5(c) show that minimizing curvature variation energy also produces smooth interpolation curves.

    Figure 4.  Optimized positivity-preserving interpolations for data in Table 1.
    Figure 5.  Optimized positivity-preserving interpolations for data in Table 2.

    Figures 4(d) and 5(d) compare the interpolation results when the free variable βi in each subinterval is computed using optimization versus when it is determined by visual comparison as described by [8] and [7]. The gray line represents [8], while the green line represents [7]. In the last subinterval of Figure 4(d), the interpolation scheme by [7] shows a jump followed by a sudden drop. In contrast, the red curve, where βi is computed by minimizing the arc length, shows a consistent drop with some wiggle. In the third subinterval, the curves obtained by minimizing the arc length, strain energy, and curvature variation energy look quite similar despite having different βi values. This is because βi is associated with the last two inner control points of the Bézier curve, and since the horizontal distance of the subinterval is small, the variation in the curves is less noticeable. In Figure 5(d), the interpolation curves from [8] and the optimized interpolation curves for the strain energy and curvature variation energy minimization are smooth and comparable across all subintervals. Meanwhile, the interpolation curve from arc length minimization tends to move inward to reduce the total arc length, resulting in the bending curve.

    Example 5.2. Table 2 shows positive data based on the blood creatinine levels of six individuals aged between 20 and 40. The x-values represent the age of individuals (years), while the y-values represent their blood creatinine levels in mg/dL.

    Each optimal βi value in this study is determined locally for each subinterval by running the WOA four times. Figure 6 presents an example of the iterative curves from these four runs to obtain the optimal βi for the first subinterval of Figure 5(a). In each run, the optimal βi values remain consistent, with only the number of iterations required for convergence varying. To determine which smoothness metric converges the fastest, the average number of iterations across the four runs is considered. Figure 7 displays the average iterative curves for each smoothness metric minimization, corresponding to the first subinterval of Figure 5(a), 5(b), and 5(c). Among them, minimizing the arc length requires the highest number of iterations to achieve convergence.

    Figure 6.  Iterative curves for the first subinterval of Figure 5(a).
    Figure 7.  Average iterative curves for each smoothness metric in subinterval 1 of Figure 5.

    Example 5.3. Table 3 displays the daily COVID-19 deaths in Malaysia from November 12, 2020 to December 4, 2020, as reported by the World Health Organization (WHO). The x-values denote the days, and the y-values indicate the number of deaths. This example differs from the previous two examples because it contains more data points that are distributed closer to each other.

    Table 3.  Daily COVID-19 deaths reported.
    i 0 1 2 3 4 5 6 7 8 9 10 11 12 13
    xi 1 2 3 5 6 7 10 12 13 14 16 17 22 23
    fi 2 1 2 3 4 5 3 3 2 4 3 2 2 11

     | Show Table
    DownLoad: CSV

    Figure 8 demonstrates the optimized positivity-preserving interpolations for data from Table 3 for different metric analyses and their comparisons with the existing scheme by [8], where βi values are determined by plotting curves with several βi values and visually selecting the smoothest ones. In Figure 8(a), the interpolation achieved by minimizing the arc length appears smooth in most subintervals due to the small gaps between subintervals. However, in the twelfth subinterval, the curve exhibits a slight oscillation due to the significant changes in the derivative value in the final subinterval.

    Figure 8.  Optimized positivity-preserving interpolations for data in Table 3.

    Figure 8(b) and 8(c) show the positivity-preserving interpolation by optimizing the strain energy and curvature variation energy, respectively. These curves are smooth with no wiggles. However, in the twelfth subinterval, the lower boundary for the βi interval is adjusted to βi[2.6,1] instead of βi(4,1], as being used in the other examples. This adjustment is made to address the abrupt changes in the y values of the last subinterval. Without this constraint, the interpolation tends to curves downward and goes below the x-axis. Thus, violating the positivity of the dataset. In contrast, the arc length minimization required no adjustment to the range, making it more efficient than the other two optimization models in this case.

    Comparing the optimized positivity-preserving interpolations for all of the metric analyses with the conventional positivity-preserving scheme by [8], as depicted in Figure 8(d), shows that all methods maintain relatively smooth curves. However, through optimization method, the free parameter values are chosen automatically as compared to [8] which involved manual selection through visual comparison. This highlights the robustness of the optimization techniques in shape preservation.

    Example 5.4. Table 4 shows a random monotone dataset taken from [25].

    Table 4.  Monotone dataset from [25].
    i 1 2 3 4 5
    xi 0 6 10 29.5 30
    fi 0.01 15 15 25 30

     | Show Table
    DownLoad: CSV

    Example 5.5. Table 5 provides a monotone dataset from an experiment on waveform distortion in electronic circuits, as reported by [26]. The data exhibits a monotone increasing behavior, with x-values representing voltage (V) and y-values representing current (A).

    Table 5.  Monotone data from [26].
    i 1 2 3 4 5 6 7 8 9 10 11
    xi 0 2 3 5 6 8 9 11 12 14 15
    fi 10 10 10 10 10 10 10.5 15 50 60 85

     | Show Table
    DownLoad: CSV

    Figure 9 illustrates the monotonicity-preserving interpolation from [9] with multiple βi values. In the previous study, the optimal βi values for achieving the smoothest curve were determined by manually plotting and comparing the curvature profiles of the interpolation, which are time consuming and prone to bias due to human judgment. In contrast, the proposed study applies WOA to automatically select the optimal βi values, ensuring a more efficient approach.

    Figure 9.  Effect of free shape parameter βi on existing scheme by [9].

    Figures 10 and 11 show the optimized monotonicity-preserving interpolation for monotone data in Tables 4 and 5, respectively. Figures 10(a) and 11(a) illustrate interpolation by minimizing the arc length. The curve in Figure 11(a) is smooth and appears to produce straightforward trajectories, while Figure 10(a) has wiggles in the third subinterval. Figures 10(b) and 11(b) illustrate the interpolations achieved by minimizing the strain energy, which aims to create curves with minimal bending energy.

    Figure 10.  Optimized monotonicity-preserving interpolation for data in Table 4.
    Figure 11.  Optimized monotonicity-preserving interpolation for data in Table 5.

    In Figures 10(c) and 11(c), the results of minimizing curvature variation energy, that aims to maintain consistent curvature throughout the curve are depicted. Minimizing the strain and curvature variation energy can be chosen as the most effective smoothness metrics because all interpolations produced are smooth with consistent transitions between data points. Although there are slight differences in the βi values in the third subinterval of Figures 10(c) and 11(c), the resulting curves for both figures produce no fluctuation.

    Figures 10(d) and 11(d) compare the results of the three optimization techniques including arc length, strain energy, and curvature variation energy against existing interpolation schemes. In Figure 10(d), the proposed methods are compared with the existing schemes by [25] and [9], whereas in Figure 11(d), the proposed methods are compared with [26] and [9]. The comparison reveals that all methods maintain monotonicity and accurately interpolate the data points. The arc length minimization technique produces the most straightforward curves, whereas the strain energy and curvature variation energy methods result in smooth and consistent curves that transition gradually between data points. In comparison with [25], which produce interpolation with C1 continuity, the interpolation from the proposed method is C2 continuous. Thus, the developed method produces a smoother transition between each subinterval.

    Example 5.6. Table 6 presents cumulative rainfall data obtained from the Malaysian Meteorological Department, Ministry of Natural Resources, Environment and Climate Change. The data is taken at Bayan Lepas Station over 12 consecutive days from May 26th to June 6th, 2022. The x-values represent the days, while the y-values indicate the cumulative amount of rainfall in mm3. Due to the nonnegativity nature of the rainfall data, this dataset shows a monotone increasing trend.

    Table 6.  Cumulative rainfall data.
    i 1 2 3 4 5 6 7 8 9 10 11 12
    xi 1 2 3 4 5 6 7 8 9 10 11 12
    fi 1.8 3.2 3.2 3.2 11.6 16.6 48.2 67 68.4 90.8 92.8 92.9

     | Show Table
    DownLoad: CSV

    Figure 12 presents the optimized monotonicity-preserving interpolation for the cumulative rainfall data provided in Table 6. Figures 12(a), 12(b), and 12(c) display the resulting interpolations when the free parameter βi values for each subinterval are optimized using arc length, strain energy, and curvature variation energy minimization, respectively. Figure 12(d) compares these optimized interpolations with the previous study by [9]. In the first three subintervals, the data points are relatively flat, causing the βi values to be less influenced by the optimization method used. In the remaining subintervals, minimizing the arc length, strain energy, and curvature variation energy produce comparable and smooth interpolations because the horizontal gap between each data point is small and uniform.

    Figure 12.  Optimized monotonicity-preserving interpolation for data in Table 6.

    Overall, it can be concluded that for closely packed data, minimizing the arc length, strain energy, and curvature variation energy results in smooth interpolations, with arc length minimization producing a more straightforward trajectory. However, for sparse datasets, arc length minimization tends to produce oscillating or wiggly interpolations curves, making strain energy and curvature variation energy minimization more suitable. When there are sudden changes in the data trend, strain energy and curvature variation energy minimization require adjustment in the range of βi to avoid violations in the shape of data, whereas arc length minimization does not require such adjustments.

    In this study, optimized positivity and monotonicity-preserving interpolation techniques have been developed. This study is an advancement of the previous studies by [8] and [9], where positivity and monotonicity-preserving interpolation techniques were developed by deriving shape preserving conditions on one of the shape parameters, αi, of the quintic trigonometric Bézier curve. The remaining shape parameter, βi was left unconstrained for the users to choose. In this study, the WOA has been applied to find the optimal values for βi. This optimization significantly reduces the computation time of the previous schemes. To achieve smoother interpolations, three different smoothness metrics, which are arc length, strain energy, and curvature variation energy, have been analyzed.

    By analyzing the three smoothness metrics, it is observed that arc length minimization produces interpolations with wiggles and oscillations when the gap between data points is sparse. This occurs because arc length minimization prioritized reducing the total length over ensuring smoothness. However, when the gap between data points is small, arc length minimization produced interpolations that are comparably smooth to those obtained through strain energy minimization and curvature variation energy minimization. Minimizing strain energy and curvature variation energy consistently produced the smoothest interpolations because both methods primarily aim to promote smoothness, provided there is no drastic changes in the trend of data points. However, when abnormalities are present in the dataset trend, the range of the shape parameter needs to be adjusted to a smaller interval to avoid violations in the shape of dataset.

    Compared with existing schemes, this technique is more time-saving and eliminates possible bias that might arise due to human judgement. Moreover, the optimization technique ensures that the chosen values are optimal and the interpolation curve produced is the smoothest. In future work, comparisons with the other optimization methods should be included to further validate the effectiveness of the proposed approach.

    Salwa Syazwani Mahzir: Formal Analysis, Investigation, Methodology, Software, Visualisation, Writing-original draft. Md Yushalify Misro: Conceptualization, Data Curation, Funding acquisition, Project administration, Supervision, Writing - review & editing.

    The authors declare they have not used Artificial Intelligence (AI) tools in the creation of this article.

    This research was supported by Ministry of Higher Education Malaysia through Fundamental Research Grant Scheme (FRGS/1/2023/STG06/USM/03/4) and School of Mathematical Sciences, Universiti Sains Malaysia. The authors are very grateful to the anonymous referees for their valuable suggestion.

    The authors declare that they have no competing interests in this paper.



    [1] J. U. Md, K. Md, M. M. Mir, A new method of central difference interpolation, Appl. Math. Sci. Int. J., 6 (2019), 01–14. http://dx.doi.org/10.5121/mathsj.2019.6301 doi: 10.5121/mathsj.2019.6301
    [2] M. Z. Hussain, M. Hussain, A. Waseem, Shape-preserving trigonometric functions, Comput. Appl. Math., 33 (2014), 411–431. https://dx.doi.org/10.1007/s40314-013-0071-1 doi: 10.1007/s40314-013-0071-1
    [3] A. N. H. Tahat, A. R. M. Piah, Z. R. Yahya, Rational cubic ball curves for monotone data, in AIP Conference Proceedings, vol. 1750, AIP Publishing, 2016, 030021. https://dx.doi.org/10.1063/1.4954557
    [4] A. Ahmad, A. Ashaari, N. B. M. Isa, Using bézier-ball function to interpolate positive real data and it's application, in 2020 5th IEEE International Conference on Recent Advances and Innovations in Engineering (ICRAIE), IEEE, 2020, 1–6. https://dx.doi.org/10.1109/ICRAIE51050.2020.9358380
    [5] S. A. A. Karim, S. S. K. Raju, Wind velocity data interpolation using rational cubic spline, in MATEC Web of Conferences, vol. 225, EDP Sciences, 2018, 04006. https://dx.doi.org/10.1051/matecconf/201822504006
    [6] M. Abbas, A. A. Majid, J. M. Ali, Monotonicity-preserving C2 rational cubic spline for monotone data, Appl. Math. Comput., 219 (2012), 2885–2895. https://dx.doi.org/10.1016/j.amc.2012.09.007 doi: 10.1016/j.amc.2012.09.007
    [7] M. Z. Hussain, M. Hussain, Z. Yameen, A C2-continuous rational quintic interpolation scheme for curve data with shape control, J. Natl. Sci. Found. Sri, 46 (2018), 341–354. https://dx.doi.org/10.4038/jnsfsr.v46i3.8486 doi: 10.4038/jnsfsr.v46i3.8486
    [8] S. S. Mahzir, M. Y. Misro, Shape preserving interpolation of positive and range-restricted data using quintic trigonometric bézier curves, Alex. Eng. J., 80 (2023), 122–133. https://dx.doi.org/10.1016/j.aej.2023.08.009 doi: 10.1016/j.aej.2023.08.009
    [9] S. S. Mahzir, M. Y. Misro, K. T. Miura, Preserving monotone or convex data using quintic trigonometric bézier curves, AIMS Math., 9 (2024), 5971–5994. https://dx.doi.org/10.3934/math.2024292 doi: 10.3934/math.2024292
    [10] M. A. Aceves-Fernández, Swarm Intelligence-Recent Advances and Current Applications, IntechOpen, Rijeka, 2023. https://dx.doi.org/10.5772/intechopen.100661
    [11] G. Hu, J. Zheng, X. Ji, X. Qin, Enhanced tunicate swarm algorithm for optimizing shape of C2 rqi-spline curves, Eng. Appl. Artif. Intel., 121 (2023), 105958. https://dx.doi.org/10.1016/j.engappai.2023.105958 doi: 10.1016/j.engappai.2023.105958
    [12] J. Zheng, G. Hu, X. Ji, X. Qin, Quintic generalized hermite interpolation curves: Construction and shape optimization using an improved gwo algorithm, Comput. Appl. Math., 41 (2022), 115. https://dx.doi.org/10.1007/s40314-022-01813-6 doi: 10.1007/s40314-022-01813-6
    [13] X. Wei, H. Huang, A survey on several new popular swarm intelligence optimization algorithms, Research Square. https://doi.org/10.21203/rs.3.rs-2450545/v1
    [14] M. Li, L. D. Li, A novel method of curve fitting based on optimized extreme learning machine, Appl. Artif. Intell., 34 (2020), 849–865. https://dx.doi.org/10.1080/08839514.2020.1787677 doi: 10.1080/08839514.2020.1787677
    [15] G. Hu, X. Zhu, G. Wei, C. T. Chang, An improved marine predators algorithm for shape optimization of developable ball surfaces, Eng. Appl. Artif. Intell., 105 (2021), 104417. https://dx.doi.org/10.1016/j.engappai.2021.104417 doi: 10.1016/j.engappai.2021.104417
    [16] S. Mirjalili, A. Lewis, The whale optimization algorithm, Adv. Eng. Softw., 95 (2016), 51–67. https://dx.doi.org/10.1016/j.advengsoft.2016.01.008 doi: 10.1016/j.advengsoft.2016.01.008
    [17] M. H. Nadimi-Shahraki, H. Zamani, Z. Asghari Varzaneh, S. Mirjalili, A systematic review of the whale optimization algorithm: theoretical foundation, improvements, and hybridizations, Arch. Comput. Meth. E., 30 (2023), 4113–4159. https://dx.doi.org/10.1007/s11831-023-09928-7 doi: 10.1007/s11831-023-09928-7
    [18] S. Mostafa Bozorgi, S. Yazdani, Iwoa: An improved whale optimization algorithm for optimization problems, J. Comput. Des. Eng., 6 (2019), 243–259. https://dx.doi.org/10.1016/j.jcde.2019.02.002 doi: 10.1016/j.jcde.2019.02.002
    [19] G. Kaur, S. Arora, Chaotic whale optimization algorithm, J. Comput. Des. Eng., 5 (2018), 275–284. https://dx.doi.org/10.1016/j.jcde.2017.12.006 doi: 10.1016/j.jcde.2017.12.006
    [20] M. M. Mafarja, S. Mirjalili, Hybrid whale optimization algorithm with simulated annealing for feature selection, Neurocomputing, 260 (2017), 302–312. https://dx.doi.org/10.1016/j.neucom.2017.04.053 doi: 10.1016/j.neucom.2017.04.053
    [21] H. Chen, Y. Xu, M. Wang, X. Zhao, A balanced whale optimization algorithm for constrained engineering design problems, Appl. Math. Model., 71 (2019), 45–59. https://dx.doi.org/10.1016/j.apm.2019.02.004 doi: 10.1016/j.apm.2019.02.004
    [22] H. Singh, V. Rai, N. Kumar, P. Dadheech, K. Kotecha, G. Selvachandran, A. Abraham, An enhanced whale optimization algorithm for clustering, Multimed. Tools Appl., 82 (2023), 4599–4618. https://dx.doi.org/10.1007/s11042-022-13453-3 doi: 10.1007/s11042-022-13453-3
    [23] Y. Zhou, Z. Hao, Multi-strategy improved whale optimization algorithm and its engineering applications, Biomimetics, 10 (2025), 47. https://dx.doi.org/10.1016/j.engappai.2021.104558 doi: 10.1016/j.engappai.2021.104558
    [24] S. Golmaei, J. Vahidi, M. Jamshidi, Whale algorithm for schedule optimization of construction projects employing building information modeling, Eng. Rep., 7 (2025), e70022. https://doi.org/10.1002/eng2.70022 doi: 10.1002/eng2.70022
    [25] S. A. A. Karim, K. V. Pang, Monotonicity preserving using GC1 rational quartic spline, in AIP Conference Proceedings, vol. 1482, American Institute of Physics, 2012, 26–31. https://dx.doi.org/10.1063/1.4757432
    [26] S. A. B. A. Karim, Rational cubic spline interpolation for monotonic interpolating curve with C2 continuity, in MATEC Web of Conferences, vol. 131, EDP Sciences, 2017, 04016. https://dx.doi.org/10.1051/matecconf/201713104016
  • Reader Comments
  • © 2025 the Author(s), licensee AIMS Press. This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0)
通讯作者: 陈斌, bchen63@163.com
  • 1. 

    沈阳化工大学材料科学与工程学院 沈阳 110142

  1. 本站搜索
  2. 百度学术搜索
  3. 万方数据库搜索
  4. CNKI搜索

Metrics

Article views(352) PDF downloads(19) Cited by(0)

Figures and Tables

Figures(12)  /  Tables(6)

Other Articles By Authors

/

DownLoad:  Full-Size Img  PowerPoint
Return
Return

Catalog