``````

In [1]:

import sys
sys.path.append('../')
from Trajectory import *
from Optimisation import *
from numpy import *
from pandas import *
import matplotlib.pyplot as plt
model = Point_Lander()

``````
``````

In [2]:

# Hermite Simpson Compressed
prob  = Hermite_Simpson_Compressed(model, nsegs=20)
ntraj = 200
fpath = '../Data/Hermite_Simpson/20Seg/'
sc    = empty(shape=(0,model.sdim+model.cdim))
for i in range(ntraj):
z = load(fpath + 'HS_20_' + str(i) + '.npy')
tf, cb, s, c = prob.Decode(z)
sc = vstack((sc, hstack((s, c))))

``````
``````

In [3]:

# Hermite Simpson Seperated
prob = Hermite_Simpson_Seperated(model, nsegs=20)
ntraj = 39
fpath = '../Data/Hermite_Simpson_Seperated/20Seg/A/'
for i in range(ntraj):
z = load(fpath + 'HSS_20_' + str(i) + '.npy')
tf, sb, cb, s, c = prob.Decode(z)
bars = hstack((sb, cb))
regs = hstack((s, c))
full = vstack((bars, regs))
sc   = vstack((sc, full))

``````
``````

In [4]:

Data = DataFrame(sc, columns=['\$x\$', '\$y\$', '\$v_x\$', '\$v_y\$', '\$m\$', '\$u\$', '\$u_2\$', '\$u_3\$'])
Data

``````
``````

Out[4]:

\$x\$
\$y\$
\$v_x\$
\$v_y\$
\$m\$
\$u\$
\$u_2\$
\$u_3\$

0
-95.633556
510.916110
-95.633556
-29.126711
8021.832221
1.000000e+00
1.000000
-1.000000

1
-322.381162
401.035505
-81.118866
-47.922380
7983.758184
1.000000e+00
1.000000
-1.000000

2
-510.719018
273.085936
-66.534736
-47.657878
7945.684148
1.000000e+00
1.000000
0.994011

3
-660.462773
165.569771
-51.880497
-37.299199
7907.610112
1.000000e+00
1.000000
1.000000

4
-771.426304
85.541219
-37.155472
-26.855153
7869.536076
1.000000e+00
1.000000
1.000000

5
-843.421678
33.188210
-22.358975
-16.339635
7831.462040
1.000000e+00
1.000000
1.000000

6
-876.259137
8.700506
-7.490308
-5.751946
7793.388004
1.000000e+00
1.000000
1.000000

7
-869.747061
12.269723
7.451237
4.908620
7755.313968
1.000000e+00
1.000000
1.000000

8
-823.691950
44.089364
22.466377
15.642781
7717.239932
1.000000e+00
1.000000
1.000000

9
-752.376574
89.876657
29.043254
17.938679
7700.607883
2.166272e-02
1.000000
1.000000

10
-675.621063
129.811473
29.097672
13.712117
7700.470418
3.787039e-17
0.195649
0.995266

11
-598.865552
158.453676
29.097672
9.431139
7700.470418
7.696908e-13
-1.000000
0.844110

12
-522.110042
175.803267
29.097672
5.150160
7700.470418
1.183423e-17
1.000000
0.565522

13
-445.354531
181.860246
29.097672
0.869181
7700.470418
3.027159e-17
1.000000
1.000000

14
-368.599020
176.624613
29.097672
-3.411798
7700.470418
9.893610e-18
-1.000000
0.038959

15
-291.843510
160.096367
29.097672
-7.692777
7700.470418
1.111349e-17
-0.813913
1.000000

16
-215.087999
132.275510
29.097672
-11.973756
7700.470418
7.972397e-18
1.000000
-0.969231

17
-140.050641
94.880192
28.160912
-15.317975
7698.104750
1.456219e-01
-1.000000
1.000000

18
-66.731435
47.910415
27.794984
-19.233026
7697.180681
1.469551e-17
1.000000
1.000000

19
-13.363406
9.599202
15.191748
-10.910769
7665.452318
1.000000e+00
-1.000000
1.000000

20
0.000000
0.000000
0.000000
0.000000
7627.378282
1.000000e+00
-1.000000
1.000000

21
-93.807043
515.482393
-93.807043
-28.761409
8030.964785
1.000000e+00
1.000000
-1.000000

22
-311.723197
409.495266
-79.607465
-47.154082
7993.672361
1.000000e+00
1.000000
-1.000000

23
-492.837405
285.318635
-65.341435
-46.539225
7956.379936
1.000000e+00
1.000000
0.562020

