Comments (8)
I have push up an old version that I think I must have used:
https://github.com/rwl/pyipopt
However, it seems that PyIPOPT has received a considerable amount of attention since I last looked at it:
https://github.com/xuy/pyipopt
I will leave this issue open until PYPOWER has been updated to use that branch. Ultimately, platform specific eggs should be available here:
https://pypi.python.org/pypi/pyipopt
from pypower.
Running the latest pyipopt with Ipopt 3.11.1 and removing the 2nd argument (m) now results in a segmentation fault in Ipopt running the t_opf_ipopt.py test. It's not clear where the issue is (pypower, pyipopt, ipopt)...lots of moving parts. I will try your uploaded pyipopt to see if that changes things (obviously you got it working at one point).
from pypower.
Unfortunately, I still get errors using rwl/pyipopt (in fact it segfaults when creating the problem) which would suggest some api change in Ipopt that I have versus the version that pyipopt works with.
from pypower.
I just remembered that I wrote this guide for setting up external solvers:
https://github.com/rwl/PYPOWER/blob/master/doc/solvers.rst
It looks like I was using Ipopt 3.9.3.
from pypower.
I tried this from scratch at home using the Ipopt 3.11.5 and pyipopt from the current github master and was able to run the optimization part successfully by simply just removing the (m) argument and the modifying the output arguments (zg is moved). So clearly the segfaults are something on my end.
from pypower.
I don't know if any user still have this problem.. but if so, i found a solution for this problem: change the output of eval_jac_g and eval_h functions when flag=True to: return ((Js.row).astype(int), (Js.col).astype(int)) and return ((Hs.row).astype(int), (Hs.col).astype(int)), respectively. Apparentely without this the solver returns a segmentation fault.
from pypower.
Hi kennyvinente, how did you solve the original problem:
x, zl, zu, obj, status, zg = nlp.solve(x0, m, userdata) (TypeError: function takes at most 2 arguments (3 given))
Did you also remove the m? I tried removing the m but then zg is an integer and not an array. This results in my script crashing here:
muSf[il] = 2 * info['lmbda'][2 * nb + arange(nl2)] * branch[il, RATE_A] / baseMVA (TypeError: 'int' object has no attribute 'getitem')
I am using ipopt version 3.12.7
from pypower.
Hello @daetzm .. some changes that i performed was:
x, zl, zu, zg, obj, status, = nlp.solve(x0, userdata) (there is a change in the outputs, probably because of the ipopt version). Also, i'm using ipopt version 3.12.12 and python3.6
And most important.. check the return of all functions, specially the eval_g and eval_h functions..check if they are running correctly.. for example, try with a 3bus system (easy to analise).
the seg fault problem is because this functions are not returning the results appropriately, so i did those changes and now its fine..
here is an image with ipopt running an opf problem
from pypower.
Related Issues (20)
- pf not found
- TypeError: object of type 'numpy.int64' has no len()
- Using truth value of an array with more than one element in t_is
- Traceback occurs when using printpf() function HOT 1
- Missing astype(int) HOT 1
- big god,help me! HOT 4
- makeYbus uses one-indexing HOT 4
- Error regarding importing a new casefile HOT 2
- Getting ValueError: Shape mismatch Error when running OPF HOT 1
- Variable bi in runpf must be converted from float to int HOT 2
- Example or documentation to use the newly added CPF feature
- IndexError in runpf.py, line 212 HOT 1
- Bugs in makeYbus.py, lines 35-36 and lines 66-67 HOT 6
- IPOPT interface in Pypower
- makePTDF ValueError: column index exceeds matrix dimensions HOT 4
- How can I use DCOPF,because I only use ACOPF
- IndexError due to 'ext2int.py' of 'runpf.py' HOT 1
- How to warm start an AC OPF solution?
- pypower.org is down HOT 1
- IEEE 30bus system
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pypower.