Skip to content

Commit

Permalink
Fixing diffs, again.
Browse files Browse the repository at this point in the history
  • Loading branch information
1ozturkbe committed Sep 25, 2019
1 parent 8a9d045 commit 025929d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
26 changes: 13 additions & 13 deletions robust/testing/diffs/test_table.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
L/D & 1.7e+01 & 1.6e+01 & 1.7e+01 & 1.7e+01
A & 8.9e+00 & 7.5e+00 & 7.7e+00 & 8.3e+00
Re & 5.0e+06 & 5.8e+06 & 5.9e+06 & 5.6e+06
S & 2.8e+01 & 4.6e+01 & 4.6e+01 & 4.2e+01
V & 5.8e+01 & 4.9e+01 & 5.e+01 & 5.1e+01
t_s & 1.4e+01 & 1.7e+01 & 1.7e+01 & 1.6e+01
W_w & 2.4e+03 & 3.9e+03 & 4.e+03 & 3.7e+03
W_{w_{strc}} & 6.7e+02 & 1.0e+03 & 1.1e+03 & 9.9e+02
W_{w_{surf}} & 1.7e+03 & 2.9e+03 & 2.9e+03 & 2.7e+03
W_{fuse} & 3.5e+02 & 3.8e+02 & 3.9e+02 & 4.e+02
V_{f_{avail}} & 1.5e-01 & 1.9e-01 & 2.e-01 & 1.9e-01
L/D & 1.7e+01 & 1.63e+01 & 1.71e+01 & 1.74e+01
A & 8.91e+00 & 7.54e+00 & 7.67e+00 & 8.27e+00
Re & 5.01e+06 & 5.78e+06 & 5.92e+06 & 5.60e+06
S & 2.82e+01 & 4.56e+01 & 4.58e+01 & 4.24e+01
V & 5.77e+01 & 4.91e+01 & 4.96e+01 & 5.07e+01
t_s & 1.44e+01 & 1.7e+01 & 1.68e+01 & 1.65e+01
W_w & 2.36e+03 & 3.89e+03 & 3.95e+03 & 3.67e+03
W_{w_{strc}} & 6.7e+02 & 1.01e+03 & 1.07e+03 & 9.88e+02
W_{w_{surf}} & 1.69e+03 & 2.87e+03 & 2.89e+03 & 2.68e+03
W_{fuse} & 3.5e+02 & 3.83e+02 & 3.93e+02 & 3.99e+02
V_{f_{avail}} & 1.5e-01 & 1.95e-01 & 1.96e-01 & 1.88e-01
V_{f_{fuse}} & 0.e+00 & 0.e+00 & 0.e+00 & 0.e+00
V_{f_{wing}} & 1.8e-01 & 3.8e-01 & 3.8e-01 & 3.3e-01
cost & 2933.499 & 3598.235 & 3589.81 & 3481.407
V_{f_{wing}} & 1.80e-01 & 3.84e-01 & 3.83e-01 & 3.29e-01
cost & 2.93e+03 & 3.6e+03 & 3.59e+03 & 3.48e+03
7 changes: 2 additions & 5 deletions robust/testing/t_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
from robust.simulations import simulate
from robust.testing.models import simple_ac

def round_sig(x, sig=2):
return np.round(x, sig-int(np.floor(np.log10(np.abs(x))))-1)

class TestSimulation(unittest.TestCase):
def test_simulate(self):
model = simple_ac()
Expand Down Expand Up @@ -86,10 +83,10 @@ def test_table_diff(self):
for j in range(len(a)):
if a[j] <= 1e-5:
a[j] = 0.
f.write(''.join([" & " + str(np.format_float_scientific(j, precision=1)) for j in a]))
f.write(''.join([" & " + str(np.format_float_scientific(j, precision=2)) for j in a]))
f.write('\n')
f.write('cost ')
f.write(' '.join(["& " + str(i['cost']) for i in soltab]))
f.write(' '.join(["& " + str(np.format_float_scientific(i['cost'], precision=2)) for i in soltab]))
f.write('\n')
f.close()

Expand Down

0 comments on commit 025929d

Please sign in to comment.