24
-636.976900
179.841234
-51.008330
-37.442213
7919.087512
1.000000e+00
1.000000
1.000000

25
-743.967287
100.679216
-36.607514
-27.234493
7881.795087
1.000000e+00
1.000000
1.000000

26
-813.632515
48.008631
-22.138345
-16.958420
7844.502663
1.000000e+00
1.000000
1.000000

27
-845.794858
22.007205
-7.600172
-6.613343
7807.210238
1.000000e+00
1.000000
1.000000

28
-840.274891
22.854365
7.007668
3.801401
7769.917814
1.000000e+00
1.000000
1.000000

29
-796.891461
50.731262
21.685845
14.286482
7732.625389
1.000000e+00
1.000000
1.000000

...
...
...
...
...
...
...
...
...

5808
216.731301
415.468672
5.114925
-40.647205
9453.731474
1.000000e+00
-1.000000
1.000000

5809
222.075338
335.411362
1.760972
-40.555911
9443.330336
3.171241e-16
0.692902
-0.929301

5810
220.573860
255.640357
-4.819256
-37.238341
9422.970168
1.000000e+00
-1.000000
1.000000

5811
201.044243
187.338282
-14.614484
-30.705772
9392.743792
1.000000e+00
-1.000000
1.000000

5812
166.139161
127.852462
-20.113072
-28.469842
9375.816905
1.000000e+00
-1.000000
1.000000

5813
115.764978
77.226030
-29.266163
-21.889909
9345.590530
1.000000e+00
-0.531072
1.000000

5814
59.960882
39.463352
-23.829377
-15.672730
9316.573198
1.000000e+00
1.000000
1.000000

5815
21.608421
14.229310
-14.319967
-9.425979
9287.555867
1.000000e+00
1.000000
1.000000

5816
2.403443
1.583542
-4.780801
-3.149471
9258.538536
1.000000e+00
1.000000
1.000000

5817
10.000000
1000.000000
20.000000
-5.000000
9500.000000
1.000000e+00
-1.000000
-1.000000

5818
40.837786
979.839264
12.230320
-13.504684
9475.818891
2.924794e-13
-0.977568
1.000000

5819
61.394626
953.440852
8.220300
-12.757322
9463.362199
0.000000e+00
-0.464832
-0.374749

5820
77.920618
924.514080
8.220300
-16.019981
9463.362199
0.000000e+00
-0.830352
0.181760

5821
94.446610
889.028098
8.219649
-19.281989
9463.360178
4.179770e-04
-1.000000
1.000000

5822
110.969984
846.985524
8.218998
-22.543996
9463.358156
0.000000e+00
0.239045
-0.474775

5823
127.493358
798.383740
8.218998
-25.806655
9463.358156
0.000000e+00
1.000000
-0.460314

5824
144.016732
743.222747
8.218970
-29.069286
9463.358070
1.771969e-05
-1.000000
1.000000

5825
160.539995
681.502655
8.215388
-32.328362
9463.346950
2.281686e-03
-1.000000
1.000000

5826
177.048966
613.237646
8.211179
-35.586812
9463.333884
4.199832e-04
-1.000000
1.000000

5827
193.555306
538.416058
8.210524
-38.848816
9463.331853
0.000000e+00
0.590336
-0.553157

5828
210.022235
457.074670
8.171318
-42.072268
9463.210143
0.000000e+00
-0.413418
1.000000

5829
220.179460
375.483777
1.683205
-38.846814
9443.090155
1.602697e-01
-1.000000
1.000000

5830
223.060320
294.610040
-0.129172
-40.297095
9437.478834
1.000000e+00
-1.000000
1.000000

5831
213.369324
219.748948
-9.516567
-34.172359
9408.461502
1.000000e+00
-1.000000
1.000000

5832
184.776093
157.230883
-17.361956
-29.589629
9384.280349
9.117795e-06
-1.000000
1.000000

5833
143.549394
100.787074
-25.226777
-24.987467
9360.099195
1.000000e+00
-1.000000
1.000000

5834
86.298769
56.782325
-28.572981
-18.785005
9331.081864
1.000000e+00
1.000000
1.000000

5835
38.394953
25.276534
-19.078380
-12.553063
9302.064533
1.000000e+00
1.000000
1.000000

5836
9.608756
6.329151
-9.554115
-6.291457
9273.047201
1.000000e+00
1.000000
1.000000

5837
0.000000
0.000000
0.000000
0.000000
9244.029870
1.000000e+00
1.000000
1.000000

5838 rows × 8 columns

``````
``````

In [5]:

``````
``````

In [ ]:

``````