Search code examples
python-2.7virtual-machineopenmdao

pyopt_driver's snopt is not working openMDAO


I am getting an issue which I couldn't find a solution too.

The error I am getting while trying to run the program when self.driver.optimizer is set to 'SNOTP'.

(openmdao-0.10.3.2)anurag-linux@Anurag-VirtualBox:/media/sf_Shared_Folder/RotorSE-master/src/rotorse$ python rotoraerodefaults.py
/home/anurag-linux/Documents/openmdao-0.10.3.2/local/lib/python2.7/site-packages/setuptools-0.9.5-py2.7.egg/pkg_resources.py:1054: UserWarning: /home/anurag-linux/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
AEP0 = 9716744.29201
Traceback (most recent call last):
  File "rotoraerodefaults.py", line 777, in <module>
    rotor.driver.optimizer = 'SNOPT'
  File "/home/anurag-linux/Documents/openmdao-0.10.3.2/local/lib/python2.7/site-packages/openmdao.main-0.10.3.2-py2.7.egg/openmdao/main/datatypes/enum.py", line 119, in validate
    self.error(obj, name, value)
  File "/home/anurag-linux/Documents/openmdao-0.10.3.2/local/lib/python2.7/site-packages/openmdao.main-0.10.3.2-py2.7.egg/openmdao/main/datatypes/enum.py", line 139, in error
    obj.raise_exception(msg, ValueError)
  File "/home/anurag-linux/Documents/openmdao-0.10.3.2/local/lib/python2.7/site-packages/openmdao.main-0.10.3.2-py2.7.egg/openmdao/main/container.py", line 1451, in raise_exception
    raise exception_class(full_msg)
ValueError: driver: Variable 'optimizer' must be in ['ALHSO', 'ALPSO', 'COBYLA', 'CONMIN', 'FILTERSD', 'KSOPT', 'MIDACO', 'NSGA2', 'PSQP', 'SDPEN', 'SLSQP', 'SOLVOPT'], but a value of SNOPT <type 'str'> was specified.

Can you suggest anything?


Solution

  • SNOPT is a commercial product that doesn't come shipped with pyoptsparse. You will have to obtain it from its developers, which I believe are at http://ccom.ucsd.edu/~optimizers