def main1(uid): #print(config.config_file_reader('emulator')) uid = "mostaque#1479870945" process_file(uid) emulator.get_context() # emulator.create_emulator() # if flag: # flag = flag = emulator.emulator_runner() # else: # print("Emulator could not be created") # instances = emulator.instances_manager() # for instance in instances: # print(instance) # app_manager.app_installer(instances) if flag: test_runner.test(uid, project_name='testProject')
x2.lower = 1 x3.lower = 1 x4.lower = 1 #upper bounds x1.upper = 5 x2.upper = 5 x3.upper = 5 x4.upper = 5 #Equations m.Equation(x1*x2*x3*x4>=25) m.Equation(x1**2+x2**2+x3**2+x4**2==eq) #Objective m.Obj(x1*x4*(x1+x2+x3)+x3) #Set global options m.options.IMODE = 3 #steady state optimization #Solve simulation m.solve(disp=False) # solve on public server assert x1.value == [1.0] assert x2.value == [4.743] assert x3.value == [3.82115] assert x4.value == [1.379408] test_runner.test('HS71', hs71)
1.241169e-08, 9.505695e-09, -1.010082e-07, -2.981075e-07, 5.308718e-07, 4.285289e-06, 8.78398e-08, -5.522232e-05, -5.722639e-05, 0.0008038919, 0.001106048, -0.01670707, 0.01296086, 0.1099515, 0.2099514, 0.3099513, 0.40791, 0.4993685, 0.5835442, 0.6623856, 0.7366278, 0.8069796, 0.8739811, 0.9381022, 0.9997478, 1.059273, 1.116987, 1.173162, 1.228042, 1.281853, 1.334825, 1.387216, 1.43936, 1.491707, 1.544859, 1.599568, 1.656665, 1.717029, 1.781369 ]) assert test.like(x4.value, [ 0.0, 0.009391499, 0.01664753, 0.02193173, 0.02566607, 0.02821239, 0.02987672, 0.03091364, 0.03147557, 0.03172517, 0.03182485, 0.03186824, 0.03190596, 0.03196116, 0.03204101, 0.03214438, 0.03226649, 0.03240157, 0.03254382, 0.03268761, 0.03282702, 0.03295587, 0.03306983, 0.03316673, 0.03325437, 0.03334324, 0.03343601, 0.03355436, 0.03372486, 0.03397063, 0.03431162, 0.03476456, 0.03534308, 0.03605795, 0.03691721, 0.03792629, 0.03908824, 0.04040382, 0.04187168, 0.04348851, 0.04524918, 0.04714691, 0.04917341, 0.05131902, 0.05357288, 0.05592305, 0.05835669, 0.06086019, 0.06341931, 0.06601937, 0.06864532, 0.07128197, 0.0739141, 0.07652658, 0.07910457, 0.08163364, 0.0840999, 0.08649021, 0.08879225, 0.0909947, 0.09308744, 0.0950616, 0.09690979, 0.09862622, 0.1002068, 0.1016495, 0.1029542, 0.104123, 0.1051604, 0.1060734, 0.1068717, 0.1075678, 0.1081772, 0.1087187, 0.1092139, 0.1096681, 0.1100938, 0.1105085, 0.110921, 0.1113354, 0.1117515, 0.1121676, 0.1125827, 0.1129968, 0.1134098, 0.1138224, 0.114235, 0.1146481, 0.1150621, 0.1154773, 0.1158941, 0.1163123, 0.1167319, 0.1171523, 0.1175723, 0.1179901, 0.1184032, 0.1188089, 0.1192077, 0.1196071, 0.1200303 ]) test.test('benchmark2', benchmark2)
[ 15.0, 15.15939, 15.31216, 15.46995, 15.63249, 15.79955, 15.95968, 16.11305, 16.25983, 16.40018, 16.53428, 16.66226, 16.7843 ], [ 1.768531, 1.758775, 1.74913, 1.739597, 1.730178, 1.720873, 1.71168, 1.702594, 1.693612, 1.684731, 1.675947, 1.667259, 1.658662 ], [ 5.0, 5.001073, 5.002143, 5.003208, 5.004269, 5.005326, 5.00638, 5.007429, 5.008475, 5.009516, 5.010554, 5.011589, 5.012619 ]])) test.test('Reservoirs', reservoirs) ##%% Plot results #time = [x * 12 for x in m.time] ## plot results #plt.figure(1) # #plt.subplot(311) #plt.plot(time,h[0],'r-') #plt.plot(time,h[1],'b--') #plt.ylabel('Level (m)') #plt.legend(['Jordanelle Reservoir','Deer Creek Reservoir']) # #plt.subplot(312) #plt.plot(time,h[3],'g-') #plt.plot(time,h[2],'k:')
7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066, 7.483066 ] assert k2.value == [ 1.196715, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856, 2.169856 ] test_runner.test('benchmark4', benchmark4)
# process simulator p.u.MEAS = u_meas[i] p.solve(disp=False) # estimator m.u.MEAS = u_meas[i] m.y.MEAS = y_meas[i] m.solve(verify_input=True, disp=False) y_est[i] = m.y.MODEL k_est[i] = m.K.NEWVAL tau_est[i] = m.tau.NEWVAL assert np.array_equal(p.K.value, [1., 1.]) assert np.array_equal(p.tau.value, [5., 5.]) print(repr(y_est)) print(repr(k_est)) print(repr(tau_est)) assert y_est == [ 0.39585442, 0.74370431, 1.05060723, 1.32242258, 1.56403979, 1.77955871, 1.97243303, 2.14558494, 2.30149745, 2.44228883 ] assert np.array_equal(k_est, [1.00000001, 1., 1., 1., 1., 1., 1., 1., 1., 1.]) assert np.array_equal(tau_est, [ 5.09999994, 5.19999994, 5.29999994, 5.39999994, 5.49999994, 5.59999994, 5.69999994, 5.79999994, 5.89999994, 5.99999994 ]) test_runner.test('Estimator', estimator)
##CV # load data file for comparison data = np.genfromtxt('hiv_data.csv', delimiter=',') # convert log-scaled data for plotting log_v = data[:, ][:, 1] # 2nd column of data v = np.power(10, log_v) LV.FSTATUS = 1 #receive measurements to fit LV.STATUS = 1 #build objective function to match data and prediction LV.value = log_v #v data from csv m.solve(disp=False) results = [lg10_kr[i].value[-1] for i in range(5)] assert (results == [5.0, -0.8378562, -6.798968, -0.3755447, 0.6999032]) #m.GUI() # # plot results # import matplotlib.pyplot as plt # plt.figure(1) # plt.semilogy(m.time,H,'b-') # plt.semilogy(m.time,I,'g:') # plt.semilogy(m.time,V,'r--') # plt.semilogy(data[:,][:,0],v,'ro') # plt.xlabel('Time (yr)') # plt.ylabel('States (log scale)') # plt.legend(['H','I','V']) #,'V data') # plt.show() test_runner.test('HIV', HIV)
#setpoint v.STATUS = 1 #add the SP to the objective m.options.CV_TYPE = 2 #L2 norm v.SP = 40 #set point v.TR_INIT = 1 #setpoint trajectory v.TAU = 5 #time constant of setpoint trajectory #%% Solve m.solve(disp=False) assert test.like(p.value, [ 0.0, 20.0, 40.0, 60.0, 80.0, 100.0, 100.0, 100.0, 97.43086, 88.78797, 79.7931, 72.62862, 67.6421, 64.4309, 62.42173, 61.12205, 60.19064, 59.42574, 58.72626, 58.05282, 57.39814, 56.76809, 56.17136, 55.61472, 55.10171, 54.63286, 54.20648, 53.8196, 53.4686, 53.14977, 52.85959, 52.59506, 52.35386, 52.13458, 51.93697, 51.7621, 51.61237, 51.49121, 51.40222, 51.34752, 51.32511 ]) assert test.like(v.value, [ 0.0, 0.7619048, 2.249433, 4.428032, 7.264792, 10.72837, 14.02702, 17.16859, 20.06269, 22.48972, 24.45852, 26.06064, 27.39649, 28.54641, 29.56503, 30.48563, 31.32691, 32.09899, 32.80766, 33.45692, 34.05033, 34.59148, 35.08413, 35.53211, 35.93922, 36.30908, 36.64509, 36.95035, 37.22771, 37.47972, 37.70867, 37.91664, 38.10552, 38.27705, 38.43288, 38.57463, 38.70393, 38.82246, 38.93195, 39.03414, 39.13062 ]) test.test('Cruise Control', cruise_control)
0.4092592, 0.4000102, 0.3907653, 0.3815233, 0.3722833, 0.3630438, 0.3538036, 0.3445612, 0.3353149, 0.3260631, 0.3168038, 0.3075349, 0.2982541, 0.2889588, 0.2796462, 0.2703132, 0.2609561, 0.2515712, 0.2421538, 0.232699, 0.223201, 0.2136533, 0.2040483, 0.1943772, 0.1846296, 0.1747934, 0.1648539, 0.1547935, 0.1445905, 0.1342179, 0.1236411, 0.1128152, 0.1016802, 0.09015248, 0.07811092, 0.06647803, 0.05657704, 0.04815068, 0.0409793, 0.034876 ] assert x2.value == [ 0.0, 0.007440616, 0.01485305, 0.02223722, 0.02959304, 0.03692043, 0.0442193, 0.05148956, 0.05873113, 0.06594391, 0.07312781, 0.08028274, 0.08740861, 0.09450531, 0.1015727, 0.1086108, 0.1156194, 0.1225984, 0.1295478, 0.1364673, 0.143357, 0.1502166, 0.1570461, 0.1638454, 0.1706143, 0.1773527, 0.1840605, 0.1907375, 0.1973837, 0.2039988, 0.2105828, 0.2171355, 0.2236568, 0.2301464, 0.2366044, 0.2430304, 0.2494244, 0.2557862, 0.2621156, 0.2684125, 0.2746766, 0.2809078, 0.2871059, 0.2932708, 0.2994021, 0.3054998, 0.3115635, 0.3175932, 0.3235885, 0.3295492, 0.3354752, 0.3413661, 0.3472217, 0.3530417, 0.3588259, 0.364574, 0.3702857, 0.3759607, 0.3815986, 0.3871993, 0.3927622, 0.3982871, 0.4037735, 0.4092212, 0.4146296, 0.4199984, 0.4253272, 0.4306153, 0.4358625, 0.441068, 0.4462315, 0.4513522, 0.4564297, 0.4614632, 0.4664519, 0.4713953, 0.4762924, 0.4811424, 0.4859444, 0.4906973, 0.4954001, 0.5000515, 0.5046501, 0.5091946, 0.5136832, 0.518114, 0.522485, 0.5267937, 0.5310373, 0.5352124, 0.539315, 0.5433401, 0.5472814, 0.5511306, 0.5548764, 0.5585023, 0.5618261, 0.5646549, 0.5670625, 0.5691114, 0.5708552 ] test_runner.test('benchmark3', benchmark3)
u.STATUS = 1 scale = m.FV(value=1,lb=0.1,ub=100) scale.status = 1 m.Equation(x1.dt()/scale == u) m.Equation(x2.dt()/scale == m.cos(x1)) m.Equation(x3.dt()/scale == m.sin(x1)) #z = m.FV(value=0) #z.STATUS = 0 #m.Connection(z,x2,pos2='end') #m.Connection(z,x3,pos2='end') m.fix(x2,nt-1,0) m.fix(x3,nt-1,0) m.Obj(scale) m.options.ICD_CALC = 1 m.options.IMODE = 6 m.solve(disp=False) assert test.like(x1.value, [1.57075, 1.584488, 1.597806, 1.611169, 1.624564, 1.63798, 1.651413, 1.664859, 1.678313, 1.69177, 1.705228, 1.718683, 1.732134, 1.74558, 1.759019, 1.77245, 1.785874, 1.799288, 1.812693, 1.826088, 1.839472, 1.852847, 1.866211, 1.879564, 1.892906, 1.906237, 1.919557, 1.932866, 1.946163, 1.959449,1.972723, 1.985986, 1.999236, 2.012475, 2.025701, 2.038915, 2.052117, 2.065306, 2.078482, 2.091646, 2.104796, 2.117933, 2.131056, 2.144166, 2.157263, 2.170345, 2.183413, 2.196467, 2.209506, 2.222531, 2.235541,2.248536, 2.261516, 2.274481, 2.287431, 2.300365, 2.313284, 2.326187, 2.339074, 2.351945, 2.3648, 2.377639, 2.390461, 2.403268, 2.416057, 2.428831, 2.441588, 2.454328, 2.467051, 2.479758, 2.492448, 2.505121, 2.517777, 2.530416, 2.543038, 2.555644, 2.568232, 2.580803, 2.593358, 2.605895, 2.618415, 2.630919, 2.643405, 2.655875, 2.668327, 2.680763, 2.693182, 2.705585, 2.71797, 2.73034, 2.742692, 2.755028, 2.767348, 2.779651, 2.791939, 2.80421, 2.816465, 2.828704, 2.840928, 2.853136, 2.865328, 2.877505, 2.889667, 2.901814,2.913946, 2.926063, 2.938165, 2.950253, 2.962327, 2.974387, 2.986432, 2.998464, 3.010482, 3.022487, 3.034478, 3.046457, 3.058422, 3.070375, 3.082316, 3.094244, 3.10616, 3.118064, 3.129956, 3.141837, 3.153707, 3.165566, 3.177413, 3.18925, 3.201077, 3.212893, 3.2247, 3.236496, 3.248283, 3.26006, 3.271829, 3.283588,3.295338, 3.30708, 3.318814, 3.330539, 3.342256, 3.353966, 3.365668, 3.377363, 3.38905, 3.40073, 3.412404, 3.424071, 3.435732, 3.447386, 3.459034, 3.470677, 3.482313, 3.493944, 3.50557, 3.51719, 3.528805, 3.540416, 3.552021, 3.563622, 3.575219, 3.586811, 3.598399, 3.609982, 3.621562, 3.633138, 3.64471, 3.656278, 3.667842, 3.679404, 3.690961, 3.702516, 3.714067, 3.725614, 3.737159, 3.7487, 3.760239, 3.771774, 3.783306, 3.794835, 3.806361, 3.817884, 3.829404, 3.840921, 3.852434, 3.863944, 3.875451, 3.886955, 3.898455, 3.909952, 3.921445, 3.932934, 3.944419, 3.9559, 3.967377, 3.97885, 3.990318, 4.00178, 4.013238, 4.024691, 4.036137, 4.047578, 4.059013, 4.070441, 4.081862, 4.093275, 4.104681, 4.116078, 4.127467, 4.138846, 4.150215, 4.161573, 4.172921, 4.184256, 4.195578, 4.206887, 4.218181, 4.229459, 4.24072, 4.251962, 4.263186, 4.274389, 4.28557, 4.296727, 4.30786, 4.318965, 4.330041, 4.341085, 4.352094, 4.363065, 4.373994, 4.384877,4.395709, 4.406487, 4.417206, 4.427862, 4.438456, 4.448986, 4.459455, 4.469864, 4.480206, 4.490454, 4.500528, 4.510246, 4.519226, 4.526707, 4.531218, 4.529966, 4.518415, 4.494345, 4.47313, 4.484098, 4.508164, 4.521127, 4.522516, 4.517303, 4.508851, 4.49891, 4.488353, 4.477589, 4.466791, 4.456028, 4.445307, 4.434603, 4.423888, 4.413144, 4.40236, 4.39153, 4.380652, 4.369725, 4.358754, 4.347739, 4.336685, 4.325595, 4.314471, 4.303316, 4.292133, 4.280923, 4.269689, 4.258433, 4.247155, 4.235857, 4.22454, 4.213206, 4.201856,4.190491, 4.179112, 4.167719, 4.156314, 4.144898, 4.133471, 4.122034, 4.110588, 4.099132, 4.087668, 4.076196, 4.064716, 4.05323, 4.041736, 4.030236, 4.01873, 4.007219, 3.995702, 3.984179, 3.972652, 3.96112, 3.949583, 3.938042, 3.926497, 3.914947, 3.903394, 3.891837, 3.880277, 3.868713, 3.857146, 3.845575, 3.834001, 3.822424, 3.810844, 3.79926, 3.787674, 3.776085, 3.764493, 3.752897, 3.741299, 3.729698, 3.718093, 3.706486, 3.694876, 3.683262, 3.671645, 3.660026, 3.648402, 3.636776, 3.625146, 3.613512, 3.601875, 3.590235, 3.57859, 3.566942, 3.555289, 3.543633, 3.531972, 3.520307, 3.508637, 3.496963, 3.485284, 3.473601, 3.461912, 3.450218, 3.438519, 3.426814, 3.415104, 3.403388, 3.391666, 3.379938, 3.368204, 3.356463, 3.344716,3.332962, 3.321201, 3.309433, 3.297658, 3.285875, 3.274085, 3.262286, 3.25048, 3.238666, 3.226843, 3.215012, 3.203172, 3.191323, 3.179465, 3.167597, 3.155721, 3.143835, 3.131938, 3.120032, 3.108116, 3.09619, 3.084253, 3.072305, 3.060347, 3.048378, 3.036398, 3.024406, 3.012403, 3.000388, 2.988362, 2.976324, 2.964274, 2.952211, 2.940137, 2.92805, 2.915951, 2.903839, 2.891714, 2.879576, 2.867426, 2.855262, 2.843086, 2.830896, 2.818692, 2.806476, 2.794246, 2.782002, 2.769745, 2.757474, 2.745189, 2.732891, 2.720579, 2.708253, 2.695913, 2.68356, 2.671192, 2.658811, 2.646416, 2.634007, 2.621585, 2.609148, 2.596698, 2.584234, 2.571757, 2.559266, 2.546761, 2.534243, 2.521711, 2.509166, 2.496608, 2.484036, 2.471452, 2.458854, 2.446244, 2.433621, 2.420985, 2.408337, 2.395676, 2.383004, 2.370319, 2.357622, 2.344913, 2.332193, 2.319461, 2.306718, 2.293964, 2.2812, 2.268424, 2.255638, 2.242842, 2.230035, 2.217219, 2.204393, 2.191558, 2.178714, 2.165861, 2.152999, 2.140129, 2.12725, 2.114364, 2.101471, 2.08857, 2.075662, 2.062747, 2.049826, 2.036899, 2.023966, 2.011028, 1.998085, 1.985137, 1.972185, 1.959228, 1.946268, 1.933305, 1.920338, 1.907369, 1.894398, 1.881425, 1.868451, 1.855476, 1.8425, 1.829524, 1.816549, 1.803574, 1.7906, 1.777628, 1.764659, 1.751692, 1.738728, 1.725768, 1.712812, 1.699862, 1.686917, 1.673978, 1.661046, 1.648122, 1.635207, 1.622301, 1.609406, 1.596522, 1.583652, 1.570796]) assert test.like(x2.value, [4.0, 3.999835, 3.99951, 3.999024, 3.998377, 3.997569, 3.9966, 3.995469, 3.994178, 3.992725, 3.991112, 3.989338, 3.987405, 3.985311, 3.983059, 3.980648, 3.978079, 3.975353, 3.972469, 3.96943, 3.966234, 3.962884, 3.95938, 3.955722, 3.951911, 3.947949, 3.943835, 3.939572, 3.935159, 3.930598, 3.925889, 3.921033, 3.916033, 3.910887, 3.905599, 3.900167, 3.894595, 3.888882, 3.88303, 3.87704, 3.870914, 3.864652, 3.858255, 3.851725, 3.845064, 3.838272, 3.83135, 3.824301, 3.817125, 3.809824, 3.802398, 3.794851, 3.787182, 3.779394, 3.771487, 3.763464, 3.755325, 3.747073, 3.738709, 3.730233, 3.721649, 3.712957, 3.704159, 3.695256, 3.686251, 3.677144, 3.667938, 3.658633, 3.649233, 3.639737, 3.630148, 3.620468, 3.610698, 3.60084, 3.590896, 3.580867, 3.570755, 3.560561, 3.550288, 3.539938, 3.529511, 3.519009, 3.508435, 3.497791, 3.487077, 3.476295, 3.465448, 3.454537, 3.443564, 3.432531, 3.421439, 3.41029, 3.399086, 3.387829, 3.37652, 3.365162,3.353756, 3.342303, 3.330806, 3.319266, 3.307686, 3.296066, 3.284409, 3.272716, 3.26099, 3.249231, 3.237442, 3.225625, 3.213781, 3.201912, 3.190019, 3.178105, 3.166172, 3.15422, 3.142252, 3.130269, 3.118274, 3.106267, 3.094251, 3.082228, 3.070198, 3.058165, 3.046128, 3.034091, 3.022055, 3.010022, 2.997992, 2.985969, 2.973953, 2.961947, 2.949951, 2.937968, 2.926, 2.914047, 2.902112, 2.890196, 2.878301, 2.866429, 2.85458, 2.842757, 2.830962, 2.819195, 2.807459, 2.795755, 2.784085, 2.77245, 2.760851, 2.749291, 2.737771, 2.726293, 2.714857, 2.703466, 2.692121, 2.680823, 2.669575, 2.658377, 2.647231, 2.636139, 2.625101, 2.61412, 2.603197, 2.592334, 2.581531, 2.57079, 2.560113, 2.549502, 2.538956, 2.528479, 2.51807, 2.507732, 2.497467, 2.487274, 2.477156, 2.467114, 2.45715, 2.447264, 2.437457, 2.427732, 2.41809, 2.408531, 2.399057, 2.38967, 2.380369, 2.371158, 2.362036, 2.353005, 2.344066, 2.335221, 2.32647, 2.317815, 2.309256, 2.300796, 2.292434, 2.284172, 2.276011, 2.267952, 2.259997, 2.252145, 2.244398, 2.236758, 2.229224, 2.221798, 2.214481, 2.207274, 2.200177, 2.193192, 2.186319, 2.179559, 2.172913, 2.166382, 2.159966, 2.153666, 2.147482, 2.141417, 2.135469, 2.12964, 2.123931, 2.118341, 2.112872, 2.107523, 2.102296, 2.097191, 2.092208, 2.087347, 2.08261, 2.077995, 2.073504, 2.069137, 2.064893, 2.060773, 2.056777, 2.052905, 2.049157, 2.045532, 2.04203, 2.038651, 2.035395, 2.032261, 2.029249, 2.026358, 2.023588, 2.020939, 2.018407, 2.015991, 2.01368, 2.011458, 2.009289, 2.007105, 2.004785, 2.002181, 1.999329, 1.996604, 1.994163, 1.991875, 1.989603, 1.98727, 1.984837, 1.982287, 1.979612, 1.976812, 1.973885, 1.970833, 1.967656, 1.964356, 1.960931, 1.957382, 1.95371, 1.949914, 1.945993, 1.941949, 1.93778, 1.933488, 1.929071, 1.92453, 1.919866, 1.915078, 1.910167, 1.905133, 1.899977, 1.894698, 1.889298, 1.883777, 1.878135, 1.872372, 1.866491, 1.86049, 1.854371, 1.848134, 1.84178, 1.83531, 1.828724, 1.822024, 1.815209, 1.808282, 1.801242, 1.79409, 1.786828, 1.779455, 1.771974, 1.764386, 1.75669, 1.748888, 1.740981, 1.73297, 1.724855, 1.716639, 1.708322, 1.699906, 1.69139, 1.682776, 1.674067, 1.665261, 1.656362, 1.647369, 1.638284, 1.629109, 1.619844, 1.61049, 1.60105, 1.591523, 1.581912, 1.572218, 1.562442, 1.552585, 1.542648, 1.532633, 1.522542, 1.512375, 1.502134, 1.49182, 1.481434, 1.470979, 1.460455, 1.449864, 1.439207, 1.428486, 1.417701, 1.406856, 1.39595, 1.384985, 1.373964, 1.362886, 1.351755, 1.340571, 1.329336, 1.318051, 1.306718, 1.295338, 1.283913, 1.272445, 1.260935, 1.249384, 1.237794, 1.226167, 1.214505, 1.202808, 1.191079, 1.179318, 1.167529, 1.155712, 1.143868, 1.132, 1.12011, 1.108198, 1.096266, 1.084317, 1.072351, 1.060371, 1.048377, 1.036373, 1.024358, 1.012336, 1.000308, 0.9882749, 0.9762391, 0.9642021, 0.9521656, 0.9401314, 0.9281011, 0.9160765, 0.9040592, 0.8920511, 0.8800538, 0.868069, 0.8560985, 0.844144, 0.8322073, 0.8202901, 0.8083941, 0.7965211, 0.7846728, 0.772851, 0.7610574, 0.7492938, 0.7375619, 0.7258634, 0.7142003, 0.7025741, 0.6909866, 0.6794396, 0.6679349, 0.6564742, 0.6450593, 0.6336918, 0.6223737, 0.6111065, 0.5998921, 0.5887323, 0.5776286, 0.566583, 0.5555971, 0.5446727, 0.5338115, 0.5230152, 0.5122855, 0.5016242, 0.491033, 0.4805136, 0.4700677, 0.459697, 0.4494031,0.4391878, 0.4290528, 0.4189996, 0.40903, 0.3991457, 0.3893482, 0.3796392, 0.3700203, 0.3604931, 0.3510593, 0.3417204, 0.332478, 0.3233336, 0.314289, 0.3053455, 0.2965047, 0.2877681, 0.2791373, 0.2706137, 0.2621988, 0.253894, 0.2457009, 0.2376208, 0.2296551, 0.2218053, 0.2140727, 0.2064586, 0.1989645, 0.1915917, 0.1843413, 0.1772149, 0.1702135, 0.1633384, 0.1565909, 0.1499722, 0.1434834, 0.1371257, 0.1309002, 0.1248081, 0.1188504, 0.1130282, 0.1073426, 0.1017945, 0.09638493, 0.0911149, 0.08598533, 0.08099713, 0.07615118, 0.07144836, 0.06688948, 0.06247536, 0.05820678, 0.05408449, 0.05010921, 0.04628163, 0.04260242, 0.03907221, 0.03569162, 0.0324612, 0.02938152, 0.02645307, 0.02367636, 0.02105183, 0.0185799, 0.01626096, 0.01409538, 0.01208347, 0.01022553, 0.008521817, 0.006972563, 0.005577959, 0.004338162, 0.003253297, 0.002323452, 0.001548677, 0.000928989, 0.0004643624, 0.0001547344, 3.075445e-17, 0.0]) assert test.like(x3.value, [0.0, 0.0120359, 0.02406854, 0.03609576, 0.04811539, 0.06012527, 0.0721232, 0.08410702, 0.09607454, 0.1080236, 0.119952, 0.1318577, 0.1437384, 0.155592, 0.1674164, 0.1792096, 0.1909693, 0.2026934, 0.21438, 0.2260269, 0.2376321, 0.2491935, 0.2607091, 0.2721769, 0.2835949, 0.294961, 0.3062734, 0.31753, 0.3287289, 0.3398682, 0.350946, 0.3619604, 0.3729094, 0.3837913, 0.3946042, 0.4053463, 0.4160157, 0.4266107, 0.4371296, 0.4475704, 0.4579317, 0.4682115, 0.4784083, 0.4885203, 0.498546, 0.5084836, 0.5183317, 0.5280885, 0.5377527, 0.5473225, 0.5567965, 0.5661733, 0.5754513, 0.5846291, 0.5937052, 0.6026784, 0.6115471, 0.6203101,0.6289661, 0.6375136, 0.6459515, 0.6542785, 0.6624934, 0.6705949, 0.6785819, 0.6864532, 0.6942078, 0.7018444, 0.7093619, 0.7167595, 0.7240359, 0.7311903, 0.7382216, 0.7451288, 0.751911, 0.7585674, 0.765097, 0.7714989, 0.7777724, 0.7839166, 0.7899307, 0.795814, 0.8015657, 0.8071851, 0.8126715, 0.8180243, 0.8232428, 0.8283263, 0.8332743, 0.8380862, 0.8427614, 0.8472995, 0.8516999, 0.8559621, 0.8600856, 0.8640701, 0.8679151, 0.8716202, 0.875185, 0.8786092, 0.8818925, 0.8850345, 0.888035, 0.8908936, 0.8936102, 0.8961845, 0.8986163, 0.9009054, 0.9030517, 0.905055, 0.9069152, 0.9086321, 0.9102058, 0.9116361, 0.912923, 0.9140664, 0.9150664, 0.9159229, 0.916636, 0.9172057, 0.9176321, 0.9179153, 0.9180554, 0.9180524, 0.9179066, 0.9176181, 0.917187, 0.9166136, 0.915898, 0.9150404, 0.9140412, 0.9129006, 0.9116188, 0.9101961, 0.9086329, 0.9069294, 0.9050861, 0.9031032, 0.9009811, 0.8987203, 0.896321, 0.8937839, 0.8911092, 0.8882974, 0.8853491, 0.8822646, 0.8790446, 0.8756894, 0.8721997, 0.8685759, 0.8648187, 0.8609286, 0.8569063, 0.8527522, 0.8484671, 0.8440516, 0.8395063, 0.8348319, 0.8300291, 0.8250986, 0.8200411, 0.8148573, 0.8095479, 0.8041138,0.7985557, 0.7928743, 0.7870706, 0.7811452, 0.7750991, 0.7689331, 0.7626479, 0.7562446, 0.749724, 0.743087, 0.7363345, 0.7294674, 0.7224868, 0.7153934, 0.7081884, 0.7008728, 0.6934474, 0.6859134, 0.6782717, 0.6705234, 0.6626696, 0.6547113, 0.6466496, 0.6384856, 0.6302205, 0.6218553, 0.6133912, 0.6048293, 0.5961707, 0.5874168, 0.5785686, 0.5696274, 0.5605944, 0.5514707, 0.5422577, 0.5329566, 0.5235686, 0.5140951, 0.5045372, 0.4948964, 0.4851739, 0.475371, 0.4654891, 0.4555295, 0.4454936, 0.4353827, 0.4251982, 0.4149415,0.4046139, 0.3942169, 0.3837519, 0.3732204, 0.3626236, 0.3519632, 0.3412405, 0.3304569, 0.3196141, 0.3087133, 0.2977562, 0.2867441, 0.2756786, 0.2645612, 0.2533933, 0.2421766, 0.2309124, 0.2196023, 0.2082479, 0.1968507, 0.1854123, 0.173934, 0.1624176, 0.1508646, 0.1392763, 0.1276545, 0.1160004, 0.1043157, 0.09260163, 0.08085983, 0.06909194, 0.0573, 0.04548684, 0.03365672, 0.02181669, 0.009979397, -0.001831889, -0.01358391, -0.02527805, -0.03700278, -0.04878966, -0.06060719, -0.07242789, -0.08423659, -0.09602515, -0.1077889, -0.1195251, -0.1312319, -0.1429077, -0.1545514, -0.1661616, -0.1777372, -0.1892768, -0.2007789, -0.212242, -0.2236647, -0.2350455, -0.2463827, -0.2576749, -0.2689205, -0.2801179, -0.2912657, -0.3023623, -0.3134061, -0.3243957, -0.3353296, -0.3462063, -0.3570242, -0.3677819, -0.3784778, -0.3891107, -0.3996789, -0.410181, -0.4206156, -0.4309812, -0.4412765, -0.4514999, -0.4616502, -0.4717258, -0.4817255, -0.4916479, -0.5014915, -0.511255, -0.5209372, -0.5305366, -0.5400519, -0.5494819, -0.5588253, -0.5680807, -0.5772469, -0.5863227, -0.5953067, -0.6041978, -0.6129947, -0.6216963, -0.6303013, -0.6388086, -0.6472169, -0.6555252, -0.6637322, -0.671837, -0.6798382, -0.6877349, -0.695526, -0.7032104, -0.7107869, -0.7182547, -0.7256126, -0.7328596, -0.7399948, -0.7470171, -0.7539256, -0.7607193, -0.7673973, -0.7739586, -0.7804023,-0.7867276, -0.7929335, -0.7990192, -0.8049837, -0.8108264, -0.8165463, -0.8221427, -0.8276147, -0.8329615, -0.8381825, -0.8432768, -0.8482438, -0.8530826, -0.8577926, -0.8623732, -0.8668236, -0.8711432, -0.8753313, -0.8793874, -0.8833108, -0.8871009, -0.8907571, -0.8942789, -0.8976658, -0.9009172, -0.9040325, -0.9070114, -0.9098533, -0.9125577, -0.9151243, -0.9175525, -0.919842, -0.9219924, -0.9240032, -0.9258741, -0.9276048, -0.929195, -0.9306443, -0.9319524, -0.933119, -0.9341439, -0.9350269, -0.9357676, -0.936366, -0.9368217, -0.9371347, -0.9373048, -0.9373318, -0.9372156, -0.9369561, -0.9365532, -0.9360069, -0.935317, -0.9344837, -0.9335068, -0.9323864, -0.9311225, -0.9297151, -0.9281644, -0.9264704, -0.9246331, -0.9226528, -0.9205296, -0.9182636, -0.9158551, -0.9133041, -0.9106111, -0.9077761, -0.9047995, -0.9016816, -0.8984226, -0.8950229, -0.8914829, -0.8878029, -0.8839834, -0.8800246, -0.8759272, -0.8716915, -0.8673179, -0.8628072, -0.8581596, -0.8533759, -0.8484565, -0.8434021, -0.8382133, -0.8328907, -0.827435, -0.8218469,-0.8161271, -0.8102762, -0.8042952, -0.7981847, -0.7919456, -0.7855787, -0.7790847, -0.7724648, -0.7657196, -0.7588501, -0.7518573, -0.7447422, -0.7375057, -0.7301489, -0.7226727, -0.7150783, -0.7073667, -0.6995391, -0.6915966, -0.6835403, -0.6753715, -0.6670912, -0.6587008, -0.6502015, -0.6415946, -0.6328813, -0.624063, -0.615141, -0.6061167, -0.5969914, -0.5877666, -0.5784437, -0.5690241, -0.5595093, -0.5499009, -0.5402002, -0.5304088, -0.5205284, -0.5105604, -0.5005064, -0.4903681, -0.480147, -0.4698449, -0.4594634,-0.4490041, -0.4384688, -0.4278592, -0.4171771, -0.4064241, -0.395602, -0.3847127, -0.3737579, -0.3627394, -0.3516591, -0.3405188, -0.3293203, -0.3180655, -0.3067564, -0.2953947, -0.2839825, -0.2725215, -0.2610138, -0.2494612, -0.2378658, -0.2262294, -0.214554, -0.2028417, -0.1910942, -0.1793138, -0.1675022, -0.1556616, -0.1437939, -0.1319011, -0.1199853, -0.1080484, -0.09609239, -0.08411938, -0.07213133, -0.06013027, -0.04811821, -0.03609714, -0.02406908, -0.01203603, -4.752194e-19, 0.0]) assert test.like(u.value, [0.0, 1.141285, 1.10648, 1.110143, 1.112781, 1.114577, 1.115979, 1.11707, 1.117704, 1.117975, 1.117991, 1.117814, 1.117485, 1.117034, 1.116483, 1.115854, 1.11516, 1.114415, 1.11363, 1.112812, 1.11197, 1.111107, 1.110227, 1.109333, 1.108427, 1.107511, 1.106585, 1.105649, 1.104703, 1.103748, 1.102782, 1.101806, 1.10082, 1.099822, 1.098812, 1.09779, 1.096755, 1.095707, 1.094646, 1.093571, 1.092483, 1.09138, 1.090264, 1.089134, 1.087989, 1.086831, 1.085659, 1.084474, 1.083275, 1.082063, 1.080838, 1.0796, 1.07835, 1.077089,1.075816, 1.074531, 1.073236, 1.071931, 1.070616, 1.069292, 1.067958, 1.066616, 1.065266, 1.063909, 1.062544, 1.061173, 1.059796, 1.058413, 1.057025, 1.055633, 1.054236, 1.052836, 1.051433, 1.050027, 1.048619,1.047209, 1.045799, 1.044387, 1.042976, 1.041565, 1.040155, 1.038746, 1.037339, 1.035935, 1.034533, 1.033135, 1.031741, 1.030351, 1.028966, 1.027586, 1.026213, 1.024846, 1.023485, 1.022133, 1.020788, 1.019452,1.018124, 1.016806, 1.015498, 1.0142, 1.012913, 1.011636, 1.010372, 1.009119, 1.007878, 1.00665, 1.005435, 1.004233, 1.003045, 1.00187, 1.00071, 0.9995647, 0.9984339, 0.9973181, 0.9962175, 0.9951325, 0.9940632, 0.9930098, 0.9919725, 0.9909515, 0.989947, 0.988959, 0.9879879, 0.9870336, 0.9860962, 0.9851759, 0.9842728, 0.9833869, 0.9825183, 0.9816669, 0.9808329, 0.9800163, 0.9792169, 0.9784349, 0.9776702, 0.9769227, 0.9761924, 0.9754792, 0.974783, 0.9741037, 0.9734412, 0.9727952, 0.9721658, 0.9715527, 0.9709556, 0.9703745, 0.9698091, 0.9692592, 0.9687246, 0.968205, 0.9677001, 0.9672097, 0.9667334, 0.9662711, 0.9658223, 0.9653868, 0.9649641, 0.9645541, 0.9641561, 0.96377, 0.9633953, 0.9630316, 0.9626785, 0.9623354, 0.9620021, 0.9616779, 0.9613625, 0.9610553, 0.9607557, 0.9604633, 0.9601775, 0.9598977, 0.9596233, 0.9593537, 0.9590883, 0.9588264, 0.9585674, 0.9583105, 0.958055, 0.9578002, 0.9575453, 0.9572895, 0.957032, 0.9567719, 0.9565084, 0.9562405, 0.9559673, 0.9556878, 0.9554011, 0.955106, 0.9548014, 0.9544864, 0.9541596, 0.9538198, 0.9534658, 0.9530962, 0.9527097, 0.9523047, 0.9518798, 0.9514333, 0.9509635, 0.9504686, 0.9499467, 0.9493957, 0.9488135, 0.9481976, 0.9475455, 0.9468544, 0.9461213, 0.9453429, 0.9445155, 0.943635, 0.942697, 0.9416964, 0.9406274, 0.9394835, 0.9382575, 0.9369408, 0.9355238, 0.9340117, 0.9324096, 0.9307068, 0.9288909, 0.926947, 0.9248581, 0.9226039, 0.9201612, 0.9175035, 0.9146009, 0.9114214, 0.9079325, 0.9041047, 0.8999173, 0.8953683, 0.890486, 0.8853435, 0.8800661, 0.8748178, 0.8697326, 0.8647418, 0.8592182, 0.8513293, 0.8368962, 0.8073544, 0.7460418, 0.6214726, 0.3747623, -0.1040045, -0.959582, -1.99966, -1.762497, 0.9112015, 1.999294, 1.076977, 0.1153686, -0.4330951, -0.7021474, -0.8258591, -0.8770839, -0.8942374, -0.8970691, -0.8940893, -0.8906796, -0.8892951, -0.8901524, -0.8925633, -0.8959036, -0.8997412, -0.9037485, -0.9077083, -0.9114936, -0.9150413, -0.9183291, -0.9213588, -0.9241454, -0.9267093, -0.9290731, -0.9312586, -0.9332859, -0.9351732, -0.9369363, -0.9385891, -0.9401436, -0.941596, -0.942943, -0.9441951, -0.9453615, -0.9464503, -0.9474686, -0.9484224, -0.9493172, -0.950158, -0.9509489, -0.951694, -0.9523965, -0.9530598, -0.9536866, -0.9542795, -0.954841, -0.9553732, -0.9558782, -0.9563579, -0.9568141, -0.9572484, -0.9576625, -0.9580577, -0.9584355, -0.9587973, -0.9591442, -0.9594776, -0.9597987, -0.9601084, -0.9604079, -0.9606983, -0.9609805, -0.9612555, -0.9615242, -0.9617875, -0.9620463, -0.9623015, -0.9625537, -0.9628039, -0.9630528, -0.9633011, -0.9635496, -0.9637989, -0.9640496, -0.9643025, -0.9645582, -0.9648173, -0.9650803, -0.9653479, -0.9656206, -0.9658989, -0.9661833, -0.9664744, -0.9667726, -0.9670785, -0.9673923, -0.9677147, -0.9680459, -0.9683865, -0.9687368, -0.9690971, -0.9694679, -0.9698495, -0.9702422, -0.9706464, -0.9710623, -0.9714903, -0.9719306, -0.9723834, -0.9728492, -0.973328, -0.9738201, -0.9743258, -0.9748451, -0.9753784, -0.9759258, -0.9764873, -0.9770633, -0.9776538, -0.9782589, -0.9788787, -0.9795133, -0.9801628, -0.9808271, -0.9815065, -0.9822007, -0.9829099, -0.9836341, -0.9843731, -0.9851269, -0.9858955, -0.9866788, -0.9874767, -0.9882891, -0.9891158, -0.9899567, -0.9908117, -0.9916807, -0.9925633, -0.9934595, -0.994369,-0.9952916, -0.9962271, -0.9971753, -0.9981358, -0.9991084, -1.000093, -1.001089, -1.002096, -1.003114, -1.004142, -1.005181, -1.006229, -1.007287, -1.008354, -1.00943, -1.010514, -1.011605, -1.012704, -1.01381, -1.014923, -1.016041, -1.017165, -1.018294, -1.019427, -1.020564, -1.021705, -1.022849, -1.023995, -1.025143, -1.026292, -1.027442, -1.028592, -1.029741, -1.030889, -1.032036, -1.033181, -1.034323, -1.035462, -1.036598, -1.037729, -1.038855, -1.039976, -1.041091, -1.042199, -1.043301, -1.044396, -1.045482, -1.04656, -1.047629, -1.048688, -1.049737, -1.050776, -1.051804, -1.05282, -1.053824, -1.054815, -1.055793, -1.056757, -1.057707, -1.058642, -1.059562, -1.060466, -1.061354, -1.062225, -1.063079, -1.063914, -1.064731, -1.06553, -1.066308, -1.067067, -1.067805, -1.068522, -1.069217, -1.06989, -1.070541, -1.071168, -1.071771, -1.07235, -1.072905, -1.073434, -1.073937, -1.074413, -1.074863, -1.075285, -1.075679, -1.076044, -1.07638, -1.076686, -1.076962, -1.077206, -1.07742, -1.077601, -1.077749, -1.077864, -1.077944, -1.07799, -1.078, -1.077973, -1.077909, -1.077807, -1.077665, -1.077482, -1.077257, -1.076988, -1.076674, -1.076312, -1.0759, -1.075435, -1.074914, -1.074332, -1.073686, -1.072969, -1.072176, -1.071298, -1.070328, -1.069249, -1.067973]) assert test.like(scale.value, [6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514, 6.018514]) test.test('jennings', jennings)
0.0, -1.098431, -1.098431, -0.9907097, -0.8051242, -0.6488827, -0.5130733, -0.5097062, -0.5097061, -0.5097061, -0.5097061 ]]) #%% plot results #import matplotlib.pyplot as plt #plt.figure(1) #plt.subplot(311) #plt.plot(m.time,u[0],'r-',linewidth=2.0) #plt.plot(m.time,u[1],'k:',linewidth=2.0) #plt.legend(['Elevator','Thrust']) #plt.ylabel('MV Action') # #plt.subplot(312) #plt.plot(m.time,y[0],'b:',linewidth=2.0) ##plt.plot(m.time,y[0].tr_hi,'k-') ##plt.plot(m.time,y[0].tr_lo,'k-') #plt.legend(['Air Speed','Upper Trajectory','Lower Trajectory']) # #plt.subplot(313) #plt.plot(m.time,y[1],'g--',linewidth=2.0) ##plt.plot(m.time,y[1].tr_hi,'k-') ##plt.plot(m.time,y[1].tr_lo,'k-') #plt.legend(['Climb Rate','Upper Trajectory','Lower Trajectory']) # #plt.show() test_runner.test('flight control', flight_control)
55.81765, 55.04334, 54.28897, 53.55306, 52.83422, 52.13115, 51.44267, 50.76765, 50.10503, 49.45505, 49.10604, 48.98275, 48.96466, 48.97739, 48.99067, 48.99787, 49.00039, 49.00074, 49.00047, 49.00021, 49.00006, 49.0, 48.99999, 48.99999, 48.99999, 48.99999, 49.0, 49.0, 49.0, 49.0, 49.0, 49.0, 49.0, 49.0, 49.0, 49.0, 49.0, 49.0, 49.0, 49.0, 49.00001, 49.00001, 49.00001, 49.00001, 49.0, 48.99997, 48.99987, 48.99967, 48.99944, 48.9994, 49.0006, 49.005, 49.0147, 49.02789, 49.02863, 48.96884, 48.75625, 48.29394, 47.6701, 47.05438, 46.44599, 45.84423, 45.24837, 44.65774, 44.07168, 43.48957, 42.91077, 42.33468, 41.7607, 41.18826, 40.61676, 40.04563, 39.47429, 38.90217, 38.32869, 37.75326, 37.17529, 36.59418, 36.00931, 35.42005, 34.82575, 34.22573, 33.6193, 33.00574, 32.38429, 31.75415, 31.1145 ] assert u.value == [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.853423, 0.7421807, 0.6899773, 0.6745367, 0.674141, 0.6771105, 0.6794158, 0.6804968, 0.6808019, 0.6808022, 0.6807487, 0.6807017, 0.6806795, 0.6806744, 0.6806733, 0.680673, 0.680673, 0.6806731, 0.6806734, 0.6806735, 0.6806737, 0.6806738, 0.6806739, 0.6806739, 0.6806738, 0.6806737, 0.6806736, 0.6806735, 0.6806733, 0.6806732, 0.6806732, 0.6806732, 0.6806735, 0.6806743, 0.6806769, 0.6806896, 0.6807248, 0.6807767, 0.6807916, 0.6806986, 0.6800795, 0.6784639, 0.6757571, 0.6738888, 0.6799703, 0.710282, 0.7875389, 0.9150895, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] test_runner.test('fishing', fishing)
from test_runner import test, case # begin challenge code def f(m, c, l): if (not -1 < c < len(m)): return 1 if (m[c] in "S E"): z = m * 1 z[c] = "." return "".join(z) if m[c] == "E" else f(z, c + 1, l) * f( z, c - 1, l) * f(z, c + l, l) * f(z, c - l, l) return 1 o = lambda a: f(list(a), a.index("S"), a.index("\n") + 1) #end challenge code test(o)