-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMethod.py
More file actions
53 lines (31 loc) · 1.02 KB
/
Method.py
File metadata and controls
53 lines (31 loc) · 1.02 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from abc import ABC as AbstractClass
from abc import abstractclassmethod
class Method( AbstractClass ):
epsilon = 10e-10
maxNumberOfIterations = 100
def __init__(self):
self.dimension = 2
self.objectiveFunction = None
self.current = None
self.solution = None
self.stopConditionMethod = None
self.iterationCounter = 0
def setObjectiveFunction( self, objectiveFunction ):
self.objectiveFunction = objectiveFunction
def setCurrent( self, current ):
self.current = current
def getIterationCounter(self):
return self.iterationCounter
def getSolution( self ):
return self.solution
def setDimension( self, dimension ):
self.dimension = dimension
@abstractclassmethod
def iteration():
pass;
@abstractclassmethod
def stopCondition():
pass
@abstractclassmethod
def isLinearOptimizationRequired():
pass