Skip to content

Commit

Permalink
changed the merging and summary creation procedures for solution bran…
Browse files Browse the repository at this point in the history
…ches to optimize compute time
  • Loading branch information
Richert committed Mar 29, 2024
1 parent bce3f88 commit 455c6df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Changelog
~~~~~

- updated how summaries of solution branches are generated to save computation time (results are now merged first, such that a summary is created only once)
- fixed a minor bug with the extraction of solutions via their keys
- improved how the continuation direction for automated bidirectional continuations is handled

0.8.5
~~~~~
Expand Down
8 changes: 5 additions & 3 deletions pycobi/pycobi.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,11 @@ def run(self, origin: Union[int, str, object] = None, starting_point: Union[str,
if bidirectional:

# perform continuation in opposite direction
auto_kwargs.pop('DS', None)
ds = auto_kwargs.pop('DS', None)
_, solution = self.run(origin, starting_point, variables=variables, params=params,
get_stability=get_stability, get_period=get_period, get_timeseries=get_timeseries,
get_eigenvals=get_eigenvals, get_lyapunov_exp=get_lyapunov_exp, bidirectional=False,
name='bidirect:cont2', DS='-', **auto_kwargs)
name='bidirect:cont2', DS=1e-3 if ds == '-' else '-', **auto_kwargs)

else:

Expand Down Expand Up @@ -559,7 +559,9 @@ def get_solution(self, cont: Union[Any, str, int], point: Union[str, int] = None
except (KeyError, IndexError):
continue
else:
raise ValueError(f'Invalid point {point} for continuation with ICP={icp} on branch {branch}.')
s = None
solution_name = 'No Label'
solution_idx = 0

# make sure a proper solution was extracted, else return an unlabeled solution
if solution_name != 'No Label':
Expand Down

0 comments on commit 455c6df

Please sign in to comment.