forked from nimishbongale/SpiderMonkey
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsolution.py
38 lines (32 loc) · 1.21 KB
/
solution.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# -*- coding: utf-8 -*-
"""
Python code of Spider-Monkey Optimization (SMO)
Coded by: Mukesh Saraswat (emailid: [email protected]), Himanshu Mittal (emailid: [email protected]) and Raju Pal (emailid: [email protected])
The code template used is similar to code given at link: https://github.com/himanshuRepo/CKGSA-in-Python
and C++ version of the SMO at link: http://smo.scrs.in/
Reference: Jagdish Chand Bansal, Harish Sharma, Shimpi Singh Jadon, and Maurice Clerc. "Spider monkey optimization algorithm for numerical optimization." Memetic computing 6, no. 1, 31-47, 2014.
@link: http://smo.scrs.in/
-- solution.py: Defining the solution variable for saving the output variables
Code compatible:
-- Python: 2.* or 3.*
Code further documented and explained by Repo maintainers
@nimishbongale
@tanisha0311
"""
class solution:
def __init__(self):
self.best = 0
self.bestIndividual=[]
self.convergence = []
self.optimizer=""
self.objfname=""
self.startTime=0
self.endTime=0
self.executionTime=0
self.lb=0
self.ub=0
self.dim=0
self.popnum=0
self.error =0
self.feval=0
self.maxiers=0