Skip to content

Commit

Permalink
change model name; add model for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mjburton committed Nov 4, 2017
1 parent 8b2de5f commit 8d410b7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
9 changes: 9 additions & 0 deletions gpkitmodels/GP/aircraft/wing/chord_spar_loading.py
Expand Up @@ -6,6 +6,15 @@
#pylint: disable=invalid-name

class ChordSparL(Model):
" place holder so dependent repos don't break "
def setup(self, static, Wcent):

sploading = SparLoading(static, Wcent)

return sploading


class SparLoading(Model):
"spar loading model"

def new_qbarFun(self, c):
Expand Down
6 changes: 3 additions & 3 deletions gpkitmodels/GP/aircraft/wing/gustloading.py
Expand Up @@ -4,19 +4,19 @@
import pandas as pd
from gpkit import Variable, Vectorize
from gpfit.fit_constraintset import FitCS
from .chord_spar_loading import ChordSparL
from .chord_spar_loading import SparLoading

#pylint: disable=invalid-name, no-member, arguments-differ
#pylint: disable=attribute-defined-outside-init

class GustL(ChordSparL):
class GustL(SparLoading):
"spar loading model"
new_qbarFun = None
new_SbarFun = None

def setup(self, static, Wcent, Wwing, V, CL):

self.load = ChordSparL.setup(self, static, Wcent)
self.load = SparLoading.setup(self, static, Wcent)
vgust = Variable("V_{gust}", 10, "m/s", "gust velocity")

with Vectorize(static.N):
Expand Down
5 changes: 2 additions & 3 deletions gpkitmodels/GP/aircraft/wing/wing_test.py
Expand Up @@ -27,8 +27,7 @@ def wing_test():
loading = W.loading(W, Wcent)

m = Model(perf["C_d"], [W, fs, perf, loading])
s = m.solve("mosek")
return s
m.solve("mosek")

if __name__ == "__main__":
s = wing_test()
wing_test()

0 comments on commit 8d410b7

Please sign in to comment.