Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow user to clear have_fcn caching of optional functionality #65

Closed
rdzman opened this issue May 20, 2019 · 1 comment
Closed

allow user to clear have_fcn caching of optional functionality #65

rdzman opened this issue May 20, 2019 · 1 comment
Assignees

Comments

@rdzman
Copy link
Member

rdzman commented May 20, 2019

The have_fcn() function detects the availability of optional functionality (e.g. 3rd party solvers) and caches the result, including version and release date info if available. This cached information can become invalid if the Matlab/Octave path is subsequently modified, leading to the potential for incorrect behavior based on the now invalid cached results returned by have_fcn().

Currently this cache can be cleared for a given functionality by toggling it off then back on. E.g. for ipopt ...

have_fcn('ipopt', 0);
have_fcn('ipopt', 1);

It would be useful to be able to easily clear all of the cached information to force a recheck for all optional functionality, e.g. after modifying the Matlab path.

Something like ...

have_fcn('all', 'clear_cache');

We could also include the following as a shortcut for the two steps of disabling and re-enabling a particular functionality mentioned above.

have_fcn('ipopt', 'clear_cache');
@rdzman rdzman self-assigned this May 20, 2019
@rdzman
Copy link
Member Author

rdzman commented May 20, 2019

I should also mention that calling mpver is a good way to cause MATPOWER to check for (and cache) the availability of many of the optional solvers/functionalities at one go.

@rdzman rdzman closed this as completed in 406842a May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant