Skip to content

Commit

Permalink
Resolving merge conflicts
Browse files Browse the repository at this point in the history
Very simple merge resolution here. Nothing to say really.

Referencing issue #22.
	simplex.py
  • Loading branch information
ericchansen committed Jun 28, 2016
2 parents 73d69a7 + be48267 commit 80ed544
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions simplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,11 @@ def run(self, r_data=None):
self.new_ffs = sorted(self.new_ffs + [ff_copy], key=lambda x: x.score)
# Allow 3 cycles w/o change for each parameter present
self._max_cycles_wo_change = 3 * (len(self.new_ffs) - 1)
wrapper = textwrap.TextWrapper(width=79)
self.new_ffs = sorted(self.new_ffs + [ff_copy], key=lambda x: x.score)
# Shows all FFs parameters.
opt.pretty_ff_params(self.new_ffs)
# Start the simplex cycles.
wrapper = textwrap.TextWrapper(width=79)
current_cycle = 0
cycles_wo_change = 0
while current_cycle < self.max_cycles \
Expand All @@ -188,9 +189,9 @@ def run(self, r_data=None):
best_ff = self.new_ffs[0]
logger.log(20, '~~ START SIMPLEX CYCLE {} ~~'.format(
current_cycle).rjust(79, '~'))
logger.log(20, 'ORDERED FF SCORES:')
logger.log(20, wrapper.fill('{}'.format(' '.join('{:15.4f}'.format(
x.score) for x in self.new_ffs))))
logger.log(20, 'ORDERED FF SCORES:')
logger.log(20, wrapper.fill('{}'.format(
' '.join('{:15.4f}'.format(x.score) for x in self.new_ffs))))
inv_ff = self.ff.__class__()
if self.do_weighted_reflection:
inv_ff.method = 'WEIGHTED INVERSION'
Expand Down

0 comments on commit 80ed544

Please sign in to comment.