Skip to content

Commit 6997954

Browse files
Update optimizer.py
1 parent 3963e89 commit 6997954

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pypop7/optimizers/core/optimizer.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ def __init__(self, problem, options):
4545
self.ndim_problem = problem.get('ndim_problem') # number of problem dimensionality
4646
assert self.ndim_problem > 0
4747
# mainly for both the *initialization* process and the *constrained sampling* process:
48-
# Constrained sampling is covered in its extended library called `PyCoPop7`
48+
# Constrained sampling is mainly covered in its extended library called `PyCoPop7`
4949
self.upper_boundary = problem.get('upper_boundary') # upper boundary of search range
5050
self.lower_boundary = problem.get('lower_boundary') # lower boundary of search range
5151
# only for the *initialization* process
52-
self.initial_upper_boundary = problem.get('initial_upper_boundary', self.upper_boundary)
53-
self.initial_lower_boundary = problem.get('initial_lower_boundary', self.lower_boundary)
52+
self.initial_upper_boundary = problem.get('initial_upper_boundary',
53+
self.upper_boundary)
54+
self.initial_lower_boundary = problem.get('initial_lower_boundary',
55+
self.lower_boundary)
5456
# mainly for the printing purpose
5557
self.problem_name = problem.get('problem_name') # should be of data type `str`
5658
if (self.problem_name is None) and hasattr(self.fitness_function, '__name__'):
@@ -89,7 +91,7 @@ def __init__(self, problem, options):
8991
self.verbose = options.get('verbose', 10)
9092

9193
# auxiliary members
92-
self.Terminations, self.termination_signal = Terminations, 0 # 0 -> NO_TERMINATION
94+
self.Terminations, self.termination_signal = Terminations, 0 # 0 -> `NO_TERMINATION`
9395
self.n_function_evaluations = options.get('n_function_evaluations', 0)
9496
self.start_function_evaluations = None
9597
self.time_function_evaluations = options.get('time_function_evaluations', 0)

0 commit comments

Comments
 (0)