Skip to content

Commit 5f18006

Browse files
committed
better display
1 parent 16a4a3a commit 5f18006

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

xdeps/madxutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def get_info(self, key=None):
178178

179179
if key is None:
180180
print("Element of type: ", self._obj.__class__.__name__)
181-
self.get_table().show(header=False)
181+
self.get_table().show(header=False, max_col_width=100)
182182
else:
183183
if hasattr(self._obj, "__iter__"):
184184
return self._ref[key]._info()

xdeps/optimize/optimize.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ def run_bfgs(self, n_steps=1000, xrtol=1e-10, gtol=1e-18, disp=False):
844844
self.tag('bfgs')
845845

846846
def run_simplex(self, n_steps=1000, fatol=1e-11, xatol=1e100,
847-
adaptive=True, disp=False):
847+
adaptive=True, disp=False, verbose=True):
848848
"""
849849
Perform the optimization using the Nelder-Mead Simplex algorithm.
850850
@@ -861,6 +861,8 @@ def run_simplex(self, n_steps=1000, fatol=1e-11, xatol=1e100,
861861
disp : bool, optional
862862
If True, display convergence messages. Defaults to False."""
863863

864+
self._add_starting_point_to_log_and_print(verbose=verbose)
865+
864866
fff = self.get_merit_function(return_scalar=True)
865867
fff.zero_if_met = True
866868
bounds = fff.get_x_limits()
@@ -877,6 +879,8 @@ def run_simplex(self, n_steps=1000, fatol=1e-11, xatol=1e100,
877879
fff.set_x(res.x)
878880
self.tag('simplex')
879881

882+
self._print_end(verbose)
883+
880884
def run_direct(self, n_steps=1000, verbose=True, **kwargs):
881885
"""
882886
Perform the optimization using the DIRECT algorithm.

0 commit comments

Comments
 (0)