import solution.py from evolopy and use it
This commit is contained in:
parent
4daac79f23
commit
ffedbbaedf
15 changed files with 37 additions and 14 deletions
|
@ -8,7 +8,7 @@ import math
|
|||
import numpy
|
||||
import random
|
||||
import time
|
||||
from solution import solution
|
||||
from .solution import solution
|
||||
|
||||
|
||||
def BAT(objf, lb, ub, dim, N, Max_iteration):
|
||||
|
|
|
@ -8,7 +8,7 @@ import math
|
|||
import numpy
|
||||
import random
|
||||
import time
|
||||
from solution import solution
|
||||
from .solution import solution
|
||||
|
||||
|
||||
def get_cuckoos(nest, best, lb, ub, n, dim):
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import random
|
||||
import numpy
|
||||
import time
|
||||
from solution import solution
|
||||
from .solution import solution
|
||||
|
||||
|
||||
# Differential Evolution (DE)
|
||||
|
|
|
@ -20,7 +20,7 @@ Created on Sun May 29 00:49:35 2016
|
|||
import numpy
|
||||
import math
|
||||
import time
|
||||
from solution import solution
|
||||
from .solution import solution
|
||||
|
||||
|
||||
def alpha_new(alpha, NGen):
|
||||
|
|
|
@ -8,7 +8,7 @@ import random
|
|||
import time
|
||||
import sys
|
||||
|
||||
from solution import solution
|
||||
from .solution import solution
|
||||
|
||||
|
||||
def crossoverPopulaton(population, scores, popSize, crossoverProbability, keep):
|
||||
|
|
|
@ -8,7 +8,7 @@ Created on Mon May 16 00:27:50 2016
|
|||
import random
|
||||
import numpy
|
||||
import math
|
||||
from solution import solution
|
||||
from .solution import solution
|
||||
import time
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ Created on Thirsday March 21 2019
|
|||
import random
|
||||
import numpy
|
||||
import math
|
||||
from solution import solution
|
||||
from .solution import solution
|
||||
import time
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import random
|
||||
import numpy
|
||||
import math
|
||||
from solution import solution
|
||||
from .solution import solution
|
||||
import time
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ Created on Mon May 16 10:42:18 2016
|
|||
import random
|
||||
import numpy
|
||||
import math
|
||||
from solution import solution
|
||||
from .solution import solution
|
||||
import time
|
||||
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import math
|
|||
import sklearn
|
||||
from numpy import asarray
|
||||
from sklearn.preprocessing import normalize
|
||||
from solution import solution
|
||||
from .solution import solution
|
||||
|
||||
|
||||
def normr(Mat):
|
||||
|
|
|
@ -7,7 +7,7 @@ Created on Sun May 15 22:37:00 2016
|
|||
|
||||
import random
|
||||
import numpy
|
||||
from solution import solution
|
||||
from .solution import solution
|
||||
import time
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import random
|
||||
import numpy
|
||||
import math
|
||||
from solution import solution
|
||||
from .solution import solution
|
||||
import time
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import random
|
||||
import numpy
|
||||
import math
|
||||
from solution import solution
|
||||
from .solution import solution
|
||||
import time
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ Created on Mon May 16 14:19:49 2016
|
|||
import random
|
||||
import numpy
|
||||
import math
|
||||
from solution import solution
|
||||
from .solution import solution
|
||||
import time
|
||||
|
||||
|
||||
|
|
23
evolopy/solution.py
Normal file
23
evolopy/solution.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Created on Tue May 17 17:06:19 2016
|
||||
|
||||
@author: Hossam Faris
|
||||
"""
|
||||
|
||||
|
||||
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.maxiers = 0
|
Loading…
Reference in a new issue