我遇到了一个我也找不到解决方案的问题。
当self.driver.optimizer
设置为'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.
你能建议什么吗?
答案 0 :(得分:2)
SNOPT是pyoptsparse随附的商业产品。您必须从其开发人员那里获得它,我相信它的开发者为http://ccom.ucsd.edu/~optimizers