0% found this document useful (0 votes)
206 views

2 - Sine Cosine Algorithm

The document describes the Sine Cosine Algorithm (SCA), a population-based metaheuristic for solving continuous optimization problems. SCA employs sine and cosine functions to update candidate solutions. It takes parameters like amplitude reduction factor and random weights to control movement towards or away from the best solution. The document provides pseudocode and examples to solve unimodal and multimodal functions as optimization tasks using SCA.

Uploaded by

Achmad P. Rifai
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
206 views

2 - Sine Cosine Algorithm

The document describes the Sine Cosine Algorithm (SCA), a population-based metaheuristic for solving continuous optimization problems. SCA employs sine and cosine functions to update candidate solutions. It takes parameters like amplitude reduction factor and random weights to control movement towards or away from the best solution. The document provides pseudocode and examples to solve unimodal and multimodal functions as optimization tasks using SCA.

Uploaded by

Achmad P. Rifai
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Sine Cosine Algorithm

(SCA)

METAHEURISTICS
Achmad P. Rifai
Evolutionary algorithms Physics-based Swarm Based Other algorithms
algorithms algorithms
Genetic Algorithms (GA) Simulated Annealing Particle Swarm Variable Neighborhood
(Holland 1992) (SA) (Kirkpatrick et al. Optimization (PSO) Search (VNS)
1983; Cerný 1985) (Kennedy and Eberhart (Mladenovic and Hansen,
1995) 1997)
Evolution Strategy (ES) Gravitational Search Ant Colony Optimization Large Neighborhood
(Rechenberg, 1978) Algorithm (GSA) (ACO) (Dorigo and Search (LNS) (Pisinger
(Rashedi et al. 2009) Stützle, 2004) and Ropke, 2010)

Genetic Programming Charged System Search Grey Wolf Optimizer Stochastic Fractal Search
(GP) (Koza 1992) (CSS) (Kaveh and (GWO) (Mirjalili et al. (SFS) (Salimi 2015)
Talatahari 2010) 2014)

Biogeography Based Central Force Dragonfly Algorithm Sine Cosine Algorithm


Optimizer (BBO) (Simon Optimization (CFO) (DA) (Mirjalili 2016) (SCA) (Mirjalili2016)
2008) (Formato 2007)

.…. and many more methods


Type of optimization problem

Discrete SA, VNS, LNS GA, BBO, ACO

PSO, GWO, SCA,


Continuous SA, ILS, VNS ABC (artificial bee
colony)

Trajectory Population

Type of metaheuristics
Sine-Cosine Algorithm (SCA)
• The SCA is a population-based metaheuristic framework proposed by
Mirjalili (2016).
• Mainly used to solve continuous problem.
• It employs two trigonometric functions to update the candidate
solutions: the sine and cosine functions.
𝑡 +1 𝑡
 
𝑋 𝑗 =𝑋 𝑗 +¿
𝑡 +1 𝑡
 
𝑋 𝑗 =𝑋 𝑗 +¿

The generated Best known


Previous solution SCA parameters
solution solution
Sine-Cosine Algorithm (SCA)
Parameters of SCA
 • dictates the next position regions (or movement direction) which could be either in
the space between the solution and destination or outside it.

• defines how far the movement should be towards or outwards the destination.

• gives random weights for destination in order to stochastically emphasize ( > 1) or


deemphasize ( < 1) the effect of desalination in defining the distance.

• equally switches between the sine and cosine components.


Parameters of SCA

Sine and cosine with range


of [-2,2]
Decreasing pattern for range
of sine cosine
 = Number of
Pseudocode of SCA
1 Input: and iterations
2 Generate a set of initial population = current
3 While iteration
4 Calculate the fitness values of each search agent = Population
5 Update the best solution of this iteration size
6 Update = SCA constant
7 Update the position of search agents using sine-cosine = initial
equation with respect to population
8 End while
9 Output: , , and

Final population Best solution (solution with Minimum objective value


minimum/maximum objectives value)
Example
• Solve these equations

   

s.t.
s.t.
Example 1
• First equation (unimodal function)

  𝑛  
2
Min 𝑓 1 ( 𝑥 ) =∑ 𝑥 𝑖
𝑖=1
s.t.
 = Number of
Pseudocode of SCA
1 Input: and iterations
2 Generate a set of initial population = current
3 While iteration
4 Calculate the fitness values of each search agent = Population
5 Update the best solution of this iteration size
6 Update = SCA constant
7 Update the position of search agents using sine-cosine = initial
equation with respect to population
8 End while
9 Output: , , and

Final population Best solution (solution with Minimum objective value


minimum/maximum objectives value)
Example 1
  𝑛
1. Set the parameters
 
Min 𝑓 1 ( 𝑥 ) =∑ 𝑥 2
𝑖
𝑖=1

Lower and upper bound =


 
Example 1

2. Create initial solution randomly


 

Perform solution generation for each variable


Replicate the process times according to the population size
Example 1

3. Set , create while or for loop until is reached


 

4. Calculate the fitness

  𝑛
2
Min 𝑓 1 ( 𝑥 ) =∑ 𝑥 𝑖
𝑖=1

Perform the calculation for all solutions in the population


5. Record the best solution with minimum objective value
Example 1
 
6. Update
   

7. Generate new solution with sine cosine function


If
 
sine function
else
 
cosine function
Example 1
8. Update
 

9. Record the best known solution and minimum obtained


objective values

Show the results


Example 2
• Second equation (multi-modal function)
 

s.t.
Task 2
Solve these problems using SCA

 
1.

s.t.
Task 2
2.  

s.t.

To be submitted by next 2 weeks


References

• Gendreau, M., & Potvin, J. Y. (2010). Handbook of metaheuristics. Springer, Boston,


MA.
• Mirjalili, S. (2016). SCA: a sine cosine algorithm for solving optimization problems.
Knowledge-based systems, 96, 120-133.

You might also like