Essential use of BeforeIT
We start by importing the BeforeIT library and other useful libraries.
import BeforeIT as Bit
using Plots
We then initialise the model loading some precomputed set of parameters and by specifying a number of epochs. In another tutorial we will illustrate how to compute parameters and initial conditions.
parameters = Bit.AUSTRIA2010Q1.parameters
initial_conditions = Bit.AUSTRIA2010Q1.initial_conditions
Dict{String, Any} with 21 entries:
"sb_inact" => 2.23847
"C_G" => [11482.3; 11556.2; … ; 14578.2; 14714.8;;]
"E_CB" => 1.0618e5
"D_RoW" => 0.0
"sb_other" => 0.590286
"L_I" => 236919.0
"omega" => 0.85
"r_bar" => 0.00164593
"N_s" => [123.0; 18.0; … ; 5.0; 60.0;;]
"C_E" => [17384.5; 17752.9; … ; 38786.7; 38617.8;;]
"D_H" => 219841.0
"K_H" => 4.05377e5
"L_G" => 2.32611e5
"pi" => [-0.00749736; -0.00789543; … ; 0.00530319; 0.00100796;;]
"w_UB" => 4.06546
"Y" => [1.04531e5; 1.05062e5; … ; 1.35709e5; 1.34636e5;;]
"Y_I" => [19804.6; 19944.1; … ; 36883.2; 36575.9;;]
"Y_EA" => 2.35485e6
"D_I" => 54049.0
⋮ => ⋮
We can now initialise the model, by specifying in advance the maximum number of epochs.
T = 16
model = Bit.init_model(parameters, initial_conditions, T);
Note that the it is very simple to inspect the model by typing
fieldnames(typeof(model))
(:w_act, :w_inact, :firms, :bank, :cb, :gov, :rotw, :agg, :prop)
and to inspect the specific attributes of one agent type by typing
fieldnames(typeof(model.bank))
(:E_k, :Pi_k, :Pi_e_k, :D_k, :r, :Y_h, :C_d_h, :I_d_h, :C_h, :I_h, :K_h, :D_h)
We can now define a data tracker, which will store the time series of the model.
data = Bit.init_data(model);
We can run now the model for a number of epochs and progressively update the data tracker.
for t in 1:T
Bit.step!(model; multi_threading = true)
Bit.update_data!(data, model)
end
Note that we can equivalently run the model for a number of epochs in the single command data = Bit.run!(model)
, but writing the loop explicitely is more instructive.
We can then plot any time series stored in the data tracker, for example
plot(data.real_gdp, title = "gdp", titlefont = 10)
Or we can plot multiple time series at once using the function plot_data
ps = Bit.plot_data(data, quantities = [:real_gdp, :real_household_consumption, :real_government_consumption, :real_capitalformation, :real_exports, :real_imports, :wages, :euribor, :gdp_deflator])
plot(ps..., layout = (3, 3))
To run multiple monte-carlo repetitions in parallel we can use
model = Bit.init_model(parameters, initial_conditions, T)
data_vector = Bit.ensemblerun(model, 4)
BeforeIT.DataVector{BeforeIT.Data}(BeforeIT.Data[BeforeIT.Data{Float64, Vector{Float64}, Matrix{Float64}}([72421.99999999997, 72541.14913269176, 71966.16261629357, 71316.93526457544, 72082.24053558064, 71678.13431859808, 71586.97511788069, 72875.12592993767, 72992.45069032314, 73321.83167801354, 74679.11361119062, 75540.69346445995, 75271.17152648425, 76571.07240452767, 77187.16508968611, 77566.42823073087, 77658.37659572501], [72421.99999999997, 72351.70820718989, 71940.69978544631, 71512.56409630165, 72041.46850801031, 71558.23830417093, 71446.03624571417, 72213.99702238229, 72237.1748955783, 72846.68642145979, 73849.42556286897, 74385.76513544934, 74104.66874872793, 75203.6533978156, 75384.20968819193, 75621.86646291765, 75640.78900087062], [64900.92049553801, 65012.8340812113, 64502.61497087743, 63929.50641798554, 64632.50065783851, 64270.8747433738, 64239.5379528272, 65412.99620863827, 65526.897118414054, 65842.43729287446, 67055.22357343785, 67858.53346985263, 67609.62409851069, 68777.5917718626, 69322.10440321898, 69676.91702739813, 69790.31572003398], [64900.92049553801, 64843.05332084154, 64479.792867898745, 64104.87086132547, 64595.94244212292, 64163.36885195055, 64113.06455438202, 64819.56433224032, 64848.86974941607, 65415.76053039216, 66310.23725951246, 66821.05632905409, 66561.85490992799, 67549.35004464908, 67702.86288253994, 67930.14239768927, 67977.1426740568], [40512.94792630534, 40542.26125197467, 40136.92669272754, 39647.29671072583, 39949.99777091443, 39708.882618642645, 39230.71361358595, 39777.084083085894, 39778.534355286756, 39822.94176033431, 40621.701596398765, 40893.76173587306, 40831.952873787704, 41533.16224704908, 41916.67028701635, 42040.470170430744, 41941.9492920784], [40512.94792630534, 40436.38529625377, 40122.725577398465, 39756.05284708877, 39927.40077062073, 39642.461571155996, 39153.477041962695, 39416.22322953658, 39366.933376489134, 39564.87835075484, 40170.392807538556, 40268.544230677835, 40199.16630380941, 40791.45609507785, 40937.57114509534, 40986.53107771996, 40852.28504328484], [14866.888022051655, 14969.63563514244, 15133.76549969313, 15180.199612466045, 15421.108685993338, 15461.008901359512, 15748.124417130635, 16226.219070596533, 16184.55110073632, 16216.37540659933, 16523.209733732972, 16384.202349635856, 16559.07307212447, 16723.428848829393, 16910.074168983392, 16737.268068916434, 16379.208917829425], [14866.888022051655, 14930.542490588581, 15128.410920582735, 15221.840278943651, 15412.386012227362, 15435.147271953036, 15717.119853934146, 16079.013527539058, 16017.08447124806, 16111.288917669572, 16339.636188559874, 16133.70717181838, 16302.451521749002, 16424.77906181225, 16515.084800903707, 16317.670927126657, 15953.67222526921], [15944.236265986638, 16090.364385901037, 15842.7482122389, 15486.16469852943, 15752.669176928428, 15685.876107097034, 15607.433141217476, 15851.711838473931, 15894.568170198234, 15969.853243043122, 16254.666571349426, 16732.068433794153, 16210.54075878929, 16850.11864443718, 16738.51280667714, 17183.622575484562, 17352.558420097404], [15944.236265986638, 16048.344462624767, 15837.142783198107, 15528.644655031389, 15743.758961912685, 15659.638342318178, 15576.70556793037, 15707.903854653381, 15730.102085098499, 15866.364284261865, 16074.076551843875, 16476.25479281636, 15959.320531435624, 16549.20640987907, 16347.530808015666, 16752.83549072382, 16901.733819557125], [15944.236265986638, 15968.134627675367, 15805.119335512278, 15633.034348503941, 15765.308284249495, 15678.445595128565, 15615.914234772736, 15852.998589428911, 15896.437862240695, 15970.53710120072, 16253.91085075763, 16455.719332328015, 16441.340303334604, 16719.850192291542, 16878.7687121761, 16959.99505747879, 17004.03417426734], [15944.236265986638, 15926.433906931714, 15799.527220196827, 15675.91718179714, 15756.390920149199, 15652.22025936699, 15585.16996409398, 15709.178932101902, 15731.952430850624, 15867.04371083405, 16073.329227339185, 16204.130743985326, 16186.543297456607, 16421.26431352087, 16484.510584094445, 16534.814232174154, 16562.264336725177], [3173.2320350842083, 3175.1083843697656, 3122.7449849062077, 3073.6653424471965, 3078.069994922253, 3061.7778087805964, 3019.2656916961896, 3029.3815432545052, 3040.079100913264, 3056.7560303712007, 3100.7248664074377, 3141.0355957950705, 3156.4151141624516, 3201.36103502868, 3248.798417738914, 3265.8316237454396, 3271.197005195797], [3173.2320350842083, 3166.8166013184155, 3121.6401055512574, 3082.096685687471, 3076.3289397918356, 3056.6563730760536, 3013.3214273847293, 3001.898754241063, 3008.622448378457, 3036.947426371082, 3066.275684589531, 3093.012856981839, 3107.499082649284, 3144.1905946890347, 3172.9122435437316, 3183.9584285950823, 3186.2103393997068], [34195.564496956766, 33993.76867664217, 33401.28539148968, 33881.43947391831, 34043.69268047343, 33499.599527605234, 32613.208053387545, 33222.46269555319, 34290.12138730428, 34417.87374527525, 34835.37754183513, 34509.38280021806, 34313.320030599076, 34522.51638824187, 35173.499132736506, 34615.31357195193, 33354.28355601564], [34195.564496956766, 33904.994083512676, 33389.4674586017, 33974.37934012116, 34024.43647580702, 33443.56474787156, 32548.999882093725, 32921.065885764794, 33935.3107399324, 34194.83663509299, 34448.355053114756, 33981.7749376904, 33781.55491630624, 33906.007521558946, 34351.90852013743, 33747.52041854468, 32487.729403226716], [33097.63671130043, 33054.88081696806, 32548.56317985541, 32878.16523106363, 33085.22777872944, 32677.232836105602, 31612.504107440574, 32202.3517577718, 33155.32432320245, 33105.21247723889, 33555.841832125225, 32978.72185506125, 32643.715208816764, 33058.153724030606, 33551.59130572736, 33010.24615605267, 31369.623590296007], [33097.63671130043, 32968.55812578947, 32537.046954334426, 32968.35302488276, 33066.513712558, 32622.573629127062, 31550.26610020639, 31910.209475111482, 32812.2557771898, 32890.68176631993, 33183.035038187685, 32474.515997553637, 32137.82452457287, 32467.795690513267, 32767.885585960328, 32182.69145119735, 30554.63149046738], [29576.14777688487, 29627.148174457667, 29337.617417977915, 29030.121541203636, 29329.447570142445, 29148.07921065828, 29068.700129745484, 29546.768459061634, 29628.424441124476, 29774.451459730954, 30312.162453080928, 30675.41004340821, 30631.12569494433, 31137.433678117115, 31395.343281887443, 31542.609249850826, 31641.799844306788], [34346.71094688274, 34405.93758879789, 34190.43974428227, 33932.52438567999, 34322.859706180825, 34147.189388323524, 34194.1316420814, 34868.43406820981, 34903.85443005203, 35066.856848046154, 35722.72001059857, 36151.236950154984, 35953.14324431864, 36602.53085981627, 36881.026259792074, 37082.67010967249, 37097.85661544936], [28335.329312139656, 28384.19007220816, 28206.40878771051, 27993.633927493003, 28315.652529671694, 28170.728134594883, 28209.454527376434, 28765.740144647665, 28794.961213841354, 28929.43485237057, 29470.50845686692, 29824.026108584403, 29660.60288013568, 30196.33429164716, 30426.08726224264, 30592.439286428165, 30604.967840994977], [978.0617717704338, 979.748317955805, 974.557808617233, 966.860491101903, 980.1933815152685, 975.6061443920302, 976.706181000299, 997.7936813668554, 994.618247237521, 1001.12898509736, 1020.3411097583731, 1031.8864762893666, 1025.3551592477615, 1037.6272339292334, 1045.7348615394806, 1051.6376678748063, 1050.659260277796], [0.0019383188997990075, 0.001921986418786048, 0.006195337471423645, 0.005299079981353705, 0.0017634933794674623, 0.005612382134961846, 0.011405083948971217, 0.005246714439012923, 0.006844844675578443, 0.0073490563911935425, 0.004665581381776418, 0.0026858482058840227, 0.005236687507637505, 0.008009568464148575, 0.007613826172205185, 0.00623600805178004, 0.002097192345985377], [2.3548476e6, 2.3548860815363694e6, 2.338358306723008e6, 2.35059445909069e6, 2.33758820523576e6, 2.3309545685554505e6, 2.326998749118295e6, 2.346292469629113e6, 2.36151992455035e6, 2.373211888195553e6, 2.3684864913283074e6, 2.360564203853822e6, 2.3588592953152847e6, 2.3646402330994685e6, 2.373496692662712e6, 2.3757300691832677e6, 2.3523767721948065e6], [0.0016459319014481277, 0.0015697915413866751, 0.0009054063336676913, 0.00147467716665677, 0.0008617280675125098, 0.000647597756360381, 0.0006944535237255957, 0.0015789691291090485, 0.0022575054330481415, 0.0027460048703371646, 0.0024539270510337847, 0.002004888558658731, 0.0019055919599899667, 0.002189372910082295, 0.002570403701594487, 0.0026157659793233415, 0.0015033663443889725], [518.0834390395164 258.24326637797435 … 136.99722836422484 504.9046295086171; 518.9768096558064 258.688574852734 … 137.23346308842417 505.77527490285684; … ; 554.0121456280713 275.28018212652023 … 144.08002710404975 529.2768035089462; 557.5822886110518 277.19140827171873 … 144.7769012500379 531.2028823985542], [518.0834390395164 258.24326637797435 … 136.99722836422484 504.9046295086171; 517.6215037596259 258.01301065747634 … 136.87507843959887 504.4544447627344; … ; 540.123265324238 268.3790094180442 … 140.46799392677593 516.0080291155658; 543.0961358233297 269.98989349320834 … 141.01555453139414 517.4020743871076]), BeforeIT.Data{Float64, Vector{Float64}, Matrix{Float64}}([72421.99999999997, 73264.87812979553, 74260.27613480782, 74756.56019032432, 74851.94322156158, 75010.56757794315, 75846.30018547512, 77119.04526128594, 77984.66940119323, 77309.95222113028, 78165.79283155035, 78643.93797906543, 79476.68748419978, 79644.87852313872, 79948.39130537455, 79925.09626627015, 80595.87510978461], [72421.99999999997, 72702.4497938695, 73329.97829889505, 73783.476314737, 73535.90250441892, 73346.4704708452, 73965.7124647815, 74637.03712126195, 74846.76534790112, 74460.20265943646, 74658.15369994838, 74795.01459198193, 75266.3193592923, 75562.9921230821, 75392.04119489378, 75129.16448317612, 75687.94957239142], [64900.92049553801, 65660.64235761984, 66586.04565268187, 67041.60083080875, 67132.05661452698, 67264.66663094942, 68012.53035419807, 69162.11047063017, 69946.99539955646, 69348.82252533437, 70130.29460906296, 70584.66658854458, 71359.01868624966, 71504.03891213344, 71759.82998815134, 71732.3371786286, 72354.66683356617], [64900.92049553801, 65156.589027296875, 65751.88696923948, 66168.94028307979, 65951.74630957295, 65772.41106263685, 66326.17875728918, 66936.18922656213, 67132.50683321121, 66792.53098824635, 66983.24323568735, 67130.17307024621, 67578.69332026114, 67839.37937097086, 67670.15533734177, 67428.01460885041, 67948.59373592542], [40512.94792630534, 40944.96039800526, 41251.97598696069, 41469.48608159471, 41485.933602455974, 41668.05358399047, 42082.942779694786, 42746.79672400522, 43149.106689942, 42685.60410300234, 43073.75838412256, 43158.34562514374, 43448.84682460814, 43624.586511954236, 43957.2926585339, 43987.474961940134, 44222.51445778387], [40512.94792630534, 40630.640542038156, 40735.19062087713, 40929.690134160024, 40756.53132564533, 40743.65466705836, 41039.508027457494, 41371.02894745321, 41412.89676794119, 41112.1549145301, 41140.85148226441, 41046.12731444999, 41147.09463129129, 41388.779141873245, 41452.11635678532, 41347.99200748477, 41529.56264431387], [14866.888022051655, 15043.195526556536, 15246.619583521373, 15248.94771973667, 15246.247195182541, 15345.870014406293, 15499.350818330498, 15948.036792236619, 16123.598549831535, 16017.388406597049, 16189.746277836837, 16325.128235770695, 16479.529878021578, 16133.886974733445, 16279.065264467332, 16316.191369667797, 16130.955231644135], [14866.888022051655, 14927.714280385337, 15055.617099531328, 15050.456709610291, 14978.188929372513, 15005.424411587244, 15115.048765937741, 15434.763358915137, 15474.826097096127, 15426.96577303212, 15463.241939843007, 15526.157972092895, 15606.50799565292, 15307.007769900674, 15351.302746607966, 15337.132920890434, 15148.652762490587], [15944.236265986638, 16129.473687084026, 16334.53741235656, 16483.775479349362, 16445.43353766745, 16677.67867970988, 16662.472356288406, 16717.50778356183, 17045.568918696747, 16956.87299638452, 17085.066930659515, 17168.61803099095, 17476.933588855776, 17836.65550006994, 17607.89509929401, 17425.664264446725, 17898.105146504135], [15944.236265986638, 16005.653470948317, 16129.906005145473, 16269.211084105387, 16156.291276088861, 16307.687120651579, 16249.331031886213, 16179.46960817813, 16359.6987315003, 16331.81968822924, 16318.385660488464, 16328.36642150296, 16551.07310784024, 16922.507561642517, 16604.401051808283, 16380.031528403882, 16808.19121232549], [15944.236265986638, 16123.906382309464, 16325.396645144552, 16418.801685777333, 16432.854001227905, 16461.568422850836, 16644.164230973664, 16941.835582803174, 17111.982483128595, 16957.327253904932, 17100.123619654736, 17192.368880335453, 17351.858077230725, 17438.345559412457, 17563.141319559196, 17555.71368875022, 17705.767675318246], [15944.236265986638, 16000.128904386658, 16120.879749168791, 16205.083035049953, 16143.93291202567, 16096.371234304122, 16231.476851398991, 16396.577615967646, 16423.439983609427, 16332.257201202121, 16332.766690354558, 16350.954877383268, 16432.62361403277, 16544.611437415235, 16562.197841083173, 16502.277294075397, 16627.566226243154], [3173.2320350842083, 3203.406411733796, 3227.8063275445875, 3231.1036642971126, 3224.440242072125, 3239.9905452209905, 3283.3163779787087, 3343.501467351266, 3361.5563526895667, 3329.387928455668, 3331.2323821203, 3336.9322071950783, 3343.3650585473006, 3380.883166296307, 3431.9136135578265, 3422.1002876158927, 3447.146371033445], [3173.2320350842083, 3178.8150033613674, 3187.369886993131, 3189.0453503769177, 3167.7483986018806, 3168.111887754176, 3201.9074701153086, 3235.8938351505344, 3226.2959048929733, 3206.6621794772327, 3181.7454948681493, 3173.618965978647, 3166.246483050109, 3207.6092374186837, 3236.324937951245, 3216.7560302923152, 3237.230693804532], [34195.564496956766, 35022.9380450575, 35655.4764116153, 36252.52309168461, 37532.367519610576, 36690.532441066476, 37328.08578110799, 37708.05040403754, 38298.890501810376, 39120.26106996067, 39753.230275869355, 39430.41843460137, 38345.271554781975, 37865.699375274686, 37489.560224030116, 37721.15467550533, 38014.35015452132], [34195.564496956766, 34754.07944231716, 35208.801361768405, 35780.63479746582, 36872.4765169099, 35876.559012194426, 36402.54637331504, 36494.45021318765, 36757.8408998179, 37678.235255242915, 37969.32991393327, 37500.64910240158, 36313.88707958893, 35925.0412165249, 35352.98737897835, 35457.68433822141, 35699.44756606207], [33097.63671130043, 33875.689526908354, 34228.33325964658, 34698.1721820409, 35858.038633354474, 35371.567141230174, 35726.55154994709, 36001.346442555565, 36632.49525908748, 37470.174354814815, 37936.009036937816, 37438.57234744145, 36273.89436206742, 35815.94983889346, 35385.42194095069, 35525.38900528937, 35670.04988066863], [33097.63671130043, 33615.637941819914, 33799.53678842767, 34246.516410604425, 35227.585543597226, 34586.85474064643, 34840.72173381553, 34842.67500647253, 35158.4971484545, 36088.97297159838, 36233.655296580684, 35606.286218465546, 34352.24345508077, 33980.34356685909, 33368.766339286034, 33393.676311824034, 33497.90461280037], [29576.14777688487, 29922.3623743158, 30335.714919756265, 30544.85080638983, 30599.67265014599, 30651.711304544468, 30939.450492292337, 31509.62938126774, 31836.458903762592, 31546.91941514848, 31891.339642597697, 32090.744320122532, 32426.597141569087, 32525.33038906395, 32715.7943020858, 32703.109758333794, 32986.0328923728], [34346.71094688274, 34748.76914571434, 35245.16133784939, 35485.688488792264, 35520.31339192083, 35593.57312176141, 36039.94077448974, 36604.41277221041, 37051.18932789657, 36749.79536459464, 37169.154246541606, 37415.547926981526, 37845.29383126021, 37896.25506581446, 37964.22363482671, 37953.253758814266, 38285.323271581125], [28335.329312139656, 28667.019047560247, 29076.53238506362, 29274.96233199557, 29303.527164129457, 29363.964932786886, 29732.209055314488, 30197.88683062264, 30566.468289670902, 30317.824475826295, 30663.786918585796, 30867.05663155751, 31221.58815386576, 31263.63012305113, 31319.702792973316, 31310.65287113926, 31584.603381664776], [978.0617717704338, 989.5108375896384, 1005.1693950761677, 1011.0615356267058, 1012.0705724602005, 1019.3822046433801, 1033.139087416016, 1048.0683171520582, 1059.347167897342, 1052.1077455912048, 1069.8007199236722, 1078.3743414404505, 1087.1277134203328, 1082.4534572550226, 1079.8120512388025, 1075.9736614806045, 1083.310669612211], [0.0019383188997990075, 0.0034957495025194074, 0.0053469442345268625, 0.0019034752212716555, 0.0018888908398917437, 0.004166159757923449, 0.0041118180818768835, 0.0040747661095765775, 0.004019847487265027, 0.0015420275916262494, -0.0017809609520359482, 0.0056656150118339355, 0.005553413291386811, 0.000815755271284635, 0.0005999196108095184, -0.000659413774003248, 0.003924174788777712], [2.3548476e6, 2.38043324979047e6, 2.3849453072923073e6, 2.3803580340180746e6, 2.404516995790369e6, 2.3760640019548833e6, 2.3663797995135733e6, 2.3644399061794938e6, 2.381529234117968e6, 2.404591441783351e6, 2.4075088171235532e6, 2.4045777858187878e6, 2.3722577294870815e6, 2.359486313792641e6, 2.352337881630981e6, 2.345731495555937e6, 2.3541361384261507e6], [0.0016459319014481277, 0.0026729891934607446, 0.002784240282697211, 0.0024326068951465904, 0.0032941438381199513, 0.00198196611651662, 0.0015287042858897492, 0.0014284046037365218, 0.0021258133639767765, 0.0029563152058643205, 0.002815915724844622, 0.0026177106753932995, 0.00122929232141091, 0.000627468085395412, 0.00029678487652000325, 0.0, 0.0004424709684297564], [518.0834390395164 258.24326637797435 … 136.99722836422484 504.9046295086171; 524.1480574149666 261.26622897549606 … 138.60090037131226 510.81497842778737; … ; 576.2908331070371 291.78185926976573 … 150.4445827527964 549.452149610699; 583.321566312658 293.6330639945389 … 151.45726300464048 553.8894029348944], [518.0834390395164 258.24326637797435 … 136.99722836422484 504.9046295086171; 520.124359741048 259.26058132893866 … 137.53691069790324 506.8936340453644; … ; 541.7103114446542 274.27339249307073 … 141.41710590604075 516.4820920104129; 547.7999120354588 275.7521338422358 … 142.23419832655867 520.1600347525568]), BeforeIT.Data{Float64, Vector{Float64}, Matrix{Float64}}([72421.99999999997, 73647.83586188419, 72586.08552305102, 73236.56975735692, 73448.15790502334, 73942.7478285558, 74530.21494980795, 75307.05263468344, 76217.66546208442, 77159.03636577708, 76949.16594549175, 76986.0883335101, 77302.89623042551, 77044.12804755349, 77680.9458570007, 78470.97520450082, 79461.62178631515], [72421.99999999997, 73392.35026648318, 72628.3932247245, 72865.41076045025, 73127.34604454064, 73088.22206148351, 73288.23170377713, 73682.6829989298, 74294.29676079612, 74790.47876788456, 74324.44750655127, 74435.34595732017, 74640.30129615153, 74322.81567221254, 75119.71909834546, 75501.24766729481, 76148.45002353296], [64900.92049553801, 66013.53073119228, 65045.11956657433, 65636.25245923581, 65820.28111297454, 66271.86771852519, 66839.63867943124, 67555.20992557984, 68377.8511059638, 69215.60367901123, 69009.56006162433, 69055.42166196802, 69333.27635793982, 69110.25898283672, 69712.31879082131, 70448.79171739747, 71361.25764955078], [64900.92049553801, 65784.52867015397, 65083.03192255978, 65303.61146165503, 65532.78681163817, 65505.991141571496, 65725.81240821342, 66098.04717785685, 66652.32175681328, 67090.88631979661, 66655.65976223417, 66767.44218214587, 66945.18432763618, 66669.18257897464, 67413.82648585325, 67782.6630477738, 68385.83255142077], [40512.94792630534, 41111.86066459142, 40615.33406476922, 40895.92824116949, 41026.47526282079, 41249.864518451264, 41221.07228469298, 41523.009378896284, 42033.45723759979, 42641.4862255948, 42694.74165261444, 42605.36409777556, 42844.043594551935, 42600.83491592226, 42694.24385468847, 42898.86812182612, 43343.621857080434], [40512.94792630534, 40969.24292060729, 40639.00721678723, 40688.6698762044, 40847.277033300394, 40773.15688782616, 40534.15784072564, 40627.35999068576, 40972.73416811719, 41332.516843107056, 41238.43378644731, 41193.741426593595, 41368.33778013296, 41096.11051713355, 41286.567382745416, 41275.364021815265, 41536.39893857815], [14866.888022051655, 15045.819418386398, 14980.418158708204, 15240.754534546079, 15344.173707980137, 15503.889451816725, 15875.42006406466, 15935.565810347643, 15853.884717697298, 15635.98475303226, 15661.915274365523, 15515.102204400333, 15816.334837954531, 16108.371333332527, 16267.13986858381, 16414.25947209427, 16157.978769720552], [14866.888022051655, 14993.625214885144, 14989.14968153154, 15163.515210204623, 15277.152382255495, 15324.71741107601, 15610.869562545946, 15591.836394240334, 15453.80862674144, 15156.00557973413, 15127.690928920747, 15001.047918485201, 15271.562325256056, 15539.399870264911, 15730.794263383505, 15793.063186077829, 15484.267891437268], [15944.236265986638, 16562.823360023187, 15859.141038692702, 16260.16258843235, 15952.051789080278, 16171.491269363436, 16218.9927377215, 16545.121832991466, 16884.055152240846, 17286.06191229117, 16974.157409822546, 17039.259768000862, 16717.130574046463, 16455.321664697345, 16910.513217412143, 17118.722120319602, 17743.96124472743], [15944.236265986638, 16505.366644043206, 15868.384736062895, 16177.75695889703, 15882.37533212148, 15984.604030418825, 15948.716887030469, 16188.244321721331, 16457.9824952818, 16755.43017803901, 16395.172785471976, 16474.70631568277, 16141.331356260709, 15874.09540357699, 16352.954880844512, 16470.86550390819, 17004.12243909588], [15944.236265986638, 16209.902816593229, 15983.82003408741, 16107.854455810108, 16155.681630489182, 16243.233522100534, 16324.675874148883, 16470.87595735345, 16687.88440264938, 16931.92682556951, 16921.743375835576, 16918.27131759729, 16981.12814835261, 16884.90660615277, 16994.892672552465, 17144.89757143632, 17354.57907286787], [15944.236265986638, 16153.670387981807, 15993.136402158936, 16026.220715699868, 16085.115745256953, 16055.517187600888, 16052.638903019393, 16115.599926180425, 16266.762155514421, 16412.166006635143, 16344.54658218823, 16357.726516376486, 16396.235886990416, 16288.506770522992, 16434.552251961504, 16496.050347252065, 16630.975652164725], [3173.2320350842083, 3219.96255337578, 3181.6500647903476, 3203.624672363414, 3213.706187532041, 3215.4631662474358, 3197.872038290169, 3201.463821383026, 3257.6214030954047, 3318.236383623017, 3338.5979913727133, 3332.4558910105593, 3346.2529304985455, 3300.046787380508, 3301.964833938792, 3304.720664456009, 3341.3196355367827], [3173.2320350842083, 3208.7924485045273, 3183.504529055782, 3187.3888748131, 3199.669143030527, 3178.303387779351, 3144.5821947390473, 3132.4083951051516, 3175.4146468352346, 3216.376195002003, 3224.71917799645, 3222.0432613785542, 3230.9957210534208, 3183.4842616009964, 3193.0953988988126, 3179.653785467535, 3202.002495790247], [34195.564496956766, 34194.6727959187, 34670.15031731627, 34154.119279236606, 34774.72658561462, 34792.83357348987, 35048.391231282214, 36067.37289274414, 35891.209299311326, 37182.26078378861, 37618.13820680051, 38503.456035947995, 38929.96400883315, 38624.96229863553, 37979.07951250583, 39235.15804951951, 38475.45569208316], [34195.564496956766, 34076.050894316715, 34690.358245130905, 33981.028039519704, 34622.83516924804, 34390.74718001498, 34464.33931704985, 35289.40133073675, 34985.48713898061, 36040.8737158013, 36334.99212228097, 37227.73987648818, 37589.07343401677, 37260.67159194498, 36726.867227454706, 37750.30675281222, 36871.21215295695], [33097.63671130043, 33267.34037703509, 33538.95805643503, 33314.39488602694, 33649.269440472395, 33775.330984566004, 33833.66136795377, 34764.017280296204, 34444.94094476462, 35586.75730892937, 35999.786598111205, 36677.09377261517, 37004.57678496097, 36745.36216503482, 36170.030596189325, 37196.0325592586, 36259.395777296675], [33097.63671130043, 33151.93540736873, 33558.506654787794, 33145.55932437489, 33502.29387238471, 33385.003447853036, 33269.85190357512, 34014.15903845447, 33575.71566832472, 34494.34754879651, 34771.84211656973, 35461.88957993014, 35730.00359951533, 35447.46171070851, 34977.46465608252, 35788.35179731866, 34747.55139853555], [29576.14777688487, 30083.177946819753, 29650.449907811075, 29867.30595573535, 29945.16084810749, 30144.14655605404, 30340.93351938304, 30671.14046824892, 31062.491603936516, 31489.312249975384, 31465.638025511376, 31475.569654735787, 31621.125969014185, 31484.40112692703, 31694.95859066676, 32015.63882923041, 32428.07530496242], [34346.71094688274, 34935.5238923507, 34415.541394290995, 34777.05134511808, 34880.920794691, 35126.223950351676, 35486.15057991664, 35861.66178093926, 36279.08152030457, 36678.540852338396, 36502.1058583776, 36535.0815555049, 36660.84277894859, 36576.96345134646, 36956.660755897865, 37363.824919054285, 37848.50142183927], [28335.329312139656, 28821.087868144852, 28392.113013991955, 28690.351279721162, 28776.041436885585, 28978.411489368973, 29275.343547658453, 29585.132556504985, 29929.495246562707, 30259.040970387334, 30113.48573327028, 30140.690004411244, 30244.440424254513, 30175.24170610759, 30488.484164171023, 30824.386215024773, 31224.2343500473], [978.0617717704338, 994.8288920218134, 979.1282644723102, 991.8951583824478, 994.1994701760896, 1001.497212119564, 1012.5545801315012, 1022.4076763916155, 1036.2779817227624, 1047.7505766974762, 1041.81617773541, 1044.7704517273423, 1051.3076099770187, 1048.8944045632309, 1060.6994442567322, 1069.3279691127545, 1084.6809227491224], [0.0019383188997990075, 0.0001845557561079847, 0.0005812516224208419, -0.0017714356367617423, 0.004248076398325029, 0.0008099023144780837, 0.0023611753960428583, 0.005439605018908944, 0.0036413194701654383, 0.007245663677523995, 0.004171964202398071, 0.002995119015825942, 0.0037663628787583114, 0.0036752156432020566, 0.0031881818680716822, 0.005001920585430586, 0.009100562979576843], [2.3548476e6, 2.3693989219188015e6, 2.380801620947429e6, 2.3572762520111315e6, 2.365678655342256e6, 2.372054502776167e6, 2.3921584139987538e6, 2.3857536146977427e6, 2.36604298571898e6, 2.382241860715183e6, 2.3789374197828313e6, 2.3816991003503334e6, 2.3916365205401345e6, 2.393027309895137e6, 2.3931712328848946e6, 2.4198267069567773e6, 2.39763992395904e6], [0.0016459319014481277, 0.002136109578098634, 0.002464661016406721, 0.001269621425659117, 0.001623711818020512, 0.0017871832759606692, 0.002542688256068865, 0.0022159230194911464, 0.00132280196430372, 0.0020645558391669005, 0.0018710122350671043, 0.0019154122986836085, 0.0022704366641119193, 0.0022438865430250603, 0.0021568427043228183, 0.0032074956381898077, 0.0022770372478430985], [518.0834390395164 258.24326637797435 … 136.99722836422484 504.9046295086171; 526.9650532415508 262.67038542755193 … 139.34580088631685 513.5603165856458; … ; 552.3278811848157 280.38562134830255 … 147.173588285117 539.9880551056256; 556.7465784603453 282.5071824386872 … 148.47334420796665 544.3091096483076], [518.0834390395164 258.24326637797435 … 136.99722836422484 504.9046295086171; 525.1370025078488 261.75917739231494 … 138.8624079326823 511.7787671114256; … ; 531.4250784090558 269.7744508029553 … 141.60381606372286 519.5522520226338; 533.5328936485641 270.72797634400087 … 142.28271179325804 521.6140081418032]), BeforeIT.Data{Float64, Vector{Float64}, Matrix{Float64}}([72421.99999999997, 72772.92988713179, 71895.05347563844, 71979.08115948646, 71773.70962428092, 71859.21533535044, 72968.26288599173, 73108.45351085537, 73284.57184412322, 74232.28698252531, 74825.45270543807, 75449.46149499959, 74975.74445511596, 75604.74088886021, 76633.36104336008, 76207.3746411507, 75741.59774072283], [72421.99999999997, 73121.53315506384, 72371.40730489013, 72776.0779898148, 72349.97575445914, 72215.02140027504, 73339.26691549894, 73786.2455417211, 73766.95412972425, 74613.49539991801, 75211.3513393737, 75122.96862057921, 74573.03738651934, 74922.81676798836, 75610.3628267101, 75588.82725521347, 74925.77556458149], [64900.92049553801, 65223.869771319325, 64425.13944900528, 64503.5329927486, 64304.73673210625, 64380.337636828845, 65403.05139531083, 65543.29536421761, 65707.71492016903, 66564.44305094657, 67094.04801665954, 67639.18902486202, 67205.02822439207, 67762.63252242452, 68714.5261639226, 68341.38824391586, 67910.30414321097], [64900.92049553801, 65536.31086974317, 64851.999996330786, 65217.75593797195, 64821.0349976233, 64699.112542541014, 65735.59042872104, 66150.9504456912, 66140.22393137305, 66906.2744429398, 67440.07334011151, 67346.4935859469, 66844.05895215763, 67151.44104067945, 67797.23848703384, 67786.6861924589, 67178.83380509916], [40512.94792630534, 40651.99409952446, 40268.103246749204, 40248.17519319844, 40206.702010074536, 40260.92352536553, 40701.254292449776, 40658.84299508686, 40725.786449334475, 41181.731928912726, 41522.21020510423, 41934.455455683725, 41686.98052035021, 41984.96051643219, 42336.48830965016, 42103.32460993473, 41935.97369654001], [40512.94792630534, 40846.728845164456, 40534.906931439284, 40693.827840311336, 40529.51882831987, 40460.27277657763, 40908.198088988924, 41035.793107459256, 40993.856487215235, 41393.21433760916, 41736.35343600747, 41752.99225332688, 41463.07288400733, 41606.273188714295, 41771.32776533463, 41761.58732401751, 41484.27610446076], [14866.888022051655, 14637.466997742222, 14828.153015905838, 14893.787952460449, 14882.9923284166, 14756.509583043024, 15033.567319573476, 15140.563908430098, 15197.093866479789, 15506.093462822922, 15660.597516719374, 16005.200484256311, 16061.520786280611, 16465.188994814198, 16429.274305619012, 16221.375128353362, 16256.817749964197], [14866.888022051655, 14707.584675257403, 14926.399656368369, 15058.701168890526, 15002.486840257572, 14829.575446374009, 15110.00485327417, 15280.932813353289, 15297.125956308986, 15585.72260519727, 15741.364193963667, 15935.9410911707, 15975.251713528449, 16316.679663279248, 16209.95574661712, 16089.712159655157, 16081.713542639312], [15944.236265986638, 16388.408554713318, 15735.570835026403, 16083.76313213708, 15956.673801627445, 15380.215051245557, 15895.632015274025, 15948.930539108575, 16086.8921080695, 16630.204435759963, 16872.46068384089, 16533.88525113568, 16728.385097470935, 16199.945673651566, 16485.317051518985, 17098.05288904784, 16033.91379035744], [15944.236265986638, 16466.91374596012, 15839.829738252141, 16261.852488510805, 16084.788827453971, 15456.369150195012, 15976.452680258795, 16096.793850409951, 16192.781132021406, 16715.606276004557, 16959.477324484003, 16462.338077517503, 16638.534186700865, 16053.828729372688, 16265.250363656092, 16959.274247624522, 15861.210509324334], [15944.236265986638, 16012.313637077548, 15833.316950109976, 15832.4226685772, 15788.695160465544, 15792.5102044067, 16036.84858091748, 16068.785257801625, 16069.504575926216, 16256.243528297879, 16444.42503336262, 16585.690121936306, 16453.31975558235, 16558.33318803085, 16767.08253145324, 16665.977791551373, 16567.25255331123], [15944.236265986638, 16089.017225481864, 15938.22348810283, 16007.729028147358, 15915.461497447619, 15870.705755038434, 16118.387255524718, 16217.759748033624, 16175.279149629108, 16339.724950197633, 16529.234158156203, 16513.918772812547, 16364.946266054434, 16408.98373362362, 16543.254484574358, 16530.706145656284, 16388.804614082466], [3173.2320350842083, 3177.7604374412617, 3154.0826462108416, 3153.288253773178, 3144.803907844849, 3153.6201935384493, 3173.7079105208973, 3185.050458231769, 3159.551979991236, 3183.214413037938, 3252.0996581582035, 3285.3367096376915, 3262.3776392098043, 3278.2122878005844, 3312.5423329909313, 3263.1973750006905, 3272.8987837820728], [3173.2320350842083, 3192.982824047316, 3174.9805977897718, 3188.2034083276008, 3170.053320026968, 3169.235131526475, 3189.8444934229947, 3214.5792160541982, 3180.3491528098893, 3199.561317840981, 3268.8717693868007, 3271.120053819152, 3244.854871742953, 3248.644141595628, 3268.3223633446823, 3236.71119547268, 3237.645983633655], [34195.564496956766, 35218.33875812528, 34592.30910082673, 33822.820667491345, 34928.34849682689, 34941.6041786531, 35825.44304533607, 36081.65751207091, 35319.21795300259, 34653.90917965293, 34426.6194821313, 35719.31971299874, 36007.815008648686, 37873.32595857194, 38725.4714727498, 38699.75550224226, 38963.803692216825], [34195.564496956766, 35387.04473164128, 34821.50677307578, 34197.32782193843, 35208.78578127477, 35114.61517838281, 36007.595986943925, 36416.17231504749, 35551.70024297286, 34831.86896523726, 34604.16849719008, 35564.7513021134, 35814.41110537194, 37531.72390815611, 38208.515310104965, 38385.64374186422, 38544.11971317345], [33097.63671130043, 34123.278522973545, 33529.08272286943, 33069.46578580023, 34201.00701266492, 33480.03700295649, 34487.633786641825, 34721.54144384103, 34044.41853276333, 33739.652024622985, 33656.43518235793, 34743.39940907465, 35508.95695763513, 36918.68025460959, 37343.1900961779, 37915.13348842813, 37448.911188355814], [33097.63671130043, 34286.73884295947, 33751.23579424514, 33435.63132983566, 34475.604522847396, 33645.811151254115, 34662.984693967126, 35043.44654454889, 34268.5096887944, 33912.91678413004, 33830.01211227168, 34593.05410354907, 35318.232503089814, 36585.688721533894, 36844.68635900272, 37607.390217948596, 37045.544305016585], [29576.14777688487, 29723.319734262568, 29401.93914997595, 29364.326250678358, 29273.671308405308, 29295.43316632595, 29803.468578062144, 29852.303278807227, 29898.910652025294, 30242.20431235746, 30515.63790914512, 30761.41035093079, 30505.999771875915, 30688.223253815588, 31102.16899173909, 31007.253432200345, 30776.912986243035], [34346.71094688274, 34517.62139531817, 34049.6544958003, 34162.2504185712, 34056.41231166096, 34104.95746975408, 34608.91780502829, 34697.283179483085, 34811.25593442121, 35312.166816504876, 35562.736068493956, 35855.07208963002, 35678.57942343994, 36035.823599602685, 36552.459410671676, 36294.60497172022, 36082.96730346268], [28335.329312139656, 28476.326912951936, 28090.263856564194, 28183.15317443372, 28095.83891550183, 28135.887671355213, 28551.64457111586, 28624.54418554588, 28718.569361603582, 29131.810525272067, 29338.524998794353, 29579.69619686049, 29434.09338134178, 29728.812470807727, 30155.026377103542, 29942.301774343592, 29767.705055775557], [978.0617717704338, 982.9286417385467, 973.5458032290845, 976.9563234990123, 974.6531120399598, 979.9470007487744, 990.6650122204946, 993.7089059273227, 997.5483337225286, 1010.0719220842577, 1015.6740390204609, 1022.7065843012439, 1020.4490290761823, 1038.585669006268, 1059.8977615117913, 1039.5298399952972, 1050.4238535052748], [0.0019383188997990075, 0.006347910192240347, 0.003511342920600846, 0.006601140396663485, 0.0031021808134645834, 0.008391365533865214, 0.006142424492080689, 0.009903881389609515, 0.0071984062198646726, 0.006318502717966412, 0.004342054163132714, 0.005575381196158968, 0.0035375040561289595, 0.0029311775037901278, 0.007802843178355223, 0.0033299658623671125, 0.004613514155459075], [2.3548476e6, 2.372528402238888e6, 2.361951510727643e6, 2.3487588206945495e6, 2.3662681081835525e6, 2.3705501514219656e6, 2.3766187279380024e6, 2.3755548009415814e6, 2.352248029052681e6, 2.33140071860467e6, 2.3243506255484247e6, 2.3497649466868024e6, 2.3547230326657034e6, 2.387532708924215e6, 2.4107170376087874e6, 2.410888477813864e6, 2.41023472702334e6], [0.0016459319014481277, 0.0024082621028785074, 0.0018720541331077463, 0.0013355535037540011, 0.0020411107645820496, 0.0022605602337772753, 0.002485960510720613, 0.0024851594390709873, 0.0015013468841117935, 0.0006634584116033412, 0.00041654433909371787, 0.0015891122741944037, 0.0017601869362100092, 0.0030676435187181514, 0.0039747281215282435, 0.0037638776307966546, 0.003564425164473683], [518.0834390395164 258.24326637797435 … 136.99722836422484 504.9046295086171; 520.6614405555903 259.5282940049384 … 137.67893141784032 507.417052802361; … ; 536.2589328677536 270.2171880005276 … 142.71860878401222 526.753816032972; 515.2932823419532 264.3594408324014 … 142.5078200364934 524.6369148451672], [518.0834390395164 258.24326637797435 … 136.99722836422484 504.9046295086171; 523.1555586286895 260.7715091888159 … 138.3384531038861 509.8477264482579; … ; 531.9063152546587 268.0239339216398 … 141.5602140380492 522.4783479765813; 509.7429942639235 261.5119923927516 … 140.97285057021256 518.9859853385276])])
Note that this will use the number of threads specified when activating the Julia environment. To discover the number of threads available, you can use the command
Threads.nthreads()
2
To activate Julia with a specific number of threads, say 8, you can use the command julia -t 8
in the terminal.
We can then plot the results of the monte-carlo repetitions using the function plot_data_vector
ps = Bit.plot_data_vector(data_vector)
plot(ps..., layout = (3, 3))