optiprofiler.get_plib_config#
- optiprofiler.get_plib_config(plib, verbose=False)[source]#
Read the current configuration of a problem library.
The returned dictionary reflects the effective values: if an environment variable
<PLIB>_<VARIABLE>(all upper-case) has been set (e.g. viaset_plib_config), it takes precedence over the value in the library’sconfig.txt.- Parameters:
- plibstr
Name of the problem library (e.g.
's2mpj','pycutest').- verbosebool, optional
If
True, the full contents ofconfig.txt(including comments) are printed so that the user can see all available options and their descriptions. Default isFalse.
- Returns:
- dict
Effective configuration as
{variable_name: value}.
- Raises:
- FileNotFoundError
If the problem library does not have a
config.txtfile.
Examples
from optiprofiler import get_plib_config config = get_plib_config('s2mpj') print(config) # {'variable_size': 'default', 'test_feasibility_problems': 0} get_plib_config('s2mpj', verbose=True) # Prints the full config.txt with comments, then returns the dict.