1 Introduction

The desired output of any engineering system process is considered the process’s objective function, and its optimal solution is required. However, engineers must have options in their selections while creating various systems and having informational alternatives of the best performance is crucial. The optimization field’s major goal is to discover the best solution to a problem (objective function) or the best objective output under a set of circumstances (constraints).

Neumaier (2004) emphasized the advantages of global optimization over local optimization and the issues that make a comprehensive search in the viable region unnecessary. These optimization issues were solved using two types of algorithms: deterministic and stochastic. The fundamental difference between deterministic and stochastic algorithms, as indicated in Jain and Agogino (1993), was the randomness of creating the next location. The first does not contain any random elements, whereas the second does. In addition, Jain and Agogino (1993) proposed using a multi-start strategy rather than a single-start technique. Instead of a single start starting from a collection of local minimum values, the minimal optimization procedure was initiated utilizing a range of uniform data in the feasible region. Clustering was employed as a prediction method to limit the number of processed data samples to a bare minimum. There was a need to present a technique that would oblige all domains because complex systems design and development tended to have adversarial objectives.

Using a multidisciplinary approach (Koch et al. 1999) to design investigated the relationship between the input and output of the constructed approximation efficient and simple statistics methodologies. Martins and Lambe (2013) emphasized the relevance of multidisciplinary design in enhancing the design phase and reducing design cycle costs and time. They also divided multidisciplinary design layouts into two categories: monolithic and distributed. An optimization problem is solved separately in the first type. The second form divides a single problem into single-start ones, each with a tiny subset of the variables and criteria (constraints).

The demand to reduce the search space was given by Wang and Simpson (2004), utilizing the fuzzy clustering approach due to vast space search in optimization problems. This strategy can solve problems involving constrained optimization and nonlinear problems. Shan and Wang (2003)’s proposed method is based on the concept of a rough set as a space search strategy for interesting areas of the design space and the global optimal optimization issue. Their results showed that employing finite objective function estimations to account for global and local optimum values was beneficial.

We are always looking for the best minimum or maximum of an interesting something in our daily lives, defined as the optimization technique. Solving these day-to-day issues within optimal values depends on the complication, so different algorithms can be used to select the most efficient or applicable algorithm for our problem. A survey on optimization techniques (Khan et al. 2015) summarized various techniques such as Simulated Annealing, Genetic Algorithms, the Ant Colony method, and Honey Bees algorithms. These algorithms began as a simulation of nature and are classified as metaheuristics algorithms. For example, Holland (1975) was the first to introduce a Genetic Algorithm (GA) that relied on genes and selection, so its main components were cross-over and mutation. Holland and others’ work was presented by Yang (2014) that focused on the features of GA.

The objective function in optimization problems can be unimodal or multimodal if the target is the minimum value of that function (Kanemitsu 1998). If the function’s local minimum value equals the global minimum, it is classified as unimodal, and the decent method is used to solve it. Traditional and modern techniques, such as Simulated Annealing and Genetic Algorithms, are used to find the global minimum value of a multimodal function with more than one local minimum value.

One of the most recent and effective population-based metaheuristic optimization techniques was SCA, which was introduced by Mirjalili (2016). Many optimization issues, including feature selection, image processing, robot path planning, scheduling, economic dispatch, radial distribution networks, and many others, are solved using this approach. It demonstrated its performance and high efficiency when compared to several well-regarded metaheuristics that are known to exist in the literature. It depends on the characteristics of the trigonometric sine and cosine functions.

2 Literature review

Many algorithms have been proposed to solve a wide range of optimization problems, but no one can compare the performance of algorithms based on a small scale of samples (problems). This observation can be clarified by the proposed theorem No Free Lunch (NFL) of Wolpert and Macready (1997), which demonstrated that the demand for new optimization algorithms is a fact due to a variety of problems. In other words, the NFL pushed for research into developing new techniques and improving existing ones for various issues. To understand the hypotheses, constraints, or even the impossibility of applying the NFL theorem, Adam et al. (2019) introduced the major research contributions that have been made to this field of study.

Some of these algorithms are based on a group of species’ collective behavior. Particle Swarm Optimization (PSO) (Kennedy and Eberhart 1995), Salp Swarm Algorithm (SSA) (Mirjalili et al. 2017), and Dragonfly Algorithm (DA) (Mirjalili 2015b) are popular algorithms in this category. The PSO method is inspired by flocks of birds that choose their flight direction and velocity. The PSO method is simpler to implement than other optimization strategies because of its mechanism and because a few parameters must be defined. As a result, the PSO algorithm is widely used in various applications, including cloud resource scheduling and privacy protection. The SSA algorithm is based on salps’ swarming behavior, frequently forming a swarm known as a salp chain in deep waters. Follower salps follow the leading salp in the SSA swarm model. Also moving towards the food source is the leading salp. The salp chain will naturally progress towards the global optimum if the food source is replaced by it. The behaviors of dragonflies are inspired statically and dynamically by Mirjalili’s Dragonfly Algorithm (DA). Modeling the social interaction of dragonflies in navigating, seeking meals, and avoiding opponents, whether swarming dynamically or statistically, is used to design two crucial phases of optimization: exploration and exploitation. The major goal of the exploration phase is for dragonflies to form sub-swarms and travel over different locations in a static swarm. On the other hand, dragonflies in the static swarm fly in larger swarms and in one direction, which is favorable in the exploitation phase.

Some algorithms are inspired by natural behavior, such as Ant Lion Optimizer (ALO) (Mirjalili 2015a) and Moth-Flame Optimization Algorithm (MFO) (Mirjalili 2015c). ALO can solve optimization problems differently. As its name suggests, the ALO algorithm simulates the intelligent behavior of natural antlions when hunting ants. Ants must wander around the search space to replicate such interactions, and antlions are permitted to pursue them and become fitter using traps. Mirjalili provides a mathematical model for moths flying in a spiral around artificial light (flames). The suggested technique is based on the transverse orientation navigating mechanism used by moths in nature. The MFO algorithm is a population-based algorithm motivated by artificial light convergence. Several operators were included in the algorithm to help it explore and exploit the search spaces.

