Skip to content

Commit b80277f

Browse files
Update optimizer.py
1 parent d72e29e commit b80277f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pypop7/optimizers/core/optimizer.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,14 @@ def __init__(self, problem, options):
4444
self.fitness_function = problem.get('fitness_function') # to be *minimized*
4545
self.ndim_problem = problem.get('ndim_problem') # number of problem dimensionality
4646
assert self.ndim_problem > 0
47-
self.upper_boundary = problem.get('upper_boundary')
48-
self.lower_boundary = problem.get('lower_boundary')
47+
# mainly for the initialization process
48+
self.upper_boundary = problem.get('upper_boundary') # upper boundary of search range
49+
self.lower_boundary = problem.get('lower_boundary') # lower boundary of search range
50+
# only for the initialization process
4951
self.initial_upper_boundary = problem.get('initial_upper_boundary', self.upper_boundary)
5052
self.initial_lower_boundary = problem.get('initial_lower_boundary', self.lower_boundary)
51-
self.problem_name = problem.get('problem_name')
53+
# mainly for the printing purpose
54+
self.problem_name = problem.get('problem_name') # should be of data type `str`
5255
if (self.problem_name is None) and hasattr(self.fitness_function, '__name__'):
5356
self.problem_name = self.fitness_function.__name__
5457

0 commit comments

Comments
 (0)