Skip to content

Commit bce95a2

Browse files
committed
optimize code
1 parent 9514e73 commit bce95a2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

biosteam/units/stage.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2593,12 +2593,10 @@ def _simultaneous_correction(self, x):
25932593
x[x < 0] = 0
25942594
x = x.reshape(shape)
25952595
r = self._objective(x)
2596-
try:
2597-
result = self._best_result
2598-
except:
2599-
self._set_point(x)
2596+
try: result = self._best_result
2597+
except: pass
26002598
else:
2601-
if result.r < r: self._set_point(result.x)
2599+
if result.r < r: x = result.x
26022600
return x
26032601

26042602
def _phenomena_iter(self, x0):

0 commit comments

Comments
 (0)