On the other hand, the Gravitational Search Algorithm (GSA) (Rashedi et al. 2009) was proposed as a new optimization technique based on the law of gravity and mass interactions. The GSA method treats agents as objects; their masses determine their objective performance. The gravitational force attracts all these items, causing a worldwide movement of all objects toward the others with heavier weights. As a result, masses cooperate through gravitational force in a direct kind of communication.

Mirjalili (2016) utilized the sine and cosine functions to explore and exploit a region of space to find the optimum solution employing both functions as a population-based algorithm. This algorithm can handle optimization issues using a primary mathematical function called sine cosine algorithm (SCA). This method generates numerous initial random candidate solutions and needs them to fluctuate outwards or towards the optimal solution. Certain current algorithms are incorporated into the SCA algorithm to enhance its performance and speed up reaching the optimal solution. For example, the hybrid algorithm SCA-PSO (Nenavath et al. 2018) combines SCA and PSO’s exploration and exploitation capabilities to produce the best possible global solutions. SCA is also integrated with binary PSO as a hybrid approach (Kumar and Bharti 2019) called HBPSOSCA used to choose a useful subset of attributes in real-life clustering problems. The integration between SCA and SSA was suggested by Neggaz et al. (2020) and Singh et al. (2019) to accelerate the search process to improve search capabilities, global convergence rate, and convergence behavior. SCA is also combined with both ALO (Kumar et al. 2020) and GSA (Jiang et al. 2020) algorithms to overcome the limitations of each one. To resolve various optimization issues, Rizk-Allah (2017) suggested a multi-orthogonal sine cosine algorithm (MOSCA) based on parallel learning. The proposed approach offers multiple-orthogonal parallel learning to effectively demonstrate two benefits: maintain the diversity of the solutions and enhance exploratory search. With the use of the SCA algorithm, the researchers were able to tackle several issues that arise in real life, including a revolutionary sine cosine algorithm for feature selection (Hafez et al. 2016), binarization of Arabic manuscript images (Elfattah et al. 2016), and solving electrical engineering problems (Attia et al. 2018; Rizk-Allah 2021).

RST extends classical set theory and helps work with uncertain and noisy data. It differs from fuzzy set theory because it is not predicated on past information. It uses the boundary region of a set rather than a member relation to convey the vagueness. When little information is available, RST is concerned with characterizing a set or collection of things that may be difficult to discern. RST describes two additional sets, one of which is an upper approximation of the original set and the other a lower approximation. The RST methodology is crucial because real-world problems are expected to contain ill-posed data. Since it was first introduced by Pawlak (1982), it has drawn the interest of scientists and researchers in a variety of domains, including attractive design space (Shan and Wang 2003), attribute reduction (Jia et al. 2016), the discovery of knowledge (Li et al. 2008), and rough-fuzzy clustering (Hu et al. 2017). There is a lot of work employing RST in the literature. For example, (Hassanien et al. 2018) merged the metaheuristic crow search algorithm (CSA) (Askarzadeh 2016) and RST to accelerate the optimum solution with a low run time cost. Bhukya and Manchala (2022) introduced a unique metaheuristic rough set-based feature selection with rule-based medical data classification to tackle data uncertainty in the healthcare sector.

3 Motivation and contribution

Researchers have mostly focused on two approaches in the literature: enhancing the existing techniques and integrating several algorithms. These directions aim to increase diversity, delay premature convergence, and speed up convergence. However, these algorithms suffer from premature convergence and weak diversity, especially when handling highly nonlinear problems. However, the simplicity and effectiveness of the SCA suffer from slow convergence to reach the optimal solution. The optimization algorithms can establish additional flexibility and improved reliability in the exploration search using RST. RST can overcome many algorithms’ limitations by searching on smaller regions.

This research aims to benefit from RST to speed up SCA in a hybrid RSCA. By speeding up the search, the RSCA can increase convergence rather than letting the algorithm run again with no improvement. The proposed RSCA has several features distinguishing the proposed strategy from other optimization techniques. First, modify the SCA to benefit from the best solutions as a first optimization level. Second, enhance the optimized solutions by integrating SCA and RST and searching in new spaces. Third, enter a second SCA optimization level to explore new search regions and collect the best solution.

The proposed two-phase strategy combines SCA for finding the best solution and the rough-based cut notion. We execute SCA as a primary optimization level in the first phase, and the output of the best solution and its related destination will be the second phase’s input. In the second phase, we use roughly based principles to reduce and discretize attributes (features), and then we identify the most appealing subspaces based on the destination output. This phase breaks new regions in the search space to enhance the exploration search. Also, as a result of the iterative process used to find an exact optimal solution, these regions get smaller. Then, at the second level of SCA, we improve the best solution and its position based on the output of the second phase.

Our contributions to this study are presented as follows:

  • A novel improved algorithm called RSCA is introduced based on RST, which integrates the advantages of both SCA and RST to improve SCA efficiency.

  • RST is introduced to improve SCA’s exploration by suggesting smaller search regions after several iterations of SCA. It also enhances exploitation by storing the best SCA first-level data for searching new neighborhood regions and feedback to the SCA second-level.

  • RST is introduced to target the prospective areas to improve the quality of the solution while avoiding the local one.

  • The proposed RSCA is tested on 23 benchmark functions and three engineering optimization problems.

  • The output data of RSCA is compared with SCA, ALO, SSA, DA, and MFO algorithms.

The arrangement of this work is organized as follows: Sect. 4 introduces the study’s related work. The basics of the sine cosine algorithm (SCA) and rough set theory (RST) are covered in Sect. 5. The suggested rough sine cosine algorithm (RSCA) is detailed in Sect. 6. The results are reported in Sect. 7, followed by some design problems in Sect. 8, and finally, conclusion and future work in Sect. 9.

