-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexError during SGP A-matrix modification #1480
Comments
oy, everything is breaking now @bqpd, even localsolve. C:\Users\Berk\Dropbox (MIT)\MIT Graduate School\Code\SPaircraft>python3 SPaircraft.py
Starting a sequence of GP solves
for 317 free variables
in 136 locally-GP constraints
and for 1208 free variables
in 4725 posynomial inequalities.
GP Solve 1
Using solver 'mosek_cli'
for 1208 free variables
in 4725 posynomial inequalities.
Solving took 0.641 seconds.
Solved cost was 3.774e+40.
Traceback (most recent call last):
File "SPaircraft.py", line 97, in <module>
sol = test()
File "SPaircraft.py", line 89, in test
sol = optimize_aircraft(m, substitutions, fixedBPR, pRatOpt, mutategparg)
File "SPaircraft.py", line 65, in optimize_aircraft
sol = m_relax.localsolve(verbosity=2, iteration_limit=200, reltol=0.01, mutategp=mutategparg)#, x0 = x0)
File "c:\users\berk\dropbox (mit)\mit graduate school\code\gpkit\gpkit\constraints\prog_factories.py", line 126, in solvefn
result = progsolve(solver, verbosity=verbosity, **solveargs)
File "c:\users\berk\dropbox (mit)\mit graduate school\code\gpkit\gpkit\constraints\sgp.py", line 151, in localsolve
gp = self.gp(x0, cleanx0=True)
File "c:\users\berk\dropbox (mit)\mit graduate school\code\gpkit\gpkit\constraints\sgp.py", line 232, in gp
row_idx = a_idxs.pop() # modify a particular A entry
IndexError: pop from empty list |
it passes tests! :p |
oops no it doesn't. Forgot it got removed from tests in gpkitmodels |
lol yes, good catch. |
New commit sets the A matrix directly; looks like there's a constraint which changes its number of variables/monomials during run. Will find out which... |
tbh, that was my fault for not fixing SPaircraft sooner. |
Interesting... I wonder which constraint it is... |
it's in |
on the second local gp |
for the 1st GP it's
|
It appears the problem is that |
Oy, seems like a small bug. Also, I wonder why this is not a valid thing to ask GPkit. m_gpapprox = m.gp(None) gives me an error. Is this expected behavior? |
uh, that should work. MWE? |
Sure, I'll make a new issue. |
fixed! will put up PR soon. SPaircraft is soooo much faster and seems to solve with |
I fixed it on Monday :P |
This is breaking SPaircraft atm. Why * before the args=None?
The text was updated successfully, but these errors were encountered: