@@ -304,9 +304,9 @@ def __run_in_serial(self):
304
304
self ._output_file ,
305
305
)
306
306
307
- sim_monitor .update_status (sim_monitor .count )
307
+ sim_monitor .print_update_status (sim_monitor .count )
308
308
309
- sim_monitor .finalize_status ()
309
+ sim_monitor .print_final_status ()
310
310
311
311
except KeyboardInterrupt :
312
312
MonteCarlo ._reprint ("Keyboard Interrupt, files saved." )
@@ -398,7 +398,7 @@ def __run_in_parallel(self, n_workers=None):
398
398
399
399
sim_consumer .join ()
400
400
401
- sim_monitor .finalize_status ()
401
+ sim_monitor .print_final_status ()
402
402
403
403
@staticmethod
404
404
def __sim_producer (
@@ -458,7 +458,7 @@ def __sim_producer(
458
458
export_queue .put ((inputs_dict , outputs_dict ))
459
459
460
460
mutex .acquire ()
461
- sim_monitor .update_status (sim_idx )
461
+ sim_monitor .print_update_status (sim_idx )
462
462
mutex .release ()
463
463
464
464
except Exception as error :
@@ -1310,15 +1310,15 @@ def increment(self):
1310
1310
self .count += 1
1311
1311
return self .count
1312
1312
1313
- def update_status (self , sim_idx ):
1313
+ def print_update_status (self , sim_idx ):
1314
1314
"""Prints a message on the same line as the previous one and replaces
1315
1315
the previous message with the new one, deleting the extra characters
1316
1316
from the previous message.
1317
1317
1318
1318
Parameters
1319
1319
----------
1320
- msg : str
1321
- Message to be printed .
1320
+ sim_idx : int
1321
+ Index of the current simulation .
1322
1322
1323
1323
Returns
1324
1324
-------
@@ -1333,18 +1333,8 @@ def update_status(self, sim_idx):
1333
1333
1334
1334
MonteCarlo ._reprint (msg , end = "\r " , flush = True )
1335
1335
1336
- def finalize_status (self ):
1337
- """Prints the final status of the simulation.
1338
-
1339
- Parameters
1340
- ----------
1341
- show_process_time : bool, optional
1342
- If True, the process time will be shown. Default is True.
1343
-
1344
- Returns
1345
- -------
1346
- None
1347
- """
1336
+ def print_final_status (self ):
1337
+ """Prints the final status of the simulation."""
1348
1338
print ()
1349
1339
performed_sims = self .count - self .initial_count
1350
1340
msg = f"Completed { performed_sims } iterations."
0 commit comments