-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.py
24 lines (17 loc) · 936 Bytes
/
example.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
from optimizer import run
# Select optimizers
# "SSA","PSO","GA","BAT","FFA","GWO","WOA","MVO","MFO","CS","HHO","SCA","JAYA","DE"
optimizer=["SSA","PSO","GWO"]
# Select benchmark function"
# "F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","F13","F14","F15","F16","F17","F18","F19"
# "Ca1","Ca2","Gt1","Mes","Mef","Sag","Tan","Ros"
objectivefunc=["F3","F4"]
# Select number of repetitions for each experiment.
# To obtain meaningful statistical results, usually 30 independent runs are executed for each algorithm.
NumOfRuns=3
# Select general parameters for all optimizers (population size, number of iterations) ....
params = {'PopulationSize' : 30, 'Iterations' : 50}
#Choose whether to Export the results in different formats
export_flags = {'Export_avg':True, 'Export_details':True,
'Export_convergence':True, 'Export_boxplot':True}
run(optimizer, objectivefunc, NumOfRuns, params, export_flags)