Skip to content

Commit e615b22

Browse files
safe_sequences_tine now includes all time spent for safety
1 parent ca08105 commit e615b22

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flowpaths/abstractwalkmodeldigraph.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ def create_solver_and_walks(self):
187187

188188
self._encode_walks()
189189

190+
start_time = time.perf_counter()
190191
self._apply_safety_optimizations()
192+
utils.logger.debug(f"{__name__}: Applied safety optimizations in {time.perf_counter() - start_time} seconds.")
193+
self.solve_statistics["safe_sequences_time"] = time.perf_counter() - start_time
191194

192195
self._encode_subset_constraints()
193196

@@ -378,13 +381,10 @@ def _apply_safety_optimizations(self):
378381
self.safe_lists = []
379382

380383
if self.optimize_with_safe_sequences or self.optimize_with_safety_as_subset_constraints or self.optimize_with_max_safe_antichain_as_subset_constraints:
381-
start_time = time.perf_counter()
382384
self.safe_lists += safetypathcoverscycles.maximal_safe_sequences_via_dominators(
383385
G=self.G,
384386
X=self.trusted_edges_for_safety,
385387
)
386-
utils.logger.debug(f"{__name__}: Found {len(self.safe_lists)} safe sequences in {time.perf_counter() - start_time} seconds.")
387-
self.solve_statistics["safe_sequences_time"] = time.perf_counter() - start_time
388388

389389
if self.safe_lists is None:
390390
return

0 commit comments

Comments
 (0)