4 Related work

The preliminaries of the optimization problem are presented in this section. In addition, the rough set theory approach as a tool to deal with uncertain data and its main definition will be illustrated.

4.1 Formulation of a problem

The formula for a nonlinear programming issue was introduced by Rao (2009) as follows:

$$\begin{aligned} \min {f_{obj}(X)} \end{aligned}$$
(1)

Subject to the constraints

$$\begin{aligned}{} & {} g_i(X)\le 0, \quad i=1,2,...,m \end{aligned}$$
(2)
$$\begin{aligned}{} & {} h_j(X) = 0, \quad j=1,2,...,p \end{aligned}$$
(3)
$$\begin{aligned}{} & {} lb_k\le x_k \le ub_k, \quad k=1,2,...,n \end{aligned}$$
(4)

where \(f_{obj}(X)\) is the minimization function of a vector with n variables \(X=\{x_1,x_2,...,x_n\}\). The lower and upper bounds for each variable component X are denoted by \(lb_n\) and \( ub_n\), respectively. There are p equality constraints \( h_j(X)\) and m inequality constraints \(g_i(X)\). Although there may be many local optima in the search space, one is the global optimum. The constraints create gaps in the search space and, on rare occasions, divide it into multiple regions. According to the literature, infeasible regions are parts of the search space that violate restrictions.

Definition 1

(Global minimum) (Bazaraa et al. 2005) Consider the issue of minimizing \(f_{obj}(X)\) over \(R^n\), and let \(X^*\in R^n\). If \(f_{obj}(X^*)\le f_{obj}(X) \forall X \in R^n\), \(X^*\) is referred to as a global minimum.

The method of penalty function (Rao 2009) transforms the previous constrained optimization problem into an unconstrained one as follows:

$$\begin{aligned} F(X)=f_{obj}+R \sum _{i=1}^{m} [G_i(X)]^2 +S \sum _{j=1}^{p} [H_j(X)]^2 \end{aligned}$$
(5)

where

$$\begin{aligned}{}[G_i(X)]^2= & {} [max(0,g_i(X))]^2 \end{aligned}$$
(6)
$$\begin{aligned}{}[H_j(X)]^2= & {} [max(0,h_j(X))]^2 \end{aligned}$$
(7)

Equations 6 and 7 indicate violations of inequality and equality constraints of the problem, where R and S are adaptive constants concerning the penalty term contribution. Equation 5 added the \(f_{obj}\) to the penalty term if the constraint violation is satisfied; else, nothing is added.

4.2 Rough set theory

Pawlak (1982) developed rough set theory (RST) to deal with uncertain information. In the early 1980s, its primary purpose was to create a rough representation of concepts based on the data collected, which concerned the data classification analysis. RST and its applications are interesting in many areas due to their mathematical rigor and ability to solve practical difficulties.

Definition 2

(Information system) (Komorowski et al. 1999; Kryszkiewicz 1998) IS stands for an information system which is defined as \(IS=(O,A \cup D)\), where \(O \ne \varnothing \) is the set of objects, and A is the set of conditional attributes (features) and set of decision attributes D for any attribute \(x\in A\), such that \(x: O \rightarrow V_x\), where \(V_x\) is the domain of an attribute x.

An information system containing conditions and decision attributes can be called a decision system. The general structure of a decision (information) system is shown in Table 1.

Definition 3

(Indiscernibility relation) (Kryszkiewicz 1998) for each set of attributes \(B \subset A\), an indiscernibility relation IND(B) is defined as

$$\begin{aligned} \begin{aligned} IND(B)&= \{(o_i,o_j) \in O \times O \mid \forall a \in B, \\ x(o_i)&= x(o_j)\}, \text {where} \quad i \ne j \end{aligned} \end{aligned}$$
(8)

This relation splits the objects O of the information system into classes denoted by O/IND(B).

Table 1 Information system representation

5 Materials and methods

This section covers the fundamentals of the sine cosine algorithm (SCA) and the concepts of rough set theory (RST).

5.1 Sine cosine algorithm

A random set of solutions is used in population-based optimization approaches to begin the optimization process. Due to the stochastic nature of population-based optimization approaches, there is no certainty that researchers will find a solution in a single run. With enough random solutions and iterations, the possibility of discovering a global optimum grows, but it is not guaranteed. Exploration and exploitation (Črepinšek et al. 2013) are the two things these population-based optimization approaches have in common. While searching for promising regions of the search space, an optimization algorithm abruptly blends many randomly generated solutions in a set of random solutions. However, the random solutions gradually alter in the exploitation phase, and the random fluctuations are much smaller than in the exploration phase. The proposed sine cosine algorithm (SCA) (Mirjalili 2016) used updating equations to apply these two phases as the following:

