CUTEST.py
is a Python interface package for modeling and solving optimization problems from CUTEst collection.
-
Clone this repo:
git clone https://github.com/PythonOptimizers/NLP.py
-
In the folder
cutest/tools
, copysite.template.cfg
tosite.cfg
and modify to your needs. -
Install:
python setup.py install
python setup.py test
>>> from cutest.model.cutestmodel import CUTEstModel
>>> model = CUTEstModel('ROSENBR')
>>> f = model.obj(model.x0)
>>> g = model.grad(model.x0)
>>> H = model.hess(model.x0)
With the sifedecoder, you can check if the problem exists in differents size. For example, LUBRIFC problem exists in 3 differents size. To import the size you want, you just have to give as argument the sifparameter when you initiate your problem in Python. For example:
>>> from cutest.model.cutestmodel import CUTEstModel
>>> model = CUTEstModel('LUBRIFC', sifParams=['-param', 'NN=50'])