Skip to content

Commit

Permalink
python 3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
bqpd committed Feb 28, 2020
1 parent 70f31dd commit 71add83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions solar/relaxed_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ def post_process(sol):
bdvars = [d for d in sol.program.varkeys if "Relax" in str(d)
and "before" not in str(d) and sol(d).magnitude >= 1.001]
if bdvars:
print "GP iteration has relaxed constants"
print sol.program.result.table(varkeys)
print("GP iteration has relaxed constants")
print(sol.program.result.table(varkeys))

return bdvars

2 changes: 1 addition & 1 deletion solar/solar.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def setup(self, aircraft, latitude=35, day=355):
if self.aircraft.Npod is not 0 and self.aircraft.Npod is not 1:
Nwing, Npod = self.aircraft.wing.N, self.aircraft.Npod
ypod = Nwing/((Npod-1)/2 + 1)
ypods = [ypod*n for n in range(1, (Npod-1)/2+1)]
ypods = [ypod*n for n in range(1, (Npod-1)//2 + 1)]
Sgust, Mgust = self.winggust.S, self.winggust.M
qgust, Sg, Mg = self.winggust.q, self.wingg.S, self.wingg.M
qg = self.wingg.q
Expand Down

0 comments on commit 71add83

Please sign in to comment.