$$\begin{aligned} X_{i}^{t+1}= {\left\{ \begin{array}{ll} X_{i}^t + r_1 \times \sin {r_2} \times |r_3 P_{i}^t - X_{i}^t|, r_4<0.5 &{} \\ X_{i}^t + r_1 \times \cos {r_2} \times |r_3 P_{i}^t - X_{i}^t |, r_4 \ge 0.5 \end{array}\right. } \end{aligned}$$
(9)

\(X_{i}^t\) denotes the location of the current solution, \(P_{i}\) is the location of the target point, and i represents the dimension of the problem at iteration t. The numbers \(r_1,r_2,r_3,r_4\) are random and \(r_4 \in [0,1]\). In the following, Mirjalili (2016) summarized the role of these parameters in Eq. 9.

  • \(r_1\): determines the next set of position regions, either inside or outside the solution to destination space.

  • \(r_2\): specifies how far the movement should be directed towards or away from the destination.

  • \(r_3\): assigns random weights to the destination to stochastically emphasize or deemphasize the effect of desalination in determining distance.

  • \(r_4\): alternates between the sine \((r_4 < 0.5)\) and cosine \((r_4 \ge 0.5)\) components.

The sine and cosine range in Eq. 9 is changed using the following equation to establish a balance between exploration and exploitation:

$$\begin{aligned} r_1 = a - t \frac{a}{T} \end{aligned}$$
(10)

t represents the current iteration, T is the maximal level of iterations, and a is a constant number. A solution can be re-positioned around another solution due to the cyclic pattern of sine and cosine functions, ensuring the space between the two solutions is exploited. The solutions should also be able to search outside the space between their respective destinations when exploring the search space by changing the r1 value (see Fig. 1). As demonstrated in Fig. 2, this can be accomplished by adjusting the range of the sine and cosine functions to \([-2,2]\) and defining the value of \(r_2 \in [0,2]\) in Eq. 9. Figure 3 shows the steps of the SCA routine.

Fig. 1
figure 1

The impact of changing \(r_1\) (Mirjalili 2016)

Fig. 2
figure 2

The impact of sine and cosine (Mirjalili 2016)

Fig. 3
figure 3

The SCA steps (Mirjalili 2016)

5.2 RST concepts

In addition to the basic concepts of RST, we will introduce new notions, such as the threshold of decision attribute(s) and cut for the condition attributes. The transformation from an optimization problem to a decision system can be achieved by choosing a value between the minimal and maximal value of the objective function. The cutting process produces the lowest collection of attribute elements capable of classifying sample points with the same decision value.

5.2.1 Threshold concept

In RST, the referred problem in Eq. 1, the set of attributes A corresponds to X vector, the value of the objective function \(f_{obj}(X)\) can be considered the decision attribute d, and the set of objects can be described by the number of readings or take samples. Partitioning the value of the objective functions into two classes will be introduced by the concept of the decision threshold.

Definition 4

(Decision threshold) (Shan and Wang 2003) \(\forall x\in X,f_{obj}(x) \in f_{obj}(X)\) let \(d_t\) be a real number that is defined as \(\{d_t:\min (f_{obj}(X)) \le d_t < \max (f_{obj}(X)) \}\) where \(\min (f_{obj}(X))\) and \(\max (f_{obj}(X))\) are the minimal and maximal values of the objective function, respectively. The value of \( d_t(f_{obj}(x))=0 \, iff \, f_{obj}(x) \le d_t\), and \(d_t(f_{obj}(x))=1 \, iff \, f_{obj}(x) > d_t\).

The threshold value classifies the samples into two sets; the first set contains zero decision values, while the other includes one. The choice of the \(d_t\) value or even the number depends on the design space and the requirement of the information system.

5.2.2 Cut concept

let \(IS=(O,A \cup \{d\})\) be an information system with decision attribute d where \(O=\{o_1,o_2,\dots ,o_k\}\). Assuming that \(V_x=[lb_x,ub_x]\subset R\) for each \(x \in A\) where R is the real numbers’ set. \(lb_x\) and \(ub_x\) are the lower and upper bounds of the attribute x, respectively.

Definition 5

(Set of cuts) (Shan and Wang 2003) For each \(V_x\), \(P_x\) partitioned the domain into subintervals and is uniquely stated by the cut set \(C_x=\{c_1^x,c_2^x,\dots ,c_l^x\}\). Classes of the overall family P is represented by \(P=\cup _{x\in A}\{x\}\times C_x \). A cut on \(V_x\) is defined as any pair \((x,c) \in P\).

The MD-heuristic method (Nguyen 1997) can build a set of cuts with the fewest attribute elements that can distinguish all pairs of objects in the universe. The steps of this method can be summarized as follows:

  1. 1.

    Construct a new decision table from the original one within the computation of:

    • A propositional parameter will be introduced for each interval \(P_l^{x_n}\) corresponding to the attribute \(x_n\), where l represents the number of intervals.

    • Each interval’s midpoint represents the c number, and then the cut pair can be defined as \((x_n,c_l)\) as the number of cuts is the same as the number of intervals.

  2. 2.

    The main elements of the new table are:

    • The first column consists of object pairs with a contrasting value of the decision attribute.

    • The first row contains all the corresponding attributes’ partitioned intervals (propositional parameters).

    • The cell value depends on the propositional parameter of each pair of objects and the cut value of the corresponding interval. If \(\min (x(o_i),x(o_j))< c_l < \max (x(o_i),x(o_j))\) the value is 1 and 0 otherwise.

  3. 3.

    Select the column with a maximum number of 1’s or anyone with the same maximum number of 1’s.

  4. 4.

    Remove from the table the selected column in the previous step and rows with value 1 in this column.

  5. 5.

    Repeat step 3. if the table has data; otherwise, stop.

At the end of these steps, the deleted propositional parameters and their cuts give the decision’s system resultant cut sets P.

5.3 Example

The rough set concepts, as well as the cut concepts, will be demonstrated in this example, taking the function \(f_{obj}(X)=x_1^2+x_2^2+x_3^2\) where \(X=[x_1\ x_2\ x_3]\) and \(V_x=[-2,2]\). As shown in Table 2, we use Matlab code to account for five random samples and compute their corresponding function value. Then, we choose a threshold value as the mean value of the output function \(dt=mean(f_{obj}(X))\), so Table 3 represents a complete information system with decision attribute d.

Table 2 Example of an information system of \(f_{obj}(X)\)
Table 3 Example of an information system

The steps of the MD-heuristic method can be applied to Table 3 as the following:

  1. 1.

    Computation step:

    • Each \(x_n\) attribute has four intervals \(P_l^{x_n}\) where \(n=1,2,3\) and \(l=1,2,3,4\).

    • Cut sets are \(C_{x_1}=\{-1.1235,-0.9365,-0.4557,0.6305\}, C_{x_2}=\{-1.2691,-1.1586,-1.0928,-0.6733\}\), and \(C_{x_3}=\{-1.0082,-0.5174,0.6702,1.6565\}\).

  2. 2.

    The new table element:

    • The intersection between the first column and the first row contains different decision pairs of objects \((o_1,o_2)\).

    • Computations of \(\min (x(o_1),x(o_2)),\max (x(o_1),x(o_2)) \) are \(-1.2209\) and \(-1.0963\), respectively. The cell value for \(x_2\) will take one because the value of its cut \(c_2=-1.1586\) lies inside the interval \([-1.2209,-1.0963]\) and so on for all different pairs (see Table 4).

  3. 3.

    Column \(P_2^{x_2}\) has the maximum number of 1’s.

  4. 4.

    Remove column \(P_2^{x_2}\) and rows with one value on this column.

  5. 5.

    Stop; the table has no data.

The resulting cut of this method after the previous steps is \(C_{x_2}=\{-1.1586\}\); as a result, the region of interest is divided into two subspaces concerning \(x_2\). The first subspace is \([-2, -1.1586]\), whereas the second is \([-1.1586,2]\).

Table 4 A new information system from Table 3

6 Rough sine cosine algorithm

In the previous sections, we introduced the SCA steps (Mirjalili 2016) and new concepts of RST (Shan and Wang 2003), and we aim to combine these two concepts in our work. We are establishing a new strategy and enhancing SCA for various issues. SCA uses a simple mathematical function to solve optimization problems, so adding the advantage of clustering the problem into small spaces will be a good hybridization. The rough sine cosine algorithm (RSCA) comprises two phases: In the first phase, two levels of SCA are used as a population-based global optimization system to solve optimization problems. In the second phase, RST improves the solution quality by considering the roughness of the previously achieved optimal solution. The roughness of the optimal solution can be expressed as a pair of precise notions based on the lower and higher bounds that make up the boundary region interval. Then, inside this region, new solutions are created randomly using the second level of SCA to increase the speed with which a solution is found. The RSCA is explained in the following manner.

6.1 Phase 1

This phase consists of two levels of SCA, but we will not run them parallel. The first level will be run as mentioned in the previous Sect. 5.1, starting with the details of the objective function, such as the variables’ lower and upper limits and the dimension. Then calculate the optimal value of the selected function and its position after the initialization step and run for many iterations less than the maximum iteration. The final value is reached after choosing the random parameters \(r_1,r_2\), and \(r_3\) in addition to the parameter r4, which is used to update solutions and switch between sine and cosine equations, respectively. This level’s output will be the second level’s input besides the rough phase’s output. We will run the second level only if the new interval of the rough step differs from the original interval; otherwise, the first level is enough as an optimization process. This level starts with the final optimal solution, the optimal position, and new intervals, while the ending criteria of this level depend on the number of new intervals. This level only searches in new subspaces from the first level’s endpoint. Then, the new optimal points are returned to the first level to choose the least fitness and perspective positions as the latest update of x values to the next iteration. Repeat these steps for each selected iteration to get the final best score and locus.

6.2 Phase 2

This phase aims to convert the output of the first level of SCA to an information system and then apply the RST concepts in the previous section. We construct the IS using the destination search as the attributes that depend on the variables’ dimension, and the objective function represents the decision attribute. After applying the Definition 4 of the threshold method and considering \(d_t\) as the average of the returned best fitness values, we get the binary representation of the decision attribute. Finally, the decision table is completed, followed by the steps in Sect. 5.2.2. This phase generates new subspace or new search intervals that are subsets of the boundary interval [lbub], and the number of elements in the set of cuts determines the number of new intervals. At the end of this stage, we will go to the second level of SCA, as mentioned in the first phase, to complete the optimization process. The flow chart and pseudo code in Figs. 4 and 5 clarify the sequence of the proposed RSCA and the input and output of each stage, and the highlighted steps in Fig. 4 indicate the modification of the SCA.

Fig. 4
figure 4

The RSCA flow chart

Fig. 5
figure 5

The RSCA pseudocode

Table 5 Results of unimodal benchmark functions (Dim = 30)
Table 6 Results of multimodal benchmark functions (Dim = 30)
Table 7 Results of fixed-dimension multimodal benchmark functions

7 Results

In this section, the proposed RSCA algorithm is evaluated on test benchmark functions (Yao et al. 1999) classified into three groups: unimodal, multimodal, and fixed-dimension multimodal. As explained previously, unimodal test functions have a single optimum and can be used to benchmark; an algorithm’s exploitation and convergence. On the other hand, multimodal test functions have more than one optimum, making them more challenging to master than unimodal test functions. One optimum is known as the global optimum, while the others are known as the local optima. An algorithm should avoid all local optima approaches and find the global optimum. As a result, multimodal test functions can evaluate algorithm exploration and avoidance of local optima.

7.1 The proposed RSCA settings

The RSCA algorithm was run 30 times along 500 iterations on each benchmark function. Tables 5 and 6 have population sizes of 30 (agent no = 30) and have dimensions of 30 (Dim = 30) overall results, but Table 7 has constant dimensions as the description of the benchmarked function The SCA source code is publicly available at https://seyedalimirjalili.com/sca. This code is modified to match the desired output of the proposed RSCA phases; also, the required code for the second phase is developed as a connection between the two levels of the SCA. Tables 5, 6 and 7 show each tested function’s mean (avg) and standard deviation (std). The RSCA method is compared to SCA (Mirjalili 2016) as the main algorithm aimed to be enhanced. ALO (Mirjalili 2015a), and MFO (Mirjalili 2015c) as nature-inspired algorithms are added to the comparison tables. The RSCA algorithm is compared to two swarm-inspired algorithms: SSA (Mirjalili et al. 2017) and DA (Mirjalili 2015b). All these algorithms are also open-source and available at the website https://seyedalimirjalili.com/projects.

7.2 Comparison of RSCA results with other algorithms

The RSCA algorithm beats other algorithms in most test cases, as shown by the results of the algorithms on the unimodal test functions in Table 5. It was the most efficient optimizer for functions F1 through F7, except for F6, but it was not the worst. The outcomes for functions F8–F23 (multimodal and fixed-dimension multimodal functions) in Tables 6 and 7 show that RSCA can also deliver competitive results on multimodal benchmark functions. Furthermore, compared to SCA, ALO, SSA, DA, and MFO, RSCA produces very competitive results and occasionally exceeds them. These results demonstrated that the RSCA method is useful for exploration. The bold font indicates the least mean and standard deviation values, as indicated in the tables.

Fig. 6
figure 6

Algorithms convergence curves of some unimodal functions

Fig. 7
figure 7

Algorithms convergence curves of some multimodal functions

Fig. 8
figure 8

F17 (fixed-dimension functions)

Fig. 9
figure 9

F23 (fixed-dimension functions)

The six algorithms’ convergence curves of some functions are shown in Figs. 6, 7, 8 and 9 to illustrate the algorithms’ convergence rate. The best score demonstrates the fitness of the best solution produced in each iteration over 30 runs. The RSCA convergence curve shows a clear falling tendency on all the test functions evaluated so that the RSCA algorithm can better approximate the global optimum over many iterations. For F6 (Fig. 6c), in the first group of unimodal functions, the convergence curve of SSA tends to be below the RSCA’s convergence curve at the end of approximately \(50^{th}\) iterations, although the competitive start from the beginning of the RSCA approach. RSCA scores the lowest values against other algorithms, As shown in Fig. 7b and c. Unlike F8 (Fig. 7a), most algorithms are close to each other for about the first 350 iterations. Figure 8a displays that the start and end of the curves are the same for six algorithms; the figure is magnified for more details across iterations, as shown in Fig. 8b, c. Although SCA records the highest values, the last benchmark function clarifies the algorithms’ proximity (see Fig. 9).

7.3 T-test results

The reliability of the RSCA algorithm will be demonstrated by the t-test, the most used technique for analyzing data when a sample of measurements is averaged. Table 8 displays the T-test values of RSCA versus SCA, ALO, SSA, DA, and MFO. The p-value of 23 benchmark functions is calculated as shown in Table 8. The p-value is chosen at 0.05; if the result is less than 0.05, the output data are different; otherwise, there may be a difference between the algorithm’s output. The RSCA is very competitive with the other algorithms along the functions. For example, F6, F12, and F13 have p-values greater than 0.05, which means RSCA is competitive with SCA. F16 p-values of all algorithms against RSCA except DA, F18 values of RSCA versus algorithms except SCA, and with the highest p-values for all algorithms. RSCA competes with SSA, DA, and MFO with values of 0.76, 0.2, and 0.06, respectively, of F20. For F23, the p-value of RSCA against SSA is equal to 0.056, which concludes the reliability of the RSCA technique.

7.4 Time complexity analysis of RSCA

Here, we assess and compare the complexity of SCA versus RSCA used in the tests to objectively compare the algorithms’ quality. The maximum number of algorithm iterations T, the number of dimensions dim, and the number of search agents or solutions N all affect the time efficiency of the algorithm. The SCA algorithm’s temporal complexity mostly depends on how often the population’s members are evaluated for fitness. The algorithm’s temporal complexity is then \( O(N*dim*T )\). With the proposed method RSCA, the time complexity is affected by the two additional phases performing two-level fitness, discovering a new search region \(R_{new}\), and probability computation at each iteration \( O(N^2*dim*T^2*R_{new})\). The RSCA algorithm is more complex than the original SCA and its variations, as can be observed. Nonetheless, the experimental findings show that increasing algorithm complexity improves algorithm performance.

Table 8 P-values of RSCA vs the other algorithms

8 Investigation of engineering optimization problems

The proposed RSCA for resolving engineering design issues is validated in this section. Since these design problems involve linear and nonlinear constraints, the penalty function method in Eq. 5 is employed. Choosing penalty multiplier R as a constant \(10^6\) and a comparison with algorithms from the literature will be shown below.

8.1 Spring design

This design problem was handled by different optimization techniques such as penalty functions (Belegundu and Arora 1995), constraints correction at constant cost Arora (2004), and metaheuristic algorithms (Coello and Montes 2002; Yang 2010; Askarzadeh 2016; Ji et al. 2020). As shown in Fig. 10, the main design factors of the tension–compression problem are the spring’s wire diameter \(d=x_1\), the mean coil diameter \(D=x_2\), and the number of active coils \(N=x_3\). This engineering challenge aims to reduce the tension-compression spring’s weight. In the literature, researchers Arora (2004), Belegundu (1982), and Coello (2000) described and solved this optimization problem. The solution to this problem can be considered \(X=[x_1\ x_2\ x_3]= [d\ D\ N]\), and the model of the optimization problem can be stated as follows:

$$\begin{aligned} \min {f_{obj}(X)}=(x_3+2)x_2x_1^2 \end{aligned}$$
(11)

Subject to:

$$\begin{aligned} g_1(X)= & {} 1-\frac{x_2^3x_3}{71785x_1^4}\le 0 \end{aligned}$$
(12)
$$\begin{aligned} g_2(X)= & {} \frac{4x_2^2-x_1x_2}{12566(x_2x_1^3-x_1^4)}+\frac{1}{5108x_1^2}\le 0 \end{aligned}$$
(13)
$$\begin{aligned} g_3(X)= & {} 1-\frac{140.45x_1}{x_2^2x_3}\le 0 \end{aligned}$$
(14)
$$\begin{aligned} g_4(X)= & {} \frac{x_1+x_2}{1.5}-1\le 0 \end{aligned}$$
(15)
$$\begin{aligned}{} & {} .05\le x_1\le 2.25\le x_2\le 1.3,\ 2\le x_3\le 15 \end{aligned}$$
(16)
Fig. 10
figure 10

Tension–compression spring (Coello 2000)

Table 9 Optimum values of spring design problem

The proposed RSCA has been applied with 20 search agents and 500 iterations and compared with SCA, SSA, ALO, DA, and MFO. The same penalty function was employed as a constraint-handling technique to establish a fair comparison between these methods. Table 9 reports the best results for spring’s design problem of RSCA, SCA, SSA, ALO, DA, and MFO. These results represent minimum parameters’ values X, perspective constraints \(g_i(X),\ i=1,...,4\), and the new objective for constrained problem F(X). RSCA approach yields the optimal factors of \(X=[0.1413\ 1.3\ 11.4332]\), with the appropriate function value equal to \(F(X)=33079.55\). Moreover, the restrictions are determined \(g_i(X)=[0.0254\ 0.1749\ 0.0430\ -0.0076]\). Although the six algorithms violate the constraints except for \(g_4(X)\), RSCA has the best function minimum value. The six algorithms’ convergence curves for the optimal objective value obtained through randomly chosen iterations are shown in Fig. 11.

Fig. 11
figure 11

Algorithms convergence curve of spring design problem

Fig. 12
figure 12

Welded beam (Coello 2000)

Fig. 13
figure 13

Algorithms convergence of welded beam design problem

Fig. 14
figure 14

Vessel pressure (Coello 2000)

8.2 Welded beam design

This test problem aims to reduce the welded beam fabrication cost as much as possible. When designing a welded beam (Rao 2009; Coello 2000; Coello and Montes 2002; Rizk-Allah 2017), shear stress \((\tau )\), bending stress in the beam \((\sigma )\), buckling load on the bar \((P_c)\), end deflection of the beam \((\delta )\), and side restrictions are all factors to consider. As indicated in Fig. 12, there are four design factors: the thickness of the weld \((h=x_1)\), length of the clamped bar \((l=x_2)\), the height of the bar \((t=x_3)\), and thickness of the bar \((b=x_4)\). These design factors can be considered as a vector \(X=[x_1\ x_2\ x_3\ x_4]=[h\ l\ t\ b]\). The mathematical model of this design problem has seven constraints and can be represented as follows:

$$\begin{aligned} \min {f_{obj}(X)}=1.10471{x_1}^2x_2+.04811x_3 x_4(14+x_2) \end{aligned}$$
(17)

Subject to:

$$\begin{aligned} g_1(X)= & {} \tau (X)-\tau _{max}\le 0 \end{aligned}$$
(18)
$$\begin{aligned} g_2(X)= & {} \sigma (X)-\sigma _{max}\le 0 \end{aligned}$$
(19)
$$\begin{aligned} g_3(X)= & {} x_1-x_4\le 0 \end{aligned}$$
(20)
$$\begin{aligned} g_4(X)= & {} 0.10471{x_1}^2+.04811x_3 x_4(14+x_2)-5\le 0 \end{aligned}$$
(21)
$$\begin{aligned} g_5(X)= & {} 0.125-x_1\le 0 \end{aligned}$$
(22)
$$\begin{aligned} g_6(X)= & {} \delta (X)-\delta _{max}\le 0 \end{aligned}$$
(23)
$$\begin{aligned} g_7(X)= & {} P-P_c(X)\le 0 \end{aligned}$$
(24)

where

$$\begin{aligned} \tau (X)= & {} \sqrt{\tau '^2+2\tau '\tau ''\frac{x_2}{2R}+\tau ''^2} \end{aligned}$$
(25)
$$\begin{aligned} \tau '= & {} \frac{P}{\sqrt{2}x_1x_2}, \tau ''=\frac{MR}{J}, M=P(L+\frac{x_2}{2}) \end{aligned}$$
(26)
$$\begin{aligned} R= & {} \sqrt{\frac{x_2^2}{4}+{\frac{x_1+x_3}{2}}^2} \end{aligned}$$
(27)
$$\begin{aligned} J= & {} 2(\sqrt{2}x_1x_2[\frac{x_2^2}{12}+{\frac{x_1+x_3}{2}}^2]) \end{aligned}$$
(28)
$$\begin{aligned} \sigma (X)= & {} \frac{6PL}{x_4x_3^2},\ \delta (X)=\frac{4PL^3}{Ex_3^3x_4} \end{aligned}$$
(29)
$$\begin{aligned} P_c(X)= & {} \frac{4.013E\sqrt{\frac{x_3^2x_4^6}{36}}}{L^2}(1-\frac{x_3}{2L}\sqrt{\frac{E}{4G}}) \end{aligned}$$
(30)
$$\begin{aligned} P= & {} 6000\ lb,\ L=14in,\nonumber \\ E= & {} 30\times 10^6\ psi,\ G =12\times 10^6\ psi \end{aligned}$$
(31)
$$\begin{aligned} \tau _{max}= & {} 13600\ psi,\ \sigma _{max}=30000\ psi, \nonumber \\ \delta _{max}= & {} 0.25\ in \end{aligned}$$
(32)
$$\begin{aligned}{} & {} 0.1\le x_1,x_4\le 2,\ 0.1\le x_2,x_3\le 10 \end{aligned}$$
(33)

Many researchers have used various optimization techniques to address this issue. Coello (COELLO 2000) and Deb (Deb 1991, 2000) used GA to tackle this optimization challenge. From the literature, SCA, SSA, ALO, DA, and MFO algorithms were applied to handle this problem.

Table 10 shows the results of 30 different runs of the previous algorithms compared with the RSCA. We used 20 search agents with 500 iterations to deal with this problem. Table 10 demonstrates the best results of the proposed RSCA compared with SCA, SSA, ALO, DA, and MFO. As shown in Table 10, DA and MFO record the lowest values \(F(X)=4.0643\) and \(F(X)=4.0635\), respectively. Although high competence of these algorithms, they violate \(g_1\), \(g_2\), and \(g_3\) constraints, unlike the remaining algorithms. The RSCA’S design parameters values equal \([1\ 1\ 4.1034\ 1]\) and its objective value \(F(X)=4.0659\). The objective values of SCA, SSA, and ALO are \(F(X)=4.0667\), \(F(X)=4.0635\), and \(F(X)=4.0635\), respectively. The RSCA’s objective value is close to the objective values of SCA, SSA, and ALO but not the worst. Figure 13 clarifies the algorithms’ convergence curves’ closeness to the optimal objective value obtained through random iterations.

8.3 Vessel pressure design

Kannan and Kramer (1994) introduced this problem as shown in Fig. 14; a cylindrical vessel is capped at both ends by hemispherical heads. The shell is constructed from two sections of rolled steel plate welded longitudinally to form a cylinder. The goal is to reduce the entire cost \(f_{obj}(X)\), including material, forming, and welding costs. \(T_s=x_1\) (shell thickness), \(T_h=x_2\) (head thickness), \(R=x_3\) (inner radius), and \(L=x_4\) (length of the cylindrical part of the vessel, excluding the head) are the four design variables in. The problem can be expressed using the same notation as Kannan and Kramer (1994), considering \(X=[x_1\ x_2\ x_3\ x_4]=[T_s\ T_h\ R\ L]\) (in inches).

$$\begin{aligned} \begin{aligned} \min {f_{obj}(X)}&=0.6224x_1x_3x_4+1.7781x_2x_3^2 \\&+3.1661x_1^2x_4+19.84x_1^2x_3 \end{aligned} \end{aligned}$$
(34)

Subject to:

$$\begin{aligned} g_1(X)= & {} -x_1+0.0193x_3\le 0 \end{aligned}$$
(35)
$$\begin{aligned} g_2(X)= & {} -x_3+0.00954x_3\le 0 \end{aligned}$$
(36)
$$\begin{aligned} g_3(X)= & {} -\pi x_3^2x_4+\frac{4}{3}\pi x_3^3+1296000\le 0 \end{aligned}$$
(37)
$$\begin{aligned} g_4(X)= & {} x_4-240\le 0 \end{aligned}$$
(38)
$$\begin{aligned}{} & {} 1\le x_1,x_2\le 99,\ 10\le x_3,x_4\le 200 \end{aligned}$$
(39)
Table 10 Optimum values of welded beam design problem
Table 11 Optimum values of vessel pressure problem
Fig. 15
figure 15

Algorithms convergence of pressure vessel design problem

Many authors used metaheuristic algorithms and other approaches to resolve this design problem (He and Wang 2007; Coello and Montes 2002; Coello 2000; Deb 1997; Hassanien et al. 2018; Rizk-Allah 2017).

Like the two previous applications, 20 search agents and 500 iterations were used to deal with this problem. Table 11 compares the suggested RSCA method to various algorithms for identifying the best design variables X, their related F(X) values, and perspective constraints \(g_i(X),\ i=1,...,4\). DA and MFO violate the \(g_4\) constraint; however, they have the lowest objective values \(F(X)=8796.9531\) and \(F(X)=8796.8952\), respectively. The remaining four algorithms satisfy the conditions where SSA has a minimum value of \(F(X)=8797.5220\) and is very close to the RSCA value of \(F(X)=8797.9745\). ALO and SCA record values \(F(X)=8801.54565\) and \(F(X)=8841.8214\), respectively, the higher values. Design parameter values of RSCA are represented by \(X=[1\ 1\ 51.5561\ 86.4812] \) and its constraint’s values \(g_i(X)=[-0.0049\ -0.5082\ -178.0628\ -153.5188]\). The convergence curves of the comparison algorithms prove the closeness of RSCA to the best algorithms values without constraint violation, as illustrated in Fig. 15.

9 Conclusion and future work

In this paper, the SCA is combined with the RST to overcome the limitation of SCA of being convergent to a local optimum and to improve the quality of the solutions discovered. The RST methodology is crucial because real-world problems are expected to contain ill-posed data. The proposed RSCA increased the solutions’ quality found and ensured a faster convergence to the best solution. RSCA consists of two phases: the SCA phase, partitioned into two levels, and the RST phase. SCA’s first level offered the initial optimal solutions to be partitioned in the RST phase. The RST phase’s main goal is searching for promising regions for better results than the initial ones by applying cut notations. The second level of SCA enhances the first-level solutions according to the new interesting search regions. The proposed RSCA algorithm is tested on 23 benchmark functions and three engineering design problems. Several algorithms from the literature are compared to the results produced by RSCA. The simulations demonstrated that the addition of RST results in a significant alteration to the SCA. It appears that the RSCA performed much better than the traditional SCA. The RSCA’s exceptional performance on benchmark challenges and engineering design problems demonstrated its suitability for use with challenging real-world issues.

The suggested RSCA has the following advantages, as shown in this article:

  • It can effectively enhance the search’s exploratory capabilities of the SCA.

  • It can improve the quality of optimum solutions of the SCA.

  • It can locate the best solution for benchmark functions and engineering design issues.

Although SCA performs well in obtaining the optimal solutions for design problems, there is still potential for enhancement in some respects. First, the RSCA cannot deal with all optimization tasks, and the issues in this study are specific. Second, the algorithm suggested in this study splits the search into two phases based on an iterative procedure, increasing the time complexity.

This research will open several topics, especially when working on complex practical tasks. We can improve the time complexity analysis using other searching strategies (Eskandar et al. 2012; Sadollah et al. 2016) integrated with RST. Other fascinating areas of applying the RSCA can be explored, including multi-objective problems (Tawhid and Savsani 2017). The benefit of the approach of rough interval (Seikh et al. 2021) for classifying decision optimization problems in engineering, economics, and health care.