optiprofiler.problem_libs.s2mpj.s2mpj_load#
- optiprofiler.problem_libs.s2mpj.s2mpj_load(problem_name, *args)[source]#
Convert an S2MPJ problem name to a Problem instance.
- Parameters:
- problem_namestr
Name of the problem in the S2MPJ collection. More details about S2MPJ can be found at the official repository.
- Returns:
- optiprofiler.Problem
A
Probleminstance corresponding to the named problem.
See also
s2mpj_selectSelect problems from S2MPJ by criteria.
Notes
There are two ways to obtain the
problem_nameyou want:Use
s2mpj_selectto get the problem names that satisfy your criteria.Look for the CSV file
probinfo_python.csvin the same directory as this module. It contains information about all problems in S2MPJ.
The problem name may appear in the form
'PROBLEMNAME_n_m'wherenis the dimension andmis the number of linear and nonlinear constraints. This happens when a problem accepts extra arguments to change its dimension or number of constraints. This information is stored in theprobinfo_python.csvfile.Examples
from optiprofiler.problem_libs.s2mpj import s2mpj_load problem = s2mpj_load('ROSENBR') print(problem.n) # 2