convexengineering / SPaircraft

Models for commercial aircraft design
http://spaircraft.readthedocs.org
25 stars 17 forks source link

Can't get relaxed_constants to work... #65

Closed 1ozturkbe closed 7 years ago

1ozturkbe commented 7 years ago

Since last night, haven't been able to get anything to run. relaxed_constants keeps throwing the following error:

Traceback (most recent call last):
  File "C:\Users\Berk\Anaconda2\lib\site-packages\IPython\core\interactiveshell.py", line 2666, in safe_execfile
    self.compile if kw['shell_futures'] else None)
  File "C:\Users\Berk\Anaconda2\lib\site-packages\IPython\utils\py3compat.py", line 276, in execfile
    exec(compiler(scripttext, filename, 'exec'), glob, loc)
  File "C:\Users\Berk\Dropbox (MIT)\MIT Graduate School\D8\d8\SP_aircraft.py", line 543, in <module>
    m_relax = relaxed_constants(m, None, ['ReqRng'])
  File "C:\Users\Berk\Dropbox (MIT)\MIT Graduate School\D8\d8\relaxed_constants.py", line 23, in relaxed_constants
    constsrelaxed = ConstantsRelaxed(model, include_only, exclude)
  File "c:\users\berk\dropbox (mit)\mit graduate school\code\gpkit\gpkit\constraints\relax.py", line 134, in __init__
    if value == 0:
  File "c:\users\berk\dropbox (mit)\mit graduate school\code\gpkit\gpkit\nomials\nomial_math.py", line 397, in __eq__
    return MonomialEquality(self, "=", other)
  File "c:\users\berk\dropbox (mit)\mit graduate school\code\gpkit\gpkit\nomials\nomial_math.py", line 581, in __init__
    ScalarSingleEquationConstraint.__init__(self, left, oper, right)
  File "c:\users\berk\dropbox (mit)\mit graduate school\code\gpkit\gpkit\nomials\nomial_math.py", line 424, in __init__
    self).__init__(Signomial(left), oper, Signomial(right))
  File "c:\users\berk\dropbox (mit)\mit graduate school\code\gpkit\gpkit\nomials\nomial_math.py", line 120, in __init__
    raise ValueError("each c must be positive.")
ValueError: each c must be positive.

so confused... I checked the subs, and booleans, and they seem ok. Any ideas @mayork? I'm surprised you aren't having the same issue.

mayork commented 7 years ago

no idea everything is working great for me right now...i would suggest pulling gpkit master and running straight from command line (i..e not in an interactive shell) and see what happens

mayork commented 7 years ago

every file gives this? how are you running them, importing run_XXX into an interactive enviornment or running main on SP_aircraft?

1ozturkbe commented 7 years ago

I pulled gpkit, that's not the issue. And neither main nor the functions work. And I tried different terminals, no difference.

mayork commented 7 years ago

what commit of D8 are you on

mayork commented 7 years ago

is this like your mosek again or something lol?

1ozturkbe commented 7 years ago

I am so confused. I am in your latest commit. Mosek seems ok, the issue is in nomial_math. wtf?

mayork commented 7 years ago

i don't know what to tell you, i'm having zero issues this morning

bqpd commented 7 years ago

Huh, might be a recent PR; just to check, you're both on master?

On May 10, 2017 10:18, "Berk Ozturk" notifications@github.com wrote:

I am so confused. I am in your latest commit. Mosek seems ok, the issue is in nomial_math. wtf?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hoburg/d8/issues/65#issuecomment-300496587, or mute the thread https://github.com/notifications/unsubscribe-auth/ABagGOSFNlH2Kdgk74DyzIXHaS414nauks5r4cdCgaJpZM4NWtld .

1ozturkbe commented 7 years ago

Appreciate the help here @bqpd. Let me know if you have any ideas, because it sucks not being able to write when there is so much work to do :P.

1ozturkbe commented 7 years ago

Actually, since the issue is definitely gpkit related, I reverted all of the commits you made two days ago @bqpd, and it works. I am currently on 4cce21bc. Let me know if that helps @bqpd. @mayork just as a heads up, don't pull gpkit :P

mayork commented 7 years ago

@bqpd the same error is showing up in our test output on jenkins

mayork commented 7 years ago

@bqpd is there a path forward on this? I really want to avoid not being able to run on master as much as possible (got ourselves into a bit of a bind with that last term)

bqpd commented 7 years ago

@mayork, @1ozturkbe, how can I reproduce this