-
Notifications
You must be signed in to change notification settings - Fork 227
/
example.py
34 lines (26 loc) · 1.03 KB
/
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
25
26
27
28
29
30
31
32
33
34
# -*- coding: utf-8 -*-
"""
Created on Sun May 24 15:50:25 2016
@author: raneem
"""
from optimizer import run
# Select optimizers
# "SSA","PSO","GA","BAT","FFA","GWO","WOA","MVO","MFO","CS","HHO","SCA","JAYA","DE"
optimizer = ["GA", "PSO", "GWO", "MVO", "WOA"]
# 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)