Giter Club home page Giter Club logo

pyopt-pyipopt's People

Contributors

syarra avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pyopt-pyipopt's Issues

sol_inform['value'] = r["sol_flag"] #ifail[0] TypeError: tuple indices must be integers, not str

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

pyOpt install successful, but pyOpt.IPOPT not importable

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

max_cpu_time option type not corresponding to pyipopt implementation

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.