syarra / pyopt-pyipopt Goto Github PK
View Code? Open in Web Editor NEWpyIPOPT module for pyOpt
pyIPOPT module for pyOpt
Hi,
first of all: thanks for your effort! Works like a charm, and even the setup is easier now than described in your Readme, as an option for your package was integrated by the pyOpt team!
When executing the provided example (thanks!!), I get the following error, though:
Traceback (most recent call last):
File "pyOpt-pyIPOPT/IPOPTtest.py", line 93, in <module>
ipopt(opt_prob,sens_type='FD',store_hst=True)
File "/home/rgiessmann/anaconda2/lib/python2.7/site-packages/pyOpt/pyOpt_optimizer.py", line 160, in __call__
return self.__solve__(opt_problem, *args, **kwargs)
File "/home/rgiessmann/anaconda2/lib/python2.7/site-packages/pyOpt/pyIPOPT/pyIPOPT.py", line 741, in __solve__
sol_inform['value'] = r["sol_flag"] #ifail[0]
TypeError: tuple indices must be integers, not str
Apart from that, the file seems to execute fine and fins an optimal solution:
EXIT: Optimal Solution Found.
-- the error appears right after that.
I didn't have the chance to go into detail about what's happening, do you have any idea?
Thanks in advance,
Robert
I am having problems installing pyopt with pyopt-pyipopt on my machine. I have successfully installed and tested pyipopt. I'm on macOS and running Python 3.6.0 (I updated your .py files so that they run in Python 3 instead of Python 2).
Running "$ python setup.py install" as instructed from within ~/pyOpt/ doesn't cause the ipopt library to build (like it does with the other pyOpt included libraries, e.g. ksopt). I've copied the first few lines of terminal output below. Any suggestions would be hugely appreciated. Please let me know if and what more information I can provide. Many thanks.
$ python setup.py install
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building library "algencan" sources
building library "cobyla" sources
building library "conmin" sources
building library "filtersd" sources
building library "ffsqp" sources
building library "gcmma" sources
building library "ksopt" sources
building library "midaco" sources
building library "mma" sources
building library "mmfd" sources
building library "nlpql" sources
building library "nlpqlp" sources
building library "nsga2" sources
building library "psqp" sources
building library "sdpen" sources
building library "slsqp" sources
building library "snopt" sources
building library "solvopt" sources
building extension "pyOpt.pyALGENCAN.algencan" sources
Dear all,
when trying to set
ipopt = pyOpt.pyIPOPT.IPOPT()
ipopt.setOption("max_cpu_time", 20)
the following error occurs upon solving:
/home/rgiessmann/anaconda2/lib/python2.7/site-packages/pyOpt/pyOpt_optimizer.pyc in __call__(self, opt_problem, *args, **kwargs)
158
159 # Solve Optimization Problem
--> 160 return self.__solve__(opt_problem, *args, **kwargs)
161
162
/home/rgiessmann/anaconda2/lib/python2.7/site-packages/pyOpt/pyIPOPT/pyIPOPT.pyc in __solve__(self, opt_problem, sens_type, store_sol, disp_opts, store_hst, hot_start, sens_mode, sens_step, *args, **kwargs)
703 if not self.options['defaults'][i][1] == optionss[i][1]:
704 if self.options[i][0].__name__ == 'int':
--> 705 ipopt.int_option(i,self.options[i][1])
706
707 if self.options[i][0].__name__ == 'float':
ValueError: max_cpu_time is not a valid int option
The problem is that max_cpu_time
is not implemented as an int_option
, but a num_option
in pyipopt. This needs to be fixed; I didn't test the other options yet.
Best,
Robert
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.