content
stringlengths
5
1.03M
input_ids
sequencelengths
4
823k
ratio_char_token
float64
0.4
12.5
token_count
int64
4
823k
#-------------------------------------------------------------------- # DNSS.jl # Soham 03-2022 #-------------------------------------------------------------------- module DNSS using NLsolve, Random, LinearAlgebra, Printf, Distributed using PyPlot, LaTeXStrings export Manifold, Space, ProductSpace, SingleSpaces, Field, Operator, U, V, Parameters export save export extract, range, Field, rmse export reshapeFromTuple, reshapeToTuple, enforcebc!, enforceregularity! export setup, distribute, distribute_ export Cardinal, ChebyshevGL, Chebyshev export value, space, linsolve, norm export basistransform, project, prolongate, restrict, filtertophalf export computeη, constraints, residuals, lineconstraints, R, M, expansion include("AbstractTypes.jl") include("Spectral/ChebyshevGL.jl") include("Spectral/1Dspace.jl") include("Spectral/2Dspace.jl") include("Spectral/BasisTransform.jl") include("AnySpace.jl") include("ArraySpace.jl") include("BoundaryUtils.jl") include("SolverUtils.jl") include("Distribute.jl") include("Save.jl") include("SphericalSymmetry.jl") end
[ 2, 10097, 650, 198, 2, 45080, 5432, 13, 20362, 198, 2, 311, 1219, 321, 7643, 12, 1238, 1828, 198, 2, 10097, 650, 198, 198, 21412, 45080, 5432, 628, 220, 220, 220, 1262, 22879, 82, 6442, 11, 14534, 11, 44800, 2348, 29230, 11, 12578, 69, 11, 4307, 6169, 198, 220, 220, 220, 1262, 9485, 43328, 11, 4689, 49568, 13290, 654, 628, 220, 220, 220, 10784, 1869, 361, 727, 11, 4687, 11, 8721, 14106, 11, 14206, 4561, 2114, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7663, 11, 35946, 11, 471, 11, 569, 11, 40117, 198, 220, 220, 220, 10784, 3613, 198, 220, 220, 220, 10784, 7925, 11, 2837, 11, 7663, 11, 42721, 325, 198, 220, 220, 220, 10784, 27179, 1758, 4863, 51, 29291, 11, 27179, 1758, 2514, 51, 29291, 11, 4605, 15630, 28265, 4605, 16338, 414, 0, 198, 220, 220, 220, 10784, 9058, 11, 14983, 11, 14983, 62, 198, 220, 220, 220, 10784, 25564, 11, 2580, 48209, 258, 85, 8763, 11, 2580, 48209, 258, 85, 198, 220, 220, 220, 10784, 1988, 11, 2272, 11, 300, 1040, 6442, 11, 2593, 198, 220, 220, 220, 10784, 1615, 396, 26084, 687, 11, 1628, 11, 16761, 378, 11, 4239, 11, 8106, 83, 2522, 1604, 220, 198, 220, 220, 220, 10784, 24061, 138, 115, 11, 17778, 11, 29598, 82, 11, 1627, 1102, 2536, 6003, 11, 371, 11, 337, 11, 7118, 628, 220, 220, 220, 2291, 7203, 23839, 31431, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 49738, 1373, 14, 7376, 48209, 258, 85, 8763, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 49738, 1373, 14, 16, 35, 13200, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 49738, 1373, 14, 17, 35, 13200, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 49738, 1373, 14, 15522, 271, 41762, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 7149, 14106, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 19182, 14106, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 49646, 560, 18274, 4487, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 50, 14375, 18274, 4487, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 20344, 4163, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 16928, 13, 20362, 4943, 198, 220, 220, 220, 2291, 7203, 4561, 37910, 13940, 3020, 11973, 13, 20362, 4943, 198, 437, 628, 198 ]
3.03866
388
""" ``` plot_scenario(m, var, class, scen; title = "", kwargs...) plot_scenario(m, vars, class, scen; untrans = false, fourquarter = false, plotroot = figurespath(m, \"scenarios\"), titles = [], tick_size = 1, kwargs...) ``` Plot `var` or `vars` *in deviations from baseline* for the alternative scenario specified by `key` and `vint`. ### Inputs - `var::Symbol` or `vars::Vector{Symbol}`: variable(s) to be plotted, e.g. `:obs_gdp` or `[:obs_gdp, :obs_nominalrate]` - `class::Symbol` - `scen::AbstractScenario`: scenario ### Keyword Arguments - `untrans::Bool`: whether to plot untransformed (model units) forecast - `fourquarter::Bool`: whether to plot four-quarter forecast - `plotroot::String`: if nonempty, plots will be saved in that directory - `title::String` or `titles::Vector{String}` - `tick_size::Int`: x-axis (time) tick size in units of years - `legend` See `?histforecast` for additional keyword arguments, all of which can be passed into `plot_scenario`. ### Output - `p::Plot` or `plots::OrderedDict{Symbol, Plot}` """ function plot_scenario(m::AbstractModel, var::Symbol, class::Symbol, scen::AbstractScenario; title::String = "", kwargs...) plots = plot_scenario(m, [var], class, scen; titles = isempty(title) ? String[] : [title], kwargs...) return plots[var] end function plot_scenario(m::AbstractModel, vars::Vector{Symbol}, class::Symbol, scen::AbstractScenario; untrans::Bool = false, fourquarter::Bool = false, plotroot::String = figurespath(m, "scenarios"), titles::Vector{String} = String[], tick_size::Int = 1, legend = :none, verbose::Symbol = :low, kwargs...) # Determine output_var fcast_prod = if untrans && fourquarter error("Only one of untrans or fourquarter can be true") elseif untrans :forecastut elseif fourquarter :forecast4q else :forecast end # Read in MeansBands hist = MeansBands() fcast = read_scenario_mb(m, scen, Symbol(fcast_prod, class)) # Get titles if not provided if isempty(titles) detexify_title = typeof(Plots.backend()) == Plots.GRBackend titles = map(var -> describe_series(m, var, class, detexify = detexify_title), vars) end # Loop through variables plots = OrderedDict{Symbol, Plots.Plot}() for (var, title) in zip(vars, titles) ylabel = series_ylabel(m, var, class, untrans = untrans, fourquarter = fourquarter) ylabel = ylabel * " (deviations from baseline)" plots[var] = histforecast(var, hist, fcast; start_date = date_forecast_start(m), title = title, legend = legend, kwargs...) # Save if output_file provided output_file = if isempty(plotroot) "" else get_scenario_filename(m, scen, Symbol(fcast_prod, "_", detexify(var)), pathfcn = figurespath, fileformat = plot_extension()) end save_plot(plots[var], output_file, verbose = verbose) end return plots end
[ 37811, 198, 15506, 63, 198, 29487, 62, 1416, 39055, 7, 76, 11, 1401, 11, 1398, 11, 4408, 26, 3670, 796, 366, 1600, 479, 86, 22046, 23029, 198, 198, 29487, 62, 1416, 39055, 7, 76, 11, 410, 945, 11, 1398, 11, 4408, 26, 1418, 26084, 796, 3991, 11, 1440, 24385, 796, 3991, 11, 198, 220, 220, 220, 7110, 15763, 796, 5538, 6978, 7, 76, 11, 19990, 1416, 268, 13010, 7879, 828, 8714, 796, 685, 4357, 4378, 62, 7857, 796, 352, 11, 198, 220, 220, 220, 479, 86, 22046, 23029, 198, 15506, 63, 198, 198, 43328, 4600, 7785, 63, 393, 4600, 85, 945, 63, 1635, 259, 47060, 422, 14805, 9, 329, 262, 5559, 8883, 198, 23599, 416, 4600, 2539, 63, 290, 4600, 85, 600, 44646, 198, 198, 21017, 23412, 82, 198, 198, 12, 4600, 7785, 3712, 13940, 23650, 63, 393, 4600, 85, 945, 3712, 38469, 90, 13940, 23650, 92, 63, 25, 7885, 7, 82, 8, 284, 307, 37515, 11, 198, 220, 304, 13, 70, 13, 4600, 25, 8158, 62, 21287, 79, 63, 393, 4600, 58, 25, 8158, 62, 21287, 79, 11, 1058, 8158, 62, 26601, 1292, 4873, 60, 63, 198, 12, 4600, 4871, 3712, 13940, 23650, 63, 198, 12, 4600, 1416, 268, 3712, 23839, 3351, 39055, 63, 25, 8883, 198, 198, 21017, 7383, 4775, 20559, 2886, 198, 198, 12, 4600, 403, 7645, 3712, 33, 970, 63, 25, 1771, 284, 7110, 1418, 26084, 12214, 357, 19849, 4991, 8, 11092, 198, 12, 4600, 14337, 24385, 3712, 33, 970, 63, 25, 1771, 284, 7110, 1440, 12, 24385, 11092, 198, 12, 4600, 29487, 15763, 3712, 10100, 63, 25, 611, 1729, 28920, 11, 21528, 481, 307, 7448, 287, 326, 8619, 198, 12, 4600, 7839, 3712, 10100, 63, 393, 4600, 83, 30540, 3712, 38469, 90, 10100, 92, 63, 198, 12, 4600, 42298, 62, 7857, 3712, 5317, 63, 25, 2124, 12, 22704, 357, 2435, 8, 4378, 2546, 287, 4991, 286, 812, 198, 12, 4600, 1455, 437, 63, 198, 198, 6214, 4600, 30, 10034, 754, 2701, 63, 329, 3224, 21179, 7159, 11, 477, 286, 543, 460, 307, 3804, 198, 20424, 4600, 29487, 62, 1416, 39055, 44646, 198, 198, 21017, 25235, 198, 198, 12, 4600, 79, 3712, 43328, 63, 393, 4600, 489, 1747, 3712, 35422, 1068, 35, 713, 90, 13940, 23650, 11, 28114, 92, 63, 198, 37811, 198, 8818, 7110, 62, 1416, 39055, 7, 76, 3712, 23839, 17633, 11, 1401, 3712, 13940, 23650, 11, 1398, 3712, 13940, 23650, 11, 4408, 3712, 23839, 3351, 39055, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3670, 3712, 10100, 796, 366, 1600, 479, 86, 22046, 23029, 628, 220, 220, 220, 21528, 796, 7110, 62, 1416, 39055, 7, 76, 11, 685, 7785, 4357, 1398, 11, 4408, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8714, 796, 318, 28920, 7, 7839, 8, 5633, 10903, 21737, 1058, 685, 7839, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 479, 86, 22046, 23029, 198, 220, 220, 220, 1441, 21528, 58, 7785, 60, 198, 437, 198, 198, 8818, 7110, 62, 1416, 39055, 7, 76, 3712, 23839, 17633, 11, 410, 945, 3712, 38469, 90, 13940, 23650, 5512, 1398, 3712, 13940, 23650, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4408, 3712, 23839, 3351, 39055, 26, 1418, 26084, 3712, 33, 970, 796, 3991, 11, 1440, 24385, 3712, 33, 970, 796, 3991, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7110, 15763, 3712, 10100, 796, 5538, 6978, 7, 76, 11, 366, 1416, 268, 13010, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8714, 3712, 38469, 90, 10100, 92, 796, 10903, 58, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4378, 62, 7857, 3712, 5317, 796, 352, 11, 8177, 796, 1058, 23108, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15942, 577, 3712, 13940, 23650, 796, 1058, 9319, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 479, 86, 22046, 23029, 198, 220, 220, 220, 1303, 45559, 3810, 5072, 62, 7785, 198, 220, 220, 220, 277, 2701, 62, 1676, 67, 796, 611, 1418, 26084, 11405, 1440, 24385, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 10049, 530, 286, 1418, 26084, 393, 1440, 24385, 460, 307, 2081, 4943, 198, 220, 220, 220, 2073, 361, 1418, 26084, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 754, 2701, 315, 198, 220, 220, 220, 2073, 361, 1440, 24385, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 754, 2701, 19, 80, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1058, 754, 2701, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 4149, 287, 28453, 33, 1746, 198, 220, 220, 220, 1554, 220, 796, 28453, 33, 1746, 3419, 198, 220, 220, 220, 277, 2701, 796, 1100, 62, 1416, 39055, 62, 2022, 7, 76, 11, 4408, 11, 38357, 7, 69, 2701, 62, 1676, 67, 11, 1398, 4008, 628, 220, 220, 220, 1303, 3497, 8714, 611, 407, 2810, 198, 220, 220, 220, 611, 318, 28920, 7, 83, 30540, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1062, 1069, 1958, 62, 7839, 796, 2099, 1659, 7, 3646, 1747, 13, 1891, 437, 28955, 6624, 1345, 1747, 13, 10761, 7282, 437, 198, 220, 220, 220, 220, 220, 220, 220, 8714, 796, 3975, 7, 7785, 4613, 6901, 62, 25076, 7, 76, 11, 1401, 11, 1398, 11, 1062, 1069, 1958, 796, 1062, 1069, 1958, 62, 7839, 828, 410, 945, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 26304, 832, 9633, 198, 220, 220, 220, 21528, 796, 14230, 1068, 35, 713, 90, 13940, 23650, 11, 1345, 1747, 13, 43328, 92, 3419, 198, 220, 220, 220, 329, 357, 7785, 11, 3670, 8, 287, 19974, 7, 85, 945, 11, 8714, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 18242, 796, 2168, 62, 2645, 9608, 7, 76, 11, 1401, 11, 1398, 11, 1418, 26084, 796, 1418, 26084, 11, 1440, 24385, 796, 1440, 24385, 8, 198, 220, 220, 220, 220, 220, 220, 220, 331, 18242, 796, 331, 18242, 1635, 366, 357, 7959, 40356, 422, 14805, 16725, 628, 220, 220, 220, 220, 220, 220, 220, 21528, 58, 7785, 60, 796, 1554, 754, 2701, 7, 7785, 11, 1554, 11, 277, 2701, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 923, 62, 4475, 796, 3128, 62, 754, 2701, 62, 9688, 7, 76, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3670, 796, 3670, 11, 8177, 796, 8177, 11, 479, 86, 22046, 23029, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 12793, 611, 5072, 62, 7753, 2810, 198, 220, 220, 220, 220, 220, 220, 220, 5072, 62, 7753, 796, 611, 318, 28920, 7, 29487, 15763, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13538, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 651, 62, 1416, 39055, 62, 34345, 7, 76, 11, 4408, 11, 38357, 7, 69, 2701, 62, 1676, 67, 11, 45434, 1600, 1062, 1069, 1958, 7, 7785, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3108, 16072, 77, 796, 5538, 6978, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 18982, 796, 7110, 62, 2302, 3004, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 3613, 62, 29487, 7, 489, 1747, 58, 7785, 4357, 5072, 62, 7753, 11, 15942, 577, 796, 15942, 577, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 21528, 198, 437 ]
2.249321
1,472
module ICD10Utilities using CSV, TypedTables, Dates, CategoricalArrays, Missings using FileIO import Base: isless, show, (==) export ICDOPTS export AbstractICD10 export ICD10 export ICD10AM, ACHI export ICD10CA, ICD10CM, ICD10GM export ICD10CM export ICD10AMAge export icd3 export isvalidcode export icd3, icd4 export seticdpunct export ICDO3 export ICD10AMcodes, ACHIcodes """ ICDOPTS Dictionary of options for ICD10Utilities. `:punct`: if `true` (default), ICD-10 codes are displayed with `.` after third character, and ACHI codes are displayed with `-` after fifth character. """ const ICDOPTS = Dict{Symbol,Any}(:punct => true) # easily set options """ seticdpunct(v::Bool) Set `ICDOPTS[:punct]` to new value. """ seticdpunct(v::Bool) = ICDOPTS[:punct] = v """ AbstractICD10 Abstract type for ICD-10 codes """ abstract type AbstractICD10 end Broadcast.broadcastable(icdcode::T) where {T<:AbstractICD10} = Ref(icdcode) include("icd10.jl") include("icd10fns.jl") include("othericd10.jl") include("icd10cm.jl") include("achi.jl") include("icd10amfns.jl") include("icdO3.jl") end # module
[ 21412, 314, 8610, 940, 18274, 2410, 198, 198, 3500, 44189, 11, 17134, 276, 51, 2977, 11, 44712, 11, 327, 2397, 12409, 3163, 20477, 11, 4544, 654, 198, 3500, 9220, 9399, 198, 198, 11748, 7308, 25, 318, 1203, 11, 905, 11, 357, 855, 8, 198, 198, 39344, 314, 8610, 3185, 4694, 198, 198, 39344, 27741, 2149, 35, 940, 198, 39344, 314, 8610, 940, 198, 39344, 314, 8610, 940, 2390, 11, 317, 3398, 40, 198, 39344, 314, 8610, 940, 8141, 11, 314, 8610, 940, 24187, 11, 314, 8610, 940, 15548, 198, 39344, 314, 8610, 940, 24187, 198, 39344, 314, 8610, 940, 2390, 23396, 198, 39344, 14158, 67, 18, 198, 39344, 318, 12102, 8189, 198, 39344, 14158, 67, 18, 11, 14158, 67, 19, 198, 39344, 900, 291, 26059, 16260, 198, 39344, 314, 8610, 46, 18, 198, 39344, 314, 8610, 940, 2390, 40148, 11, 317, 3398, 40, 40148, 198, 198, 37811, 198, 220, 220, 220, 314, 8610, 3185, 4694, 198, 198, 35, 14188, 286, 3689, 329, 314, 8610, 940, 18274, 2410, 13, 198, 198, 63, 25, 79, 16260, 63, 25, 611, 4600, 7942, 63, 357, 12286, 828, 314, 8610, 12, 940, 12416, 389, 9066, 351, 4600, 13, 63, 706, 2368, 2095, 11, 198, 392, 317, 3398, 40, 12416, 389, 9066, 351, 4600, 12, 63, 706, 8150, 2095, 13, 198, 37811, 198, 9979, 314, 8610, 3185, 4694, 796, 360, 713, 90, 13940, 23650, 11, 7149, 92, 7, 25, 79, 16260, 5218, 2081, 8, 198, 2, 3538, 900, 3689, 198, 37811, 198, 220, 220, 220, 900, 291, 26059, 16260, 7, 85, 3712, 33, 970, 8, 198, 198, 7248, 4600, 2149, 35, 3185, 4694, 58, 25, 79, 16260, 60, 63, 284, 649, 1988, 13, 198, 37811, 198, 2617, 291, 26059, 16260, 7, 85, 3712, 33, 970, 8, 796, 314, 8610, 3185, 4694, 58, 25, 79, 16260, 60, 796, 410, 198, 198, 37811, 198, 220, 220, 220, 27741, 2149, 35, 940, 198, 198, 23839, 2099, 329, 314, 8610, 12, 940, 12416, 198, 37811, 198, 397, 8709, 2099, 27741, 2149, 35, 940, 886, 198, 198, 30507, 2701, 13, 36654, 2701, 540, 7, 291, 67, 8189, 3712, 51, 8, 810, 1391, 51, 27, 25, 23839, 2149, 35, 940, 92, 796, 6524, 7, 291, 67, 8189, 8, 198, 198, 17256, 7203, 291, 67, 940, 13, 20362, 4943, 198, 17256, 7203, 291, 67, 940, 69, 5907, 13, 20362, 4943, 198, 17256, 7203, 847, 291, 67, 940, 13, 20362, 4943, 198, 17256, 7203, 291, 67, 940, 11215, 13, 20362, 4943, 198, 17256, 7203, 14299, 13, 20362, 4943, 198, 17256, 7203, 291, 67, 940, 321, 69, 5907, 13, 20362, 4943, 198, 17256, 7203, 291, 67, 46, 18, 13, 20362, 4943, 198, 198, 437, 1303, 8265, 198 ]
2.520362
442
### A Pluto.jl notebook ### # v0.16.4 using Markdown using InteractiveUtils # ╔═╡ f7dfc33e-6ff8-44d6-a88e-bea5834a9d27 import A1 using A2 # ╔═╡ 360ee541-cbc4-4df6-bdc5-ea23fe08abdd import A1, B1, .C1, D1.E1 using A2, B2, .C2, D2.E2 # ╔═╡ 8a4eff2d-5dbc-4056-a81b-da0618503467 import A1: b1, c1 using A2: b2, c2 # ╔═╡ 393a7816-0fa0-4f74-8fe7-c8d8d8c7e868 import A1.B1: b1, c1 using A2.B2: b2, c2 # ╔═╡ c1b5da89-c9a3-439c-8bee-2a8690265796 import .A1 using .A2 # ╔═╡ daf52b3f-513c-45de-a232-bda50e45b326 import .A1: x1 using .A2: x2 # ╔═╡ 6a90ece9-e7ad-404e-a3b0-4d484821f461 import ..A1 using ..A2 # ╔═╡ 4206dd87-a9e9-4f2c-865f-bec68d199b55 import A1.B1 using A2.B2 # ╔═╡ eb7ba436-d23b-4e97-af92-81271fa76989 import A1.B1.C1 using A2.B2.C2 # ╔═╡ 4f1d3da9-370c-42c2-9d17-a3caffca638d import A1.B1.C1.D1 using A2.B2.C2.D2 # ╔═╡ Cell order: # ╠═f7dfc33e-6ff8-44d6-a88e-bea5834a9d27 # ╠═360ee541-cbc4-4df6-bdc5-ea23fe08abdd # ╠═8a4eff2d-5dbc-4056-a81b-da0618503467 # ╠═393a7816-0fa0-4f74-8fe7-c8d8d8c7e868 # ╠═c1b5da89-c9a3-439c-8bee-2a8690265796 # ╠═daf52b3f-513c-45de-a232-bda50e45b326 # ╠═6a90ece9-e7ad-404e-a3b0-4d484821f461 # ╠═4206dd87-a9e9-4f2c-865f-bec68d199b55 # ╠═eb7ba436-d23b-4e97-af92-81271fa76989 # ╠═4f1d3da9-370c-42c2-9d17-a3caffca638d
[ 21017, 317, 32217, 13, 20362, 20922, 44386, 198, 2, 410, 15, 13, 1433, 13, 19, 198, 198, 3500, 2940, 2902, 198, 3500, 21365, 18274, 4487, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 277, 22, 7568, 66, 2091, 68, 12, 21, 487, 23, 12, 2598, 67, 21, 12, 64, 3459, 68, 12, 1350, 64, 3365, 2682, 64, 24, 67, 1983, 198, 11748, 317, 16, 198, 3500, 317, 17, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 11470, 1453, 20, 3901, 12, 66, 15630, 19, 12, 19, 7568, 21, 12, 17457, 66, 20, 12, 18213, 1954, 5036, 2919, 397, 1860, 198, 11748, 317, 16, 11, 347, 16, 11, 764, 34, 16, 11, 360, 16, 13, 36, 16, 198, 3500, 317, 17, 11, 347, 17, 11, 764, 34, 17, 11, 360, 17, 13, 36, 17, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 807, 64, 19, 14822, 17, 67, 12, 20, 9945, 66, 12, 1821, 3980, 12, 64, 6659, 65, 12, 6814, 3312, 1507, 1120, 2682, 3134, 198, 11748, 317, 16, 25, 275, 16, 11, 269, 16, 198, 3500, 317, 17, 25, 275, 17, 11, 269, 17, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 5014, 18, 64, 3695, 1433, 12, 15, 13331, 15, 12, 19, 69, 4524, 12, 23, 5036, 22, 12, 66, 23, 67, 23, 67, 23, 66, 22, 68, 23, 3104, 198, 11748, 317, 16, 13, 33, 16, 25, 275, 16, 11, 269, 16, 198, 3500, 317, 17, 13, 33, 17, 25, 275, 17, 11, 269, 17, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 269, 16, 65, 20, 6814, 4531, 12, 66, 24, 64, 18, 12, 47106, 66, 12, 23, 20963, 12, 17, 64, 23, 35844, 2075, 3553, 4846, 198, 11748, 764, 32, 16, 198, 3500, 764, 32, 17, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 288, 1878, 4309, 65, 18, 69, 12, 48645, 66, 12, 2231, 2934, 12, 64, 24339, 12, 43444, 1120, 68, 2231, 65, 39195, 198, 11748, 764, 32, 16, 25, 2124, 16, 198, 3500, 764, 32, 17, 25, 2124, 17, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 718, 64, 3829, 68, 344, 24, 12, 68, 22, 324, 12, 26429, 68, 12, 64, 18, 65, 15, 12, 19, 67, 2780, 2780, 2481, 69, 40652, 198, 11748, 11485, 32, 16, 198, 3500, 11485, 32, 17, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 604, 22136, 1860, 5774, 12, 64, 24, 68, 24, 12, 19, 69, 17, 66, 12, 23, 2996, 69, 12, 9423, 3104, 67, 19104, 65, 2816, 198, 11748, 317, 16, 13, 33, 16, 198, 3500, 317, 17, 13, 33, 17, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 36649, 22, 7012, 43690, 12, 67, 1954, 65, 12, 19, 68, 5607, 12, 1878, 5892, 12, 23, 1065, 4869, 13331, 22, 3388, 4531, 198, 11748, 317, 16, 13, 33, 16, 13, 34, 16, 198, 3500, 317, 17, 13, 33, 17, 13, 34, 17, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 604, 69, 16, 67, 18, 6814, 24, 12, 20167, 66, 12, 3682, 66, 17, 12, 24, 67, 1558, 12, 64, 18, 66, 2001, 6888, 21, 2548, 67, 198, 11748, 317, 16, 13, 33, 16, 13, 34, 16, 13, 35, 16, 198, 3500, 317, 17, 13, 33, 17, 13, 34, 17, 13, 35, 17, 198, 198, 2, 2343, 243, 242, 28670, 22880, 94, 12440, 1502, 25, 198, 2, 2343, 243, 254, 28670, 69, 22, 7568, 66, 2091, 68, 12, 21, 487, 23, 12, 2598, 67, 21, 12, 64, 3459, 68, 12, 1350, 64, 3365, 2682, 64, 24, 67, 1983, 198, 2, 2343, 243, 254, 28670, 15277, 1453, 20, 3901, 12, 66, 15630, 19, 12, 19, 7568, 21, 12, 17457, 66, 20, 12, 18213, 1954, 5036, 2919, 397, 1860, 198, 2, 2343, 243, 254, 28670, 23, 64, 19, 14822, 17, 67, 12, 20, 9945, 66, 12, 1821, 3980, 12, 64, 6659, 65, 12, 6814, 3312, 1507, 1120, 2682, 3134, 198, 2, 2343, 243, 254, 28670, 26007, 64, 3695, 1433, 12, 15, 13331, 15, 12, 19, 69, 4524, 12, 23, 5036, 22, 12, 66, 23, 67, 23, 67, 23, 66, 22, 68, 23, 3104, 198, 2, 2343, 243, 254, 28670, 66, 16, 65, 20, 6814, 4531, 12, 66, 24, 64, 18, 12, 47106, 66, 12, 23, 20963, 12, 17, 64, 23, 35844, 2075, 3553, 4846, 198, 2, 2343, 243, 254, 28670, 67, 1878, 4309, 65, 18, 69, 12, 48645, 66, 12, 2231, 2934, 12, 64, 24339, 12, 43444, 1120, 68, 2231, 65, 39195, 198, 2, 2343, 243, 254, 28670, 21, 64, 3829, 68, 344, 24, 12, 68, 22, 324, 12, 26429, 68, 12, 64, 18, 65, 15, 12, 19, 67, 2780, 2780, 2481, 69, 40652, 198, 2, 2343, 243, 254, 28670, 19, 22136, 1860, 5774, 12, 64, 24, 68, 24, 12, 19, 69, 17, 66, 12, 23, 2996, 69, 12, 9423, 3104, 67, 19104, 65, 2816, 198, 2, 2343, 243, 254, 28670, 1765, 22, 7012, 43690, 12, 67, 1954, 65, 12, 19, 68, 5607, 12, 1878, 5892, 12, 23, 1065, 4869, 13331, 22, 3388, 4531, 198, 2, 2343, 243, 254, 28670, 19, 69, 16, 67, 18, 6814, 24, 12, 20167, 66, 12, 3682, 66, 17, 12, 24, 67, 1558, 12, 64, 18, 66, 2001, 6888, 21, 2548, 67, 198 ]
1.441008
873
#= Author:= Shreeda Bhat License:= MIT UTF-8 =# #= In Julia the for loop is simple, Unlike python, matlab it won't use vectorized code. `for.....end` =# println("***********************1st Example*************************") for num = 1:10 # here the colon is used represent the range like in python println("number is $num") end println("***********************2nd Example*************************") x = ["shreeda",1,2,0.3,4] for i in x println("what i'm passing now is $i") end #= Note: in the condition it should be `variable = iterable` =# println("***********************3rd Example*************************") for i in 1:10 println(i) end println("***********************4th Example*************************") my_bio = ["shreeda","20","Astaqc Consulting"] for bio in my_bio println("let's see this array $bio") end println("*********************** 5th Example*************************") m,n = 3,3 array = zeros(m,n) println(array) for i in 1:m for j in 1:n array[i,j]=i+j end end println(array) println("*********************** 6th Example*************************") # Let's do list comprehension B = zeros(3,3) for i in 1:m,j in 1:n B[i,j]=i+j end println(B) println("*********************** 7th Example*************************") # Sorry its array comprehension c= [i+j for i in 1:n, j in 1:m] print(c)
[ 1303, 28, 198, 13838, 25, 28, 911, 15977, 64, 347, 5183, 198, 34156, 25, 28, 17168, 220, 198, 48504, 12, 23, 796, 2, 628, 198, 2, 28, 198, 818, 22300, 262, 329, 9052, 318, 2829, 11, 12101, 21015, 11, 2603, 23912, 340, 1839, 470, 779, 15879, 1143, 2438, 13, 220, 628, 220, 220, 220, 4600, 1640, 12359, 437, 63, 198, 198, 46249, 198, 198, 35235, 7203, 8412, 2466, 8162, 16, 301, 17934, 8412, 4557, 9, 4943, 198, 1640, 997, 796, 352, 25, 940, 1303, 994, 262, 7633, 318, 973, 2380, 262, 2837, 588, 287, 21015, 220, 198, 220, 220, 220, 44872, 7203, 17618, 318, 720, 22510, 4943, 198, 437, 198, 198, 35235, 7203, 8412, 2466, 8162, 17, 358, 17934, 8412, 4557, 9, 4943, 198, 198, 87, 796, 14631, 1477, 15977, 64, 1600, 16, 11, 17, 11, 15, 13, 18, 11, 19, 60, 198, 198, 1640, 1312, 287, 2124, 198, 220, 220, 220, 44872, 7203, 10919, 1312, 1101, 6427, 783, 318, 720, 72, 4943, 198, 437, 628, 198, 198, 2, 28, 220, 198, 6425, 25, 287, 262, 4006, 340, 815, 307, 4600, 45286, 796, 11629, 540, 63, 198, 46249, 198, 198, 35235, 7203, 8412, 2466, 8162, 18, 4372, 17934, 8412, 4557, 9, 4943, 198, 198, 1640, 1312, 287, 352, 25, 940, 198, 220, 220, 220, 44872, 7, 72, 8, 198, 437, 628, 198, 35235, 7203, 8412, 2466, 8162, 19, 400, 17934, 8412, 4557, 9, 4943, 198, 198, 1820, 62, 65, 952, 796, 14631, 1477, 15977, 64, 2430, 1238, 2430, 33751, 30188, 66, 41005, 8973, 198, 198, 1640, 13401, 287, 616, 62, 65, 952, 198, 220, 220, 220, 44872, 7203, 1616, 338, 766, 428, 7177, 720, 65, 952, 4943, 198, 437, 198, 198, 35235, 7203, 8412, 2466, 8162, 642, 400, 17934, 8412, 4557, 9, 4943, 198, 76, 11, 77, 796, 513, 11, 18, 220, 198, 18747, 796, 1976, 27498, 7, 76, 11, 77, 8, 198, 35235, 7, 18747, 8, 198, 198, 1640, 1312, 287, 352, 25, 76, 198, 220, 220, 220, 329, 474, 287, 352, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 7177, 58, 72, 11, 73, 22241, 72, 10, 73, 198, 220, 220, 220, 886, 198, 437, 198, 35235, 7, 18747, 8, 198, 198, 35235, 7203, 8412, 2466, 8162, 718, 400, 17934, 8412, 4557, 9, 4943, 198, 2, 3914, 338, 466, 1351, 35915, 198, 33, 796, 1976, 27498, 7, 18, 11, 18, 8, 198, 1640, 1312, 287, 352, 25, 76, 11, 73, 287, 352, 25, 77, 198, 220, 220, 220, 347, 58, 72, 11, 73, 22241, 72, 10, 73, 198, 437, 198, 35235, 7, 33, 8, 198, 198, 35235, 7203, 8412, 2466, 8162, 767, 400, 17934, 8412, 4557, 9, 4943, 198, 2, 19061, 663, 7177, 35915, 198, 66, 28, 685, 72, 10, 73, 329, 1312, 287, 352, 25, 77, 11, 474, 287, 352, 25, 76, 60, 198, 4798, 7, 66, 8 ]
2.906977
473
""" Subtypes are different approaches for solving an optimization problem. We use "approach" to mean a configured algorithm: that is, the algorithm (e.g. simplex), along with fixed values for all the algorithm hyperparemeters. """ abstract type AbstractApproach end """ Subtypes contain all the information for an individual instance of an optimization problem. They either contain all of the requisite data themselves, or a mechanism to somehow retreive it from, e.g., a website. """ abstract type AbstractInstance end """ Subtypes encapsulate an single approach applied to a single instance. Callers can ask to optimize a model and then query the results, but the workings of the approach are otherwise treated as a black box. """ abstract type AbstractModel end """ Subtypes contain all the useful information needed for understanding how a particular approach performed on a particular instance. Typical fields stored may include solve time, or node count for a MIP-based approach. """ abstract type AbstractResult end """ Subtypes store the results for experiments across multiple approaches and multiple instances. Backends could be as simple as a CSV file, or something more complex like HDF5. """ abstract type AbstractResultTable end """ prep_instance!(instance::AbstractInstance)::Nothing Prepare an instance for experimentation. This is useful if there is a lightweight way to represent an instance (e.g. a string name in an instance library), but collecting the data is relatively costly (e.g. download something from the web and converting it to the right file format). Additionally, this prep work can do more complex pre-processing: if you are evaluating methods for dual bounds, this function could run a set of heuristics to produce a good primal solution. This method is only called once per instance, meaning that the resulting computations can be shared across all approaches run on the particular instance. !!! note Implementing this method is optional. If you don't need to do any prep work as all the requisite data is already available, simply defer to the available fallback method. """ function prep_instance! end prep_instance!(::AbstractInstance) = nothing """ build_model( approach::AbstractApproach, instance::AbstractInstance, config::Dict{String,Any}=Dict{String,Any}() )::AbstractModel Given a particular `approach` and a particular `instance`, build a model that encapsulates the two. The optional `config` argument contains parameters that are shared across all approaches and instances in a experiment run: for example, a time limit, a node limit, a constraint violation tolerance, etc. """ function build_model end """ optimize!(model::AbstractModel) Solve the instance using the approach specified by `model`. """ function optimize! end """ tear_down(model::AbstractModel, instance::AbstractInstance, T::Type{<:AbstractResult})) Record the results of in individual experiment of a particular approach on a particular instance. The results will be stored in an object of type `T`. !!! note This function should only be called after `optimize!(model)` has been called. """ function tear_down end """ record_result!(table::AbstractResultTable, result::AbstractResult) Given the results from an individual experiment, record it in `table`. """ function record_result! end
[ 37811, 198, 7004, 19199, 389, 1180, 10581, 329, 18120, 281, 23989, 1917, 13, 775, 779, 198, 1, 21064, 620, 1, 284, 1612, 257, 17839, 11862, 25, 326, 318, 11, 262, 11862, 357, 68, 13, 70, 13, 198, 14323, 11141, 828, 1863, 351, 5969, 3815, 329, 477, 262, 11862, 8718, 79, 533, 4164, 364, 13, 198, 37811, 198, 397, 8709, 2099, 27741, 4677, 28562, 886, 198, 198, 37811, 198, 7004, 19199, 3994, 477, 262, 1321, 329, 281, 1981, 4554, 286, 281, 198, 40085, 1634, 1917, 13, 1119, 2035, 3994, 477, 286, 262, 37088, 1366, 2405, 11, 198, 273, 257, 9030, 284, 7599, 1005, 260, 425, 340, 422, 11, 304, 13, 70, 1539, 257, 3052, 13, 198, 37811, 198, 397, 8709, 2099, 27741, 33384, 886, 198, 198, 37811, 198, 7004, 19199, 32652, 5039, 281, 2060, 3164, 5625, 284, 257, 2060, 4554, 13, 4889, 364, 198, 5171, 1265, 284, 27183, 257, 2746, 290, 788, 12405, 262, 2482, 11, 475, 262, 35084, 286, 262, 198, 21064, 620, 389, 4306, 5716, 355, 257, 2042, 3091, 13, 198, 37811, 198, 397, 8709, 2099, 27741, 17633, 886, 198, 198, 37811, 198, 7004, 19199, 3994, 477, 262, 4465, 1321, 2622, 329, 4547, 703, 257, 198, 3911, 13174, 3164, 6157, 319, 257, 1948, 4554, 13, 48752, 7032, 8574, 198, 11261, 2291, 8494, 640, 11, 393, 10139, 954, 329, 257, 337, 4061, 12, 3106, 3164, 13, 198, 37811, 198, 397, 8709, 2099, 27741, 23004, 886, 198, 198, 37811, 198, 7004, 19199, 3650, 262, 2482, 329, 10256, 1973, 3294, 10581, 290, 198, 48101, 10245, 13, 5157, 2412, 714, 307, 355, 2829, 355, 257, 44189, 2393, 11, 393, 1223, 198, 3549, 3716, 588, 5572, 37, 20, 13, 198, 37811, 198, 397, 8709, 2099, 27741, 23004, 10962, 886, 198, 198, 37811, 198, 220, 220, 220, 3143, 62, 39098, 0, 7, 39098, 3712, 23839, 33384, 2599, 25, 18465, 198, 198, 37534, 533, 281, 4554, 329, 29315, 13, 770, 318, 4465, 611, 612, 318, 257, 198, 2971, 6551, 835, 284, 2380, 281, 4554, 357, 68, 13, 70, 13, 257, 4731, 1438, 287, 281, 4554, 198, 32016, 828, 475, 13157, 262, 1366, 318, 5365, 16378, 357, 68, 13, 70, 13, 4321, 1223, 198, 6738, 262, 3992, 290, 23202, 340, 284, 262, 826, 2393, 5794, 737, 12032, 11, 428, 198, 46012, 670, 460, 466, 517, 3716, 662, 12, 36948, 25, 611, 345, 389, 22232, 5050, 329, 198, 646, 282, 22303, 11, 428, 2163, 714, 1057, 257, 900, 286, 339, 333, 3969, 284, 4439, 257, 922, 198, 1050, 4402, 4610, 13, 770, 2446, 318, 691, 1444, 1752, 583, 4554, 11, 3616, 326, 262, 198, 20274, 278, 2653, 602, 460, 307, 4888, 1973, 477, 10581, 1057, 319, 262, 198, 3911, 13174, 4554, 13, 198, 198, 10185, 3465, 198, 220, 220, 220, 48282, 278, 428, 2446, 318, 11902, 13, 1002, 345, 836, 470, 761, 284, 466, 597, 3143, 670, 198, 220, 220, 220, 355, 477, 262, 37088, 1366, 318, 1541, 1695, 11, 2391, 29135, 284, 262, 198, 220, 220, 220, 1695, 2121, 1891, 2446, 13, 198, 37811, 198, 8818, 3143, 62, 39098, 0, 886, 198, 46012, 62, 39098, 0, 7, 3712, 23839, 33384, 8, 796, 2147, 198, 198, 37811, 198, 220, 220, 220, 1382, 62, 19849, 7, 198, 220, 220, 220, 220, 220, 220, 220, 3164, 3712, 23839, 4677, 28562, 11, 198, 220, 220, 220, 220, 220, 220, 220, 4554, 3712, 23839, 33384, 11, 198, 220, 220, 220, 220, 220, 220, 220, 4566, 3712, 35, 713, 90, 10100, 11, 7149, 92, 28, 35, 713, 90, 10100, 11, 7149, 92, 3419, 198, 220, 220, 220, 1267, 3712, 23839, 17633, 198, 198, 15056, 257, 1948, 4600, 21064, 620, 63, 290, 257, 1948, 4600, 39098, 47671, 1382, 257, 2746, 326, 198, 12685, 1686, 15968, 262, 734, 13, 383, 11902, 4600, 11250, 63, 4578, 4909, 10007, 326, 198, 533, 4888, 1973, 477, 10581, 290, 10245, 287, 257, 6306, 1057, 25, 329, 198, 20688, 11, 257, 640, 4179, 11, 257, 10139, 4179, 11, 257, 32315, 8747, 15621, 11, 3503, 13, 198, 37811, 198, 8818, 1382, 62, 19849, 886, 198, 198, 37811, 198, 220, 220, 220, 27183, 0, 7, 19849, 3712, 23839, 17633, 8, 198, 198, 50, 6442, 262, 4554, 1262, 262, 3164, 7368, 416, 4600, 19849, 44646, 198, 37811, 198, 8818, 27183, 0, 886, 198, 198, 37811, 198, 220, 220, 220, 11626, 62, 2902, 7, 19849, 3712, 23839, 17633, 11, 4554, 3712, 23839, 33384, 11, 309, 3712, 6030, 90, 27, 25, 23839, 23004, 92, 4008, 198, 198, 23739, 262, 2482, 286, 287, 1981, 6306, 286, 257, 1948, 3164, 319, 257, 198, 3911, 13174, 4554, 13, 383, 2482, 481, 307, 8574, 287, 281, 2134, 286, 2099, 4600, 51, 44646, 198, 198, 10185, 3465, 198, 220, 220, 220, 770, 2163, 815, 691, 307, 1444, 706, 4600, 40085, 1096, 0, 7, 19849, 8, 63, 468, 587, 198, 220, 220, 220, 1444, 13, 198, 37811, 198, 8818, 11626, 62, 2902, 886, 198, 198, 37811, 198, 220, 220, 220, 1700, 62, 20274, 0, 7, 11487, 3712, 23839, 23004, 10962, 11, 1255, 3712, 23839, 23004, 8, 198, 198, 15056, 262, 2482, 422, 281, 1981, 6306, 11, 1700, 340, 287, 4600, 11487, 44646, 198, 37811, 198, 8818, 1700, 62, 20274, 0, 886, 198 ]
3.983549
851
# UnitCommitment.jl: Optimization Package for Security-Constrained Unit Commitment # Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved. # Released under the modified BSD license. See COPYING.md for more details. using UnitCommitment, Test, LinearAlgebra @testset "Sensitivity" begin @testset "Susceptance matrix" begin instance = UnitCommitment.read_benchmark("test/case14") actual = UnitCommitment.susceptance_matrix(instance.lines) @test size(actual) == (20, 20) expected = Diagonal([29.5, 7.83, 8.82, 9.9, 10.04, 10.2, 41.45, 8.35, 3.14, 6.93, 8.77, 6.82, 13.4, 9.91, 15.87, 20.65, 6.46, 9.09, 8.73, 5.02]) @test round.(actual, digits=2) == expected end @testset "Reduced incidence matrix" begin instance = UnitCommitment.read_benchmark("test/case14") actual = UnitCommitment.reduced_incidence_matrix(lines=instance.lines, buses=instance.buses) @test size(actual) == (20, 13) @test actual[1, 1] == -1.0 @test actual[3, 1] == 1.0 @test actual[4, 1] == 1.0 @test actual[5, 1] == 1.0 @test actual[3, 2] == -1.0 @test actual[6, 2] == 1.0 @test actual[4, 3] == -1.0 @test actual[6, 3] == -1.0 @test actual[7, 3] == 1.0 @test actual[8, 3] == 1.0 @test actual[9, 3] == 1.0 @test actual[2, 4] == -1.0 @test actual[5, 4] == -1.0 @test actual[7, 4] == -1.0 @test actual[10, 4] == 1.0 @test actual[10, 5] == -1.0 @test actual[11, 5] == 1.0 @test actual[12, 5] == 1.0 @test actual[13, 5] == 1.0 @test actual[8, 6] == -1.0 @test actual[14, 6] == 1.0 @test actual[15, 6] == 1.0 @test actual[14, 7] == -1.0 @test actual[9, 8] == -1.0 @test actual[15, 8] == -1.0 @test actual[16, 8] == 1.0 @test actual[17, 8] == 1.0 @test actual[16, 9] == -1.0 @test actual[18, 9] == 1.0 @test actual[11, 10] == -1.0 @test actual[18, 10] == -1.0 @test actual[12, 11] == -1.0 @test actual[19, 11] == 1.0 @test actual[13, 12] == -1.0 @test actual[19, 12] == -1.0 @test actual[20, 12] == 1.0 @test actual[17, 13] == -1.0 @test actual[20, 13] == -1.0 end @testset "Injection Shift Factors (ISF)" begin instance = UnitCommitment.read_benchmark("test/case14") actual = UnitCommitment.injection_shift_factors(lines=instance.lines, buses=instance.buses) @test size(actual) == (20, 13) @test round.(actual, digits=2) == [ -0.84 -0.75 -0.67 -0.61 -0.63 -0.66 -0.66 -0.65 -0.65 -0.64 -0.63 -0.63 -0.64; -0.16 -0.25 -0.33 -0.39 -0.37 -0.34 -0.34 -0.35 -0.35 -0.36 -0.37 -0.37 -0.36; 0.03 -0.53 -0.15 -0.1 -0.12 -0.14 -0.14 -0.14 -0.13 -0.13 -0.12 -0.12 -0.13; 0.06 -0.14 -0.32 -0.22 -0.25 -0.3 -0.3 -0.29 -0.28 -0.27 -0.25 -0.26 -0.27; 0.08 -0.07 -0.2 -0.29 -0.26 -0.22 -0.22 -0.22 -0.23 -0.25 -0.26 -0.26 -0.24; 0.03 0.47 -0.15 -0.1 -0.12 -0.14 -0.14 -0.14 -0.13 -0.13 -0.12 -0.12 -0.13; 0.08 0.31 0.5 -0.3 -0.03 0.36 0.36 0.28 0.23 0.1 -0.0 0.02 0.17; 0.0 0.01 0.02 -0.01 -0.22 -0.63 -0.63 -0.45 -0.41 -0.32 -0.24 -0.25 -0.36; 0.0 0.01 0.01 -0.01 -0.12 -0.17 -0.17 -0.26 -0.24 -0.18 -0.14 -0.14 -0.21; -0.0 -0.02 -0.03 0.02 -0.66 -0.2 -0.2 -0.29 -0.36 -0.5 -0.63 -0.61 -0.43; -0.0 -0.01 -0.02 0.01 0.21 -0.12 -0.12 -0.17 -0.28 -0.53 0.18 0.15 -0.03; -0.0 -0.0 -0.0 0.0 0.03 -0.02 -0.02 -0.03 -0.02 0.01 -0.52 -0.17 -0.09; -0.0 -0.01 -0.01 0.01 0.11 -0.06 -0.06 -0.09 -0.05 0.02 -0.28 -0.59 -0.31; -0.0 -0.0 -0.0 -0.0 -0.0 -0.0 -1.0 -0.0 -0.0 -0.0 -0.0 -0.0 0.0 ; 0.0 0.01 0.02 -0.01 -0.22 0.37 0.37 -0.45 -0.41 -0.32 -0.24 -0.25 -0.36; 0.0 0.01 0.02 -0.01 -0.21 0.12 0.12 0.17 -0.72 -0.47 -0.18 -0.15 0.03; 0.0 0.01 0.01 -0.01 -0.14 0.08 0.08 0.12 0.07 -0.03 -0.2 -0.24 -0.6 ; 0.0 0.01 0.02 -0.01 -0.21 0.12 0.12 0.17 0.28 -0.47 -0.18 -0.15 0.03; -0.0 -0.0 -0.0 0.0 0.03 -0.02 -0.02 -0.03 -0.02 0.01 0.48 -0.17 -0.09; -0.0 -0.01 -0.01 0.01 0.14 -0.08 -0.08 -0.12 -0.07 0.03 0.2 0.24 -0.4 ] end @testset "Line Outage Distribution Factors (LODF)" begin instance = UnitCommitment.read_benchmark("test/case14") isf_before = UnitCommitment.injection_shift_factors(lines=instance.lines, buses=instance.buses) lodf = UnitCommitment.line_outage_factors(lines=instance.lines, buses=instance.buses, isf=isf_before) for contingency in instance.contingencies for lc in contingency.lines prev_susceptance = lc.susceptance lc.susceptance = 0.0 isf_after = UnitCommitment.injection_shift_factors(lines=instance.lines, buses=instance.buses) lc.susceptance = prev_susceptance for lm in instance.lines expected = isf_after[lm.offset, :] actual = isf_before[lm.offset, :] + lodf[lm.offset, lc.offset] * isf_before[lc.offset, :] @test norm(expected - actual) < 1e-6 end end end end end
[ 2, 11801, 6935, 270, 434, 13, 20362, 25, 30011, 1634, 15717, 329, 4765, 12, 3103, 2536, 1328, 11801, 35910, 434, 198, 2, 15069, 357, 34, 8, 12131, 11, 471, 25705, 49974, 710, 11, 11419, 13, 1439, 2489, 10395, 13, 198, 2, 28728, 739, 262, 9518, 347, 10305, 5964, 13, 4091, 27975, 45761, 13, 9132, 329, 517, 3307, 13, 198, 198, 3500, 11801, 6935, 270, 434, 11, 6208, 11, 44800, 2348, 29230, 198, 198, 31, 9288, 2617, 366, 50, 40545, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 30746, 984, 590, 17593, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 4554, 796, 11801, 6935, 270, 434, 13, 961, 62, 26968, 4102, 7203, 9288, 14, 7442, 1415, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 4036, 796, 11801, 6935, 270, 434, 13, 82, 385, 984, 590, 62, 6759, 8609, 7, 39098, 13, 6615, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2546, 7, 50039, 8, 6624, 357, 1238, 11, 1160, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2938, 796, 6031, 27923, 26933, 1959, 13, 20, 11, 220, 767, 13, 5999, 11, 220, 807, 13, 6469, 11, 860, 13, 24, 11, 220, 838, 13, 3023, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 838, 13, 17, 11, 220, 6073, 13, 2231, 11, 807, 13, 2327, 11, 513, 13, 1415, 11, 718, 13, 6052, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 807, 13, 3324, 11, 220, 718, 13, 6469, 11, 220, 1511, 13, 19, 11, 860, 13, 6420, 11, 1315, 13, 5774, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1160, 13, 2996, 11, 718, 13, 3510, 11, 220, 860, 13, 2931, 11, 807, 13, 4790, 11, 642, 13, 2999, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2835, 12195, 50039, 11, 19561, 28, 17, 8, 6624, 2938, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 9288, 2617, 366, 7738, 19513, 18349, 17593, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 4554, 796, 11801, 6935, 270, 434, 13, 961, 62, 26968, 4102, 7203, 9288, 14, 7442, 1415, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 4036, 796, 11801, 6935, 270, 434, 13, 445, 19513, 62, 1939, 1704, 62, 6759, 8609, 7, 6615, 28, 39098, 13, 6615, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16893, 28, 39098, 13, 65, 2664, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2546, 7, 50039, 8, 6624, 357, 1238, 11, 1511, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 16, 11, 220, 220, 352, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 18, 11, 220, 220, 352, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 19, 11, 220, 220, 352, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 20, 11, 220, 220, 352, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 18, 11, 220, 220, 362, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 21, 11, 220, 220, 362, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 19, 11, 220, 220, 513, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 21, 11, 220, 220, 513, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 22, 11, 220, 220, 513, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 23, 11, 220, 220, 513, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 24, 11, 220, 220, 513, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 17, 11, 220, 220, 604, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 20, 11, 220, 220, 604, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 22, 11, 220, 220, 604, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 940, 11, 220, 604, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 940, 11, 220, 642, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1157, 11, 220, 642, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1065, 11, 220, 642, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1485, 11, 220, 642, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 23, 11, 220, 220, 718, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1415, 11, 220, 718, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1314, 11, 220, 718, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1415, 11, 220, 767, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 24, 11, 220, 220, 807, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1314, 11, 220, 807, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1433, 11, 220, 807, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1558, 11, 220, 807, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1433, 11, 220, 860, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1507, 11, 220, 860, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1157, 11, 838, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1507, 11, 838, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1065, 11, 1367, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1129, 11, 1367, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1485, 11, 1105, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1129, 11, 1105, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1238, 11, 1105, 60, 220, 6624, 220, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1558, 11, 1511, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 4036, 58, 1238, 11, 1511, 60, 220, 6624, 532, 16, 13, 15, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 9288, 2617, 366, 818, 29192, 15576, 41140, 357, 1797, 37, 16725, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 4554, 796, 11801, 6935, 270, 434, 13, 961, 62, 26968, 4102, 7203, 9288, 14, 7442, 1415, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 4036, 796, 11801, 6935, 270, 434, 13, 259, 29192, 62, 30846, 62, 22584, 669, 7, 6615, 28, 39098, 13, 6615, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16893, 28, 39098, 13, 65, 2664, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2546, 7, 50039, 8, 6624, 357, 1238, 11, 1511, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2835, 12195, 50039, 11, 19561, 28, 17, 8, 6624, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15, 13, 5705, 532, 15, 13, 2425, 532, 15, 13, 3134, 532, 15, 13, 5333, 532, 15, 13, 5066, 532, 15, 13, 2791, 532, 15, 13, 2791, 532, 15, 13, 2996, 532, 15, 13, 2996, 532, 15, 13, 2414, 532, 15, 13, 5066, 532, 15, 13, 5066, 532, 15, 13, 2414, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15, 13, 1433, 532, 15, 13, 1495, 532, 15, 13, 2091, 532, 15, 13, 2670, 532, 15, 13, 2718, 532, 15, 13, 2682, 532, 15, 13, 2682, 532, 15, 13, 2327, 532, 15, 13, 2327, 532, 15, 13, 2623, 532, 15, 13, 2718, 532, 15, 13, 2718, 532, 15, 13, 2623, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 3070, 532, 15, 13, 4310, 532, 15, 13, 1314, 532, 15, 13, 16, 220, 532, 15, 13, 1065, 532, 15, 13, 1415, 532, 15, 13, 1415, 532, 15, 13, 1415, 532, 15, 13, 1485, 532, 15, 13, 1485, 532, 15, 13, 1065, 532, 15, 13, 1065, 532, 15, 13, 1485, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 3312, 532, 15, 13, 1415, 532, 15, 13, 2624, 532, 15, 13, 1828, 532, 15, 13, 1495, 532, 15, 13, 18, 220, 532, 15, 13, 18, 220, 532, 15, 13, 1959, 532, 15, 13, 2078, 532, 15, 13, 1983, 532, 15, 13, 1495, 532, 15, 13, 2075, 532, 15, 13, 1983, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 2919, 532, 15, 13, 2998, 532, 15, 13, 17, 220, 532, 15, 13, 1959, 532, 15, 13, 2075, 532, 15, 13, 1828, 532, 15, 13, 1828, 532, 15, 13, 1828, 532, 15, 13, 1954, 532, 15, 13, 1495, 532, 15, 13, 2075, 532, 15, 13, 2075, 532, 15, 13, 1731, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 3070, 220, 657, 13, 2857, 532, 15, 13, 1314, 532, 15, 13, 16, 220, 532, 15, 13, 1065, 532, 15, 13, 1415, 532, 15, 13, 1415, 532, 15, 13, 1415, 532, 15, 13, 1485, 532, 15, 13, 1485, 532, 15, 13, 1065, 532, 15, 13, 1065, 532, 15, 13, 1485, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 2919, 220, 657, 13, 3132, 220, 657, 13, 20, 220, 532, 15, 13, 18, 220, 532, 15, 13, 3070, 220, 657, 13, 2623, 220, 657, 13, 2623, 220, 657, 13, 2078, 220, 657, 13, 1954, 220, 657, 13, 16, 220, 532, 15, 13, 15, 220, 220, 657, 13, 2999, 220, 657, 13, 1558, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 15, 220, 220, 657, 13, 486, 220, 657, 13, 2999, 532, 15, 13, 486, 532, 15, 13, 1828, 532, 15, 13, 5066, 532, 15, 13, 5066, 532, 15, 13, 2231, 532, 15, 13, 3901, 532, 15, 13, 2624, 532, 15, 13, 1731, 532, 15, 13, 1495, 532, 15, 13, 2623, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 15, 220, 220, 657, 13, 486, 220, 657, 13, 486, 532, 15, 13, 486, 532, 15, 13, 1065, 532, 15, 13, 1558, 532, 15, 13, 1558, 532, 15, 13, 2075, 532, 15, 13, 1731, 532, 15, 13, 1507, 532, 15, 13, 1415, 532, 15, 13, 1415, 532, 15, 13, 2481, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15, 13, 15, 220, 532, 15, 13, 2999, 532, 15, 13, 3070, 220, 657, 13, 2999, 532, 15, 13, 2791, 532, 15, 13, 17, 220, 532, 15, 13, 17, 220, 532, 15, 13, 1959, 532, 15, 13, 2623, 532, 15, 13, 20, 220, 532, 15, 13, 5066, 532, 15, 13, 5333, 532, 15, 13, 3559, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15, 13, 15, 220, 532, 15, 13, 486, 532, 15, 13, 2999, 220, 657, 13, 486, 220, 657, 13, 2481, 532, 15, 13, 1065, 532, 15, 13, 1065, 532, 15, 13, 1558, 532, 15, 13, 2078, 532, 15, 13, 4310, 220, 657, 13, 1507, 220, 657, 13, 1314, 532, 15, 13, 3070, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15, 13, 15, 220, 532, 15, 13, 15, 220, 532, 15, 13, 15, 220, 220, 657, 13, 15, 220, 220, 657, 13, 3070, 532, 15, 13, 2999, 532, 15, 13, 2999, 532, 15, 13, 3070, 532, 15, 13, 2999, 220, 657, 13, 486, 532, 15, 13, 4309, 532, 15, 13, 1558, 532, 15, 13, 2931, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15, 13, 15, 220, 532, 15, 13, 486, 532, 15, 13, 486, 220, 657, 13, 486, 220, 657, 13, 1157, 532, 15, 13, 3312, 532, 15, 13, 3312, 532, 15, 13, 2931, 532, 15, 13, 2713, 220, 657, 13, 2999, 532, 15, 13, 2078, 532, 15, 13, 3270, 532, 15, 13, 3132, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15, 13, 15, 220, 532, 15, 13, 15, 220, 532, 15, 13, 15, 220, 532, 15, 13, 15, 220, 532, 15, 13, 15, 220, 532, 15, 13, 15, 220, 532, 16, 13, 15, 220, 532, 15, 13, 15, 220, 532, 15, 13, 15, 220, 532, 15, 13, 15, 220, 532, 15, 13, 15, 220, 532, 15, 13, 15, 220, 220, 657, 13, 15, 2162, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 15, 220, 220, 657, 13, 486, 220, 657, 13, 2999, 532, 15, 13, 486, 532, 15, 13, 1828, 220, 657, 13, 2718, 220, 657, 13, 2718, 532, 15, 13, 2231, 532, 15, 13, 3901, 532, 15, 13, 2624, 532, 15, 13, 1731, 532, 15, 13, 1495, 532, 15, 13, 2623, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 15, 220, 220, 657, 13, 486, 220, 657, 13, 2999, 532, 15, 13, 486, 532, 15, 13, 2481, 220, 657, 13, 1065, 220, 657, 13, 1065, 220, 657, 13, 1558, 532, 15, 13, 4761, 532, 15, 13, 2857, 532, 15, 13, 1507, 532, 15, 13, 1314, 220, 657, 13, 3070, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 15, 220, 220, 657, 13, 486, 220, 657, 13, 486, 532, 15, 13, 486, 532, 15, 13, 1415, 220, 657, 13, 2919, 220, 657, 13, 2919, 220, 657, 13, 1065, 220, 657, 13, 2998, 532, 15, 13, 3070, 532, 15, 13, 17, 220, 532, 15, 13, 1731, 532, 15, 13, 21, 2162, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 657, 13, 15, 220, 220, 657, 13, 486, 220, 657, 13, 2999, 532, 15, 13, 486, 532, 15, 13, 2481, 220, 657, 13, 1065, 220, 657, 13, 1065, 220, 657, 13, 1558, 220, 657, 13, 2078, 532, 15, 13, 2857, 532, 15, 13, 1507, 532, 15, 13, 1314, 220, 657, 13, 3070, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15, 13, 15, 220, 532, 15, 13, 15, 220, 532, 15, 13, 15, 220, 220, 657, 13, 15, 220, 220, 657, 13, 3070, 532, 15, 13, 2999, 532, 15, 13, 2999, 532, 15, 13, 3070, 532, 15, 13, 2999, 220, 657, 13, 486, 220, 657, 13, 2780, 532, 15, 13, 1558, 532, 15, 13, 2931, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 15, 13, 15, 220, 532, 15, 13, 486, 532, 15, 13, 486, 220, 657, 13, 486, 220, 657, 13, 1415, 532, 15, 13, 2919, 532, 15, 13, 2919, 532, 15, 13, 1065, 532, 15, 13, 2998, 220, 657, 13, 3070, 220, 657, 13, 17, 220, 220, 657, 13, 1731, 532, 15, 13, 19, 220, 2361, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 13949, 3806, 496, 27484, 41140, 357, 38543, 37, 16725, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 4554, 796, 11801, 6935, 270, 434, 13, 961, 62, 26968, 4102, 7203, 9288, 14, 7442, 1415, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 318, 69, 62, 19052, 796, 11801, 6935, 270, 434, 13, 259, 29192, 62, 30846, 62, 22584, 669, 7, 6615, 28, 39098, 13, 6615, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16893, 28, 39098, 13, 65, 2664, 8, 198, 220, 220, 220, 220, 220, 220, 220, 19527, 69, 796, 11801, 6935, 270, 434, 13, 1370, 62, 448, 496, 62, 22584, 669, 7, 6615, 28, 39098, 13, 6615, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16893, 28, 39098, 13, 65, 2664, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 318, 69, 28, 4468, 62, 19052, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 38820, 287, 4554, 13, 3642, 278, 3976, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 300, 66, 287, 38820, 13, 6615, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8654, 62, 82, 385, 984, 590, 796, 300, 66, 13, 82, 385, 984, 590, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 66, 13, 82, 385, 984, 590, 796, 657, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 318, 69, 62, 8499, 796, 220, 11801, 6935, 270, 434, 13, 259, 29192, 62, 30846, 62, 22584, 669, 7, 6615, 28, 39098, 13, 6615, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16893, 28, 39098, 13, 65, 2664, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 66, 13, 82, 385, 984, 590, 796, 8654, 62, 82, 385, 984, 590, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 300, 76, 287, 4554, 13, 6615, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2938, 796, 318, 69, 62, 8499, 58, 75, 76, 13, 28968, 11, 1058, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4036, 796, 318, 69, 62, 19052, 58, 75, 76, 13, 28968, 11, 1058, 60, 1343, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19527, 69, 58, 75, 76, 13, 28968, 11, 300, 66, 13, 28968, 60, 1635, 318, 69, 62, 19052, 58, 44601, 13, 28968, 11, 1058, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 2593, 7, 40319, 532, 4036, 8, 1279, 352, 68, 12, 21, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437 ]
1.626991
3,705
# Winston: using Winston # optionally call figure prior to plotting to set the size figure(width=600, height=400) # plot some data pl = plot(cumsum(rand(500) - 0.5), "r", cumsum(rand(500) - 0.5), "b") # display the plot (not done automatically!) display(pl) println("Press enter to continue: ") readline(STDIN) # save the current figure savefig("winston.svg")
[ 2, 21400, 25, 198, 3500, 21400, 198, 2, 42976, 869, 3785, 3161, 284, 29353, 284, 900, 262, 2546, 198, 26875, 7, 10394, 28, 8054, 11, 6001, 28, 7029, 8, 198, 2, 7110, 617, 1366, 198, 489, 796, 7110, 7, 66, 5700, 388, 7, 25192, 7, 4059, 8, 532, 657, 13, 20, 828, 366, 81, 1600, 269, 5700, 388, 7, 25192, 7, 4059, 8, 532, 657, 13, 20, 828, 366, 65, 4943, 198, 2, 3359, 262, 7110, 357, 1662, 1760, 6338, 8133, 198, 13812, 7, 489, 8, 198, 35235, 7203, 13800, 3802, 284, 2555, 25, 366, 8, 198, 961, 1370, 7, 32147, 1268, 8, 198, 2, 3613, 262, 1459, 3785, 198, 21928, 5647, 7203, 5404, 3743, 13, 21370, 70, 4943 ]
3.016807
119
type Music ptr::Ptr{Void} function Music(ptr::Ptr{Void}) m = new(ptr) finalizer(m, destroy) m end end function Music(filename::AbstractString) Music(ccall((:sfMusic_createFromFile, libcsfml_audio), Ptr{Void}, (Ptr{Cchar},), filename)) end function destroy(music::Music) ccall((:sfMusic_destroy, libcsfml_audio), Void, (Ptr{Void},), music.ptr) end function set_loop(music::Music, loop::Bool) ccall((:sfMusic_setLoop, libcsfml_audio), Void, (Ptr{Void}, Int32,), music.ptr, loop) end function get_loop(music::Music) return Bool(ccall((:sfMusic_getLoop, libcsfml_audio), Int32, (Ptr{Void},), music.ptr)) end function play(music::Music) ccall((:sfMusic_play, libcsfml_audio), Void, (Ptr{Void},), music.ptr) end function pause(music::Music) ccall((:sfMusic_pause, libcsfml_audio), Void, (Ptr{Void},), music.ptr) end function stop(music::Music) ccall((:sfMusic_pause, libcsfml_audio), Void, (Ptr{Void},), music.ptr) end function get_duration(music::Music) return ccall((:sfMusic_getDuration, libcsfml_audio), Time, (Ptr{Void},), music.ptr) end function get_channelcount(music::Music) return Real(ccall((:sfMusic_getChannelCount, libcsfml_audio), UInt32, (Ptr{Void},), music.ptr)) end function get_samplerate(music::Music) return Real(ccall((:sfMusic_getSampleRate, libcsfml_audio), UInt32, (Ptr{Void},), music.ptr)) end function set_pitch(music::Music, pitch::Real) ccall((:sfMusic_setPitch, libcsfml_audio), Void, (Ptr{Void}, Cfloat,), music.ptr, pitch) end function set_volume(music::Music, volume::Real) ccall((:sfMusic_setVolume, libcsfml_audio), Void, (Ptr{Void}, Cfloat,), music.ptr, volume) end function get_pitch(music::Music) return Real(ccall((:sfMusic_getPitch, libcsfml_audio), Cfloat, (Ptr{Void},), music.ptr)) end function get_volume(music::Music) return Real(ccall((:sfMusic_getVolume, libcsfml_audio), Cfloat, (Ptr{Void},), music.ptr)) end function get_status(music::Music) return ccall((:sfMusic_getStatus, libcsfml_audio), Int32, (Ptr{Void},), music.ptr) end
[ 4906, 7849, 198, 220, 220, 220, 50116, 3712, 46745, 90, 53, 1868, 92, 628, 220, 220, 220, 2163, 7849, 7, 20692, 3712, 46745, 90, 53, 1868, 30072, 198, 220, 220, 220, 220, 220, 220, 220, 285, 796, 649, 7, 20692, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2457, 7509, 7, 76, 11, 4117, 8, 198, 220, 220, 220, 220, 220, 220, 220, 285, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 7849, 7, 34345, 3712, 23839, 10100, 8, 198, 220, 220, 220, 7849, 7, 535, 439, 19510, 25, 28202, 22648, 62, 17953, 4863, 8979, 11, 9195, 6359, 38122, 62, 24051, 828, 350, 2213, 90, 53, 1868, 5512, 357, 46745, 90, 34, 10641, 5512, 828, 29472, 4008, 198, 437, 198, 198, 8818, 4117, 7, 28965, 3712, 22648, 8, 198, 220, 220, 220, 269, 13345, 19510, 25, 28202, 22648, 62, 41659, 11, 9195, 6359, 38122, 62, 24051, 828, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 828, 2647, 13, 20692, 8, 198, 437, 198, 198, 8818, 900, 62, 26268, 7, 28965, 3712, 22648, 11, 9052, 3712, 33, 970, 8, 198, 220, 220, 220, 269, 13345, 19510, 25, 28202, 22648, 62, 2617, 39516, 11, 9195, 6359, 38122, 62, 24051, 828, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 2558, 2624, 11, 828, 2647, 13, 20692, 11, 9052, 8, 198, 437, 198, 198, 8818, 651, 62, 26268, 7, 28965, 3712, 22648, 8, 198, 220, 220, 220, 1441, 347, 970, 7, 535, 439, 19510, 25, 28202, 22648, 62, 1136, 39516, 11, 9195, 6359, 38122, 62, 24051, 828, 2558, 2624, 11, 357, 46745, 90, 53, 1868, 5512, 828, 2647, 13, 20692, 4008, 198, 437, 198, 198, 8818, 711, 7, 28965, 3712, 22648, 8, 198, 220, 220, 220, 269, 13345, 19510, 25, 28202, 22648, 62, 1759, 11, 9195, 6359, 38122, 62, 24051, 828, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 828, 2647, 13, 20692, 8, 198, 437, 198, 198, 8818, 14985, 7, 28965, 3712, 22648, 8, 198, 220, 220, 220, 269, 13345, 19510, 25, 28202, 22648, 62, 32125, 11, 9195, 6359, 38122, 62, 24051, 828, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 828, 2647, 13, 20692, 8, 198, 437, 198, 198, 8818, 2245, 7, 28965, 3712, 22648, 8, 198, 220, 220, 220, 269, 13345, 19510, 25, 28202, 22648, 62, 32125, 11, 9195, 6359, 38122, 62, 24051, 828, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 828, 2647, 13, 20692, 8, 198, 437, 198, 198, 8818, 651, 62, 32257, 7, 28965, 3712, 22648, 8, 198, 220, 220, 220, 1441, 269, 13345, 19510, 25, 28202, 22648, 62, 1136, 26054, 11, 9195, 6359, 38122, 62, 24051, 828, 3862, 11, 357, 46745, 90, 53, 1868, 5512, 828, 2647, 13, 20692, 8, 198, 437, 198, 198, 8818, 651, 62, 17620, 9127, 7, 28965, 3712, 22648, 8, 198, 220, 220, 220, 1441, 6416, 7, 535, 439, 19510, 25, 28202, 22648, 62, 1136, 29239, 12332, 11, 9195, 6359, 38122, 62, 24051, 828, 471, 5317, 2624, 11, 357, 46745, 90, 53, 1868, 5512, 828, 2647, 13, 20692, 4008, 198, 437, 198, 198, 8818, 651, 62, 37687, 20053, 378, 7, 28965, 3712, 22648, 8, 198, 220, 220, 220, 1441, 6416, 7, 535, 439, 19510, 25, 28202, 22648, 62, 1136, 36674, 32184, 11, 9195, 6359, 38122, 62, 24051, 828, 471, 5317, 2624, 11, 357, 46745, 90, 53, 1868, 5512, 828, 2647, 13, 20692, 4008, 198, 437, 198, 198, 8818, 900, 62, 79, 2007, 7, 28965, 3712, 22648, 11, 7078, 3712, 15633, 8, 198, 220, 220, 220, 269, 13345, 19510, 25, 28202, 22648, 62, 2617, 47, 2007, 11, 9195, 6359, 38122, 62, 24051, 828, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 327, 22468, 11, 828, 2647, 13, 20692, 11, 7078, 8, 198, 437, 198, 198, 8818, 900, 62, 29048, 7, 28965, 3712, 22648, 11, 6115, 3712, 15633, 8, 198, 220, 220, 220, 269, 13345, 19510, 25, 28202, 22648, 62, 2617, 31715, 11, 9195, 6359, 38122, 62, 24051, 828, 18331, 11, 357, 46745, 90, 53, 1868, 5512, 327, 22468, 11, 828, 2647, 13, 20692, 11, 6115, 8, 198, 437, 198, 198, 8818, 651, 62, 79, 2007, 7, 28965, 3712, 22648, 8, 198, 220, 220, 220, 1441, 6416, 7, 535, 439, 19510, 25, 28202, 22648, 62, 1136, 47, 2007, 11, 9195, 6359, 38122, 62, 24051, 828, 327, 22468, 11, 357, 46745, 90, 53, 1868, 5512, 828, 2647, 13, 20692, 4008, 198, 437, 198, 198, 8818, 651, 62, 29048, 7, 28965, 3712, 22648, 8, 198, 220, 220, 220, 1441, 6416, 7, 535, 439, 19510, 25, 28202, 22648, 62, 1136, 31715, 11, 9195, 6359, 38122, 62, 24051, 828, 327, 22468, 11, 357, 46745, 90, 53, 1868, 5512, 828, 2647, 13, 20692, 4008, 198, 437, 198, 198, 8818, 651, 62, 13376, 7, 28965, 3712, 22648, 8, 198, 220, 220, 220, 1441, 269, 13345, 19510, 25, 28202, 22648, 62, 1136, 19580, 11, 9195, 6359, 38122, 62, 24051, 828, 2558, 2624, 11, 357, 46745, 90, 53, 1868, 5512, 828, 2647, 13, 20692, 8, 198, 437, 198 ]
2.545232
818
""" bounded_by(f, a::Arf, b::Arf, C::Arf; degree, abs_value, log_bisection, depth_start, maxevals, depth, threaded, verbose) Return `true` if the function `f` can be shown to be bounded by `C` on the interval `[a, b]`, i.e. `f(x) <= C` for all `x ∈ [a, b]`, otherwise return `false`. This function is similar to first computing the maximum with [`maximum_enclosure`](@ref) and then check if the computed maximum satisfies the bound. However if the only thing needed is to check if the bound holds this method has a number of benefits - it aborts early if the bound is shown to not hold - it doesn't try to compute an accurate enclosure of the maximum, it only bisects as much as is needed for getting the bound. - the implementation is simpler and easier to check for correctness. The maximum of `f` is enclosed by the use of Taylor series through [`maximum_series`](@ref). The degree of the expansion is kept constant and the interval is bisected until we can either conclude that the bound holds on the whole interval or there is subinterval where it doesn't hold. The function `f` should support evaluation on both `Arb` and `ArbSeries` and should return an enclosure of the result in both cases. The degree used for `ArbSeries` can be set with the `degree` argument (defaults to 8). If `degree` is negative then it will fall back to direct evaluation with `Arb` and not make use of [`maximum_series`](@ref), this is usually much slower but does not require the function to be implemented for `ArbSeries`. If `abs_value = true` the instead consider the function `abs(f(x))` on the interval `[a, b]`. If `log_bisection = true` then the intervals are bisected in a logarithmic scale, see [`bisect_interval`](@ref) for details. The argument `depth_start` bisect the interval using [`bisect_interval_recursive`](@ref) before starting to compute the extrema. This can be useful if it is known beforehand that a certain number of bisections will be necessary before the enclosures get good enough. It defaults to `0` which corresponds to not bisecting the interval at all before starting. The arguments `maxevals` and `depth` can be used to limit the number of function evaluations and the number of bisections of the interval respectively. Notice that `depth` takes `depth_start` into account, so the maximum number of iterations is `depth - depth_start`. If `threaded = true` then evaluate `f` in parallel on the intervals using [`Threads.@threads`](@ref). If `verbose = true` then output information about the process. """ function bounded_by( f, a::Arf, b::Arf, C::Arf; degree::Integer = 8, abs_value = false, log_bisection = false, depth_start::Integer = 0, maxevals::Integer = 1000, depth::Integer = 20, threaded = false, verbose = false, ) check_interval(a, b) maybe_abs = abs_value ? abs : identity if a == b return maybe_abs(f(Arb(a))) <= C end # List of intervals intervals = bisect_interval_recursive(a, b, depth_start, log_midpoint = log_bisection) iterations = 0 evals = 0 while true iterations += 1 evals += length(intervals) # Evaluate f on the remaining intervals values = similar(intervals, Arb) if degree < 0 if threaded Threads.@threads for i in eachindex(intervals) values[i] = maybe_abs(f(Arb(intervals[i]))) end else for i in eachindex(intervals) values[i] = maybe_abs(f(Arb(intervals[i]))) end end else if threaded Threads.@threads for i in eachindex(intervals) values[i], _ = maximum_series(f, intervals[i]...; degree, abs_value) end else for (i, (a, b)) in enumerate(intervals) values[i], _ = maximum_series(f, a, b; degree, abs_value) end end end # Check for each interval if the bound is satisfied next_intervals = sizehint!(empty(intervals), 2length(intervals)) for i in eachindex(intervals) if values[i] > C verbose && @info "bound doesn't hold on the interval x = $(intervals[i])" verbose && @info "got the maximum of f(x) to be $(values[i])" return false elseif !(values[i] <= C) push!( next_intervals, bisect_interval(intervals[i]..., log_midpoint = log_bisection)..., ) end end intervals = next_intervals verbose && @info "iteration: $(lpad(iterations, 2)), " * "remaining intervals: $(lpad(length(intervals) ÷ 2, 3)), " non_finite = count(!isfinite, values) verbose && non_finite > 0 && @info "non-finite intervals: $non_finite" isempty(intervals) && break # Check if we have done the maximum number of function # evaluations or reached the maximum depth if evals >= maxevals || iterations >= depth - depth_start if verbose evals >= maxevals && @warn "reached maximum number of evaluations $evals >= $maxevals" iterations >= depth - depth_start && @warn "reached maximum depth $depth" end return false end end return true end
[ 37811, 198, 220, 220, 220, 49948, 62, 1525, 7, 69, 11, 257, 3712, 3163, 69, 11, 275, 3712, 3163, 69, 11, 327, 3712, 3163, 69, 26, 4922, 11, 2352, 62, 8367, 11, 2604, 62, 41907, 3213, 11, 6795, 62, 9688, 11, 3509, 1990, 874, 11, 6795, 11, 40945, 11, 15942, 577, 8, 198, 198, 13615, 4600, 7942, 63, 611, 262, 2163, 4600, 69, 63, 460, 307, 3402, 284, 307, 49948, 416, 4600, 34, 63, 319, 198, 1169, 16654, 4600, 58, 64, 11, 275, 60, 47671, 1312, 13, 68, 13, 4600, 69, 7, 87, 8, 19841, 327, 63, 329, 477, 4600, 87, 18872, 230, 685, 64, 11, 275, 60, 47671, 198, 847, 3083, 1441, 4600, 9562, 44646, 198, 198, 1212, 2163, 318, 2092, 284, 717, 14492, 262, 5415, 351, 198, 58, 63, 47033, 62, 268, 17966, 63, 16151, 31, 5420, 8, 290, 788, 2198, 611, 262, 29231, 5415, 198, 82, 17403, 444, 262, 5421, 13, 2102, 611, 262, 691, 1517, 2622, 318, 284, 2198, 611, 198, 1169, 5421, 6622, 428, 2446, 468, 257, 1271, 286, 4034, 198, 12, 340, 450, 2096, 1903, 611, 262, 5421, 318, 3402, 284, 407, 1745, 198, 12, 340, 1595, 470, 1949, 284, 24061, 281, 7187, 30685, 286, 262, 5415, 11, 340, 198, 220, 691, 47457, 478, 82, 355, 881, 355, 318, 2622, 329, 1972, 262, 5421, 13, 198, 12, 262, 7822, 318, 18599, 290, 4577, 284, 2198, 329, 29409, 13, 198, 198, 464, 5415, 286, 4600, 69, 63, 318, 28543, 416, 262, 779, 286, 8121, 2168, 832, 198, 58, 63, 47033, 62, 25076, 63, 16151, 31, 5420, 737, 383, 4922, 286, 262, 7118, 318, 4030, 6937, 198, 392, 262, 16654, 318, 47457, 11197, 1566, 356, 460, 2035, 13796, 326, 262, 198, 7784, 6622, 319, 262, 2187, 16654, 393, 612, 318, 850, 3849, 2100, 810, 340, 198, 45084, 470, 1745, 13, 198, 198, 464, 2163, 4600, 69, 63, 815, 1104, 12660, 319, 1111, 4600, 3163, 65, 63, 290, 198, 63, 3163, 65, 27996, 63, 290, 815, 1441, 281, 30685, 286, 262, 1255, 287, 1111, 198, 33964, 13, 383, 4922, 973, 329, 4600, 3163, 65, 27996, 63, 460, 307, 900, 351, 262, 4600, 16863, 63, 198, 49140, 357, 12286, 82, 284, 807, 737, 1002, 4600, 16863, 63, 318, 4633, 788, 340, 481, 2121, 198, 1891, 284, 1277, 12660, 351, 4600, 3163, 65, 63, 290, 407, 787, 779, 286, 198, 58, 63, 47033, 62, 25076, 63, 16151, 31, 5420, 828, 428, 318, 3221, 881, 13611, 475, 857, 407, 198, 46115, 262, 2163, 284, 307, 9177, 329, 4600, 3163, 65, 27996, 44646, 198, 198, 1532, 4600, 8937, 62, 8367, 796, 2081, 63, 262, 2427, 2074, 262, 2163, 4600, 8937, 7, 69, 7, 87, 4008, 63, 319, 198, 1169, 16654, 4600, 58, 64, 11, 275, 60, 44646, 198, 198, 1532, 4600, 6404, 62, 41907, 3213, 796, 2081, 63, 788, 262, 20016, 389, 47457, 11197, 287, 257, 198, 6404, 283, 342, 9383, 5046, 11, 766, 685, 63, 41907, 478, 62, 3849, 2100, 63, 16151, 31, 5420, 8, 329, 3307, 13, 198, 198, 464, 4578, 4600, 18053, 62, 9688, 63, 47457, 478, 262, 16654, 1262, 198, 58, 63, 41907, 478, 62, 3849, 2100, 62, 8344, 30753, 63, 16151, 31, 5420, 8, 878, 3599, 284, 24061, 262, 198, 2302, 260, 2611, 13, 770, 460, 307, 4465, 611, 340, 318, 1900, 27091, 326, 257, 1728, 198, 17618, 286, 47457, 478, 507, 481, 307, 3306, 878, 262, 13507, 16091, 651, 922, 198, 48229, 13, 632, 26235, 284, 4600, 15, 63, 543, 24866, 284, 407, 47457, 478, 278, 262, 198, 3849, 2100, 379, 477, 878, 3599, 13, 198, 198, 464, 7159, 4600, 9806, 1990, 874, 63, 290, 4600, 18053, 63, 460, 307, 973, 284, 4179, 262, 1271, 198, 1659, 2163, 34109, 290, 262, 1271, 286, 47457, 478, 507, 286, 262, 16654, 198, 15008, 2280, 13, 17641, 326, 4600, 18053, 63, 2753, 4600, 18053, 62, 9688, 63, 656, 1848, 11, 523, 198, 1169, 5415, 1271, 286, 34820, 318, 4600, 18053, 532, 6795, 62, 9688, 44646, 198, 198, 1532, 4600, 16663, 276, 796, 2081, 63, 788, 13446, 4600, 69, 63, 287, 10730, 319, 262, 20016, 198, 3500, 685, 63, 16818, 82, 13, 31, 16663, 82, 63, 16151, 31, 5420, 737, 198, 198, 1532, 4600, 19011, 577, 796, 2081, 63, 788, 5072, 1321, 546, 262, 1429, 13, 198, 37811, 198, 8818, 49948, 62, 1525, 7, 198, 220, 220, 220, 277, 11, 198, 220, 220, 220, 257, 3712, 3163, 69, 11, 198, 220, 220, 220, 275, 3712, 3163, 69, 11, 198, 220, 220, 220, 327, 3712, 3163, 69, 26, 198, 220, 220, 220, 4922, 3712, 46541, 796, 807, 11, 198, 220, 220, 220, 2352, 62, 8367, 796, 3991, 11, 198, 220, 220, 220, 2604, 62, 41907, 3213, 796, 3991, 11, 198, 220, 220, 220, 6795, 62, 9688, 3712, 46541, 796, 657, 11, 198, 220, 220, 220, 3509, 1990, 874, 3712, 46541, 796, 8576, 11, 198, 220, 220, 220, 6795, 3712, 46541, 796, 1160, 11, 198, 220, 220, 220, 40945, 796, 3991, 11, 198, 220, 220, 220, 15942, 577, 796, 3991, 11, 198, 8, 198, 220, 220, 220, 2198, 62, 3849, 2100, 7, 64, 11, 275, 8, 628, 220, 220, 220, 3863, 62, 8937, 796, 2352, 62, 8367, 5633, 2352, 1058, 5369, 628, 220, 220, 220, 611, 257, 6624, 275, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 3863, 62, 8937, 7, 69, 7, 3163, 65, 7, 64, 22305, 19841, 327, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 7343, 286, 20016, 198, 220, 220, 220, 20016, 796, 47457, 478, 62, 3849, 2100, 62, 8344, 30753, 7, 64, 11, 275, 11, 6795, 62, 9688, 11, 2604, 62, 13602, 4122, 796, 2604, 62, 41907, 3213, 8, 628, 220, 220, 220, 34820, 796, 657, 198, 220, 220, 220, 819, 874, 796, 657, 198, 220, 220, 220, 981, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 34820, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 819, 874, 15853, 4129, 7, 3849, 12786, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 26439, 4985, 277, 319, 262, 5637, 20016, 198, 220, 220, 220, 220, 220, 220, 220, 3815, 796, 2092, 7, 3849, 12786, 11, 943, 65, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 4922, 1279, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 40945, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14122, 82, 13, 31, 16663, 82, 329, 1312, 287, 1123, 9630, 7, 3849, 12786, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3815, 58, 72, 60, 796, 3863, 62, 8937, 7, 69, 7, 3163, 65, 7, 3849, 12786, 58, 72, 60, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 1123, 9630, 7, 3849, 12786, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3815, 58, 72, 60, 796, 3863, 62, 8937, 7, 69, 7, 3163, 65, 7, 3849, 12786, 58, 72, 60, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 40945, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 14122, 82, 13, 31, 16663, 82, 329, 1312, 287, 1123, 9630, 7, 3849, 12786, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3815, 58, 72, 4357, 4808, 796, 5415, 62, 25076, 7, 69, 11, 20016, 58, 72, 60, 986, 26, 4922, 11, 2352, 62, 8367, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 357, 72, 11, 357, 64, 11, 275, 4008, 287, 27056, 378, 7, 3849, 12786, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3815, 58, 72, 4357, 4808, 796, 5415, 62, 25076, 7, 69, 11, 257, 11, 275, 26, 4922, 11, 2352, 62, 8367, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 6822, 329, 1123, 16654, 611, 262, 5421, 318, 11378, 198, 220, 220, 220, 220, 220, 220, 220, 1306, 62, 3849, 12786, 796, 2546, 71, 600, 0, 7, 28920, 7, 3849, 12786, 828, 362, 13664, 7, 3849, 12786, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 1123, 9630, 7, 3849, 12786, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 3815, 58, 72, 60, 1875, 327, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15942, 577, 11405, 2488, 10951, 366, 7784, 1595, 470, 1745, 319, 262, 16654, 2124, 796, 29568, 3849, 12786, 58, 72, 12962, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15942, 577, 11405, 2488, 10951, 366, 23442, 262, 5415, 286, 277, 7, 87, 8, 284, 307, 29568, 27160, 58, 72, 12962, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 5145, 7, 27160, 58, 72, 60, 19841, 327, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1306, 62, 3849, 12786, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 47457, 478, 62, 3849, 2100, 7, 3849, 12786, 58, 72, 60, 986, 11, 2604, 62, 13602, 4122, 796, 2604, 62, 41907, 3213, 26513, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 20016, 796, 1306, 62, 3849, 12786, 628, 220, 220, 220, 220, 220, 220, 220, 15942, 577, 11405, 2488, 10951, 366, 2676, 341, 25, 29568, 75, 15636, 7, 2676, 602, 11, 362, 36911, 366, 1635, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 2787, 1397, 20016, 25, 29568, 75, 15636, 7, 13664, 7, 3849, 12786, 8, 6184, 115, 362, 11, 513, 36911, 366, 628, 220, 220, 220, 220, 220, 220, 220, 1729, 62, 69, 9504, 796, 954, 7, 0, 4468, 9504, 11, 3815, 8, 198, 220, 220, 220, 220, 220, 220, 220, 15942, 577, 11405, 1729, 62, 69, 9504, 1875, 657, 11405, 2488, 10951, 366, 13159, 12, 69, 9504, 20016, 25, 720, 13159, 62, 69, 9504, 1, 628, 220, 220, 220, 220, 220, 220, 220, 318, 28920, 7, 3849, 12786, 8, 11405, 2270, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 6822, 611, 356, 423, 1760, 262, 5415, 1271, 286, 2163, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 34109, 393, 4251, 262, 5415, 6795, 198, 220, 220, 220, 220, 220, 220, 220, 611, 819, 874, 18189, 3509, 1990, 874, 8614, 34820, 18189, 6795, 532, 6795, 62, 9688, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 15942, 577, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 819, 874, 18189, 3509, 1990, 874, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 366, 260, 2317, 5415, 1271, 286, 34109, 720, 1990, 874, 18189, 720, 9806, 1990, 874, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 34820, 18189, 6795, 532, 6795, 62, 9688, 11405, 2488, 40539, 366, 260, 2317, 5415, 6795, 720, 18053, 1, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 2081, 198, 437, 198 ]
2.523941
2,172
using Revise using POMDPModelChecking using POMDPs using POMDPModels using POMDPSimulators using BeliefUpdaters using QMDP using SARSOP using POMCPOW pomdp = TigerPOMDP() function POMDPModelChecking.labels(pomdp::TigerPOMDP, s::Bool, a::Int64) if (a == 1 && s) || (a == 2 && !s) return ["eaten"] elseif (a == 2 && s) || (a == 1 && !s) return ["!eaten"] else return ["!eaten"] end end # POMDPs.reward(pomdp::TigerPOMDP, s::Bool, a::Int64) = ((a == 1 && s) || (a == 2 && !s)) ? -1. : 0. # POMDPs.reward(pomdp::TigerPOMDP, s::Bool, a::Int64, sp::Int64) = (a == 1 && sp) || (a == 2 && !sp) ? -1. : 0. γ = 1 - 1e-3 POMDPs.discount(::ProductPOMDP{Bool,Int64,Bool,Int64,String}) = γ sarsop = SARSOPSolver(precision = 1e-3) solver = ModelCheckingSolver(property = "!eaten", solver=sarsop) ltl2tgba(solver.property, solver.automata_file) autom_type = automata_type(solver.automata_file) automata = nothing if autom_type == "Buchi" automata = hoa2buchi(solver.automata_file) elseif autom_type == "Rabin" automata = hoa2rabin(solver.automata_file) end pmdp = ProductPOMDP(pomdp, automata, Set{ProductState{Bool, Int64}}(), ProductState(false, -1)) accepting_states!(pmdp) policy = solve(sarsop, pmdp) updater = DiscreteUpdater(pmdp) b0 = initialize_belief(up, initialstate_distribution(pmdp)) b0 = initialize_belief(up, initialstate_distribution(pmdp)) using Random rng = MersenneTwister(1) n_ep = 1000 avg_r = 0. for ep=1:n_ep global avg_r s0 = initialstate(pomdp, rng) hist = simulate(hr, pomdp, policy, up, b0, s0); if hist.reward_hist[end] > 0. avg_r += 1 end end avg_r /= n_ep policy = solve(QMDPSolver(), pomdp) pomcpow = POMCPOWSolver() solver = ModelCheckingSolver(property = "!eaten U safe", solver=sarsop) POMDPs.discount(::ProductPOMDP{Bool, Int64, Bool, Int64, String}) = γ policy = solve(solver, pomdp) pmdp = policy.mdp function POMDPs.action(policy::ModelCheckingPolicy{P,M}, b::DiscreteBelief) where {P<:Policy, M<:ProductPOMDP} return action(policy.policy, b) end policy = solve(sarsop, pomdp) hr = HistoryRecorder(max_steps = 20) up = DiscreteUpdater(policy.mdp) b0 = initialize_belief(up, initialstate_distribution(pmdp)) using Random rng = MersenneTwister(1) n_ep = 1000 avg_r = 0. for ep=1:n_ep global avg_r s0 = initialstate(pomdp, rng) hist = simulate(hr, pomdp, policy, up, b0, s0); if hist.reward_hist[end] > 0. avg_r += 1 end end avg_r /= n_ep trans_prob_consistency_check(pmdp) for s in states(pmdp) for a in actions(pmdp) d = transition(pmdp, s, a) println("Transition from state ", s, " action ", a, " : ", d.vals, " ", d.probs) end end solver = ModelCheckingSolver(property = "!eaten U safe", solver=pomcpow) policy = solve(solver, pomdp); action(policy, b0) using POMDPModelTools using Random using ParticleFilters rng = MersenneTwister(1) filter = SimpleParticleFilter(pomdp, LowVarianceResampler(1000)) b0 = initialize_belief(filter, initialstate_distribution(pomdp)) s0 = initialstate(pomdp, rng) hr = HistoryRecorder(max_steps=100) simulate(hr, pomdp, policy, filter, b0) state_space = states(pmdp) transition(pmdp, state_space[4], 2) solve(sarsop, pmdp, pomdp_file_name="model.pomdpx")
[ 3500, 5416, 786, 201, 198, 3500, 350, 2662, 6322, 17633, 9787, 278, 201, 198, 3500, 350, 2662, 6322, 82, 201, 198, 3500, 350, 2662, 6322, 5841, 1424, 201, 198, 3500, 350, 2662, 35, 3705, 320, 24325, 201, 198, 3500, 49728, 4933, 67, 8605, 201, 198, 3500, 1195, 44, 6322, 201, 198, 3500, 311, 27415, 3185, 201, 198, 3500, 350, 2662, 8697, 3913, 201, 198, 201, 198, 79, 296, 26059, 796, 17030, 47, 2662, 6322, 3419, 201, 198, 201, 198, 8818, 350, 2662, 6322, 17633, 9787, 278, 13, 23912, 1424, 7, 79, 296, 26059, 3712, 51, 8254, 47, 2662, 6322, 11, 264, 3712, 33, 970, 11, 257, 3712, 5317, 2414, 8, 201, 198, 220, 220, 220, 611, 357, 64, 6624, 352, 11405, 264, 8, 8614, 357, 64, 6624, 362, 11405, 5145, 82, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 14631, 4098, 268, 8973, 201, 198, 220, 220, 220, 2073, 361, 357, 64, 6624, 362, 11405, 264, 8, 8614, 357, 64, 6624, 352, 11405, 5145, 82, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 14631, 0, 4098, 268, 8973, 201, 198, 220, 220, 220, 2073, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 14631, 0, 4098, 268, 8973, 201, 198, 220, 220, 220, 886, 201, 198, 437, 201, 198, 201, 198, 2, 350, 2662, 6322, 82, 13, 260, 904, 7, 79, 296, 26059, 3712, 51, 8254, 47, 2662, 6322, 11, 264, 3712, 33, 970, 11, 257, 3712, 5317, 2414, 8, 796, 14808, 64, 6624, 352, 11405, 264, 8, 8614, 357, 64, 6624, 362, 11405, 5145, 82, 4008, 5633, 532, 16, 13, 1058, 657, 13, 201, 198, 2, 350, 2662, 6322, 82, 13, 260, 904, 7, 79, 296, 26059, 3712, 51, 8254, 47, 2662, 6322, 11, 264, 3712, 33, 970, 11, 257, 3712, 5317, 2414, 11, 599, 3712, 5317, 2414, 8, 796, 357, 64, 6624, 352, 11405, 599, 8, 8614, 357, 64, 6624, 362, 11405, 5145, 2777, 8, 5633, 532, 16, 13, 1058, 657, 13, 201, 198, 42063, 796, 220, 352, 532, 352, 68, 12, 18, 201, 198, 47, 2662, 6322, 82, 13, 15410, 608, 7, 3712, 15667, 47, 2662, 6322, 90, 33, 970, 11, 5317, 2414, 11, 33, 970, 11, 5317, 2414, 11, 10100, 30072, 796, 7377, 111, 201, 198, 82, 945, 404, 796, 311, 27415, 30737, 14375, 7, 3866, 16005, 796, 352, 68, 12, 18, 8, 201, 198, 82, 14375, 796, 9104, 9787, 278, 50, 14375, 7, 26745, 796, 366, 0, 4098, 268, 1600, 1540, 332, 28, 82, 945, 404, 8, 201, 198, 201, 198, 2528, 75, 17, 25297, 7012, 7, 82, 14375, 13, 26745, 11, 1540, 332, 13, 2306, 296, 1045, 62, 7753, 8, 201, 198, 2306, 296, 62, 4906, 796, 3557, 1045, 62, 4906, 7, 82, 14375, 13, 2306, 296, 1045, 62, 7753, 8, 201, 198, 2306, 296, 1045, 796, 2147, 201, 198, 361, 3557, 62, 4906, 6624, 366, 33, 22200, 1, 201, 198, 220, 220, 220, 3557, 1045, 796, 8169, 64, 17, 65, 22200, 7, 82, 14375, 13, 2306, 296, 1045, 62, 7753, 8, 201, 198, 17772, 361, 3557, 62, 4906, 6624, 366, 49, 6014, 1, 201, 198, 220, 220, 220, 3557, 1045, 796, 8169, 64, 17, 81, 6014, 7, 82, 14375, 13, 2306, 296, 1045, 62, 7753, 8, 201, 198, 437, 201, 198, 201, 198, 4426, 26059, 796, 8721, 47, 2662, 6322, 7, 79, 296, 26059, 11, 3557, 1045, 11, 5345, 90, 15667, 9012, 90, 33, 970, 11, 2558, 2414, 11709, 22784, 8721, 9012, 7, 9562, 11, 532, 16, 4008, 201, 198, 13635, 278, 62, 27219, 0, 7, 4426, 26059, 8, 201, 198, 201, 198, 201, 198, 30586, 796, 8494, 7, 82, 945, 404, 11, 9114, 26059, 8, 201, 198, 201, 198, 929, 67, 729, 796, 8444, 8374, 4933, 67, 729, 7, 4426, 26059, 8, 201, 198, 65, 15, 796, 41216, 62, 6667, 2086, 7, 929, 11, 4238, 5219, 62, 17080, 3890, 7, 4426, 26059, 4008, 201, 198, 201, 198, 201, 198, 65, 15, 796, 41216, 62, 6667, 2086, 7, 929, 11, 4238, 5219, 62, 17080, 3890, 7, 4426, 26059, 4008, 201, 198, 3500, 14534, 201, 198, 81, 782, 796, 337, 364, 29727, 5080, 1694, 7, 16, 8, 201, 198, 201, 198, 77, 62, 538, 796, 8576, 201, 198, 615, 70, 62, 81, 796, 657, 13, 201, 198, 1640, 2462, 28, 16, 25, 77, 62, 538, 201, 198, 220, 220, 220, 3298, 42781, 62, 81, 201, 198, 220, 220, 220, 264, 15, 796, 4238, 5219, 7, 79, 296, 26059, 11, 374, 782, 8, 201, 198, 220, 220, 220, 1554, 796, 29308, 7, 11840, 11, 279, 296, 26059, 11, 2450, 11, 510, 11, 275, 15, 11, 264, 15, 1776, 201, 198, 220, 220, 220, 611, 1554, 13, 260, 904, 62, 10034, 58, 437, 60, 1875, 657, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 42781, 62, 81, 15853, 352, 201, 198, 220, 220, 220, 886, 201, 198, 437, 201, 198, 615, 70, 62, 81, 1220, 28, 299, 62, 538, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 30586, 796, 8494, 7, 48, 12740, 3705, 14375, 22784, 279, 296, 26059, 8, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 79, 296, 13155, 322, 796, 350, 2662, 8697, 22845, 14375, 3419, 201, 198, 201, 198, 82, 14375, 796, 9104, 9787, 278, 50, 14375, 7, 26745, 796, 366, 0, 4098, 268, 471, 3338, 1600, 1540, 332, 28, 82, 945, 404, 8, 201, 198, 201, 198, 47, 2662, 6322, 82, 13, 15410, 608, 7, 3712, 15667, 47, 2662, 6322, 90, 33, 970, 11, 2558, 2414, 11, 347, 970, 11, 2558, 2414, 11, 10903, 30072, 796, 7377, 111, 201, 198, 201, 198, 30586, 796, 8494, 7, 82, 14375, 11, 279, 296, 26059, 8, 201, 198, 4426, 26059, 796, 2450, 13, 9132, 79, 201, 198, 201, 198, 8818, 350, 2662, 6322, 82, 13, 2673, 7, 30586, 3712, 17633, 9787, 278, 36727, 90, 47, 11, 44, 5512, 275, 3712, 15642, 8374, 12193, 2086, 8, 810, 1391, 47, 27, 25, 36727, 11, 337, 27, 25, 15667, 47, 2662, 6322, 92, 201, 198, 220, 220, 220, 1441, 2223, 7, 30586, 13, 30586, 11, 275, 8, 201, 198, 437, 201, 198, 201, 198, 30586, 796, 8494, 7, 82, 945, 404, 11, 279, 296, 26059, 8, 201, 198, 201, 198, 11840, 796, 7443, 6690, 2875, 7, 9806, 62, 20214, 796, 1160, 8, 201, 198, 929, 796, 8444, 8374, 4933, 67, 729, 7, 30586, 13, 9132, 79, 8, 201, 198, 65, 15, 796, 41216, 62, 6667, 2086, 7, 929, 11, 4238, 5219, 62, 17080, 3890, 7, 4426, 26059, 4008, 201, 198, 3500, 14534, 201, 198, 81, 782, 796, 337, 364, 29727, 5080, 1694, 7, 16, 8, 201, 198, 201, 198, 77, 62, 538, 796, 8576, 201, 198, 615, 70, 62, 81, 796, 657, 13, 201, 198, 1640, 2462, 28, 16, 25, 77, 62, 538, 201, 198, 220, 220, 220, 3298, 42781, 62, 81, 201, 198, 220, 220, 220, 264, 15, 796, 4238, 5219, 7, 79, 296, 26059, 11, 374, 782, 8, 201, 198, 220, 220, 220, 1554, 796, 29308, 7, 11840, 11, 279, 296, 26059, 11, 2450, 11, 510, 11, 275, 15, 11, 264, 15, 1776, 201, 198, 220, 220, 220, 611, 1554, 13, 260, 904, 62, 10034, 58, 437, 60, 1875, 657, 13, 201, 198, 220, 220, 220, 220, 220, 220, 220, 42781, 62, 81, 15853, 352, 201, 198, 220, 220, 220, 886, 201, 198, 437, 201, 198, 615, 70, 62, 81, 1220, 28, 299, 62, 538, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 7645, 62, 1676, 65, 62, 5936, 396, 1387, 62, 9122, 7, 4426, 26059, 8, 220, 201, 198, 201, 198, 1640, 264, 287, 2585, 7, 4426, 26059, 8, 201, 198, 220, 220, 220, 329, 257, 287, 4028, 7, 4426, 26059, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 288, 796, 6801, 7, 4426, 26059, 11, 264, 11, 257, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 8291, 653, 422, 1181, 33172, 264, 11, 366, 2223, 33172, 257, 11, 366, 1058, 33172, 288, 13, 12786, 11, 366, 33172, 288, 13, 1676, 1443, 8, 201, 198, 220, 220, 220, 886, 201, 198, 437, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 82, 14375, 796, 9104, 9787, 278, 50, 14375, 7, 26745, 796, 366, 0, 4098, 268, 471, 3338, 1600, 1540, 332, 28, 79, 296, 13155, 322, 8, 201, 198, 201, 198, 30586, 796, 8494, 7, 82, 14375, 11, 279, 296, 26059, 1776, 201, 198, 201, 198, 2673, 7, 30586, 11, 275, 15, 8, 201, 198, 201, 198, 3500, 350, 2662, 6322, 17633, 33637, 201, 198, 3500, 14534, 201, 198, 3500, 2142, 1548, 11928, 1010, 201, 198, 201, 198, 81, 782, 796, 337, 364, 29727, 5080, 1694, 7, 16, 8, 201, 198, 24455, 796, 17427, 7841, 1548, 22417, 7, 79, 296, 26059, 11, 7754, 23907, 590, 4965, 321, 20053, 7, 12825, 4008, 201, 198, 65, 15, 796, 41216, 62, 6667, 2086, 7, 24455, 11, 4238, 5219, 62, 17080, 3890, 7, 79, 296, 26059, 4008, 201, 198, 82, 15, 796, 4238, 5219, 7, 79, 296, 26059, 11, 374, 782, 8, 201, 198, 11840, 796, 7443, 6690, 2875, 7, 9806, 62, 20214, 28, 3064, 8, 201, 198, 14323, 5039, 7, 11840, 11, 279, 296, 26059, 11, 2450, 11, 8106, 11, 275, 15, 8, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 5219, 62, 13200, 796, 2585, 7, 4426, 26059, 8, 201, 198, 7645, 653, 7, 4426, 26059, 11, 1181, 62, 13200, 58, 19, 4357, 362, 8, 201, 198, 201, 198, 82, 6442, 7, 82, 945, 404, 11, 9114, 26059, 11, 279, 296, 26059, 62, 7753, 62, 3672, 2625, 19849, 13, 79, 296, 67, 8416, 4943, 201, 198, 201, 198 ]
2.119339
1,634
#------------------------------------------------------------------- #* EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. #* #* This LIBRARY is free software; you can distribute it and/or modify #* it under the therms of the ALSOC FREE LICENSE as available at #* http://www.enq.ufrgs.br/alsoc. #* #* EMSO Copyright (C) 2004 - 2007 ALSOC, original code #* from http://www.rps.eng.br Copyright (C) 2002-2004. #* All rights reserved. #* #* EMSO is distributed under the therms of the ALSOC LICENSE as #* available at http://www.enq.ufrgs.br/alsoc. #* #*---------------------------------------------------------------------- #* File containg models of columns: distillation, stripping, absorbers #* rectifier, .... #* #* The default nomenclature is: #* Type_Column_reboilertype_condensertyper #* #* where: #* Type = refluxed or reboiled or section #* Column = Stripping, Absorption, Rectifier, Distillation #* Reboiler type (if exists) = kettle or thermosyphon #* Condenser type (if exists) = with subccoling or without subcooling #* #*----------------------------------------------------------------------- #* Author: Paula B. Staudt #* $Id: column.mso 511 2008-05-12 17:25:33Z paula $ #*--------------------------------------------------------------------- type Packed_Section_ColumnBasic Packed_Section_ColumnBasic()=begin PP=outers.PP NComp=outers.NComp [ ], [ ], new( DanaPlugin(Dict{Symbol,Any}( :Brief=>"External Physical Properties", :Type=>"PP" )), DanaInteger(Dict{Symbol,Any}( :Brief=>"Number of components", :Protected=>true )), DanaInteger(Dict{Symbol,Any}( :Brief=>"Number of Feed Stages", :Default=>3, :Protected=>true )), DanaInteger(Dict{Symbol,Any}( :Brief=>"Number of Stages", :Default=>3 )), fill(DanaInteger(Dict{Symbol,Any}( :Brief=>"Feed Stage Location", :Default=>2 )),(NumberOfFeeds)), length(Dict{Symbol,Any}( :Brief=>"Height of packing" )), heat_rate(Dict{Symbol,Any}( :Brief=>"Rate of heat supply" )), length(Dict{Symbol,Any}( :Brief=>"Column diameter" )), DanaReal(Dict{Symbol,Any}( :Brief=>"Void fraction of packing, (m^3 void space/m^3 packed bed)" )), positive(Dict{Symbol,Any}( :Brief=>"Resistance coefficient on the liquid load", :Default=>1 )), DanaReal(Dict{Symbol,Any}( :Brief=>"surface area per packing volume", :Unit=>"m^2/m^3" )), length(Dict{Symbol,Any}( :Brief=>"The Height Equivalent to a Theoretical Plate", :Protected=>true )), [ :(LiquidConnector.F= LiquidInlet.F), :(LiquidConnector.T = LiquidInlet.T), :(LiquidConnector.P = LiquidInlet.P), :(LiquidConnector.z = LiquidInlet.z), :(LiquidConnector.v = LiquidInlet.v), :(LiquidConnector.h = LiquidInlet.h), :(VapourConnector.F= VapourInlet.F), :(VapourConnector.T = VapourInlet.T), :(VapourConnector.P = VapourInlet.P), :(VapourConnector.z = VapourInlet.z), :(VapourConnector.v = VapourInlet.v), :(VapourConnector.h = VapourInlet.h), :(LiquidOutlet.F= STAGES(NumberOfStages).OutletLiquid.F), :(LiquidOutlet.T = STAGES(NumberOfStages).OutletLiquid.T), :(LiquidOutlet.P = STAGES(NumberOfStages).OutletLiquid.P), :(LiquidOutlet.z = STAGES(NumberOfStages).OutletLiquid.z), :(VapourOutlet.F= STAGES(1).OutletVapour.F), :(VapourOutlet.T = STAGES(1).OutletVapour.T), :(VapourOutlet.P = STAGES(1).OutletVapour.P), :(VapourOutlet.z = STAGES(1).OutletVapour.z), :(TCI*"K" = STAGES(CONTROL.Tindicator_TrayNumber).OutletVapour.T), :(PCI*"atm" = STAGES(CONTROL.Pindicator_TrayNumber).OutletVapour.P), :(zCI * 1e-6 = STAGES(CONTROL.zindicator_TrayNumber).OutletLiquid.z(CONTROL.zindicator_Component) * STAGES(CONTROL.zindicator_TrayNumber).Mw(CONTROL.zindicator_Component) / sum(STAGES(CONTROL.zindicator_TrayNumber).Mw*STAGES(CONTROL.zindicator_TrayNumber).OutletLiquid.z)), :(PressureDrop = STAGES(NumberOfStages).OutletLiquid.P - STAGES(1).OutletLiquid.P), ], [ "","","","","","","","","","","","","","","","","","","","","Tray Temperature Indicator","Tray Pressure Indicator","Tray Composition Indicator","PressureDrop", ], [:PP,:NComp,:NumberOfFeeds,:NumberOfStages,:FeedStageLocation,:PackingHeight,:HeatSupply,:ColumnDiameter,:VoidFraction,:ResistanceCoeff,:AreaPerPackingVol,:HETP,], ) end PP::DanaPlugin NComp::DanaInteger NumberOfFeeds::DanaInteger NumberOfStages::DanaInteger FeedStageLocation::Array{DanaInteger} PackingHeight::length HeatSupply::heat_rate ColumnDiameter::length VoidFraction::DanaReal ResistanceCoeff::positive AreaPerPackingVol::DanaReal HETP::length equations::Array{Expr,1} equationNames::Array{String,1} initials::Array{Expr,1} initialNames::Array{String,1} parameters::Array{Symbol,1} attributes::Dict{Symbol,Any} end export Packed_Section_ColumnBasic function set(in::Packed_Section_ColumnBasic) STAGES.Number_Stages = NumberOfStages STAGES.HeightOfPacking = PackingHeight STAGES.HeatOnStage = HeatSupply STAGES.ColumnInternalDiameter = ColumnDiameter STAGES.PackingVoidFraction = VoidFraction STAGES.LiquidResistanceCoeff = ResistanceCoeff STAGES.AreaPerPackingVolume = AreaPerPackingVol HETP = PackingHeight/NumberOfStages end function setEquationFlow(in::Packed_Section_ColumnBasic) addEquation(1) addEquation(2) addEquation(3) addEquation(4) addEquation(5) addEquation(6) addEquation(7) addEquation(8) addEquation(9) addEquation(10) addEquation(11) addEquation(12) addEquation(13) addEquation(14) addEquation(15) addEquation(16) addEquation(17) addEquation(18) addEquation(19) addEquation(20) #TCI*'K' = TRAYS(min([NumberOfTrays, CONTROL.Tindicator_TrayNumber])).OutletVapour.T; addEquation(21) #PCI*'atm' = TRAYS(min([NumberOfTrays, CONTROL.Pindicator_TrayNumber])).OutletVapour.P; addEquation(22) #zCI * .000001 = STAGES(CONTROL.zindicator_TrayNumber).OutletVapour.z(CONTROL.zindicator_Component) * STAGES(CONTROL.zindicator_TrayNumber).Mw(CONTROL.zindicator_Component) ; #/sum(STAGES(CONTROL.zindicator_TrayNumber).Mw*STAGES(CONTROL.zindicator_TrayNumber).OutletLiquid.z); addEquation(23) addEquation(24) end function initial(in::Packed_Section_ColumnBasic) end function atributes(in::Packed_Section_ColumnBasic,_::Dict{Symbol,Any}) fields::Dict{Symbol,Any}=Dict{Symbol,Any}() fields[:Pallete]=false fields[:Icon]="icon/PackedSectionColumn" fields[:Brief]="Model of a packed column section." fields[:Info]="== Model of a packed column section containing == * NStages theoretical stages. == Specify == * the feed stream of each tray (Inlet); * the InletLiquid stream of the top tray; * the InletVapour stream of the bottom tray; * the total pressure drop (dP) of the section. == Initial Conditions == * the stages temperature (OutletLiquid.T); * the stages liquid holdup; * (NoComps - 1) OutletLiquid (OR OutletVapour) compositions for each tray. " drive!(fields,_) return fields end Packed_Section_ColumnBasic(_::Dict{Symbol,Any})=begin newModel=Packed_Section_ColumnBasic() newModel.attributes=atributes(newModel,_) newModel end
[ 2, 10097, 6329, 198, 2, 9, 41363, 46, 9104, 10074, 357, 3620, 43, 8, 15069, 357, 34, 8, 5472, 532, 4343, 27249, 4503, 13, 198, 2, 9, 198, 2, 9, 770, 45651, 49, 13153, 318, 1479, 3788, 26, 345, 460, 14983, 340, 290, 14, 273, 13096, 198, 2, 9, 340, 739, 262, 10811, 907, 286, 262, 27249, 4503, 17189, 38559, 24290, 355, 1695, 379, 198, 2, 9, 2638, 1378, 2503, 13, 268, 80, 13, 3046, 81, 14542, 13, 1671, 14, 874, 420, 13, 198, 2, 9, 198, 2, 9, 41363, 46, 15069, 357, 34, 8, 5472, 532, 4343, 27249, 4503, 11, 2656, 2438, 198, 2, 9, 422, 2638, 1378, 2503, 13, 81, 862, 13, 1516, 13, 1671, 15069, 357, 34, 8, 6244, 12, 15724, 13, 198, 2, 9, 1439, 2489, 10395, 13, 198, 2, 9, 198, 2, 9, 41363, 46, 318, 9387, 739, 262, 10811, 907, 286, 262, 27249, 4503, 38559, 24290, 355, 198, 2, 9, 1695, 379, 2638, 1378, 2503, 13, 268, 80, 13, 3046, 81, 14542, 13, 1671, 14, 874, 420, 13, 198, 2, 9, 198, 2, 9, 10097, 23031, 198, 2, 9, 9220, 542, 64, 278, 4981, 286, 15180, 25, 1233, 40903, 11, 37727, 11, 8256, 1213, 198, 2, 9, 13621, 7483, 11, 19424, 198, 2, 9, 198, 2, 9, 383, 4277, 299, 3674, 565, 1300, 318, 25, 198, 2, 9, 197, 197, 6030, 62, 39470, 62, 260, 2127, 5329, 4906, 62, 17561, 45268, 774, 525, 198, 2, 9, 198, 2, 9, 810, 25, 198, 2, 9, 197, 6030, 796, 1006, 22564, 276, 393, 302, 2127, 3902, 393, 2665, 198, 2, 9, 197, 39470, 796, 26137, 2105, 11, 13051, 273, 1159, 11, 48599, 7483, 11, 4307, 40903, 198, 2, 9, 197, 28951, 20837, 2099, 357, 361, 7160, 8, 796, 40231, 393, 10811, 16785, 88, 746, 261, 198, 2, 9, 197, 25559, 45268, 2099, 357, 361, 7160, 8, 796, 351, 850, 535, 40949, 393, 1231, 850, 24494, 278, 198, 2, 9, 198, 2, 9, 10097, 26866, 198, 2, 9, 6434, 25, 36025, 347, 13, 520, 3885, 83, 198, 2, 9, 720, 7390, 25, 5721, 13, 76, 568, 642, 1157, 3648, 12, 2713, 12, 1065, 1596, 25, 1495, 25, 2091, 57, 279, 2518, 64, 720, 198, 2, 9, 10097, 30934, 198, 4906, 350, 6021, 62, 16375, 62, 39470, 26416, 198, 197, 47, 6021, 62, 16375, 62, 39470, 26416, 3419, 28, 27471, 198, 197, 197, 10246, 28, 280, 1010, 13, 10246, 198, 197, 197, 45, 7293, 28, 280, 1010, 13, 45, 7293, 198, 197, 197, 58, 198, 197, 197, 197, 198, 197, 197, 4357, 198, 197, 197, 58, 198, 197, 197, 197, 198, 197, 197, 4357, 198, 197, 197, 3605, 7, 198, 197, 197, 197, 35, 2271, 37233, 7, 35, 713, 90, 13940, 23650, 11, 7149, 92, 7, 198, 197, 197, 197, 197, 25, 33, 3796, 14804, 1, 41506, 16331, 24946, 1600, 198, 197, 197, 197, 197, 25, 6030, 14804, 1, 10246, 1, 198, 197, 197, 197, 36911, 198, 197, 197, 197, 35, 2271, 46541, 7, 35, 713, 90, 13940, 23650, 11, 7149, 92, 7, 198, 197, 197, 197, 197, 25, 33, 3796, 14804, 1, 15057, 286, 6805, 1600, 198, 197, 197, 197, 197, 25, 19703, 11197, 14804, 7942, 198, 197, 197, 197, 36911, 198, 197, 197, 197, 35, 2271, 46541, 7, 35, 713, 90, 13940, 23650, 11, 7149, 92, 7, 198, 197, 197, 197, 197, 25, 33, 3796, 14804, 1, 15057, 286, 18272, 520, 1095, 1600, 198, 197, 197, 197, 197, 25, 19463, 14804, 18, 11, 198, 197, 197, 197, 197, 25, 19703, 11197, 14804, 7942, 198, 197, 197, 197, 36911, 198, 197, 197, 197, 35, 2271, 46541, 7, 35, 713, 90, 13940, 23650, 11, 7149, 92, 7, 198, 197, 197, 197, 197, 25, 33, 3796, 14804, 1, 15057, 286, 520, 1095, 1600, 198, 197, 197, 197, 197, 25, 19463, 14804, 18, 198, 197, 197, 197, 36911, 198, 197, 197, 197, 20797, 7, 35, 2271, 46541, 7, 35, 713, 90, 13940, 23650, 11, 7149, 92, 7, 198, 197, 197, 197, 197, 25, 33, 3796, 14804, 1, 18332, 15371, 13397, 1600, 198, 197, 197, 197, 197, 25, 19463, 14804, 17, 198, 197, 197, 197, 36911, 7, 15057, 5189, 18332, 82, 36911, 198, 197, 197, 197, 13664, 7, 35, 713, 90, 13940, 23650, 11, 7149, 92, 7, 198, 197, 197, 197, 197, 25, 33, 3796, 14804, 1, 23106, 286, 24157, 1, 198, 197, 197, 197, 36911, 198, 197, 197, 197, 25080, 62, 4873, 7, 35, 713, 90, 13940, 23650, 11, 7149, 92, 7, 198, 197, 197, 197, 197, 25, 33, 3796, 14804, 1, 32184, 286, 4894, 5127, 1, 198, 197, 197, 197, 36911, 198, 197, 197, 197, 13664, 7, 35, 713, 90, 13940, 23650, 11, 7149, 92, 7, 198, 197, 197, 197, 197, 25, 33, 3796, 14804, 1, 39470, 14753, 1, 198, 197, 197, 197, 36911, 198, 197, 197, 197, 35, 2271, 15633, 7, 35, 713, 90, 13940, 23650, 11, 7149, 92, 7, 198, 197, 197, 197, 197, 25, 33, 3796, 14804, 1, 53, 1868, 13390, 286, 24157, 11, 357, 76, 61, 18, 7951, 2272, 14, 76, 61, 18, 11856, 3996, 16725, 198, 197, 197, 197, 36911, 198, 197, 197, 197, 24561, 7, 35, 713, 90, 13940, 23650, 11, 7149, 92, 7, 198, 197, 197, 197, 197, 25, 33, 3796, 14804, 1, 4965, 9311, 35381, 319, 262, 8122, 3440, 1600, 198, 197, 197, 197, 197, 25, 19463, 14804, 16, 198, 197, 197, 197, 36911, 198, 197, 197, 197, 35, 2271, 15633, 7, 35, 713, 90, 13940, 23650, 11, 7149, 92, 7, 198, 197, 197, 197, 197, 25, 33, 3796, 14804, 1, 42029, 1989, 583, 24157, 6115, 1600, 198, 197, 197, 197, 197, 25, 26453, 14804, 1, 76, 61, 17, 14, 76, 61, 18, 1, 198, 197, 197, 197, 36911, 198, 197, 197, 197, 13664, 7, 35, 713, 90, 13940, 23650, 11, 7149, 92, 7, 198, 197, 197, 197, 197, 25, 33, 3796, 14804, 1, 464, 27280, 7889, 29540, 284, 257, 383, 9997, 605, 23648, 1600, 198, 197, 197, 197, 197, 25, 19703, 11197, 14804, 7942, 198, 197, 197, 197, 36911, 198, 197, 197, 197, 58, 198, 197, 197, 197, 197, 37498, 41966, 34525, 13, 37, 28, 21020, 818, 1616, 13, 37, 828, 198, 197, 197, 197, 197, 37498, 41966, 34525, 13, 51, 796, 21020, 818, 1616, 13, 51, 828, 198, 197, 197, 197, 197, 37498, 41966, 34525, 13, 47, 796, 21020, 818, 1616, 13, 47, 828, 198, 197, 197, 197, 197, 37498, 41966, 34525, 13, 89, 796, 21020, 818, 1616, 13, 89, 828, 198, 197, 197, 197, 197, 37498, 41966, 34525, 13, 85, 796, 21020, 818, 1616, 13, 85, 828, 198, 197, 197, 197, 197, 37498, 41966, 34525, 13, 71, 796, 21020, 818, 1616, 13, 71, 828, 198, 197, 197, 197, 197, 37498, 53, 499, 454, 34525, 13, 37, 28, 569, 499, 454, 818, 1616, 13, 37, 828, 198, 197, 197, 197, 197, 37498, 53, 499, 454, 34525, 13, 51, 796, 569, 499, 454, 818, 1616, 13, 51, 828, 198, 197, 197, 197, 197, 37498, 53, 499, 454, 34525, 13, 47, 796, 569, 499, 454, 818, 1616, 13, 47, 828, 198, 197, 197, 197, 197, 37498, 53, 499, 454, 34525, 13, 89, 796, 569, 499, 454, 818, 1616, 13, 89, 828, 198, 197, 197, 197, 197, 37498, 53, 499, 454, 34525, 13, 85, 796, 569, 499, 454, 818, 1616, 13, 85, 828, 198, 197, 197, 197, 197, 37498, 53, 499, 454, 34525, 13, 71, 796, 569, 499, 454, 818, 1616, 13, 71, 828, 198, 197, 197, 197, 197, 37498, 41966, 7975, 1616, 13, 37, 28, 3563, 25552, 7, 15057, 5189, 1273, 1095, 737, 7975, 1616, 41966, 13, 37, 828, 198, 197, 197, 197, 197, 37498, 41966, 7975, 1616, 13, 51, 796, 3563, 25552, 7, 15057, 5189, 1273, 1095, 737, 7975, 1616, 41966, 13, 51, 828, 198, 197, 197, 197, 197, 37498, 41966, 7975, 1616, 13, 47, 796, 3563, 25552, 7, 15057, 5189, 1273, 1095, 737, 7975, 1616, 41966, 13, 47, 828, 198, 197, 197, 197, 197, 37498, 41966, 7975, 1616, 13, 89, 796, 3563, 25552, 7, 15057, 5189, 1273, 1095, 737, 7975, 1616, 41966, 13, 89, 828, 198, 197, 197, 197, 197, 37498, 53, 499, 454, 7975, 1616, 13, 37, 28, 3563, 25552, 7, 16, 737, 7975, 1616, 53, 499, 454, 13, 37, 828, 198, 197, 197, 197, 197, 37498, 53, 499, 454, 7975, 1616, 13, 51, 796, 3563, 25552, 7, 16, 737, 7975, 1616, 53, 499, 454, 13, 51, 828, 198, 197, 197, 197, 197, 37498, 53, 499, 454, 7975, 1616, 13, 47, 796, 3563, 25552, 7, 16, 737, 7975, 1616, 53, 499, 454, 13, 47, 828, 198, 197, 197, 197, 197, 37498, 53, 499, 454, 7975, 1616, 13, 89, 796, 3563, 25552, 7, 16, 737, 7975, 1616, 53, 499, 454, 13, 89, 828, 198, 197, 197, 197, 197, 37498, 4825, 40, 9, 1, 42, 1, 796, 3563, 25552, 7, 10943, 5446, 3535, 13, 51, 521, 26407, 62, 51, 2433, 15057, 737, 7975, 1616, 53, 499, 454, 13, 51, 828, 198, 197, 197, 197, 197, 37498, 5662, 40, 9, 1, 265, 76, 1, 796, 3563, 25552, 7, 10943, 5446, 3535, 13, 47, 521, 26407, 62, 51, 2433, 15057, 737, 7975, 1616, 53, 499, 454, 13, 47, 828, 198, 197, 197, 197, 197, 37498, 89, 25690, 1635, 352, 68, 12, 21, 796, 3563, 25552, 7, 10943, 5446, 3535, 13, 89, 521, 26407, 62, 51, 2433, 15057, 737, 7975, 1616, 41966, 13, 89, 7, 10943, 5446, 3535, 13, 89, 521, 26407, 62, 21950, 8, 1635, 3563, 25552, 7, 10943, 5446, 3535, 13, 89, 521, 26407, 62, 51, 2433, 15057, 737, 44, 86, 7, 10943, 5446, 3535, 13, 89, 521, 26407, 62, 21950, 8, 1220, 2160, 7, 2257, 25552, 7, 10943, 5446, 3535, 13, 89, 521, 26407, 62, 51, 2433, 15057, 737, 44, 86, 9, 2257, 25552, 7, 10943, 5446, 3535, 13, 89, 521, 26407, 62, 51, 2433, 15057, 737, 7975, 1616, 41966, 13, 89, 36911, 198, 197, 197, 197, 197, 37498, 13800, 495, 26932, 796, 3563, 25552, 7, 15057, 5189, 1273, 1095, 737, 7975, 1616, 41966, 13, 47, 532, 3563, 25552, 7, 16, 737, 7975, 1616, 41966, 13, 47, 828, 198, 197, 197, 197, 4357, 198, 197, 197, 197, 58, 198, 197, 197, 197, 197, 1, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 2430, 51, 2433, 34467, 1423, 26407, 2430, 51, 2433, 30980, 1423, 26407, 2430, 51, 2433, 955, 9150, 1423, 26407, 2430, 13800, 495, 26932, 1600, 198, 197, 197, 197, 4357, 198, 197, 197, 197, 58, 25, 10246, 11, 25, 45, 7293, 11, 25, 15057, 5189, 18332, 82, 11, 25, 15057, 5189, 1273, 1095, 11, 25, 18332, 29391, 14749, 11, 25, 47, 5430, 23106, 11, 25, 39596, 15979, 306, 11, 25, 39470, 35, 13173, 11, 25, 53, 1868, 37, 7861, 11, 25, 4965, 9311, 34, 2577, 487, 11, 25, 30547, 5990, 47, 5430, 16598, 11, 25, 39, 2767, 47, 11, 4357, 198, 197, 197, 8, 198, 197, 437, 198, 197, 10246, 3712, 35, 2271, 37233, 198, 197, 45, 7293, 3712, 35, 2271, 46541, 198, 197, 15057, 5189, 18332, 82, 3712, 35, 2271, 46541, 198, 197, 15057, 5189, 1273, 1095, 3712, 35, 2271, 46541, 198, 197, 18332, 29391, 14749, 3712, 19182, 90, 35, 2271, 46541, 92, 198, 197, 47, 5430, 23106, 3712, 13664, 198, 197, 39596, 15979, 306, 3712, 25080, 62, 4873, 198, 197, 39470, 35, 13173, 3712, 13664, 198, 197, 53, 1868, 37, 7861, 3712, 35, 2271, 15633, 198, 197, 4965, 9311, 34, 2577, 487, 3712, 24561, 198, 197, 30547, 5990, 47, 5430, 16598, 3712, 35, 2271, 15633, 198, 197, 39, 2767, 47, 3712, 13664, 198, 197, 4853, 602, 3712, 19182, 90, 3109, 1050, 11, 16, 92, 198, 197, 4853, 341, 36690, 3712, 19182, 90, 10100, 11, 16, 92, 198, 197, 36733, 82, 3712, 19182, 90, 3109, 1050, 11, 16, 92, 198, 197, 36733, 36690, 3712, 19182, 90, 10100, 11, 16, 92, 198, 197, 17143, 7307, 3712, 19182, 90, 13940, 23650, 11, 16, 92, 198, 197, 1078, 7657, 3712, 35, 713, 90, 13940, 23650, 11, 7149, 92, 198, 437, 198, 39344, 350, 6021, 62, 16375, 62, 39470, 26416, 198, 8818, 900, 7, 259, 3712, 47, 6021, 62, 16375, 62, 39470, 26416, 8, 198, 197, 2257, 25552, 13, 15057, 62, 1273, 1095, 796, 7913, 5189, 1273, 1095, 198, 197, 3563, 25552, 13, 23106, 5189, 47, 5430, 796, 350, 5430, 23106, 198, 197, 3563, 25552, 13, 39596, 2202, 29391, 796, 12308, 15979, 306, 198, 197, 3563, 25552, 13, 39470, 37693, 35, 13173, 796, 29201, 35, 13173, 198, 197, 3563, 25552, 13, 47, 5430, 53, 1868, 37, 7861, 796, 18331, 37, 7861, 198, 197, 3563, 25552, 13, 41966, 4965, 9311, 34, 2577, 487, 796, 17363, 34, 2577, 487, 198, 197, 3563, 25552, 13, 30547, 5990, 47, 5430, 31715, 796, 9498, 5990, 47, 5430, 16598, 198, 197, 367, 2767, 47, 796, 350, 5430, 23106, 14, 15057, 5189, 1273, 1095, 198, 197, 220, 198, 437, 198, 8818, 900, 23588, 341, 37535, 7, 259, 3712, 47, 6021, 62, 16375, 62, 39470, 26416, 8, 198, 197, 2860, 23588, 341, 7, 16, 8, 198, 197, 2860, 23588, 341, 7, 17, 8, 198, 197, 2860, 23588, 341, 7, 18, 8, 198, 197, 2860, 23588, 341, 7, 19, 8, 198, 197, 2860, 23588, 341, 7, 20, 8, 198, 197, 2860, 23588, 341, 7, 21, 8, 198, 197, 2860, 23588, 341, 7, 22, 8, 198, 197, 2860, 23588, 341, 7, 23, 8, 198, 197, 2860, 23588, 341, 7, 24, 8, 198, 197, 2860, 23588, 341, 7, 940, 8, 198, 197, 2860, 23588, 341, 7, 1157, 8, 198, 197, 2860, 23588, 341, 7, 1065, 8, 198, 197, 2860, 23588, 341, 7, 1485, 8, 198, 197, 2860, 23588, 341, 7, 1415, 8, 198, 197, 2860, 23588, 341, 7, 1314, 8, 198, 197, 2860, 23588, 341, 7, 1433, 8, 198, 197, 2860, 23588, 341, 7, 1558, 8, 198, 197, 2860, 23588, 341, 7, 1507, 8, 198, 197, 2860, 23588, 341, 7, 1129, 8, 198, 197, 2860, 23588, 341, 7, 1238, 8, 198, 197, 2, 4825, 40, 9, 6, 42, 6, 796, 29125, 16309, 7, 1084, 26933, 15057, 5189, 2898, 592, 11, 49833, 13, 51, 521, 26407, 62, 51, 2433, 15057, 12962, 737, 7975, 1616, 53, 499, 454, 13, 51, 26, 198, 197, 2860, 23588, 341, 7, 2481, 8, 198, 197, 2, 5662, 40, 9, 6, 265, 76, 6, 796, 29125, 16309, 7, 1084, 26933, 15057, 5189, 2898, 592, 11, 49833, 13, 47, 521, 26407, 62, 51, 2433, 15057, 12962, 737, 7975, 1616, 53, 499, 454, 13, 47, 26, 198, 197, 2860, 23588, 341, 7, 1828, 8, 198, 197, 2, 89, 25690, 1635, 764, 2388, 486, 796, 3563, 25552, 7, 10943, 5446, 3535, 13, 89, 521, 26407, 62, 51, 2433, 15057, 737, 7975, 1616, 53, 499, 454, 13, 89, 7, 10943, 5446, 3535, 13, 89, 521, 26407, 62, 21950, 8, 1635, 3563, 25552, 7, 10943, 5446, 3535, 13, 89, 521, 26407, 62, 51, 2433, 15057, 737, 44, 86, 7, 10943, 5446, 3535, 13, 89, 521, 26407, 62, 21950, 8, 2162, 1303, 14, 16345, 7, 2257, 25552, 7, 10943, 5446, 3535, 13, 89, 521, 26407, 62, 51, 2433, 15057, 737, 44, 86, 9, 2257, 25552, 7, 10943, 5446, 3535, 13, 89, 521, 26407, 62, 51, 2433, 15057, 737, 7975, 1616, 41966, 13, 89, 1776, 198, 197, 2860, 23588, 341, 7, 1954, 8, 198, 197, 2860, 23588, 341, 7, 1731, 8, 198, 437, 198, 8818, 4238, 7, 259, 3712, 47, 6021, 62, 16375, 62, 39470, 26416, 8, 198, 197, 198, 437, 198, 8818, 379, 7657, 7, 259, 3712, 47, 6021, 62, 16375, 62, 39470, 26416, 11, 62, 3712, 35, 713, 90, 13940, 23650, 11, 7149, 30072, 198, 197, 25747, 3712, 35, 713, 90, 13940, 23650, 11, 7149, 92, 28, 35, 713, 90, 13940, 23650, 11, 7149, 92, 3419, 198, 197, 25747, 58, 25, 11531, 5807, 22241, 9562, 198, 197, 25747, 58, 25, 19578, 60, 2625, 4749, 14, 47, 6021, 16375, 39470, 1, 198, 197, 25747, 58, 25, 33, 3796, 60, 2625, 17633, 286, 257, 11856, 5721, 2665, 526, 198, 197, 25747, 58, 25, 12360, 60, 2625, 855, 9104, 286, 257, 11856, 5721, 2665, 7268, 6624, 198, 9, 399, 1273, 1095, 16200, 9539, 13, 198, 198, 855, 18291, 1958, 6624, 198, 9, 262, 3745, 4269, 286, 1123, 26473, 357, 818, 1616, 1776, 198, 9, 262, 554, 1616, 41966, 4269, 286, 262, 1353, 26473, 26, 198, 9, 262, 554, 1616, 53, 499, 454, 4269, 286, 262, 4220, 26473, 26, 198, 9, 262, 2472, 3833, 4268, 357, 67, 47, 8, 286, 262, 2665, 13, 198, 198, 855, 20768, 27617, 6624, 198, 9, 262, 9539, 5951, 357, 7975, 1616, 41966, 13, 51, 1776, 198, 9, 262, 9539, 8122, 1745, 929, 26, 198, 9, 357, 2949, 5377, 862, 532, 352, 8, 3806, 1616, 41966, 357, 1581, 3806, 1616, 53, 499, 454, 8, 33543, 329, 1123, 26473, 13, 198, 1, 198, 197, 19472, 0, 7, 25747, 11, 62, 8, 198, 197, 7783, 7032, 198, 437, 198, 47, 6021, 62, 16375, 62, 39470, 26416, 28264, 3712, 35, 713, 90, 13940, 23650, 11, 7149, 30072, 28, 27471, 198, 197, 3605, 17633, 28, 47, 6021, 62, 16375, 62, 39470, 26416, 3419, 198, 197, 3605, 17633, 13, 1078, 7657, 28, 265, 7657, 7, 3605, 17633, 11, 62, 8, 198, 197, 3605, 17633, 198, 437, 198 ]
2.503686
2,849
""" v_func() Lorem ipsum dolor sit amet. """ function v_func() 9 end """ v_func(cur_obj::GType) Lorem ipsum dolor sit amet. """ function v_func(cur_obj::GType) 8 end """ v_func(cur_obj::AType) Lorem ipsum dolor sit amet. """ function v_func(cur_obj::AType) 7 end
[ 37811, 198, 220, 220, 220, 410, 62, 20786, 3419, 198, 198, 43, 29625, 220, 2419, 388, 288, 45621, 1650, 716, 316, 13, 198, 37811, 198, 8818, 410, 62, 20786, 3419, 198, 220, 860, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 410, 62, 20786, 7, 22019, 62, 26801, 3712, 38, 6030, 8, 198, 198, 43, 29625, 220, 2419, 388, 288, 45621, 1650, 716, 316, 13, 198, 37811, 198, 8818, 410, 62, 20786, 7, 22019, 62, 26801, 3712, 38, 6030, 8, 198, 220, 807, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 410, 62, 20786, 7, 22019, 62, 26801, 3712, 1404, 2981, 8, 198, 198, 43, 29625, 220, 2419, 388, 288, 45621, 1650, 716, 316, 13, 198, 37811, 198, 8818, 410, 62, 20786, 7, 22019, 62, 26801, 3712, 1404, 2981, 8, 198, 220, 767, 198, 437, 198 ]
2.072464
138
# Before running this, please make sure to activate and instantiate the environment # corresponding to [this `Project.toml`](https://raw.githubusercontent.com/alan-turing-institute/DataScienceTutorials.jl/master/Project.toml) and [this `Manifest.toml`](https://raw.githubusercontent.com/alan-turing-institute/DataScienceTutorials.jl/master/Manifest.toml) # so that you get an environment which matches the one used to generate the tutorials: # # ```julia # cd("DataScienceTutorials") # cd to folder with the *.toml # using Pkg; Pkg.activate("."); Pkg.instantiate() # ``` # **Main author**: Yaqub Alwan (IQVIA).## ## Getting started using MLJ using PrettyPrinting import DataFrames import Statistics using PyPlot using StableRNGs @load LGBMRegressor # Let us try LightGBM out by doing a regression task on the Boston house prices dataset.# This is a commonly used dataset so there is a loader built into MLJ. # Here, the objective is to show how LightGBM can do better than a Linear Regressor# with minimal effort.## We start out by taking a quick peek at the data itself and its statistical properties. features, targets = @load_boston features = DataFrames.DataFrame(features) @show size(features) @show targets[1:3] first(features, 3) |> pretty # We can also describe the dataframe DataFrames.describe(features) # Do the usual train/test partitioning. This is important so we can estimate generalisation. train, test = partition(eachindex(targets), 0.70, shuffle=true, rng=StableRNG(52)) # Let us investigation some of the commonly tweaked LightGBM parameters. We start with looking at a learning curve for number of boostings. lgb = LGBMRegressor() #initialised a model with default params lgbm = machine(lgb, features[train, :], targets[train, 1]) boostrange = range(lgb, :num_iterations, lower=2, upper=500) curve = learning_curve!(lgbm, resampling=CV(nfolds=5), range=boostrange, resolution=100, measure=rms) figure(figsize=(8,6)) plot(curve.parameter_values, curve.measurements) xlabel("Number of rounds", fontsize=14) ylabel("RMSE", fontsize=14) # \fig{lgbm_hp1.svg} # It looks like that we don't need to go much past 100 boosts # Since LightGBM is a gradient based learning method, we also have a learning rate parameter which controls the size of gradient updates.# Let us look at a learning curve for this parameter too lgb = LGBMRegressor() #initialised a model with default params lgbm = machine(lgb, features[train, :], targets[train, 1]) learning_range = range(lgb, :learning_rate, lower=1e-3, upper=1, scale=:log) curve = learning_curve!(lgbm, resampling=CV(nfolds=5), range=learning_range, resolution=100, measure=rms) figure(figsize=(8,6)) plot(curve.parameter_values, curve.measurements) xscale("log") xlabel("Learning rate (log scale)", fontsize=14) ylabel("RMSE", fontsize=14) # \fig{lgbm_hp2.svg} # It seems like near 0.5 is a reasonable place. Bearing in mind that for lower# values of learning rate we possibly require more boosting in order to converge, so the default# value of 100 might not be sufficient for convergence. We leave this as an exercise to the reader.# We can still try to tune this parameter, however. # Finally let us check number of datapoints required to produce a leaf in an individual tree. This parameter# controls the complexity of individual learner trees, and too low a value might lead to overfitting. lgb = LGBMRegressor() #initialised a model with default params lgbm = machine(lgb, features[train, :], targets[train, 1]) # dataset is small enough and the lower and upper sets the tree to have certain number of leaves leaf_range = range(lgb, :min_data_in_leaf, lower=1, upper=50) curve = learning_curve!(lgbm, resampling=CV(nfolds=5), range=leaf_range, resolution=50, measure=rms) figure(figsize=(8,6)) plot(curve.parameter_values, curve.measurements) xlabel("Min data in leaf", fontsize=14) ylabel("RMSE", fontsize=14) # \fig{lgbm_hp3.svg} # It does not seem like there is a huge risk for overfitting, and lower is better for this parameter. # Using the learning curves above we can select some small-ish ranges to jointly search for the best# combinations of these parameters via cross validation. r1 = range(lgb, :num_iterations, lower=50, upper=100) r2 = range(lgb, :min_data_in_leaf, lower=2, upper=10) r3 = range(lgb, :learning_rate, lower=1e-1, upper=1e0) tm = TunedModel(model=lgb, tuning=Grid(resolution=5), resampling=CV(rng=StableRNG(123)), ranges=[r1,r2,r3], measure=rms) mtm = machine(tm, features, targets) fit!(mtm, rows=train); # Lets see what the cross validation best model parameters turned out to be? best_model = fitted_params(mtm).best_model @show best_model.learning_rate @show best_model.min_data_in_leaf @show best_model.num_iterations # Great, and now let's predict using the held out data. predictions = predict(mtm, rows=test) rms_score = round(rms(predictions, targets[test, 1]), sigdigits=4) @show rms_score # This file was generated using Literate.jl, https://github.com/fredrikekre/Literate.jl
[ 2, 7413, 2491, 428, 11, 3387, 787, 1654, 284, 15155, 290, 9113, 9386, 262, 2858, 198, 2, 11188, 284, 685, 5661, 4600, 16775, 13, 39532, 75, 63, 16151, 5450, 1378, 1831, 13, 12567, 43667, 13, 785, 14, 25786, 12, 83, 870, 12, 8625, 3678, 14, 6601, 26959, 51, 44917, 82, 13, 20362, 14, 9866, 14, 16775, 13, 39532, 75, 8, 290, 685, 5661, 4600, 5124, 8409, 13, 39532, 75, 63, 16151, 5450, 1378, 1831, 13, 12567, 43667, 13, 785, 14, 25786, 12, 83, 870, 12, 8625, 3678, 14, 6601, 26959, 51, 44917, 82, 13, 20362, 14, 9866, 14, 5124, 8409, 13, 39532, 75, 8, 198, 2, 523, 326, 345, 651, 281, 2858, 543, 7466, 262, 530, 973, 284, 7716, 262, 27992, 25, 198, 2, 198, 2, 7559, 63, 73, 43640, 198, 2, 22927, 7203, 6601, 26959, 51, 44917, 82, 4943, 1303, 22927, 284, 9483, 351, 262, 46866, 39532, 75, 198, 2, 1262, 350, 10025, 26, 350, 10025, 13, 39022, 7203, 526, 1776, 350, 10025, 13, 8625, 415, 9386, 3419, 198, 2, 7559, 63, 198, 198, 2, 12429, 13383, 1772, 1174, 25, 26421, 421, 65, 978, 8149, 357, 33866, 53, 3539, 737, 2235, 22492, 18067, 2067, 198, 3500, 10373, 41, 198, 3500, 20090, 18557, 278, 198, 11748, 6060, 35439, 198, 11748, 14370, 198, 3500, 9485, 43328, 198, 3500, 520, 540, 49, 10503, 82, 628, 198, 31, 2220, 406, 4579, 44, 8081, 44292, 198, 198, 2, 3914, 514, 1949, 4401, 4579, 44, 503, 416, 1804, 257, 20683, 4876, 319, 262, 6182, 2156, 4536, 27039, 32535, 770, 318, 257, 8811, 973, 27039, 523, 612, 318, 257, 40213, 3170, 656, 10373, 41, 13, 198, 2, 3423, 11, 262, 9432, 318, 284, 905, 703, 4401, 4579, 44, 460, 466, 1365, 621, 257, 44800, 3310, 44292, 2, 351, 10926, 3626, 13, 2235, 775, 923, 503, 416, 2263, 257, 2068, 27185, 379, 262, 1366, 2346, 290, 663, 13905, 6608, 13, 198, 40890, 11, 6670, 796, 2488, 2220, 62, 65, 5744, 198, 40890, 796, 6060, 35439, 13, 6601, 19778, 7, 40890, 8, 198, 31, 12860, 2546, 7, 40890, 8, 198, 31, 12860, 6670, 58, 16, 25, 18, 60, 198, 11085, 7, 40890, 11, 513, 8, 930, 29, 2495, 198, 198, 2, 775, 460, 635, 6901, 262, 1366, 14535, 198, 6601, 35439, 13, 20147, 4892, 7, 40890, 8, 198, 198, 2, 2141, 262, 6678, 4512, 14, 9288, 18398, 278, 13, 770, 318, 1593, 523, 356, 460, 8636, 2276, 5612, 13, 198, 27432, 11, 1332, 796, 18398, 7, 27379, 9630, 7, 83, 853, 1039, 828, 657, 13, 2154, 11, 36273, 28, 7942, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 782, 28, 1273, 540, 49, 10503, 7, 4309, 4008, 198, 198, 2, 3914, 514, 3645, 617, 286, 262, 8811, 38304, 4401, 4579, 44, 10007, 13, 775, 923, 351, 2045, 379, 257, 4673, 12133, 329, 1271, 286, 5750, 654, 13, 198, 75, 22296, 796, 406, 4579, 44, 8081, 44292, 3419, 1303, 36733, 1417, 257, 2746, 351, 4277, 42287, 198, 75, 70, 20475, 796, 4572, 7, 75, 22296, 11, 3033, 58, 27432, 11, 1058, 4357, 6670, 58, 27432, 11, 352, 12962, 198, 39521, 9521, 796, 2837, 7, 75, 22296, 11, 1058, 22510, 62, 2676, 602, 11, 2793, 28, 17, 11, 6727, 28, 4059, 8, 198, 22019, 303, 796, 4673, 62, 22019, 303, 0, 7, 75, 70, 20475, 11, 581, 321, 11347, 28, 33538, 7, 77, 69, 10119, 28, 20, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2837, 28, 39521, 9521, 11, 6323, 28, 3064, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3953, 28, 81, 907, 8, 628, 198, 26875, 7, 5647, 7857, 16193, 23, 11, 21, 4008, 198, 29487, 7, 22019, 303, 13, 17143, 2357, 62, 27160, 11, 12133, 13, 1326, 5015, 902, 8, 198, 87, 18242, 7203, 15057, 286, 9196, 1600, 10369, 7857, 28, 1415, 8, 198, 2645, 9608, 7203, 29138, 5188, 1600, 10369, 7857, 28, 1415, 8, 628, 198, 198, 2, 3467, 5647, 90, 75, 70, 20475, 62, 24831, 16, 13, 21370, 70, 92, 198, 2, 632, 3073, 588, 326, 356, 836, 470, 761, 284, 467, 881, 1613, 1802, 31822, 198, 2, 4619, 4401, 4579, 44, 318, 257, 31312, 1912, 4673, 2446, 11, 356, 635, 423, 257, 4673, 2494, 11507, 543, 6973, 262, 2546, 286, 31312, 5992, 32535, 3914, 514, 804, 379, 257, 4673, 12133, 329, 428, 11507, 1165, 198, 75, 22296, 796, 406, 4579, 44, 8081, 44292, 3419, 1303, 36733, 1417, 257, 2746, 351, 4277, 42287, 198, 75, 70, 20475, 796, 4572, 7, 75, 22296, 11, 3033, 58, 27432, 11, 1058, 4357, 6670, 58, 27432, 11, 352, 12962, 198, 40684, 62, 9521, 796, 2837, 7, 75, 22296, 11, 1058, 40684, 62, 4873, 11, 2793, 28, 16, 68, 12, 18, 11, 6727, 28, 16, 11, 5046, 28, 25, 6404, 8, 198, 22019, 303, 796, 4673, 62, 22019, 303, 0, 7, 75, 70, 20475, 11, 581, 321, 11347, 28, 33538, 7, 77, 69, 10119, 28, 20, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2837, 28, 40684, 62, 9521, 11, 6323, 28, 3064, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3953, 28, 81, 907, 8, 628, 198, 26875, 7, 5647, 7857, 16193, 23, 11, 21, 4008, 198, 29487, 7, 22019, 303, 13, 17143, 2357, 62, 27160, 11, 12133, 13, 1326, 5015, 902, 8, 198, 87, 9888, 7203, 6404, 4943, 198, 87, 18242, 7203, 41730, 2494, 357, 6404, 5046, 42501, 10369, 7857, 28, 1415, 8, 198, 2645, 9608, 7203, 29138, 5188, 1600, 10369, 7857, 28, 1415, 8, 628, 198, 198, 2, 3467, 5647, 90, 75, 70, 20475, 62, 24831, 17, 13, 21370, 70, 92, 198, 2, 632, 2331, 588, 1474, 657, 13, 20, 318, 257, 6397, 1295, 13, 28834, 287, 2000, 326, 329, 2793, 2, 3815, 286, 4673, 2494, 356, 5457, 2421, 517, 27611, 287, 1502, 284, 47873, 11, 523, 262, 4277, 2, 1988, 286, 1802, 1244, 407, 307, 6751, 329, 40826, 13, 775, 2666, 428, 355, 281, 5517, 284, 262, 9173, 32535, 775, 460, 991, 1949, 284, 14009, 428, 11507, 11, 2158, 13, 198, 2, 9461, 1309, 514, 2198, 1271, 286, 4818, 499, 1563, 82, 2672, 284, 4439, 257, 12835, 287, 281, 1981, 5509, 13, 770, 11507, 2, 6973, 262, 13357, 286, 1981, 22454, 1008, 7150, 11, 290, 1165, 1877, 257, 1988, 1244, 1085, 284, 625, 32232, 13, 198, 75, 22296, 796, 406, 4579, 44, 8081, 44292, 3419, 1303, 36733, 1417, 257, 2746, 351, 4277, 42287, 198, 75, 70, 20475, 796, 4572, 7, 75, 22296, 11, 3033, 58, 27432, 11, 1058, 4357, 6670, 58, 27432, 11, 352, 12962, 198, 198, 2, 27039, 318, 1402, 1576, 290, 262, 2793, 290, 6727, 5621, 262, 5509, 284, 423, 1728, 1271, 286, 5667, 198, 33201, 62, 9521, 796, 2837, 7, 75, 22296, 11, 1058, 1084, 62, 7890, 62, 259, 62, 33201, 11, 2793, 28, 16, 11, 6727, 28, 1120, 8, 628, 198, 22019, 303, 796, 4673, 62, 22019, 303, 0, 7, 75, 70, 20475, 11, 581, 321, 11347, 28, 33538, 7, 77, 69, 10119, 28, 20, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2837, 28, 33201, 62, 9521, 11, 6323, 28, 1120, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3953, 28, 81, 907, 8, 198, 198, 26875, 7, 5647, 7857, 16193, 23, 11, 21, 4008, 198, 29487, 7, 22019, 303, 13, 17143, 2357, 62, 27160, 11, 12133, 13, 1326, 5015, 902, 8, 198, 87, 18242, 7203, 9452, 1366, 287, 12835, 1600, 10369, 7857, 28, 1415, 8, 198, 2645, 9608, 7203, 29138, 5188, 1600, 10369, 7857, 28, 1415, 8, 628, 198, 198, 2, 3467, 5647, 90, 75, 70, 20475, 62, 24831, 18, 13, 21370, 70, 92, 198, 2, 632, 857, 407, 1283, 588, 612, 318, 257, 3236, 2526, 329, 625, 32232, 11, 290, 2793, 318, 1365, 329, 428, 11507, 13, 198, 2, 8554, 262, 4673, 23759, 2029, 356, 460, 2922, 617, 1402, 12, 680, 16069, 284, 26913, 2989, 329, 262, 1266, 2, 17790, 286, 777, 10007, 2884, 3272, 21201, 13, 198, 81, 16, 796, 2837, 7, 75, 22296, 11, 1058, 22510, 62, 2676, 602, 11, 2793, 28, 1120, 11, 6727, 28, 3064, 8, 198, 81, 17, 796, 2837, 7, 75, 22296, 11, 1058, 1084, 62, 7890, 62, 259, 62, 33201, 11, 2793, 28, 17, 11, 6727, 28, 940, 8, 198, 81, 18, 796, 2837, 7, 75, 22296, 11, 1058, 40684, 62, 4873, 11, 2793, 28, 16, 68, 12, 16, 11, 6727, 28, 16, 68, 15, 8, 198, 17209, 796, 13932, 276, 17633, 7, 19849, 28, 75, 22296, 11, 24549, 28, 41339, 7, 29268, 28, 20, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 581, 321, 11347, 28, 33538, 7, 81, 782, 28, 1273, 540, 49, 10503, 7, 10163, 36911, 16069, 41888, 81, 16, 11, 81, 17, 11, 81, 18, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3953, 28, 81, 907, 8, 198, 16762, 76, 796, 4572, 7, 17209, 11, 3033, 11, 6670, 8, 198, 11147, 0, 7, 16762, 76, 11, 15274, 28, 27432, 1776, 198, 198, 2, 38257, 766, 644, 262, 3272, 21201, 1266, 2746, 10007, 2900, 503, 284, 307, 30, 198, 13466, 62, 19849, 796, 18235, 62, 37266, 7, 16762, 76, 737, 13466, 62, 19849, 198, 31, 12860, 1266, 62, 19849, 13, 40684, 62, 4873, 198, 31, 12860, 1266, 62, 19849, 13, 1084, 62, 7890, 62, 259, 62, 33201, 198, 31, 12860, 1266, 62, 19849, 13, 22510, 62, 2676, 602, 198, 198, 2, 3878, 11, 290, 783, 1309, 338, 4331, 1262, 262, 2714, 503, 1366, 13, 198, 28764, 9278, 796, 4331, 7, 16762, 76, 11, 15274, 28, 9288, 8, 198, 81, 907, 62, 26675, 796, 2835, 7, 81, 907, 7, 28764, 9278, 11, 6670, 58, 9288, 11, 352, 46570, 43237, 12894, 896, 28, 19, 8, 198, 198, 31, 12860, 374, 907, 62, 26675, 628, 198, 198, 2, 770, 2393, 373, 7560, 1262, 17667, 378, 13, 20362, 11, 3740, 1378, 12567, 13, 785, 14, 39193, 8760, 74, 260, 14, 43460, 378, 13, 20362, 628 ]
2.958002
1,762
# benchmarks of reduction on views using NumericExtensions const a = rand(1000, 1000) const a_sub = sub(a, 1:999, :) const a_view = view(a, 1:999, :) println("for sum:") for dim = 1:2 # warmup sum(a_sub, dim) sum(a_view, dim) # profile et1 = @elapsed for i=1:100; sum(a_sub, dim); end et2 = @elapsed for i=1:100; sum(a_view, dim); end @printf(" dim = %d: on a_sub => %.4fs on a_view => %.4fs | gain = %.4fx\n", dim, et1, et2, et1 / et2) end println("for sumabs:") for dim = 1:2 # warmup sum(a_sub, dim) sum(a_view, dim) # profile et1 = @elapsed for i=1:100; sum(abs(a_sub), dim); end et2 = @elapsed for i=1:100; sumabs(a_view, dim); end @printf(" dim = %d: on a_sub => %.4fs on a_view => %.4fs | gain = %.4fx\n", dim, et1, et2, et1 / et2) end
[ 2, 31747, 286, 7741, 319, 5009, 198, 198, 3500, 399, 39223, 11627, 5736, 198, 198, 9979, 257, 796, 43720, 7, 12825, 11, 8576, 8, 198, 198, 9979, 257, 62, 7266, 796, 850, 7, 64, 11, 352, 25, 17032, 11, 14373, 198, 9979, 257, 62, 1177, 796, 1570, 7, 64, 11, 352, 25, 17032, 11, 14373, 198, 198, 35235, 7203, 1640, 2160, 25, 4943, 198, 1640, 5391, 796, 352, 25, 17, 198, 220, 220, 220, 1303, 5814, 929, 198, 220, 220, 220, 2160, 7, 64, 62, 7266, 11, 5391, 8, 198, 220, 220, 220, 2160, 7, 64, 62, 1177, 11, 5391, 8, 628, 220, 220, 220, 1303, 7034, 198, 220, 220, 220, 2123, 16, 796, 2488, 417, 28361, 329, 1312, 28, 16, 25, 3064, 26, 2160, 7, 64, 62, 7266, 11, 5391, 1776, 886, 198, 220, 220, 220, 2123, 17, 796, 2488, 417, 28361, 329, 1312, 28, 16, 25, 3064, 26, 2160, 7, 64, 62, 1177, 11, 5391, 1776, 886, 628, 220, 220, 220, 2488, 37435, 7203, 220, 5391, 796, 4064, 67, 25, 220, 319, 257, 62, 7266, 5218, 4064, 13, 19, 9501, 220, 220, 319, 257, 62, 1177, 5218, 4064, 13, 19, 9501, 220, 220, 930, 220, 4461, 796, 4064, 13, 19, 21373, 59, 77, 1600, 220, 198, 220, 220, 220, 220, 220, 220, 220, 5391, 11, 2123, 16, 11, 2123, 17, 11, 2123, 16, 1220, 2123, 17, 8, 198, 437, 198, 198, 35235, 7203, 1640, 2160, 8937, 25, 4943, 198, 1640, 5391, 796, 352, 25, 17, 198, 220, 220, 220, 1303, 5814, 929, 198, 220, 220, 220, 2160, 7, 64, 62, 7266, 11, 5391, 8, 198, 220, 220, 220, 2160, 7, 64, 62, 1177, 11, 5391, 8, 628, 220, 220, 220, 1303, 7034, 198, 220, 220, 220, 2123, 16, 796, 2488, 417, 28361, 329, 1312, 28, 16, 25, 3064, 26, 2160, 7, 8937, 7, 64, 62, 7266, 828, 5391, 1776, 886, 198, 220, 220, 220, 2123, 17, 796, 2488, 417, 28361, 329, 1312, 28, 16, 25, 3064, 26, 2160, 8937, 7, 64, 62, 1177, 11, 5391, 1776, 886, 628, 220, 220, 220, 2488, 37435, 7203, 220, 5391, 796, 4064, 67, 25, 220, 319, 257, 62, 7266, 5218, 4064, 13, 19, 9501, 220, 220, 319, 257, 62, 1177, 5218, 4064, 13, 19, 9501, 220, 220, 930, 220, 4461, 796, 4064, 13, 19, 21373, 59, 77, 1600, 220, 198, 220, 220, 220, 220, 220, 220, 220, 5391, 11, 2123, 16, 11, 2123, 17, 11, 2123, 16, 1220, 2123, 17, 8, 198, 437, 628 ]
2.041262
412
include("..\\src\\introducao.jl") module IntroducaoTeste include("error_handler_pt_br.jl") end using Base.Test import Introducao Test.with_handler(custom_handler) do @test soma(1,2) == 2 end
[ 17256, 7203, 492, 6852, 10677, 6852, 27427, 66, 5488, 13, 20362, 4943, 198, 198, 21412, 11036, 66, 5488, 14402, 68, 198, 220, 2291, 7203, 18224, 62, 30281, 62, 457, 62, 1671, 13, 20362, 4943, 198, 437, 198, 198, 3500, 7308, 13, 14402, 198, 198, 11748, 11036, 66, 5488, 198, 198, 14402, 13, 4480, 62, 30281, 7, 23144, 62, 30281, 8, 466, 198, 220, 2488, 9288, 3870, 64, 7, 16, 11, 17, 8, 6624, 362, 198, 437, 198 ]
2.584416
77
module Node mutable struct node mass radius position velocity end export node end
[ 21412, 19081, 198, 198, 76, 18187, 2878, 10139, 198, 220, 220, 220, 2347, 198, 220, 220, 220, 16874, 198, 220, 220, 220, 2292, 198, 220, 220, 220, 15432, 198, 437, 198, 198, 39344, 10139, 198, 437, 198 ]
2.702703
37
using RCall, MixedModels, Test using StatsBase: zscore const LMM = LinearMixedModel const GLMM = GeneralizedLinearMixedModel @testset "merMod" begin # this is available in MixedModels.dataset(:sleepstudy) but with different # capitalization than in R sleepstudy = rcopy(R"sleepstudy") jlmm = fit!(LMM(@formula(Reaction ~ 1 + round(Days) + (1|Subject)),sleepstudy), REML=false) @testset "bare model" begin @test_throws ArgumentError (@rput jlmm) end @testset "reversed tuple" begin jm = (sleepstudy, jlmm); @test_throws ArgumentError (@rput jm) end end
[ 3500, 13987, 439, 11, 35250, 5841, 1424, 11, 6208, 198, 3500, 20595, 14881, 25, 1976, 26675, 198, 9979, 406, 12038, 796, 44800, 44, 2966, 17633, 198, 9979, 10188, 12038, 796, 3611, 1143, 14993, 451, 44, 2966, 17633, 198, 198, 31, 9288, 2617, 366, 647, 5841, 1, 2221, 198, 220, 220, 220, 1303, 428, 318, 1695, 287, 35250, 5841, 1424, 13, 19608, 292, 316, 7, 25, 42832, 44517, 8, 475, 351, 1180, 198, 220, 220, 220, 1303, 3139, 1634, 621, 287, 371, 198, 220, 220, 220, 3993, 44517, 796, 374, 30073, 7, 49, 1, 42832, 44517, 4943, 198, 220, 220, 220, 474, 75, 3020, 796, 4197, 0, 7, 43, 12038, 7, 31, 687, 4712, 7, 3041, 2673, 5299, 352, 1343, 2835, 7, 38770, 8, 1343, 357, 16, 91, 19776, 36911, 42832, 44517, 828, 22657, 43, 28, 9562, 8, 198, 220, 220, 220, 2488, 9288, 2617, 366, 49382, 2746, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 4275, 81, 1996, 474, 75, 3020, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 9288, 2617, 366, 260, 690, 276, 46545, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 474, 76, 796, 357, 42832, 44517, 11, 474, 75, 3020, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 62, 400, 8516, 45751, 12331, 4275, 81, 1996, 474, 76, 8, 198, 220, 220, 220, 886, 198, 437, 198 ]
2.558824
238
println(Sys.WORD_SIZE) println("typeof(1): $(typeof(1))") println("zero: $(zero(Float64))") println("zero: $(one(Float64))") for T in [Int8,Int16,Int32,Int64,Int128,UInt8,UInt16,UInt32,UInt64,UInt128] println("$(lpad(T,7)): [$(typemin(T)),$(typemax(T))]") end x = [1,2,3] .^ 3 println("vectorized operation using dot notation: $(x))") # NaN is not equal to, not less than, and not greater than anything, including itself. println(NaN == NaN) println([1 NaN] == [1 NaN]) println([1 3] == [1 3]) println(isequal(NaN, NaN)) println(isfinite(8)) println(isinf(Inf)) println(isnan(7)) # can chain comparsions v(x) = (println(x); x) v(1) < v(2) <= v(3) # rational numbers - note that number is reduced to smallest possible terms x = 6//9 println("rational number: $(x), numerator: $(numerator(x)), denominator: $(denominator(x))") # strings println("""Can use triple "quotes" to escape embedded quotes""") str = "Hello World!" println("Single index: $(str[1]), $(typeof(str[1]))") # also note indexing is 1-based println("Same thing but using range: $(str[1:1]), $(typeof(str[1:1]))") println("Using 'end' keyword: $(str[end])") # function declaration - "traditional" function f(x,y) x + y end println("1 + 2 = $(f(1, 2))") # assignment form g(x, y) = x + y println("2 + 3 = $(g(2, 3))") # anonymous function example - can also use more than 1 variable (or 0) println(map(x -> x^2 + 2x - 1, [1,3,-1])) # named tuples x = (a=1, b=1+1) println(x.a) # argument destructuring minmax2(x, y) = (y < x) ? (y, x) : (x, y) range2((min, max)) = max - min # note the extra set of parentheses println("range of (10, 2): $(range2(minmax2(10, 2)))") # varargs bar(a,b,x...) = (a,b,x) println("2 args (no varargs): $(bar(1,2))") println("6 args: $(bar(1,2,3,4,5,6))") x = (11, 12) println("With splatting: $(bar(1, 2, x...))") # Optional arguments function Example(y::Int64, x::Int64=0, z::Int64=0) y + x + z end println(Example(2011, 2)) # Keyword arguments - note the semicolon function circle(x, y; radius::Int=1) return (x=x, y=y, radius=radius) end println(circle(2, 3)) println(circle(4, 5; :radius => 6)) function keywords(; kwargs...) println(kwargs...) end keywords(x="Hello", y="World", z="!") # do blocks - pass in function as the first argument y = map([-2, -1, 0, 2]) do x if x < 0 && iseven(x) return 0 elseif x == 0 return 1 else return x end end println(y) # vectorizing functions (dot syntax) f(x,y) = 3x + 4y A = [1.0, 2.0, 3.0] B = [4.0, 5.0, 6.0] println(f.(pi, A)) println(f.(A, B)) Y = [1.0, 2.0, 3.0, 4.0] X = similar(Y); # pre-allocate output array - more efficient than allocating for results @. X = sin(cos(Y)) # equivalent to X .= sin.(cos.(Y)) println(X) # compound expressions - begin blocks, note that they don't have to be multiline z = begin x = 1 y = 2 x + y end println("compound expression: $(z)") z = (x = 1; y = 2; x + y) # using chain syntax - can be multiline println("using chain syntax: $(z)") # conditional statements - note that no local scope function test(x,y) if x < y relation = "less than" elseif x == y relation = "equal to" else relation = "greater than" end println("x is ", relation, " y.") end test(1, 2) test(2, 1) test(2, 2) # ternary operator x = 1; y = 0 println(x < y ? "less than" : "not less than") # short circuit evaluation # you can use non-booleans as the last expression in a conditional chain function fact(n::Int) n >= 0 || error("n must be non-negative") n == 0 && return 1 n * fact(n-1) end println(fact(5)) println(fact(0)) #println(fact(-1)) # loops - while and for i = 1 while i <= 5 println(i) global i += 1 end for i = 1:5 # 1:5 is a range object println(i) end for i in [1,4,0] println(i) end # same as using the keyword in for s ∈ ["foo","bar","baz"] println(s) end for i ∈ [1,2,3,4,5,6] if iseven(i) continue elseif i == 5 break end println(i) end # forms cartesian product of the iterables for i = 1:2, j = 3:4 println((i, j)) end # exception handling f(x) = x>=0 ? exp(-x) : throw(DomainError(x, "argument must be nonnegative")) try f(-1) catch e if isa(e, DomainError) println("you can only provide nonnegative numbers") else rethrow(e) end finally println("we did it team") end
[ 198, 35235, 7, 44387, 13, 54, 12532, 62, 33489, 8, 198, 198, 35235, 7203, 4906, 1659, 7, 16, 2599, 29568, 4906, 1659, 7, 16, 4008, 4943, 198, 35235, 7203, 22570, 25, 29568, 22570, 7, 43879, 2414, 4008, 4943, 198, 35235, 7203, 22570, 25, 29568, 505, 7, 43879, 2414, 4008, 4943, 198, 198, 1640, 309, 287, 685, 5317, 23, 11, 5317, 1433, 11, 5317, 2624, 11, 5317, 2414, 11, 5317, 12762, 11, 52, 5317, 23, 11, 52, 5317, 1433, 11, 52, 5317, 2624, 11, 52, 5317, 2414, 11, 52, 5317, 12762, 60, 198, 220, 220, 220, 44872, 7203, 3, 7, 75, 15636, 7, 51, 11, 22, 8, 2599, 685, 3, 7, 28004, 14857, 7, 51, 36911, 3, 7, 28004, 368, 897, 7, 51, 4008, 60, 4943, 198, 437, 198, 198, 87, 796, 685, 16, 11, 17, 11, 18, 60, 764, 61, 513, 198, 35235, 7203, 31364, 1143, 4905, 1262, 16605, 33274, 25, 29568, 87, 4008, 4943, 198, 198, 2, 11013, 45, 318, 407, 4961, 284, 11, 407, 1342, 621, 11, 290, 407, 3744, 621, 1997, 11, 1390, 2346, 13, 198, 35235, 7, 26705, 45, 6624, 11013, 45, 8, 198, 35235, 26933, 16, 11013, 45, 60, 6624, 685, 16, 11013, 45, 12962, 198, 35235, 26933, 16, 513, 60, 6624, 685, 16, 513, 12962, 198, 35235, 7, 786, 13255, 7, 26705, 45, 11, 11013, 45, 4008, 198, 35235, 7, 4468, 9504, 7, 23, 4008, 198, 35235, 7, 271, 10745, 7, 18943, 4008, 198, 35235, 7, 271, 12647, 7, 22, 4008, 198, 198, 2, 460, 6333, 552, 945, 507, 198, 85, 7, 87, 8, 796, 357, 35235, 7, 87, 1776, 2124, 8, 198, 85, 7, 16, 8, 1279, 410, 7, 17, 8, 19841, 410, 7, 18, 8, 198, 198, 2, 9377, 3146, 532, 3465, 326, 1271, 318, 5322, 284, 18197, 1744, 2846, 198, 87, 796, 718, 1003, 24, 198, 35235, 7203, 20310, 1271, 25, 29568, 87, 828, 5470, 1352, 25, 29568, 77, 6975, 1352, 7, 87, 36911, 31457, 1352, 25, 29568, 6559, 6351, 1352, 7, 87, 4008, 4943, 198, 198, 2, 13042, 198, 35235, 7203, 15931, 6090, 779, 15055, 366, 421, 6421, 1, 284, 6654, 14553, 13386, 15931, 4943, 198, 2536, 796, 366, 15496, 2159, 2474, 198, 35235, 7203, 28008, 6376, 25, 29568, 2536, 58, 16, 46570, 29568, 4906, 1659, 7, 2536, 58, 16, 60, 4008, 4943, 220, 1303, 635, 3465, 6376, 278, 318, 352, 12, 3106, 198, 35235, 7203, 30556, 1517, 475, 1262, 2837, 25, 29568, 2536, 58, 16, 25, 16, 46570, 29568, 4906, 1659, 7, 2536, 58, 16, 25, 16, 60, 4008, 4943, 198, 35235, 7203, 12814, 705, 437, 6, 21179, 25, 29568, 2536, 58, 437, 12962, 4943, 198, 198, 2, 2163, 14305, 532, 366, 36380, 1, 198, 8818, 277, 7, 87, 11, 88, 8, 198, 220, 220, 220, 2124, 1343, 331, 198, 437, 198, 35235, 7203, 16, 1343, 362, 796, 29568, 69, 7, 16, 11, 362, 4008, 4943, 198, 198, 2, 16237, 1296, 198, 70, 7, 87, 11, 331, 8, 796, 2124, 1343, 331, 198, 35235, 7203, 17, 1343, 513, 796, 29568, 70, 7, 17, 11, 513, 4008, 4943, 198, 198, 2, 11614, 2163, 1672, 532, 460, 635, 779, 517, 621, 352, 7885, 357, 273, 657, 8, 198, 35235, 7, 8899, 7, 87, 4613, 2124, 61, 17, 1343, 362, 87, 532, 352, 11, 685, 16, 11, 18, 12095, 16, 60, 4008, 198, 198, 2, 3706, 12777, 2374, 198, 87, 796, 357, 64, 28, 16, 11, 275, 28, 16, 10, 16, 8, 198, 35235, 7, 87, 13, 64, 8, 198, 198, 2, 4578, 15256, 870, 198, 1084, 9806, 17, 7, 87, 11, 331, 8, 796, 357, 88, 1279, 2124, 8, 5633, 357, 88, 11, 2124, 8, 1058, 357, 87, 11, 331, 8, 198, 9521, 17, 19510, 1084, 11, 3509, 4008, 796, 3509, 532, 949, 220, 1303, 3465, 262, 3131, 900, 286, 46672, 198, 35235, 7203, 9521, 286, 357, 940, 11, 362, 2599, 29568, 9521, 17, 7, 1084, 9806, 17, 7, 940, 11, 362, 22305, 4943, 198, 198, 2, 1401, 22046, 198, 5657, 7, 64, 11, 65, 11, 87, 23029, 796, 357, 64, 11, 65, 11, 87, 8, 198, 35235, 7203, 17, 26498, 357, 3919, 1401, 22046, 2599, 29568, 5657, 7, 16, 11, 17, 4008, 4943, 198, 35235, 7203, 21, 26498, 25, 29568, 5657, 7, 16, 11, 17, 11, 18, 11, 19, 11, 20, 11, 21, 4008, 4943, 198, 87, 796, 357, 1157, 11, 1105, 8, 198, 35235, 7203, 3152, 4328, 265, 889, 25, 29568, 5657, 7, 16, 11, 362, 11, 2124, 986, 4008, 4943, 198, 198, 2, 32233, 7159, 198, 8818, 17934, 7, 88, 3712, 5317, 2414, 11, 2124, 3712, 5317, 2414, 28, 15, 11, 1976, 3712, 5317, 2414, 28, 15, 8, 198, 220, 220, 220, 331, 1343, 2124, 1343, 1976, 198, 437, 198, 198, 35235, 7, 16281, 7, 9804, 11, 362, 4008, 198, 198, 2, 7383, 4775, 7159, 532, 3465, 262, 5026, 27045, 261, 198, 8818, 9197, 7, 87, 11, 331, 26, 16874, 3712, 5317, 28, 16, 8, 198, 220, 220, 220, 1441, 357, 87, 28, 87, 11, 331, 28, 88, 11, 16874, 28, 42172, 8, 198, 437, 198, 35235, 7, 45597, 7, 17, 11, 513, 4008, 198, 35235, 7, 45597, 7, 19, 11, 642, 26, 1058, 42172, 5218, 718, 4008, 198, 198, 8818, 26286, 7, 26, 479, 86, 22046, 23029, 198, 220, 220, 220, 44872, 7, 46265, 22046, 23029, 198, 437, 198, 2539, 10879, 7, 87, 2625, 15496, 1600, 331, 2625, 10603, 1600, 1976, 2625, 2474, 8, 198, 198, 2, 466, 7021, 532, 1208, 287, 2163, 355, 262, 717, 4578, 198, 88, 796, 3975, 26933, 12, 17, 11, 532, 16, 11, 657, 11, 362, 12962, 466, 2124, 198, 220, 220, 220, 611, 2124, 1279, 657, 11405, 318, 10197, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 657, 198, 220, 220, 220, 2073, 361, 2124, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 352, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2124, 198, 220, 220, 220, 886, 198, 437, 198, 35235, 7, 88, 8, 198, 198, 2, 15879, 2890, 5499, 357, 26518, 15582, 8, 198, 69, 7, 87, 11, 88, 8, 796, 513, 87, 1343, 604, 88, 198, 32, 796, 685, 16, 13, 15, 11, 362, 13, 15, 11, 513, 13, 15, 60, 198, 33, 796, 685, 19, 13, 15, 11, 642, 13, 15, 11, 718, 13, 15, 60, 198, 35235, 7, 69, 12195, 14415, 11, 317, 4008, 198, 35235, 7, 69, 12195, 32, 11, 347, 4008, 198, 198, 56, 796, 685, 16, 13, 15, 11, 362, 13, 15, 11, 513, 13, 15, 11, 604, 13, 15, 60, 198, 55, 796, 2092, 7, 56, 1776, 1303, 662, 12, 439, 13369, 5072, 7177, 532, 517, 6942, 621, 477, 27123, 329, 2482, 198, 31, 13, 1395, 796, 7813, 7, 6966, 7, 56, 4008, 1303, 7548, 284, 1395, 764, 28, 7813, 12195, 6966, 12195, 56, 4008, 198, 35235, 7, 55, 8, 198, 198, 2, 13061, 14700, 532, 2221, 7021, 11, 3465, 326, 484, 836, 470, 423, 284, 307, 1963, 346, 500, 198, 89, 796, 2221, 198, 220, 220, 2124, 796, 352, 198, 220, 220, 331, 796, 362, 198, 220, 220, 2124, 1343, 331, 198, 437, 198, 35235, 7203, 5589, 633, 5408, 25, 29568, 89, 8, 4943, 198, 198, 89, 796, 357, 87, 796, 352, 26, 331, 796, 362, 26, 2124, 1343, 331, 8, 220, 1303, 1262, 6333, 15582, 532, 460, 307, 1963, 346, 500, 198, 35235, 7203, 3500, 6333, 15582, 25, 29568, 89, 8, 4943, 198, 198, 2, 26340, 6299, 532, 3465, 326, 645, 1957, 8354, 198, 8818, 1332, 7, 87, 11, 88, 8, 198, 220, 220, 611, 2124, 1279, 331, 198, 220, 220, 220, 220, 220, 220, 8695, 796, 366, 1203, 621, 1, 198, 220, 220, 2073, 361, 2124, 6624, 331, 198, 220, 220, 220, 220, 220, 220, 8695, 796, 366, 40496, 284, 1, 198, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 8695, 796, 366, 18223, 263, 621, 1, 198, 220, 220, 886, 198, 220, 220, 44872, 7203, 87, 318, 33172, 8695, 11, 366, 331, 19570, 198, 437, 198, 9288, 7, 16, 11, 362, 8, 198, 9288, 7, 17, 11, 352, 8, 198, 9288, 7, 17, 11, 362, 8, 198, 198, 2, 1059, 77, 560, 10088, 198, 87, 796, 352, 26, 331, 796, 657, 198, 35235, 7, 87, 1279, 331, 5633, 366, 1203, 621, 1, 1058, 366, 1662, 1342, 621, 4943, 198, 198, 2, 1790, 10349, 12660, 198, 2, 345, 460, 779, 1729, 12, 2127, 2305, 504, 355, 262, 938, 5408, 287, 257, 26340, 6333, 198, 8818, 1109, 7, 77, 3712, 5317, 8, 198, 220, 220, 299, 18189, 657, 8614, 4049, 7203, 77, 1276, 307, 1729, 12, 31591, 4943, 198, 220, 220, 299, 6624, 657, 11405, 1441, 352, 198, 220, 220, 299, 1635, 1109, 7, 77, 12, 16, 8, 198, 437, 198, 35235, 7, 22584, 7, 20, 4008, 198, 35235, 7, 22584, 7, 15, 4008, 198, 2, 35235, 7, 22584, 32590, 16, 4008, 198, 198, 2, 23607, 532, 981, 290, 329, 198, 72, 796, 352, 198, 4514, 1312, 19841, 642, 198, 220, 220, 44872, 7, 72, 8, 198, 220, 220, 3298, 1312, 15853, 352, 198, 437, 198, 198, 1640, 1312, 796, 352, 25, 20, 220, 1303, 352, 25, 20, 318, 257, 2837, 2134, 198, 220, 220, 44872, 7, 72, 8, 198, 437, 198, 198, 1640, 1312, 287, 685, 16, 11, 19, 11, 15, 60, 198, 220, 220, 44872, 7, 72, 8, 198, 437, 198, 198, 2, 976, 355, 1262, 262, 21179, 287, 198, 1640, 264, 18872, 230, 14631, 21943, 2430, 5657, 2430, 65, 1031, 8973, 198, 220, 220, 44872, 7, 82, 8, 198, 437, 198, 198, 1640, 1312, 18872, 230, 685, 16, 11, 17, 11, 18, 11, 19, 11, 20, 11, 21, 60, 198, 220, 220, 220, 611, 318, 10197, 7, 72, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 2073, 361, 1312, 6624, 642, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 886, 198, 220, 220, 220, 44872, 7, 72, 8, 198, 437, 198, 198, 2, 5107, 6383, 35610, 1720, 286, 262, 11629, 2977, 198, 1640, 1312, 796, 352, 25, 17, 11, 474, 796, 513, 25, 19, 198, 220, 220, 44872, 19510, 72, 11, 474, 4008, 198, 437, 198, 198, 2, 6631, 9041, 198, 69, 7, 87, 8, 796, 2124, 29, 28, 15, 5633, 1033, 32590, 87, 8, 1058, 3714, 7, 43961, 12331, 7, 87, 11, 366, 49140, 1276, 307, 1729, 31591, 48774, 198, 28311, 198, 220, 220, 220, 277, 32590, 16, 8, 198, 40198, 304, 198, 220, 220, 220, 611, 318, 64, 7, 68, 11, 20021, 12331, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 5832, 460, 691, 2148, 1729, 31591, 3146, 4943, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 302, 16939, 7, 68, 8, 198, 220, 220, 220, 886, 198, 69, 3289, 198, 220, 220, 220, 44872, 7203, 732, 750, 340, 1074, 4943, 198, 437, 198 ]
2.413127
1,813
""" readMapFromFITS{T <: Number}(f::FITSIO.FITSFILE, column, t::Type{T}) readMapFromFITS{T <: Number}(fileName::String, column, t::Type{T}) Read a Healpix map from the specified (1-base indexed) column in a FITS file. The values will be read as numbers of type T. If the code fails, FITSIO will raise an exception. (Refer to the FITSIO library for more information.) """ function readMapFromFITS(f::FITSIO.FITSFile, column, t::Type{T}) where {T <: Number} value, comment = FITSIO.fits_read_keyword(f, "NSIDE") nside = parse(Int, value) value, comment = FITSIO.fits_read_keyword(f, "ORDERING") ringOrdering = uppercase(strip(value[2:end-1])) == "RING" repeat = (FITSIO.fits_get_coltype(f, column))[2] nrows = FITSIO.fits_get_num_rows(f) if repeat * nrows != nside2npix(nside) error("Wrong number of pixels in column $column of FITS file (NSIDE=$nside)") end if ringOrdering result = Map{T, Ring}(Array{T}(undef, nside2npix(nside))) else result = Map{T, Nest}(Array{T}(undef, nside2npix(nside))) end FITSIO.fits_read_col(f, column, 1, 1, result.pixels) result end function readMapFromFITS(fileName::AbstractString, column, t::Type{T}) where {T <: Number} f = FITSIO.fits_open_table(fileName) result = readMapFromFITS(f, column, t) FITSIO.fits_close_file(f) result end ################################################################################ """ savePixelsToFITS(map::Map{T}, f::FITSIO.FITSFile, column) where {T <: Number} Save the pixels of `map` into the column with index/name `column` in the FITS file, which must have been already opened. """ function savePixelsToFITS(map::AbstractMap{T, O}, f::FITSIO.FITSFile, column) where {T <: Number, O} FITSIO.fits_update_key(f, "PIXTYPE", "HEALPIX", "HEALPIX pixelisation") FITSIO.fits_update_key(f, "NSIDE", map.resolution.nside, "Value of NSIDE") FITSIO.fits_update_key(f, "FIRSTPIX", 1, "First pixel (1 based)") FITSIO.fits_update_key(f, "LASTPIX", map.resolution.numOfPixels, "Last pixel (1 based)") FITSIO.fits_update_key(f, "INDXSCHM", "IMPLICIT", "Indexing: IMPLICIT or EXPLICIT") FITSIO.fits_write_col(f, column, 1, 1, map.pixels) end """ saveToFITS{T <: Number, O <: Order}(map::Map{T, O}, f::FITSIO.FITSFile, column) saveToFITS{T <: Number, O <: Order}(map::Map{T, O}, fileName::String, typechar="D", unit="", extname="MAP") Save a Healpix map in the specified (1-based index) column in a FITS file. If the code fails, FITSIO will raise an exception. (Refer to the FITSIO library for more information.) """ function saveToFITS(map::OrderedMap{T, Ring}, f::FITSIO.FITSFile, column) where {T <: Number} FITSIO.fits_update_key(f, "ORDERING", "RING") savePixelsToFITS(map, f, column) end function saveToFITS(map::OrderedMap{T, Nest}, f::FITSIO.FITSFile, column) where {T <: Number} FITSIO.fits_update_key(f, "ORDERING", "NEST") savePixelsToFITS(map, f, column) end """ saveToFITS(map::Map{T, O}, filename::AbstractString, typechar="D", unit="", extname="MAP") where {T <: Number, O <: Order} Save a map into a FITS file. The name of the file is specified in `filename`; if it begins with `!`, existing files will be overwritten without warning. The parameter `typechar` specifies the data type to be used in the FITS file: the default (`D`) will save 64-bit floating-point values. See the CFITSIO documentation for other values. The keyword `unit` specifies the measure unit used for the pixels in the map. The keyword `extname` specifies the name of the HDU where the map pixels will be written. """ function saveToFITS(map::OrderedMap{T, O}, fileName::AbstractString; typechar="D", unit="", extname="MAP") where {T <: Number, O <: Order} f = FITSIO.fits_create_file(fileName) try FITSIO.fits_create_binary_tbl(f, 0, [("PIXELS", "1$typechar", unit)], extname) saveToFITS(map, f, 1) finally FITSIO.fits_close_file(f) end end ################################################################################
[ 37811, 198, 220, 220, 220, 1100, 13912, 4863, 37, 29722, 90, 51, 1279, 25, 7913, 92, 7, 69, 3712, 37, 29722, 9399, 13, 37, 29722, 25664, 11, 5721, 11, 256, 3712, 6030, 90, 51, 30072, 198, 220, 220, 220, 1100, 13912, 4863, 37, 29722, 90, 51, 1279, 25, 7913, 92, 7, 7753, 5376, 3712, 10100, 11, 5721, 11, 256, 3712, 6030, 90, 51, 30072, 198, 198, 5569, 257, 24923, 79, 844, 3975, 422, 262, 7368, 357, 16, 12, 8692, 41497, 8, 5721, 287, 257, 198, 37, 29722, 2393, 13, 383, 3815, 481, 307, 1100, 355, 3146, 286, 2099, 309, 13, 1002, 262, 2438, 198, 69, 1768, 11, 376, 29722, 9399, 481, 5298, 281, 6631, 13, 357, 46238, 284, 262, 376, 29722, 9399, 5888, 198, 1640, 517, 1321, 2014, 198, 37811, 198, 198, 8818, 1100, 13912, 4863, 37, 29722, 7, 69, 3712, 37, 29722, 9399, 13, 37, 29722, 8979, 11, 5721, 11, 256, 3712, 6030, 90, 51, 30072, 810, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1391, 51, 1279, 25, 7913, 92, 198, 220, 220, 220, 1988, 11, 2912, 796, 376, 29722, 9399, 13, 21013, 62, 961, 62, 2539, 4775, 7, 69, 11, 366, 8035, 14114, 4943, 198, 220, 220, 220, 299, 1589, 796, 21136, 7, 5317, 11, 1988, 8, 628, 220, 220, 220, 1988, 11, 2912, 796, 376, 29722, 9399, 13, 21013, 62, 961, 62, 2539, 4775, 7, 69, 11, 366, 12532, 1137, 2751, 4943, 198, 220, 220, 220, 5858, 18743, 278, 796, 334, 39921, 589, 7, 36311, 7, 8367, 58, 17, 25, 437, 12, 16, 60, 4008, 6624, 366, 49, 2751, 1, 628, 220, 220, 220, 9585, 796, 357, 37, 29722, 9399, 13, 21013, 62, 1136, 62, 4033, 4906, 7, 69, 11, 5721, 4008, 58, 17, 60, 198, 220, 220, 220, 299, 8516, 796, 376, 29722, 9399, 13, 21013, 62, 1136, 62, 22510, 62, 8516, 7, 69, 8, 628, 220, 220, 220, 611, 9585, 1635, 299, 8516, 14512, 299, 1589, 17, 37659, 844, 7, 77, 1589, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4049, 7203, 39213, 506, 1271, 286, 17848, 287, 5721, 720, 28665, 286, 376, 29722, 2393, 357, 8035, 14114, 43641, 77, 1589, 8, 4943, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 5858, 18743, 278, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 9347, 90, 51, 11, 12569, 92, 7, 19182, 90, 51, 92, 7, 917, 891, 11, 299, 1589, 17, 37659, 844, 7, 77, 1589, 22305, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 9347, 90, 51, 11, 21420, 92, 7, 19182, 90, 51, 92, 7, 917, 891, 11, 299, 1589, 17, 37659, 844, 7, 77, 1589, 22305, 198, 220, 220, 220, 886, 198, 220, 220, 220, 376, 29722, 9399, 13, 21013, 62, 961, 62, 4033, 7, 69, 11, 5721, 11, 352, 11, 352, 11, 1255, 13, 79, 14810, 8, 628, 220, 220, 220, 1255, 198, 437, 198, 198, 8818, 1100, 13912, 4863, 37, 29722, 7, 7753, 5376, 3712, 23839, 10100, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5721, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 3712, 6030, 90, 51, 30072, 810, 1391, 51, 1279, 25, 7913, 92, 198, 220, 220, 220, 277, 796, 376, 29722, 9399, 13, 21013, 62, 9654, 62, 11487, 7, 7753, 5376, 8, 198, 220, 220, 220, 1255, 796, 1100, 13912, 4863, 37, 29722, 7, 69, 11, 5721, 11, 256, 8, 198, 220, 220, 220, 376, 29722, 9399, 13, 21013, 62, 19836, 62, 7753, 7, 69, 8, 628, 220, 220, 220, 1255, 198, 437, 198, 198, 29113, 29113, 14468, 198, 198, 37811, 198, 220, 220, 220, 3613, 47, 14810, 2514, 37, 29722, 7, 8899, 3712, 13912, 90, 51, 5512, 277, 3712, 37, 29722, 9399, 13, 37, 29722, 8979, 11, 5721, 8, 810, 1391, 51, 1279, 25, 7913, 92, 198, 198, 16928, 262, 17848, 286, 4600, 8899, 63, 656, 262, 5721, 351, 6376, 14, 3672, 4600, 28665, 63, 287, 262, 376, 29722, 198, 7753, 11, 543, 1276, 423, 587, 1541, 4721, 13, 198, 37811, 198, 8818, 3613, 47, 14810, 2514, 37, 29722, 7, 8899, 3712, 23839, 13912, 90, 51, 11, 440, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 3712, 37, 29722, 9399, 13, 37, 29722, 8979, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5721, 8, 810, 1391, 51, 1279, 25, 7913, 11, 440, 92, 628, 220, 220, 220, 376, 29722, 9399, 13, 21013, 62, 19119, 62, 2539, 7, 69, 11, 366, 47, 10426, 25216, 1600, 366, 13909, 1847, 47, 10426, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 13909, 1847, 47, 10426, 17465, 5612, 4943, 198, 220, 220, 220, 376, 29722, 9399, 13, 21013, 62, 19119, 62, 2539, 7, 69, 11, 366, 8035, 14114, 1600, 3975, 13, 29268, 13, 77, 1589, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 11395, 286, 10896, 14114, 4943, 198, 220, 220, 220, 376, 29722, 9399, 13, 21013, 62, 19119, 62, 2539, 7, 69, 11, 366, 39776, 2257, 47, 10426, 1600, 352, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 5962, 17465, 357, 16, 1912, 8, 4943, 198, 220, 220, 220, 376, 29722, 9399, 13, 21013, 62, 19119, 62, 2539, 7, 69, 11, 366, 43, 1921, 7250, 10426, 1600, 3975, 13, 29268, 13, 22510, 5189, 47, 14810, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 5956, 17465, 357, 16, 1912, 8, 4943, 198, 220, 220, 220, 376, 29722, 9399, 13, 21013, 62, 19119, 62, 2539, 7, 69, 11, 366, 12115, 55, 50, 3398, 44, 1600, 366, 3955, 31484, 2043, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 15732, 278, 25, 8959, 31484, 2043, 393, 7788, 31484, 2043, 4943, 198, 220, 220, 220, 376, 29722, 9399, 13, 21013, 62, 13564, 62, 4033, 7, 69, 11, 5721, 11, 352, 11, 352, 11, 3975, 13, 79, 14810, 8, 198, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 3613, 2514, 37, 29722, 90, 51, 1279, 25, 7913, 11, 440, 1279, 25, 8284, 92, 7, 8899, 3712, 13912, 90, 51, 11, 440, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 3712, 37, 29722, 9399, 13, 37, 29722, 8979, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5721, 8, 198, 220, 220, 220, 3613, 2514, 37, 29722, 90, 51, 1279, 25, 7913, 11, 440, 1279, 25, 8284, 92, 7, 8899, 3712, 13912, 90, 51, 11, 440, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 5376, 3712, 10100, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 10641, 2625, 35, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4326, 2625, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1070, 3672, 2625, 33767, 4943, 198, 198, 16928, 257, 24923, 79, 844, 3975, 287, 262, 7368, 357, 16, 12, 3106, 6376, 8, 5721, 287, 257, 376, 29722, 198, 7753, 13, 1002, 262, 2438, 10143, 11, 376, 29722, 9399, 481, 5298, 281, 6631, 13, 357, 46238, 284, 262, 198, 37, 29722, 9399, 5888, 329, 517, 1321, 2014, 198, 37811, 198, 8818, 3613, 2514, 37, 29722, 7, 8899, 3712, 35422, 1068, 13912, 90, 51, 11, 12569, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 3712, 37, 29722, 9399, 13, 37, 29722, 8979, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5721, 8, 810, 1391, 51, 1279, 25, 7913, 92, 628, 220, 220, 220, 376, 29722, 9399, 13, 21013, 62, 19119, 62, 2539, 7, 69, 11, 366, 12532, 1137, 2751, 1600, 366, 49, 2751, 4943, 198, 220, 220, 220, 3613, 47, 14810, 2514, 37, 29722, 7, 8899, 11, 277, 11, 5721, 8, 198, 198, 437, 198, 198, 8818, 3613, 2514, 37, 29722, 7, 8899, 3712, 35422, 1068, 13912, 90, 51, 11, 21420, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 3712, 37, 29722, 9399, 13, 37, 29722, 8979, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5721, 8, 810, 1391, 51, 1279, 25, 7913, 92, 628, 220, 220, 220, 376, 29722, 9399, 13, 21013, 62, 19119, 62, 2539, 7, 69, 11, 366, 12532, 1137, 2751, 1600, 366, 45, 6465, 4943, 198, 220, 220, 220, 3613, 47, 14810, 2514, 37, 29722, 7, 8899, 11, 277, 11, 5721, 8, 198, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 3613, 2514, 37, 29722, 7, 8899, 3712, 13912, 90, 51, 11, 440, 5512, 29472, 3712, 23839, 10100, 11, 2099, 10641, 2625, 35, 1600, 4326, 2625, 1600, 1070, 3672, 2625, 33767, 4943, 810, 1391, 51, 1279, 25, 7913, 11, 440, 1279, 25, 8284, 92, 198, 198, 16928, 257, 3975, 656, 257, 376, 29722, 2393, 13, 383, 1438, 286, 262, 2393, 318, 7368, 287, 198, 63, 34345, 63, 26, 611, 340, 6140, 351, 4600, 0, 47671, 4683, 3696, 481, 307, 6993, 9108, 198, 19419, 6509, 13, 383, 11507, 4600, 4906, 10641, 63, 26052, 262, 1366, 2099, 284, 198, 1350, 973, 287, 262, 376, 29722, 2393, 25, 262, 4277, 357, 63, 35, 63, 8, 481, 3613, 5598, 12, 2545, 198, 48679, 803, 12, 4122, 3815, 13, 4091, 262, 18551, 29722, 9399, 10314, 329, 584, 198, 27160, 13, 383, 21179, 4600, 20850, 63, 26052, 262, 3953, 4326, 973, 329, 262, 198, 79, 14810, 287, 262, 3975, 13, 383, 21179, 4600, 2302, 3672, 63, 26052, 262, 1438, 286, 262, 5572, 52, 198, 3003, 262, 3975, 17848, 481, 307, 3194, 13, 198, 198, 37811, 198, 8818, 3613, 2514, 37, 29722, 7, 8899, 3712, 35422, 1068, 13912, 90, 51, 11, 440, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 5376, 3712, 23839, 10100, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2099, 10641, 2625, 35, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4326, 2625, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1070, 3672, 2625, 33767, 4943, 810, 1391, 51, 1279, 25, 7913, 11, 440, 1279, 25, 8284, 92, 628, 220, 220, 220, 277, 796, 376, 29722, 9399, 13, 21013, 62, 17953, 62, 7753, 7, 7753, 5376, 8, 198, 220, 220, 220, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 376, 29722, 9399, 13, 21013, 62, 17953, 62, 39491, 62, 83, 2436, 7, 69, 11, 657, 11, 685, 7203, 47, 10426, 37142, 1600, 366, 16, 3, 4906, 10641, 1600, 4326, 8, 4357, 1070, 3672, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3613, 2514, 37, 29722, 7, 8899, 11, 277, 11, 352, 8, 198, 220, 220, 220, 3443, 198, 220, 220, 220, 220, 220, 220, 220, 376, 29722, 9399, 13, 21013, 62, 19836, 62, 7753, 7, 69, 8, 198, 220, 220, 220, 886, 198, 198, 437, 198, 198, 29113, 29113, 14468, 198 ]
2.141118
2,218
""" Bridges `CP.Reification{MOI.EqualTo}` to indicator constraints, both with equality and inequalities (CP.DifferentFrom). """ struct ReificationEqualTo2IndicatorBridge{T <: Real} <: MOIBC.AbstractBridge indic_true::MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, MOI.Indicator{MOI.ACTIVATE_ON_ONE, MOI.EqualTo{T}}} indic_false::MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, MOI.Indicator{MOI.ACTIVATE_ON_ZERO, CP.DifferentFrom{T}}} end function MOIBC.bridge_constraint( ::Type{ReificationEqualTo2IndicatorBridge{T}}, model, f::MOI.VectorOfVariables, s::CP.Reification{MOI.EqualTo{T}}, ) where {T} return MOIBC.bridge_constraint( ReificationEqualTo2IndicatorBridge{T}, model, MOI.VectorAffineFunction{T}(f), s, ) end function MOIBC.bridge_constraint( ::Type{ReificationEqualTo2IndicatorBridge{T}}, model, f::MOI.VectorAffineFunction{T}, s::CP.Reification{MOI.EqualTo{T}}, ) where {T <: Real} indic_true = MOI.add_constraint( model, f, MOI.Indicator{MOI.ACTIVATE_ON_ONE}(MOI.EqualTo(s.set.value)) ) indic_false = MOI.add_constraint( model, f, MOI.Indicator{MOI.ACTIVATE_ON_ZERO}(CP.DifferentFrom(s.set.value)) # TODO: helper to build CP.\neq from MOI.EqTo, CP.Strictly from inequalities, like `!()`? ) return ReificationEqualTo2IndicatorBridge{T}(indic_true, indic_false) end function MOI.supports_constraint( ::Type{ReificationEqualTo2IndicatorBridge{T}}, ::Union{Type{MOI.VectorOfVariables}, Type{MOI.VectorAffineFunction{T}}}, ::Type{CP.Reification{MOI.EqualTo{T}}}, ) where {T <: Real} return true end function MOIB.added_constrained_variable_types(::Type{ReificationEqualTo2IndicatorBridge{T}}) where {T <: Real} return Tuple{Type}[] end function MOIB.added_constraint_types(::Type{ReificationEqualTo2IndicatorBridge{T}}) where {T <: Real} return [ (MOI.VectorAffineFunction{T}, MOI.Indicator{MOI.ACTIVATE_ON_ONE, MOI.EqualTo{T}}), (MOI.VectorAffineFunction{T}, MOI.Indicator{MOI.ACTIVATE_ON_ZERO, CP.DifferentFrom{T}}), ] end function MOI.get( ::ReificationEqualTo2IndicatorBridge{T}, ::MOI.NumberOfConstraints{ MOI.VectorAffineFunction{T}, MOI.Indicator{MOI.ACTIVATE_ON_ONE, MOI.EqualTo{T}}, }, ) where {T <: Real} return 1 end function MOI.get( ::ReificationEqualTo2IndicatorBridge{T}, ::MOI.NumberOfConstraints{ MOI.VectorAffineFunction{T}, MOI.Indicator{MOI.ACTIVATE_ON_ZERO, CP.DifferentFrom{T}}, }, ) where {T <: Real} return 1 end function MOI.get( b::ReificationEqualTo2IndicatorBridge{T}, ::MOI.ListOfConstraintIndices{ MOI.VectorAffineFunction{T}, MOI.Indicator{MOI.ACTIVATE_ON_ONE, MOI.EqualTo{T}}, }, ) where {T <: Real} return [b.indic_true] end function MOI.get( b::ReificationEqualTo2IndicatorBridge{T}, ::MOI.ListOfConstraintIndices{ MOI.VectorAffineFunction{T}, MOI.Indicator{MOI.ACTIVATE_ON_ZERO, CP.DifferentFrom{T}}, }, ) where {T <: Real} return [b.indic_false] end
[ 37811, 198, 33, 32124, 4600, 8697, 13, 3041, 2649, 90, 11770, 40, 13, 36, 13255, 2514, 92, 63, 284, 16916, 17778, 11, 1111, 351, 10537, 198, 392, 45460, 357, 8697, 13, 40341, 4863, 737, 198, 37811, 198, 7249, 797, 2649, 36, 13255, 2514, 17, 5497, 26407, 37385, 90, 51, 1279, 25, 6416, 92, 1279, 25, 13070, 40, 2749, 13, 23839, 37385, 198, 220, 220, 220, 2699, 62, 7942, 3712, 11770, 40, 13, 3103, 2536, 2913, 15732, 90, 11770, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 13070, 40, 13, 5497, 26407, 90, 11770, 40, 13, 10659, 3824, 6158, 62, 1340, 62, 11651, 11, 13070, 40, 13, 36, 13255, 2514, 90, 51, 42535, 198, 220, 220, 220, 2699, 62, 9562, 3712, 11770, 40, 13, 3103, 2536, 2913, 15732, 90, 11770, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 13070, 40, 13, 5497, 26407, 90, 11770, 40, 13, 10659, 3824, 6158, 62, 1340, 62, 57, 34812, 11, 16932, 13, 40341, 4863, 90, 51, 42535, 198, 437, 198, 198, 8818, 13070, 40, 2749, 13, 9458, 62, 1102, 2536, 2913, 7, 198, 220, 220, 220, 7904, 6030, 90, 3041, 2649, 36, 13255, 2514, 17, 5497, 26407, 37385, 90, 51, 92, 5512, 198, 220, 220, 220, 2746, 11, 198, 220, 220, 220, 277, 3712, 11770, 40, 13, 38469, 5189, 23907, 2977, 11, 198, 220, 220, 220, 264, 3712, 8697, 13, 3041, 2649, 90, 11770, 40, 13, 36, 13255, 2514, 90, 51, 92, 5512, 198, 8, 810, 1391, 51, 92, 198, 220, 220, 220, 1441, 13070, 40, 2749, 13, 9458, 62, 1102, 2536, 2913, 7, 198, 220, 220, 220, 220, 220, 220, 220, 797, 2649, 36, 13255, 2514, 17, 5497, 26407, 37385, 90, 51, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 11, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 38469, 35191, 500, 22203, 90, 51, 92, 7, 69, 828, 198, 220, 220, 220, 220, 220, 220, 220, 264, 11, 198, 220, 220, 220, 1267, 198, 437, 198, 198, 8818, 13070, 40, 2749, 13, 9458, 62, 1102, 2536, 2913, 7, 198, 220, 220, 220, 7904, 6030, 90, 3041, 2649, 36, 13255, 2514, 17, 5497, 26407, 37385, 90, 51, 92, 5512, 198, 220, 220, 220, 2746, 11, 198, 220, 220, 220, 277, 3712, 11770, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 198, 220, 220, 220, 264, 3712, 8697, 13, 3041, 2649, 90, 11770, 40, 13, 36, 13255, 2514, 90, 51, 92, 5512, 198, 8, 810, 1391, 51, 1279, 25, 6416, 92, 198, 220, 220, 220, 2699, 62, 7942, 796, 13070, 40, 13, 2860, 62, 1102, 2536, 2913, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 277, 11, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 5497, 26407, 90, 11770, 40, 13, 10659, 3824, 6158, 62, 1340, 62, 11651, 92, 7, 11770, 40, 13, 36, 13255, 2514, 7, 82, 13, 2617, 13, 8367, 4008, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 2699, 62, 9562, 796, 13070, 40, 13, 2860, 62, 1102, 2536, 2913, 7, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 277, 11, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 5497, 26407, 90, 11770, 40, 13, 10659, 3824, 6158, 62, 1340, 62, 57, 34812, 92, 7, 8697, 13, 40341, 4863, 7, 82, 13, 2617, 13, 8367, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 16926, 46, 25, 31904, 284, 1382, 16932, 13, 59, 710, 80, 422, 13070, 40, 13, 36, 80, 2514, 11, 16932, 13, 1273, 2012, 306, 422, 45460, 11, 588, 4600, 0, 3419, 63, 30, 220, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 1441, 797, 2649, 36, 13255, 2514, 17, 5497, 26407, 37385, 90, 51, 92, 7, 521, 291, 62, 7942, 11, 2699, 62, 9562, 8, 198, 437, 198, 198, 8818, 13070, 40, 13, 18608, 2096, 62, 1102, 2536, 2913, 7, 198, 220, 220, 220, 7904, 6030, 90, 3041, 2649, 36, 13255, 2514, 17, 5497, 26407, 37385, 90, 51, 92, 5512, 198, 220, 220, 220, 7904, 38176, 90, 6030, 90, 11770, 40, 13, 38469, 5189, 23907, 2977, 5512, 5994, 90, 11770, 40, 13, 38469, 35191, 500, 22203, 90, 51, 11709, 5512, 198, 220, 220, 220, 7904, 6030, 90, 8697, 13, 3041, 2649, 90, 11770, 40, 13, 36, 13255, 2514, 90, 51, 11709, 5512, 198, 8, 810, 1391, 51, 1279, 25, 6416, 92, 198, 220, 220, 220, 1441, 2081, 198, 437, 198, 198, 8818, 13070, 9865, 13, 29373, 62, 1102, 2536, 1328, 62, 45286, 62, 19199, 7, 3712, 6030, 90, 3041, 2649, 36, 13255, 2514, 17, 5497, 26407, 37385, 90, 51, 11709, 8, 810, 1391, 51, 1279, 25, 6416, 92, 198, 220, 220, 220, 1441, 309, 29291, 90, 6030, 92, 21737, 198, 437, 198, 198, 8818, 13070, 9865, 13, 29373, 62, 1102, 2536, 2913, 62, 19199, 7, 3712, 6030, 90, 3041, 2649, 36, 13255, 2514, 17, 5497, 26407, 37385, 90, 51, 11709, 8, 810, 1391, 51, 1279, 25, 6416, 92, 198, 220, 220, 220, 1441, 685, 198, 220, 220, 220, 220, 220, 220, 220, 357, 11770, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 13070, 40, 13, 5497, 26407, 90, 11770, 40, 13, 10659, 3824, 6158, 62, 1340, 62, 11651, 11, 13070, 40, 13, 36, 13255, 2514, 90, 51, 11709, 828, 198, 220, 220, 220, 220, 220, 220, 220, 357, 11770, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 13070, 40, 13, 5497, 26407, 90, 11770, 40, 13, 10659, 3824, 6158, 62, 1340, 62, 57, 34812, 11, 16932, 13, 40341, 4863, 90, 51, 11709, 828, 198, 220, 220, 220, 2361, 198, 437, 198, 198, 8818, 13070, 40, 13, 1136, 7, 198, 220, 220, 220, 7904, 3041, 2649, 36, 13255, 2514, 17, 5497, 26407, 37385, 90, 51, 5512, 198, 220, 220, 220, 7904, 11770, 40, 13, 15057, 5189, 3103, 2536, 6003, 90, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 13070, 40, 13, 5497, 26407, 90, 11770, 40, 13, 10659, 3824, 6158, 62, 1340, 62, 11651, 11, 13070, 40, 13, 36, 13255, 2514, 90, 51, 92, 5512, 198, 220, 220, 220, 8964, 198, 8, 810, 1391, 51, 1279, 25, 6416, 92, 198, 220, 220, 220, 1441, 352, 198, 437, 198, 198, 8818, 13070, 40, 13, 1136, 7, 198, 220, 220, 220, 7904, 3041, 2649, 36, 13255, 2514, 17, 5497, 26407, 37385, 90, 51, 5512, 198, 220, 220, 220, 7904, 11770, 40, 13, 15057, 5189, 3103, 2536, 6003, 90, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 13070, 40, 13, 5497, 26407, 90, 11770, 40, 13, 10659, 3824, 6158, 62, 1340, 62, 57, 34812, 11, 16932, 13, 40341, 4863, 90, 51, 92, 5512, 198, 220, 220, 220, 8964, 198, 8, 810, 1391, 51, 1279, 25, 6416, 92, 198, 220, 220, 220, 1441, 352, 198, 437, 198, 198, 8818, 13070, 40, 13, 1136, 7, 198, 220, 220, 220, 275, 3712, 3041, 2649, 36, 13255, 2514, 17, 5497, 26407, 37385, 90, 51, 5512, 198, 220, 220, 220, 7904, 11770, 40, 13, 8053, 5189, 3103, 2536, 2913, 5497, 1063, 90, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 13070, 40, 13, 5497, 26407, 90, 11770, 40, 13, 10659, 3824, 6158, 62, 1340, 62, 11651, 11, 13070, 40, 13, 36, 13255, 2514, 90, 51, 92, 5512, 198, 220, 220, 220, 8964, 198, 8, 810, 1391, 51, 1279, 25, 6416, 92, 198, 220, 220, 220, 1441, 685, 65, 13, 521, 291, 62, 7942, 60, 198, 437, 198, 198, 8818, 13070, 40, 13, 1136, 7, 198, 220, 220, 220, 275, 3712, 3041, 2649, 36, 13255, 2514, 17, 5497, 26407, 37385, 90, 51, 5512, 198, 220, 220, 220, 7904, 11770, 40, 13, 8053, 5189, 3103, 2536, 2913, 5497, 1063, 90, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 13070, 40, 13, 5497, 26407, 90, 11770, 40, 13, 10659, 3824, 6158, 62, 1340, 62, 57, 34812, 11, 16932, 13, 40341, 4863, 90, 51, 92, 5512, 198, 220, 220, 220, 8964, 198, 8, 810, 1391, 51, 1279, 25, 6416, 92, 198, 220, 220, 220, 1441, 685, 65, 13, 521, 291, 62, 9562, 60, 198, 437, 198 ]
2.239366
1,387
module SizeInterlacedTest using SimplePNGs using Test include("common.jl") using .TestCommon: load_json pl(name) = SimplePNGs.load(joinpath("PngSuite", name*".png")) @testset "Size test files" begin @testset "1x1 paletted file, interlaced" begin img1 = load_json("s01n3p01") img2 = pl("s01i3p01") @test img1 == img2 end @testset "2x2 paletted file, interlaced" begin img1 = load_json("s02n3p01") img2 = pl("s02i3p01") @test img1 == img2 end @testset "3x3 paletted file, interlaced" begin img1 = load_json("s03n3p01") img2 = pl("s03i3p01") @test img1 == img2 end @testset "4x4 paletted file, interlaced" begin img1 = load_json("s04n3p01") img2 = pl("s04i3p01") @test img1 == img2 end @testset "5x5 paletted file, interlaced" begin img1 = load_json("s05n3p02") img2 = pl("s05i3p02") @test img1 == img2 end @testset "6x6 paletted file, interlaced" begin img1 = load_json("s06n3p02") img2 = pl("s06i3p02") @test img1 == img2 end @testset "7x7 paletted file, interlaced" begin img1 = load_json("s07n3p02") img2 = pl("s07i3p02") @test img1 == img2 end @testset "8x8 paletted file, interlaced" begin img1 = load_json("s08n3p02") img2 = pl("s08i3p02") @test img1 == img2 end @testset "9x9 paletted file, interlaced" begin img1 = load_json("s09n3p02") img2 = pl("s09i3p02") @test img1 == img2 end @testset "32x32 paletted file, interlaced" begin img1 = load_json("s32n3p04") img2 = pl("s32i3p04") @test img1 == img2 end @testset "33x33 paletted file, interlaced" begin img1 = load_json("s33n3p04") img2 = pl("s33i3p04") @test img1 == img2 end @testset "34x34 paletted file, interlaced" begin img1 = load_json("s34n3p04") img2 = pl("s34i3p04") @test img1 == img2 end @testset "35x35 paletted file, interlaced" begin img1 = load_json("s35n3p04") img2 = pl("s35i3p04") @test img1 == img2 end @testset "36x36 paletted file, interlaced" begin img1 = load_json("s36n3p04") img2 = pl("s36i3p04") @test img1 == img2 end @testset "37x37 paletted file, interlaced" begin img1 = load_json("s37n3p04") img2 = pl("s37i3p04") @test img1 == img2 end @testset "38x38 paletted file, interlaced" begin img1 = load_json("s38n3p04") img2 = pl("s38i3p04") @test img1 == img2 end @testset "39x39 paletted file, interlaced" begin img1 = load_json("s39n3p04") img2 = pl("s39i3p04") @test img1 == img2 end @testset "40x40 paletted file, interlaced" begin img1 = load_json("s40n3p04") img2 = pl("s40i3p04") @test img1 == img2 end end end # module
[ 21412, 12849, 9492, 75, 2286, 14402, 198, 3500, 17427, 47, 10503, 82, 198, 3500, 6208, 198, 198, 17256, 7203, 11321, 13, 20362, 4943, 198, 3500, 764, 14402, 17227, 25, 3440, 62, 17752, 198, 198, 489, 7, 3672, 8, 796, 17427, 47, 10503, 82, 13, 2220, 7, 22179, 6978, 7203, 47, 782, 5606, 578, 1600, 1438, 9, 1911, 11134, 48774, 198, 198, 31, 9288, 2617, 366, 10699, 1332, 3696, 1, 2221, 198, 220, 220, 220, 2488, 9288, 2617, 366, 16, 87, 16, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 486, 77, 18, 79, 486, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 486, 72, 18, 79, 486, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 17, 87, 17, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 2999, 77, 18, 79, 486, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 2999, 72, 18, 79, 486, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 18, 87, 18, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 3070, 77, 18, 79, 486, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 3070, 72, 18, 79, 486, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 19, 87, 19, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 3023, 77, 18, 79, 486, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 3023, 72, 18, 79, 486, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 9288, 2617, 366, 20, 87, 20, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 2713, 77, 18, 79, 2999, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 2713, 72, 18, 79, 2999, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 21, 87, 21, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 3312, 77, 18, 79, 2999, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 3312, 72, 18, 79, 2999, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 22, 87, 22, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 2998, 77, 18, 79, 2999, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 2998, 72, 18, 79, 2999, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 23, 87, 23, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 2919, 77, 18, 79, 2999, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 2919, 72, 18, 79, 2999, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 9288, 2617, 366, 24, 87, 24, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 2931, 77, 18, 79, 2999, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 2931, 72, 18, 79, 2999, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 9288, 2617, 366, 2624, 87, 2624, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 2624, 77, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 2624, 72, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 2091, 87, 2091, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 2091, 77, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 2091, 72, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 2682, 87, 2682, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 2682, 77, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 2682, 72, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 2327, 87, 2327, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 2327, 77, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 2327, 72, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 2623, 87, 2623, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 2623, 77, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 2623, 72, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 2718, 87, 2718, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 2718, 77, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 2718, 72, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 2548, 87, 2548, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 2548, 77, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 2548, 72, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2488, 9288, 2617, 366, 2670, 87, 2670, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 2670, 77, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 2670, 72, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2488, 9288, 2617, 366, 1821, 87, 1821, 6340, 316, 1513, 2393, 11, 987, 75, 2286, 1, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 16, 796, 3440, 62, 17752, 7203, 82, 1821, 77, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 33705, 17, 796, 458, 7203, 82, 1821, 72, 18, 79, 3023, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 9288, 33705, 16, 6624, 33705, 17, 198, 220, 220, 220, 886, 198, 437, 198, 198, 437, 1303, 8265, 198 ]
1.900126
1,592
using Dates @testset "util.jl" begin p1 = DDR2import.util.Point(1.0, 2.0) @test p1.lat == 1.0 @test p1.lon == 2.0 @test DDR2import.util.extract_lat("S123456") ≈ -12.58222222 atol = 0.0001 @test DDR2import.util.extract_lat("N123456.0") ≈ 12.58222222 atol = 0.0001 @test DDR2import.util.extract_lat("123456N") ≈ 12.58222222 atol = 0.0001 @test DDR2import.util.extract_lat("S1234") ≈ -12.56666666 atol = 0.0001 @test DDR2import.util.extract_lat("N12") ≈ 12.0 atol = 0.0001 @test DDR2import.util.extract_lat("1234S") ≈ -12.56666666 atol = 0.0001 @test DDR2import.util.extract_lat("12N") ≈ 12.0 atol = 0.0001 @test DDR2import.util.extract_lat("") === NaN @test DDR2import.util.extract_lon("W1123456") ≈ -112.58222222 atol = 0.0001 @test DDR2import.util.extract_lon("E1123456.0") ≈ 112.58222222 atol = 0.0001 @test DDR2import.util.extract_lon("0123456E") ≈ 12.58222222 atol = 0.0001 @test DDR2import.util.extract_lon("W01234") ≈ -12.56666666 atol = 0.0001 @test DDR2import.util.extract_lon("E112") ≈ 112.0 atol = 0.0001 @test DDR2import.util.extract_lon("11234W") ≈ -112.56666666 atol = 0.0001 @test DDR2import.util.extract_lon("012E") ≈ 12.0 atol = 0.0001 @test DDR2import.util.extract_lon("E1") === NaN # @test DDR2import.util.latlon("S123456", "012E").lat ≈ -12.58222222 atol = 0.0001 # @test DDR2import.util.latlon("S123456", "012E").lon ≈ 12.0 atol = 0.0001 # @test DDR2import.util.latlon("S123456", "E1") === NaN # # @test DDR2import.util.latlon("S123456E1123456.0").lat ≈ -12.58222222 atol = 0.0001 # @test DDR2import.util.latlon("S123456E1123456.0").lon ≈ 112.58222222 atol = 0.0001 # @test DDR2import.util.latlon("S123456W1123456.0").lon ≈ -112.58222222 atol = 0.0001 @test DDR2import.util.latlon("S123456", "012E").ϕ ≈ -12.58222222 atol = 0.0001 @test DDR2import.util.latlon("S123456", "012E").λ ≈ 12.0 atol = 0.0001 @test DDR2import.util.latlon("S123456", "E1") === NaN @test DDR2import.util.latlon("123456S1123456.0E").ϕ ≈ -12.58222222 atol = 0.0001 @test DDR2import.util.latlon("123456S1123456.0E").λ ≈ 112.58222222 atol = 0.0001 @test DDR2import.util.latlon("123456S1123456.0W").λ ≈ -112.58222222 atol = 0.0001 yymmdd = DateFormat("YYmmdd") testdate = DDR2import.util.format_date("200110", yymmdd, addyear=Year(2000)) @test Dates.year(testdate) == 2020 @test Dates.month(testdate) == 1 @test Dates.day(testdate) == 10 hhmmss = DateFormat("HHMMSS") testtime = DDR2import.util.format_time("102030", hhmmss) @test Dates.hour(testtime) == 10 @test Dates.minute(testtime) == 20 @test Dates.second(testtime) == 30 hhmm = DateFormat("HHMM") testtime2 = DDR2import.util.format_time("2400", hhmm) @test Dates.hour(testtime2) == 23 @test Dates.minute(testtime2) == 59 @test Dates.second(testtime2) == 59 yyyymmddhhmmss = DateFormat("YYYYmmddHHMMSS") testdatetime = DDR2import.util.format_datetime("20200110102030", yyyymmddhhmmss) @test Dates.year(testdatetime) == 2020 @test Dates.month(testdatetime) == 1 @test Dates.day(testdatetime) == 10 @test Dates.hour(testdatetime) == 10 @test Dates.minute(testdatetime) == 20 @test Dates.second(testdatetime) == 30 end
[ 3500, 44712, 198, 198, 31, 9288, 2617, 366, 22602, 13, 20362, 1, 2221, 198, 220, 220, 220, 279, 16, 796, 30085, 17, 11748, 13, 22602, 13, 12727, 7, 16, 13, 15, 11, 362, 13, 15, 8, 198, 220, 220, 220, 2488, 9288, 279, 16, 13, 15460, 6624, 352, 13, 15, 198, 220, 220, 220, 2488, 9288, 279, 16, 13, 14995, 6624, 362, 13, 15, 628, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 15460, 7203, 50, 10163, 29228, 4943, 15139, 230, 532, 1065, 13, 3365, 1828, 1828, 1828, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 15460, 7203, 45, 10163, 29228, 13, 15, 4943, 15139, 230, 1105, 13, 3365, 1828, 1828, 1828, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 15460, 7203, 10163, 29228, 45, 4943, 15139, 230, 1105, 13, 3365, 1828, 1828, 1828, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 15460, 7203, 50, 1065, 2682, 4943, 15139, 230, 532, 1065, 13, 20, 19060, 27310, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 15460, 7203, 45, 1065, 4943, 15139, 230, 1105, 13, 15, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 15460, 7203, 1065, 2682, 50, 4943, 15139, 230, 532, 1065, 13, 20, 19060, 27310, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 15460, 7203, 1065, 45, 4943, 15139, 230, 1105, 13, 15, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 15460, 7203, 4943, 24844, 11013, 45, 628, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 14995, 7203, 54, 16, 10163, 29228, 4943, 15139, 230, 532, 14686, 13, 3365, 1828, 1828, 1828, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 14995, 7203, 36, 16, 10163, 29228, 13, 15, 4943, 15139, 230, 13539, 13, 3365, 1828, 1828, 1828, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 14995, 7203, 486, 1954, 29228, 36, 4943, 15139, 230, 1105, 13, 3365, 1828, 1828, 1828, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 14995, 7203, 54, 486, 24409, 4943, 15139, 230, 532, 1065, 13, 20, 19060, 27310, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 14995, 7203, 36, 14686, 4943, 15139, 230, 13539, 13, 15, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 14995, 7203, 14686, 2682, 54, 4943, 15139, 230, 532, 14686, 13, 20, 19060, 27310, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 14995, 7203, 30206, 36, 4943, 15139, 230, 1105, 13, 15, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 2302, 974, 62, 14995, 7203, 36, 16, 4943, 24844, 11013, 45, 628, 220, 220, 220, 1303, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 15460, 14995, 7203, 50, 10163, 29228, 1600, 366, 30206, 36, 11074, 15460, 15139, 230, 532, 1065, 13, 3365, 1828, 1828, 1828, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 1303, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 15460, 14995, 7203, 50, 10163, 29228, 1600, 366, 30206, 36, 11074, 14995, 15139, 230, 1105, 13, 15, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 1303, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 15460, 14995, 7203, 50, 10163, 29228, 1600, 366, 36, 16, 4943, 24844, 11013, 45, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 1303, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 15460, 14995, 7203, 50, 10163, 29228, 36, 16, 10163, 29228, 13, 15, 11074, 15460, 15139, 230, 532, 1065, 13, 3365, 1828, 1828, 1828, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 1303, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 15460, 14995, 7203, 50, 10163, 29228, 36, 16, 10163, 29228, 13, 15, 11074, 14995, 15139, 230, 13539, 13, 3365, 1828, 1828, 1828, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 1303, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 15460, 14995, 7203, 50, 10163, 29228, 54, 16, 10163, 29228, 13, 15, 11074, 14995, 15139, 230, 532, 14686, 13, 3365, 1828, 1828, 1828, 379, 349, 796, 657, 13, 18005, 628, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 15460, 14995, 7203, 50, 10163, 29228, 1600, 366, 30206, 36, 11074, 139, 243, 15139, 230, 532, 1065, 13, 3365, 1828, 1828, 1828, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 15460, 14995, 7203, 50, 10163, 29228, 1600, 366, 30206, 36, 11074, 39377, 15139, 230, 1105, 13, 15, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 15460, 14995, 7203, 50, 10163, 29228, 1600, 366, 36, 16, 4943, 24844, 11013, 45, 628, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 15460, 14995, 7203, 10163, 29228, 50, 16, 10163, 29228, 13, 15, 36, 11074, 139, 243, 15139, 230, 532, 1065, 13, 3365, 1828, 1828, 1828, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 15460, 14995, 7203, 10163, 29228, 50, 16, 10163, 29228, 13, 15, 36, 11074, 39377, 15139, 230, 13539, 13, 3365, 1828, 1828, 1828, 379, 349, 796, 657, 13, 18005, 198, 220, 220, 220, 2488, 9288, 30085, 17, 11748, 13, 22602, 13, 15460, 14995, 7203, 10163, 29228, 50, 16, 10163, 29228, 13, 15, 54, 11074, 39377, 15139, 230, 532, 14686, 13, 3365, 1828, 1828, 1828, 379, 349, 796, 657, 13, 18005, 628, 198, 220, 220, 220, 331, 26621, 1860, 796, 7536, 26227, 7203, 26314, 3020, 1860, 4943, 198, 220, 220, 220, 1332, 4475, 796, 30085, 17, 11748, 13, 22602, 13, 18982, 62, 4475, 7203, 2167, 11442, 1600, 331, 26621, 1860, 11, 751, 1941, 28, 17688, 7, 11024, 4008, 198, 220, 220, 220, 2488, 9288, 44712, 13, 1941, 7, 9288, 4475, 8, 6624, 12131, 198, 220, 220, 220, 2488, 9288, 44712, 13, 8424, 7, 9288, 4475, 8, 6624, 352, 198, 220, 220, 220, 2488, 9288, 44712, 13, 820, 7, 9288, 4475, 8, 6624, 838, 628, 220, 220, 220, 289, 71, 3020, 824, 796, 7536, 26227, 7203, 16768, 12038, 5432, 4943, 198, 220, 220, 220, 1332, 2435, 796, 30085, 17, 11748, 13, 22602, 13, 18982, 62, 2435, 7203, 940, 1238, 1270, 1600, 289, 71, 3020, 824, 8, 198, 220, 220, 220, 2488, 9288, 44712, 13, 9769, 7, 9288, 2435, 8, 6624, 838, 198, 220, 220, 220, 2488, 9288, 44712, 13, 11374, 7, 9288, 2435, 8, 6624, 1160, 198, 220, 220, 220, 2488, 9288, 44712, 13, 12227, 7, 9288, 2435, 8, 6624, 1542, 198, 220, 220, 220, 289, 71, 3020, 796, 7536, 26227, 7203, 16768, 12038, 4943, 198, 220, 220, 220, 1332, 2435, 17, 796, 30085, 17, 11748, 13, 22602, 13, 18982, 62, 2435, 7203, 1731, 405, 1600, 289, 71, 3020, 8, 198, 220, 220, 220, 2488, 9288, 44712, 13, 9769, 7, 9288, 2435, 17, 8, 6624, 2242, 198, 220, 220, 220, 2488, 9288, 44712, 13, 11374, 7, 9288, 2435, 17, 8, 6624, 7863, 198, 220, 220, 220, 2488, 9288, 44712, 13, 12227, 7, 9288, 2435, 17, 8, 6624, 7863, 628, 220, 220, 220, 331, 22556, 26621, 1860, 12337, 3020, 824, 796, 7536, 26227, 7203, 26314, 26314, 3020, 1860, 16768, 12038, 5432, 4943, 198, 220, 220, 220, 1332, 19608, 8079, 796, 30085, 17, 11748, 13, 22602, 13, 18982, 62, 19608, 8079, 7203, 1238, 2167, 1157, 20943, 1238, 1270, 1600, 331, 22556, 26621, 1860, 12337, 3020, 824, 8, 198, 220, 220, 220, 2488, 9288, 44712, 13, 1941, 7, 9288, 19608, 8079, 8, 6624, 12131, 198, 220, 220, 220, 2488, 9288, 44712, 13, 8424, 7, 9288, 19608, 8079, 8, 6624, 352, 198, 220, 220, 220, 2488, 9288, 44712, 13, 820, 7, 9288, 19608, 8079, 8, 6624, 838, 198, 220, 220, 220, 2488, 9288, 44712, 13, 9769, 7, 9288, 19608, 8079, 8, 6624, 838, 198, 220, 220, 220, 2488, 9288, 44712, 13, 11374, 7, 9288, 19608, 8079, 8, 6624, 1160, 198, 220, 220, 220, 2488, 9288, 44712, 13, 12227, 7, 9288, 19608, 8079, 8, 6624, 1542, 198, 437, 198 ]
2.238095
1,470
############################################################################################ # INFEASIBLE MODELS # ############################################################################################ struct Infeasible{N,M,D<:AbstractModel} <: AbstractModel model::D _u::SVector{M,Int} # inds to original controls _ui::SVector{N,Int} # inds to infeasible controls end struct InfeasibleLie{N,M,D<:AbstractModel} <: RobotDynamics.LieGroupModel model::D _u::SVector{M,Int} # inds to original controls _ui::SVector{N,Int} # inds to infeasible controls end """ $(TYPEDEF) An infeasible model is an augmented dynamics model that makes the system artifically fully actuated by augmenting the control vector with `n` additional controls. The dynamics are handled explicitly in discrete time: ``x_{k+1} = f(x_k,u_k,dt) + w_k`` where ``w_k`` are the additional `n`-dimensional controls. In practice, these are constrained to be zero by the end of the solve. # Constructors ```julia InfeasibleModel(model::AbstractModel) ``` """ const InfeasibleModel{N,M,D} = Union{Infeasible{N,M,D},InfeasibleLie{N,M,D}} where {N,M,D} function InfeasibleModel(model::AbstractModel) n,m = size(model) _u = SVector{m}(1:m) _ui = SVector{n}((1:n) .+ m) Infeasible(model, _u, _ui) end function InfeasibleModel(model::RobotDynamics.LieGroupModel) n,m = size(model) _u = SVector{m}(1:m) _ui = SVector{n}((1:n) .+ m) InfeasibleLie(model, _u, _ui) end RobotDynamics.LieState(model::InfeasibleLie) = RobotDynamics.LieState(model.model) # Generic Infeasible Methods RobotDynamics.state_dim(model::InfeasibleModel{n}) where n = n RobotDynamics.control_dim(model::InfeasibleModel{n,m}) where {n,m} = n+m RobotDynamics.dynamics(::InfeasibleModel, x, u) = throw(ErrorException("Cannot evaluate continuous dynamics on an infeasible model")) @generated function RobotDynamics.discrete_dynamics(::Type{Q}, model::InfeasibleModel{N,M}, z::AbstractKnotPoint{T,N}) where {T,N,M,Q<:Explicit} _u = SVector{M}((1:M) .+ N) _ui = SVector{N}((1:N) .+ (N+M)) quote x = state(z) dt = z.dt u0 = z.z[$_u] ui = z.z[$_ui] RobotDynamics.discrete_dynamics($Q, model.model, x, u0, z.t, dt) + ui end end @inline RobotDynamics.rotation_type(model::InfeasibleModel) where D = rotation_type(model.model) @generated function RobotDynamics.discrete_jacobian!(::Type{Q}, ∇f, model::InfeasibleModel{N,M}, z::AbstractKnotPoint{T,N}, cache=nothing) where {T,N,M,Q<:Explicit} ∇ui = [(@SMatrix zeros(N,N+M)) Diagonal(@SVector ones(N)) @SVector zeros(N)] _x = SVector{N}(1:N) _u = SVector{M}((1:M) .+ N) _z = SVector{N+M}(1:N+M) _ui = SVector{N}((1:N) .+ (N+M)) zi = [:(z.z[$i]) for i = 1:N+M] NM1 = N+M+1 NM = N+M ∇u0 = @SMatrix zeros(N,N) quote # Build KnotPoint for original model s0 = SVector{$NM1}($(zi...), z.dt) u0 = z.z[$_u] ui = z.z[$_ui] z_ = StaticKnotPoint(z.z[$_z], $_x, $_u, z.dt, z.t) ∇f_ = uview(∇f, 1:N, 1:$NM) discrete_jacobian!($Q, ∇f_, model.model, z_) # ∇f[$_x, N+NM] .= ∇f_[$_x, N+M] # ∇dt ∇f[$_x, $_ui] .= Diagonal(@SVector ones(N)) return # ∇f[$_x,$_ui] # [∇f[$_x, $_z] $∇u0 ∇dt] + $∇ui end end function RD._discrete_jacobian!(::RD.ForwardAD, ::Type{Q}, ∇f, model::InfeasibleModel{N,M}, z::AbstractKnotPoint{T,N}, cache=nothing) where {T,N,M,Q<:Explicit} RD.discrete_jacobian!(Q, ∇f, model, z, cache) end function RobotDynamics.state_diff(model::InfeasibleModel, x::SVector, x0::SVector) RobotDynamics.state_diff(model.model, x, x0) end function RobotDynamics.state_diff_jacobian!(G, model::InfeasibleModel, Z::Traj) RobotDynamics.state_diff_jacobian!(G, model.model, Z) end function RobotDynamics.∇²differential!(∇G, model::InfeasibleModel, x::SVector, dx::SVector) return ∇²differential!(∇G, model.model, x, dx) end RobotDynamics.state_diff_size(model::InfeasibleModel) = RobotDynamics.state_diff_size(model.model) Base.position(model::InfeasibleModel, x::SVector) = position(model.model, x) RobotDynamics.orientation(model::InfeasibleModel, x::SVector) = orientation(model.model, x) "Calculate a dynamically feasible initial trajectory for an infeasible problem, given a desired trajectory" function infeasible_trajectory(model::InfeasibleModel{n,m}, Z0::Traj) where {T,n,m} x,u = zeros(model) ui = @SVector zeros(n) Z = [KnotPoint(state(z), [control(z); ui], z.dt, z.t) for z in Z0] N = length(Z0) for k = 1:N-1 RobotDynamics.propagate_dynamics(RobotDynamics.RK4, model, Z[k+1], Z[k]) x′ = state(Z[k+1]) u_slack = state(Z0[k+1]) - x′ u = [control(Z0[k]); u_slack] RobotDynamics.set_control!(Z[k], u) RobotDynamics.set_state!(Z[k+1], x′ + u_slack) end return Traj(Z) end ############################################################################################ # INFEASIBLE CONSTRAINT # ############################################################################################ """ $(TYPEDEF) Constraints additional ``infeasible'' controls to be zero. Constructors: ```julia InfeasibleConstraint(model::InfeasibleModel) InfeasibleConstraint(n,m) ``` """ struct InfeasibleConstraint{n} <: TO.ControlConstraint ui::SVector{n,Int} m::Int function InfeasibleConstraint(n::Int, m::Int) ui = SVector{n}((1:n) .+ m) new{n}(ui, m) end end InfeasibleConstraint(model::InfeasibleModel{n,m}) where {n,m} = InfeasibleConstraint(n,m) RobotDynamics.control_dim(con::InfeasibleConstraint{n}) where n = n + con.m @inline TO.sense(::InfeasibleConstraint) = TO.Equality() @inline Base.length(::InfeasibleConstraint{n}) where n = n function TO.evaluate(con::InfeasibleConstraint, u::SVector) ui = u[con.ui] # infeasible controls end function TO.jacobian!(∇c, con::InfeasibleConstraint{n}, u::SVector) where n for (i,j) in enumerate(con.ui) ∇c[i,j] = 1 end return true end
[ 198, 29113, 29113, 14468, 7804, 4242, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3268, 15112, 1921, 34563, 19164, 37142, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 29113, 29113, 14468, 7804, 4242, 198, 7249, 4806, 30412, 856, 90, 45, 11, 44, 11, 35, 27, 25, 23839, 17633, 92, 1279, 25, 27741, 17633, 198, 220, 220, 220, 2746, 3712, 35, 198, 220, 220, 220, 4808, 84, 3712, 50, 38469, 90, 44, 11, 5317, 92, 220, 1303, 773, 82, 284, 2656, 6973, 198, 220, 220, 220, 4808, 9019, 3712, 50, 38469, 90, 45, 11, 5317, 92, 1303, 773, 82, 284, 1167, 30412, 856, 6973, 198, 437, 198, 198, 7249, 4806, 30412, 856, 47918, 90, 45, 11, 44, 11, 35, 27, 25, 23839, 17633, 92, 1279, 25, 16071, 35, 4989, 873, 13, 47918, 13247, 17633, 220, 198, 220, 220, 220, 2746, 3712, 35, 198, 220, 220, 220, 4808, 84, 3712, 50, 38469, 90, 44, 11, 5317, 92, 220, 1303, 773, 82, 284, 2656, 6973, 198, 220, 220, 220, 4808, 9019, 3712, 50, 38469, 90, 45, 11, 5317, 92, 1303, 773, 82, 284, 1167, 30412, 856, 6973, 198, 437, 198, 198, 37811, 29568, 9936, 47, 1961, 25425, 8, 198, 2025, 1167, 30412, 856, 2746, 318, 281, 30259, 17262, 2746, 326, 1838, 262, 1080, 29829, 453, 3938, 198, 529, 6605, 416, 35016, 278, 262, 1630, 15879, 351, 4600, 77, 63, 3224, 6973, 13, 383, 17262, 389, 198, 38788, 11777, 287, 28810, 640, 25, 198, 198, 15506, 87, 23330, 74, 10, 16, 92, 796, 277, 7, 87, 62, 74, 11, 84, 62, 74, 11, 28664, 8, 1343, 266, 62, 74, 15506, 198, 198, 3003, 7559, 86, 62, 74, 15506, 389, 262, 3224, 4600, 77, 63, 12, 19577, 6973, 13, 554, 3357, 11, 777, 389, 31070, 198, 1462, 307, 6632, 416, 262, 886, 286, 262, 8494, 13, 198, 198, 2, 28407, 669, 198, 15506, 63, 73, 43640, 198, 818, 5036, 292, 856, 17633, 7, 19849, 3712, 23839, 17633, 8, 198, 15506, 63, 198, 37811, 198, 9979, 4806, 30412, 856, 17633, 90, 45, 11, 44, 11, 35, 92, 796, 4479, 90, 818, 5036, 292, 856, 90, 45, 11, 44, 11, 35, 5512, 818, 5036, 292, 856, 47918, 90, 45, 11, 44, 11, 35, 11709, 810, 1391, 45, 11, 44, 11, 35, 92, 198, 198, 8818, 4806, 30412, 856, 17633, 7, 19849, 3712, 23839, 17633, 8, 198, 220, 220, 220, 299, 11, 76, 796, 2546, 7, 19849, 8, 198, 220, 220, 220, 4808, 84, 220, 796, 20546, 9250, 90, 76, 92, 7, 16, 25, 76, 8, 198, 220, 220, 220, 4808, 9019, 796, 20546, 9250, 90, 77, 92, 19510, 16, 25, 77, 8, 764, 10, 285, 8, 198, 220, 220, 220, 4806, 30412, 856, 7, 19849, 11, 4808, 84, 11, 4808, 9019, 8, 198, 437, 198, 198, 8818, 4806, 30412, 856, 17633, 7, 19849, 3712, 14350, 313, 35, 4989, 873, 13, 47918, 13247, 17633, 8, 198, 220, 220, 220, 299, 11, 76, 796, 2546, 7, 19849, 8, 198, 220, 220, 220, 4808, 84, 220, 796, 20546, 9250, 90, 76, 92, 7, 16, 25, 76, 8, 198, 220, 220, 220, 4808, 9019, 796, 20546, 9250, 90, 77, 92, 19510, 16, 25, 77, 8, 764, 10, 285, 8, 198, 220, 220, 220, 4806, 30412, 856, 47918, 7, 19849, 11, 4808, 84, 11, 4808, 9019, 8, 198, 437, 198, 198, 14350, 313, 35, 4989, 873, 13, 47918, 9012, 7, 19849, 3712, 818, 5036, 292, 856, 47918, 8, 796, 16071, 35, 4989, 873, 13, 47918, 9012, 7, 19849, 13, 19849, 8, 198, 198, 2, 42044, 4806, 30412, 856, 25458, 198, 14350, 313, 35, 4989, 873, 13, 5219, 62, 27740, 7, 19849, 3712, 818, 5036, 292, 856, 17633, 90, 77, 30072, 810, 299, 796, 299, 198, 14350, 313, 35, 4989, 873, 13, 13716, 62, 27740, 7, 19849, 3712, 818, 5036, 292, 856, 17633, 90, 77, 11, 76, 30072, 810, 1391, 77, 11, 76, 92, 796, 299, 10, 76, 198, 198, 14350, 313, 35, 4989, 873, 13, 67, 4989, 873, 7, 3712, 818, 5036, 292, 856, 17633, 11, 2124, 11, 334, 8, 796, 198, 220, 220, 220, 3714, 7, 12331, 16922, 7203, 34, 34574, 13446, 12948, 17262, 319, 281, 1167, 30412, 856, 2746, 48774, 198, 198, 31, 27568, 2163, 16071, 35, 4989, 873, 13, 15410, 8374, 62, 67, 4989, 873, 7, 3712, 6030, 90, 48, 5512, 2746, 3712, 818, 5036, 292, 856, 17633, 90, 45, 11, 44, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 3712, 23839, 42, 1662, 12727, 90, 51, 11, 45, 30072, 810, 1391, 51, 11, 45, 11, 44, 11, 48, 27, 25, 18438, 3628, 92, 198, 220, 220, 220, 4808, 84, 796, 20546, 9250, 90, 44, 92, 19510, 16, 25, 44, 8, 764, 10, 399, 8, 198, 220, 220, 220, 4808, 9019, 796, 20546, 9250, 90, 45, 92, 19510, 16, 25, 45, 8, 764, 10, 357, 45, 10, 44, 4008, 198, 220, 220, 220, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 1181, 7, 89, 8, 198, 220, 220, 220, 220, 220, 220, 220, 288, 83, 796, 1976, 13, 28664, 198, 220, 220, 220, 220, 220, 220, 220, 334, 15, 796, 1976, 13, 89, 58, 3, 62, 84, 60, 198, 220, 220, 220, 220, 220, 220, 220, 334, 72, 796, 1976, 13, 89, 58, 3, 62, 9019, 60, 198, 220, 220, 220, 220, 220, 220, 220, 16071, 35, 4989, 873, 13, 15410, 8374, 62, 67, 4989, 873, 16763, 48, 11, 2746, 13, 19849, 11, 2124, 11, 334, 15, 11, 1976, 13, 83, 11, 288, 83, 8, 1343, 334, 72, 198, 220, 220, 220, 886, 198, 437, 198, 198, 31, 45145, 16071, 35, 4989, 873, 13, 10599, 341, 62, 4906, 7, 19849, 3712, 818, 5036, 292, 856, 17633, 8, 810, 360, 796, 13179, 62, 4906, 7, 19849, 13, 19849, 8, 198, 198, 31, 27568, 2163, 16071, 35, 4989, 873, 13, 15410, 8374, 62, 30482, 672, 666, 0, 7, 3712, 6030, 90, 48, 5512, 18872, 229, 69, 11, 2746, 3712, 818, 5036, 292, 856, 17633, 90, 45, 11, 44, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 3712, 23839, 42, 1662, 12727, 90, 51, 11, 45, 5512, 12940, 28, 22366, 8, 810, 1391, 51, 11, 45, 11, 44, 11, 48, 27, 25, 18438, 3628, 92, 628, 220, 220, 220, 18872, 229, 9019, 796, 47527, 31, 12310, 265, 8609, 1976, 27498, 7, 45, 11, 45, 10, 44, 4008, 6031, 27923, 7, 31, 50, 38469, 3392, 7, 45, 4008, 2488, 50, 38469, 1976, 27498, 7, 45, 15437, 198, 220, 220, 220, 4808, 87, 796, 20546, 9250, 90, 45, 92, 7, 16, 25, 45, 8, 198, 220, 220, 220, 4808, 84, 796, 20546, 9250, 90, 44, 92, 19510, 16, 25, 44, 8, 764, 10, 399, 8, 198, 220, 220, 220, 4808, 89, 796, 20546, 9250, 90, 45, 10, 44, 92, 7, 16, 25, 45, 10, 44, 8, 198, 220, 220, 220, 4808, 9019, 796, 20546, 9250, 90, 45, 92, 19510, 16, 25, 45, 8, 764, 10, 357, 45, 10, 44, 4008, 198, 220, 220, 220, 1976, 72, 796, 685, 37498, 89, 13, 89, 58, 3, 72, 12962, 329, 1312, 796, 352, 25, 45, 10, 44, 60, 198, 220, 220, 220, 28692, 16, 796, 399, 10, 44, 10, 16, 198, 197, 32755, 796, 399, 10, 44, 198, 220, 220, 220, 18872, 229, 84, 15, 796, 2488, 12310, 265, 8609, 1976, 27498, 7, 45, 11, 45, 8, 628, 220, 220, 220, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 10934, 42572, 12727, 329, 2656, 2746, 198, 220, 220, 220, 220, 220, 220, 220, 264, 15, 796, 20546, 9250, 90, 3, 32755, 16, 92, 16763, 7, 17027, 986, 828, 1976, 13, 28664, 8, 628, 220, 220, 220, 220, 220, 220, 220, 334, 15, 796, 1976, 13, 89, 58, 3, 62, 84, 60, 198, 220, 220, 220, 220, 220, 220, 220, 334, 72, 796, 1976, 13, 89, 58, 3, 62, 9019, 60, 198, 197, 197, 89, 62, 796, 36125, 42, 1662, 12727, 7, 89, 13, 89, 58, 3, 62, 89, 4357, 40111, 87, 11, 40111, 84, 11, 1976, 13, 28664, 11, 1976, 13, 83, 8, 198, 197, 197, 24861, 229, 69, 62, 796, 334, 1177, 7, 24861, 229, 69, 11, 352, 25, 45, 11, 352, 25, 3, 32755, 8, 198, 220, 220, 220, 220, 220, 220, 220, 28810, 62, 30482, 672, 666, 0, 16763, 48, 11, 18872, 229, 69, 62, 11, 2746, 13, 19849, 11, 1976, 62, 8, 198, 197, 197, 2, 18872, 229, 69, 58, 3, 62, 87, 11, 399, 10, 32755, 60, 764, 28, 18872, 229, 69, 62, 58, 3, 62, 87, 11, 399, 10, 44, 60, 1303, 18872, 229, 28664, 198, 197, 197, 24861, 229, 69, 58, 3, 62, 87, 11, 40111, 9019, 60, 764, 28, 6031, 27923, 7, 31, 50, 38469, 3392, 7, 45, 4008, 198, 197, 197, 7783, 198, 197, 197, 2, 18872, 229, 69, 58, 3, 62, 87, 11, 3, 62, 9019, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 685, 24861, 229, 69, 58, 3, 62, 87, 11, 40111, 89, 60, 720, 24861, 229, 84, 15, 18872, 229, 28664, 60, 1343, 720, 24861, 229, 9019, 198, 220, 220, 220, 886, 198, 437, 198, 8818, 31475, 13557, 15410, 8374, 62, 30482, 672, 666, 0, 7, 3712, 35257, 13, 39746, 2885, 11, 7904, 6030, 90, 48, 5512, 18872, 229, 69, 11, 2746, 3712, 818, 5036, 292, 856, 17633, 90, 45, 11, 44, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 3712, 23839, 42, 1662, 12727, 90, 51, 11, 45, 5512, 12940, 28, 22366, 8, 810, 1391, 51, 11, 45, 11, 44, 11, 48, 27, 25, 18438, 3628, 92, 198, 220, 220, 220, 31475, 13, 15410, 8374, 62, 30482, 672, 666, 0, 7, 48, 11, 18872, 229, 69, 11, 2746, 11, 1976, 11, 12940, 8, 198, 437, 628, 198, 8818, 16071, 35, 4989, 873, 13, 5219, 62, 26069, 7, 19849, 3712, 818, 5036, 292, 856, 17633, 11, 2124, 3712, 50, 38469, 11, 2124, 15, 3712, 50, 38469, 8, 198, 197, 14350, 313, 35, 4989, 873, 13, 5219, 62, 26069, 7, 19849, 13, 19849, 11, 2124, 11, 2124, 15, 8, 198, 437, 198, 198, 8818, 16071, 35, 4989, 873, 13, 5219, 62, 26069, 62, 30482, 672, 666, 0, 7, 38, 11, 2746, 3712, 818, 5036, 292, 856, 17633, 11, 1168, 3712, 15721, 73, 8, 198, 197, 14350, 313, 35, 4989, 873, 13, 5219, 62, 26069, 62, 30482, 672, 666, 0, 7, 38, 11, 2746, 13, 19849, 11, 1168, 8, 198, 437, 198, 198, 8818, 16071, 35, 4989, 873, 13, 24861, 229, 31185, 39799, 498, 0, 7, 24861, 229, 38, 11, 2746, 3712, 818, 5036, 292, 856, 17633, 11, 2124, 3712, 50, 38469, 11, 44332, 3712, 50, 38469, 8, 198, 197, 7783, 18872, 229, 31185, 39799, 498, 0, 7, 24861, 229, 38, 11, 2746, 13, 19849, 11, 2124, 11, 44332, 8, 198, 437, 198, 198, 14350, 313, 35, 4989, 873, 13, 5219, 62, 26069, 62, 7857, 7, 19849, 3712, 818, 5036, 292, 856, 17633, 8, 796, 16071, 35, 4989, 873, 13, 5219, 62, 26069, 62, 7857, 7, 19849, 13, 19849, 8, 198, 198, 14881, 13, 9150, 7, 19849, 3712, 818, 5036, 292, 856, 17633, 11, 2124, 3712, 50, 38469, 8, 796, 2292, 7, 19849, 13, 19849, 11, 2124, 8, 198, 198, 14350, 313, 35, 4989, 873, 13, 13989, 341, 7, 19849, 3712, 818, 5036, 292, 856, 17633, 11, 2124, 3712, 50, 38469, 8, 796, 12852, 7, 19849, 13, 19849, 11, 2124, 8, 198, 198, 1, 9771, 3129, 378, 257, 32366, 23498, 4238, 22942, 329, 281, 1167, 30412, 856, 1917, 11, 1813, 257, 198, 8906, 1202, 22942, 1, 198, 8818, 1167, 30412, 856, 62, 9535, 752, 652, 7, 19849, 3712, 818, 5036, 292, 856, 17633, 90, 77, 11, 76, 5512, 1168, 15, 3712, 15721, 73, 8, 810, 1391, 51, 11, 77, 11, 76, 92, 198, 220, 220, 220, 2124, 11, 84, 796, 1976, 27498, 7, 19849, 8, 198, 220, 220, 220, 334, 72, 796, 2488, 50, 38469, 1976, 27498, 7, 77, 8, 198, 220, 220, 220, 1168, 796, 685, 42, 1662, 12727, 7, 5219, 7, 89, 828, 685, 13716, 7, 89, 1776, 334, 72, 4357, 1976, 13, 28664, 11, 1976, 13, 83, 8, 329, 1976, 287, 1168, 15, 60, 198, 220, 220, 220, 399, 796, 4129, 7, 57, 15, 8, 198, 220, 220, 220, 329, 479, 796, 352, 25, 45, 12, 16, 198, 220, 220, 220, 220, 220, 220, 220, 16071, 35, 4989, 873, 13, 22930, 37861, 62, 67, 4989, 873, 7, 14350, 313, 35, 4989, 873, 13, 49, 42, 19, 11, 2746, 11, 1168, 58, 74, 10, 16, 4357, 1168, 58, 74, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 17478, 796, 1181, 7, 57, 58, 74, 10, 16, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 334, 62, 6649, 441, 796, 1181, 7, 57, 15, 58, 74, 10, 16, 12962, 532, 2124, 17478, 198, 220, 220, 220, 220, 220, 220, 220, 334, 796, 685, 13716, 7, 57, 15, 58, 74, 36563, 334, 62, 6649, 441, 60, 198, 220, 220, 220, 220, 220, 220, 220, 16071, 35, 4989, 873, 13, 2617, 62, 13716, 0, 7, 57, 58, 74, 4357, 334, 8, 198, 220, 220, 220, 220, 220, 220, 220, 16071, 35, 4989, 873, 13, 2617, 62, 5219, 0, 7, 57, 58, 74, 10, 16, 4357, 2124, 17478, 1343, 334, 62, 6649, 441, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 4759, 73, 7, 57, 8, 198, 437, 628, 198, 29113, 29113, 14468, 7804, 4242, 198, 2, 220, 220, 197, 197, 197, 197, 197, 197, 197, 197, 1268, 15112, 1921, 34563, 7102, 2257, 3861, 12394, 220, 197, 197, 197, 197, 197, 197, 197, 197, 197, 220, 220, 1303, 198, 29113, 29113, 14468, 7804, 4242, 198, 37811, 29568, 9936, 47, 1961, 25425, 8, 1482, 2536, 6003, 3224, 7559, 259, 5036, 292, 856, 7061, 6973, 284, 307, 6632, 13, 198, 42316, 669, 25, 7559, 63, 73, 43640, 198, 818, 5036, 292, 856, 3103, 2536, 2913, 7, 19849, 3712, 818, 5036, 292, 856, 17633, 8, 198, 818, 5036, 292, 856, 3103, 2536, 2913, 7, 77, 11, 76, 8, 198, 15506, 63, 198, 37811, 198, 7249, 4806, 30412, 856, 3103, 2536, 2913, 90, 77, 92, 1279, 25, 5390, 13, 15988, 3103, 2536, 2913, 198, 197, 9019, 3712, 50, 38469, 90, 77, 11, 5317, 92, 198, 197, 76, 3712, 5317, 198, 197, 8818, 4806, 30412, 856, 3103, 2536, 2913, 7, 77, 3712, 5317, 11, 285, 3712, 5317, 8, 198, 197, 197, 9019, 796, 20546, 9250, 90, 77, 92, 19510, 16, 25, 77, 8, 764, 10, 285, 8, 198, 197, 197, 3605, 90, 77, 92, 7, 9019, 11, 285, 8, 198, 197, 437, 198, 437, 198, 198, 818, 5036, 292, 856, 3103, 2536, 2913, 7, 19849, 3712, 818, 5036, 292, 856, 17633, 90, 77, 11, 76, 30072, 810, 1391, 77, 11, 76, 92, 796, 4806, 30412, 856, 3103, 2536, 2913, 7, 77, 11, 76, 8, 198, 14350, 313, 35, 4989, 873, 13, 13716, 62, 27740, 7, 1102, 3712, 818, 5036, 292, 856, 3103, 2536, 2913, 90, 77, 30072, 810, 299, 796, 299, 1343, 369, 13, 76, 198, 31, 45145, 5390, 13, 33819, 7, 3712, 818, 5036, 292, 856, 3103, 2536, 2913, 8, 796, 5390, 13, 36, 13237, 3419, 198, 31, 45145, 7308, 13, 13664, 7, 3712, 818, 5036, 292, 856, 3103, 2536, 2913, 90, 77, 30072, 810, 299, 796, 299, 198, 198, 8818, 5390, 13, 49786, 7, 1102, 3712, 818, 5036, 292, 856, 3103, 2536, 2913, 11, 334, 3712, 50, 38469, 8, 198, 220, 220, 220, 334, 72, 796, 334, 58, 1102, 13, 9019, 60, 1303, 1167, 30412, 856, 6973, 198, 437, 198, 198, 8818, 5390, 13, 30482, 672, 666, 0, 7, 24861, 229, 66, 11, 369, 3712, 818, 5036, 292, 856, 3103, 2536, 2913, 90, 77, 5512, 334, 3712, 50, 38469, 8, 810, 299, 198, 197, 1640, 357, 72, 11, 73, 8, 287, 27056, 378, 7, 1102, 13, 9019, 8, 198, 197, 197, 24861, 229, 66, 58, 72, 11, 73, 60, 796, 352, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2081, 198, 437, 198 ]
2.246313
2,712
module GatekeepHelperFlagSummitGem using ..Ahorn, Maple # Thanks to Communal Helper for most of this implementation @mapdef Entity "GatekeepHelper/FlagSummitGem" FlagSummitGem( x::Integer, y::Integer, index::Integer=0, sprite::String="", flag::String="", particleColor::String="", ) const placements = Ahorn.PlacementDict( "Flag Summit Gem (Gatekeep Helper)" => Ahorn.EntityPlacement( FlagSummitGem, ), ) const sprites = ["collectables/summitgems/$i/gem00" for i in 0:7] function getSprite(index) if index > length(sprites) return sprites[end] end return sprites[index] end # positive numbers only function getClampedIndex(entity::FlagSummitGem) index = Int(get(entity.data, "index", 0)) if index < 0 index = 0 end entity.data["index"] = index return index end function Ahorn.selection(entity::FlagSummitGem) x, y = Ahorn.position(entity) return Ahorn.getSpriteRectangle(getSprite(getClampedIndex(entity) + 1), x, y) end Ahorn.render(ctx::Ahorn.Cairo.CairoContext, entity::FlagSummitGem) = Ahorn.drawSprite(ctx, getSprite(getClampedIndex(entity) + 1), 0, 0) end
[ 21412, 12816, 14894, 47429, 34227, 13065, 2781, 38, 368, 198, 198, 3500, 11485, 10910, 1211, 11, 21249, 198, 198, 2, 6930, 284, 4440, 282, 5053, 525, 329, 749, 286, 428, 7822, 198, 198, 31, 8899, 4299, 20885, 366, 22628, 14894, 47429, 14, 34227, 13065, 2781, 38, 368, 1, 19762, 13065, 2781, 38, 368, 7, 198, 220, 220, 220, 2124, 3712, 46541, 11, 198, 220, 220, 220, 331, 3712, 46541, 11, 198, 220, 220, 220, 6376, 3712, 46541, 28, 15, 11, 198, 220, 220, 220, 33810, 3712, 10100, 2625, 1600, 198, 220, 220, 220, 6056, 3712, 10100, 2625, 1600, 198, 220, 220, 220, 18758, 10258, 3712, 10100, 2625, 1600, 198, 8, 198, 198, 9979, 21957, 3196, 796, 7900, 1211, 13, 3646, 5592, 35, 713, 7, 198, 220, 220, 220, 366, 34227, 20014, 15669, 357, 22628, 14894, 5053, 525, 16725, 5218, 7900, 1211, 13, 32398, 3646, 5592, 7, 198, 220, 220, 220, 220, 220, 220, 220, 19762, 13065, 2781, 38, 368, 11, 198, 220, 220, 220, 10612, 198, 8, 198, 198, 9979, 42866, 796, 14631, 33327, 2977, 14, 16345, 2781, 70, 5232, 32624, 72, 14, 24090, 405, 1, 329, 1312, 287, 657, 25, 22, 60, 198, 198, 8818, 651, 38454, 578, 7, 9630, 8, 198, 220, 220, 220, 611, 6376, 1875, 4129, 7, 2777, 23156, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 42866, 58, 437, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 42866, 58, 9630, 60, 198, 437, 198, 198, 2, 3967, 3146, 691, 198, 8818, 651, 2601, 13322, 15732, 7, 26858, 3712, 34227, 13065, 2781, 38, 368, 8, 198, 220, 220, 220, 6376, 796, 2558, 7, 1136, 7, 26858, 13, 7890, 11, 366, 9630, 1600, 657, 4008, 198, 220, 220, 220, 611, 6376, 1279, 657, 198, 220, 220, 220, 220, 220, 220, 220, 6376, 796, 657, 198, 220, 220, 220, 886, 198, 220, 220, 220, 9312, 13, 7890, 14692, 9630, 8973, 796, 6376, 198, 220, 220, 220, 1441, 6376, 198, 437, 198, 198, 8818, 7900, 1211, 13, 49283, 7, 26858, 3712, 34227, 13065, 2781, 38, 368, 8, 198, 220, 220, 220, 2124, 11, 331, 796, 7900, 1211, 13, 9150, 7, 26858, 8, 628, 220, 220, 220, 1441, 7900, 1211, 13, 1136, 38454, 578, 45474, 9248, 7, 1136, 38454, 578, 7, 1136, 2601, 13322, 15732, 7, 26858, 8, 1343, 352, 828, 2124, 11, 331, 8, 198, 437, 198, 198, 10910, 1211, 13, 13287, 7, 49464, 3712, 10910, 1211, 13, 34, 18131, 13, 34, 18131, 21947, 11, 9312, 3712, 34227, 13065, 2781, 38, 368, 8, 796, 198, 220, 220, 220, 7900, 1211, 13, 19334, 38454, 578, 7, 49464, 11, 651, 38454, 578, 7, 1136, 2601, 13322, 15732, 7, 26858, 8, 1343, 352, 828, 657, 11, 657, 8, 198, 437, 198 ]
2.581498
454
coast(region=[110 140 20 35], proj=(name=:Albers, center=[125 20], parallels=[25 45]), frame=:ag, resolution=:low, area=250, land=:green, shore=:thinnest, fmt=:png, savefig="1") coast(region=[-88 -70 18 24], proj=(name=:eqdc, center=[-79 21], parallels=[19 23]), frame=:ag, res=:intermediate, borders=(type=1,pen=("thick","red")), land=:green, shore=:thinnest, fmt=:png, savefig="2") coast(region=[-130 -70 24 52], proj=(name=:lambertConic, center=[-100 35], parallels=[33 45]), frame=:ag, res=:low, borders=((type=1, pen=("thick","red")), (type=2, pen=("thinner",))), area=500, land=:tan, water=:blue, shore=(:thinnest,:white), fmt=:png, savefig="3") coast(region=(-180,-20,0,90), proj=:poly, xaxis=(annot=30,grid=10), yaxis=(annot=10,grid=10), res=:crude, area=1000, land=:lightgray, shore=:thinnest, figsize=10, fmt=:png, savefig="4") coast(region="0/-40/60/-10+r", proj=(name=:laea, center=[30,-30]), frame=:ag, res=:low, area=500, land=(pattern=10,dpi=300), shore=:thinnest, figsize=10, fmt=:png, savefig="5") gmt("destroy") coast(region=:g, proj=(name=:laea, center=[280,30]), frame=:g, res=:crude, area=1000, land=:navy, figsize=8, fmt=:png, savefig="6") coast(region=(-30,30,60,72), proj=(name=:Stereographic, center=[0,90], paralles=60), frame=:a10g, res=:low, area=250, land=:royalblue, water=:seashell, figscale="1:30000000", fmt=:png, savefig="7") coast(region="-25/59/70/72+r", proj=(name=:stereographic, center=(10,90)), frame=:a20g, res=:low, area=250, land=:darkbrown, shore=:thinnest, water=:lightgray, figsize=11, fmt=:png, savefig="8") coast(region="100/-42/160/-8r", proj=(name=:stereographic, center=(130,-30)), frame=:ag, res=:low, area=500, land=:green, ocean=:lightblue, shore=:thinnest, figsize=10, fmt=:png, savefig="1") coast(region=:g, proj="G4/52/230/90/60/180/60/60", xaxis=(annot=2,grid=2), yaxis=(annot=1,grid=1), rivers=:all, res=:intermediate, land=:lightbrown, ocean=:lightblue, shore=:thinnest, figsize=10, par=(:MAP_ANNOT_MIN_SPACING,0.65), fmt=:png, savefig="9") coast(region=:g, proj=(name=:ortho, center=(-75,41)), frame=:g, res=:crude, area=5000, land=:pink, ocean=:thistle, figsize=10, fmt=:png, savefig="10") coast(region=:g, proj=(name=:azimuthalEquidistant, center=(-100,40)), frame=:g, res=:crude, area=10000, land=:lightgray, shore=:thinnest, figsize=10, fmt=:png, savefig="11") coast(region=:g, proj=(name=:Gnomonic, center=(-120,35), horizon=60), frame=(annot=30, grid=15), res=:crude, area=10000, land=:tan, ocean=:cyan, shore=:thinnest, figsize=10, fmt=:png, savefig="12") coast(region=(0,360,-70,70), proj=:Mercator, xaxis=(annot=60,ticks=15), yaxis=(annot=30,ticks=15), res=:crude, area=:5000, land=:red, scale=0.03, par=(:MAP_FRAME_TYPE,"fancy+"), fmt=:png, savefig="13") coast(region="20/30/50/45r", proj=(name=:tmerc, center=35), frame=:ag, res=:low, area=250, land=:lightbrown, ocean=:seashell, shore=:thinnest, scale=0.45, fmt=:png, savefig="14") coast(region=(0,360,-80,80), proj=(name=:tmerc, center=[330 -45]), frame=(annot=30, grid=:auto, axes=:WSne), res=:crude, area=2000, land=:black, water=:lightblue, figsize=9, fmt=:png, savefig="15") coast(region="270/20/305/25+r", proj=(name=:omercp, center=[280 25.5], parallels=[22 69]), frame=:ag, res=:i, area=250, shore=:thinnest, land=:burlywood, water=:azure, rose="jTR+w1+f2+l+o0.4", figsize=12, par=(FONT_TITLE=8, MAP_TITLE_OFFSET=0.12), fmt=:png, savefig="16") coast(region="7:30/38:30/10:30/41:30r", proj=(name=:Cassini, center=[8.75 40]), frame=:afg, map_scale="jBR+c40+w100+f+o0.4/0.5", land=:springgreen, res=:high, water=:azure, shore=:thinnest, rivers=(:all,:thinner), figsize=6, par=(:FONT_LABEL,12), fmt=:png, savefig="17") coast(region=:g, proj=:equidistCylindrical, frame=(annot=60, ticks=30, grid=30), res=:crude, area=5000, land=:tan4, water=:lightcyan, figsize=12, fmt=:png, savefig="18") coast(region=(-145,215,-90,90), proj=(name=:cylindricalEqualArea, center=(35,30)), frame=(annot=45, grid=45), res=:crude, area=10000, water=:dodgerblue, shore=:thinnest, figsize=12, fmt=:png, savefig="19") coast(region=(-90,270,-80,90), proj=:Miller, xaxis=(annot=45,grid=45), yaxis=(annot=30,grid=30), res=:crude, area=10000, land=:khaki, water=:azure, shore=:thinnest, scale="1:400000000", fmt=:png, savefig="20") coast(region=(-180,180,-60,80), proj=(name=:cylindricalStereographic, center=(0,45)), xaxis=(annot=60,ticks=30, grid=30), yaxis=(annot=30,grid=30), res=:crude, area=5000, shore=:black, land=:seashell4, ocean=:antiquewhite1, figsize=12, fmt=:png, savefig="21") coast(region=:g, proj=:Hammer, frame=:g, res=:crude, area=10000, land=:black, ocean=:cornsilk, figsize=12, fmt=:png, savefig="22") coast(region=:d, proj=:Mollweide, frame=:g, res=:crude, area=10000, land=:tomato1, water=:skyblue, figsize=12, fmt=:png, savefig="23") coast(region=:d, proj=:Winkel, frame=:g, res=:crude, area=10000, land=:burlywood4, water=:wheat1, figsize=12, fmt=:png, savefig="24") coast(region=:d, proj=:Robinson, frame=:g, res=:crude, area=10000, land=:goldenrod, water=:snow2, figsize=12, fmt=:png, savefig="25") coast(region=:d, proj=:EckertIV, frame=:g, res=:crude, area=10000, land=:ivory, water=:bisque3, shore=:thinnest, figsize=12, fmt=:png, savefig="26") coast(region=:d, proj=:EckertVI, frame=:g, res=:crude, area=10000, land=:ivory, water=:bisque3, shore=:thinnest, figsize=12, fmt=:png, savefig="27") coast(region=:d, proj=:Sinusoidal, xaxis=(grid=30,), yaxis=(grid=15,), res=:crude, area=10000, land=:coral4, water=:azure3, figsize=12, fmt=:png, savefig="28") coast(region=(200,340,-90,90), proj=:Sinusoidal, frame=:g, res=:crude, area=10000, land=:darkred, water=:azure, scale=0.03333) coast!(region=(-20,60,-90,90), frame=:g, res=:crude, area=10000, land=:darkgreen, water=:azure, xoff=4.666) coast!(region=(60,200,-90,90), frame=:g, res=:crude, area=10000, land=:darkblue, water=:azure, xoff=2.6664, fmt=:png, savefig="29") coast(region=:g, proj=:VanderGrinten, xaxis=(grid=30,), yaxis=(grid=15,),res=:crude, land=:lightgray, water=:cornsilk, area=10000, shore=:thinnest, figsize=10, fmt=:png, savefig="30")
[ 1073, 459, 7, 36996, 41888, 11442, 12713, 1160, 3439, 4357, 220, 198, 220, 220, 220, 220, 220, 386, 73, 16193, 3672, 28, 25, 2348, 1213, 11, 3641, 41888, 11623, 1160, 4357, 30614, 41888, 1495, 4153, 46570, 198, 220, 220, 220, 220, 220, 5739, 28, 25, 363, 11, 198, 220, 220, 220, 220, 220, 6323, 28, 25, 9319, 11, 198, 220, 220, 220, 220, 220, 1989, 28, 9031, 11, 198, 220, 220, 220, 220, 220, 1956, 28, 25, 14809, 11, 198, 220, 220, 220, 220, 220, 15191, 28, 25, 400, 3732, 395, 11, 198, 220, 220, 220, 220, 220, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 16, 4943, 198, 198, 1073, 459, 7, 36996, 41888, 12, 3459, 532, 2154, 1248, 1987, 4357, 386, 73, 16193, 3672, 28, 25, 27363, 17896, 11, 3641, 41888, 12, 3720, 2310, 4357, 30614, 41888, 1129, 2242, 46570, 198, 220, 220, 220, 220, 220, 5739, 28, 25, 363, 11, 581, 28, 25, 3849, 13857, 11, 11637, 16193, 4906, 28, 16, 11, 3617, 28, 7203, 400, 624, 2430, 445, 4943, 828, 1956, 28, 25, 14809, 11, 198, 220, 220, 220, 220, 220, 15191, 28, 25, 400, 3732, 395, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 17, 4943, 198, 198, 1073, 459, 7, 36996, 41888, 12, 12952, 532, 2154, 1987, 6740, 4357, 386, 73, 16193, 3672, 28, 25, 2543, 4835, 3103, 291, 11, 3641, 41888, 12, 3064, 3439, 4357, 30614, 41888, 2091, 4153, 46570, 198, 220, 220, 220, 220, 220, 5739, 28, 25, 363, 11, 581, 28, 25, 9319, 11, 11637, 16193, 7, 4906, 28, 16, 11, 3112, 28, 7203, 400, 624, 2430, 445, 4943, 828, 357, 4906, 28, 17, 11, 3112, 28, 7203, 400, 5083, 1600, 4008, 828, 198, 220, 220, 220, 220, 220, 1989, 28, 4059, 11, 1956, 28, 25, 38006, 11, 1660, 28, 25, 17585, 11, 15191, 16193, 25, 400, 3732, 395, 11, 25, 11186, 828, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 18, 4943, 198, 198, 1073, 459, 7, 36996, 16193, 12, 15259, 12095, 1238, 11, 15, 11, 3829, 828, 386, 73, 28, 25, 35428, 11, 2124, 22704, 16193, 34574, 28, 1270, 11, 25928, 28, 940, 828, 331, 22704, 16193, 34574, 28, 940, 11, 25928, 28, 940, 828, 198, 220, 220, 220, 220, 220, 581, 28, 25, 6098, 2507, 11, 1989, 28, 12825, 11, 1956, 28, 25, 2971, 44605, 11, 15191, 28, 25, 400, 3732, 395, 11, 2336, 7857, 28, 940, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 19, 4943, 198, 198, 1073, 459, 7, 36996, 2625, 15, 16327, 1821, 14, 1899, 16327, 940, 10, 81, 1600, 386, 73, 16193, 3672, 28, 25, 75, 44705, 11, 3641, 41888, 1270, 12095, 1270, 46570, 5739, 28, 25, 363, 11, 581, 28, 25, 9319, 11, 198, 220, 220, 220, 220, 220, 1989, 28, 4059, 11, 1956, 16193, 33279, 28, 940, 11, 67, 14415, 28, 6200, 828, 15191, 28, 25, 400, 3732, 395, 11, 2336, 7857, 28, 940, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 20, 4943, 198, 70, 16762, 7203, 41659, 4943, 198, 198, 1073, 459, 7, 36996, 28, 25, 70, 11, 386, 73, 16193, 3672, 28, 25, 75, 44705, 11, 3641, 41888, 21033, 11, 1270, 46570, 5739, 28, 25, 70, 11, 581, 28, 25, 6098, 2507, 11, 1989, 28, 12825, 11, 198, 220, 220, 220, 220, 220, 1956, 28, 25, 77, 2830, 11, 2336, 7857, 28, 23, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 21, 4943, 198, 198, 1073, 459, 7, 36996, 16193, 12, 1270, 11, 1270, 11, 1899, 11, 4761, 828, 386, 73, 16193, 3672, 28, 25, 1273, 567, 6826, 11, 3641, 41888, 15, 11, 3829, 4357, 1582, 439, 274, 28, 1899, 828, 198, 220, 220, 220, 220, 220, 5739, 28, 25, 64, 940, 70, 11, 581, 28, 25, 9319, 11, 1989, 28, 9031, 11, 1956, 28, 25, 3287, 282, 17585, 11, 1660, 28, 25, 325, 292, 12758, 11, 198, 220, 220, 220, 220, 220, 2336, 9888, 2625, 16, 25, 18, 24598, 1600, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 22, 4943, 198, 198, 1073, 459, 7, 36996, 2625, 12, 1495, 14, 3270, 14, 2154, 14, 4761, 10, 81, 1600, 386, 73, 16193, 3672, 28, 25, 301, 567, 6826, 11, 3641, 16193, 940, 11, 3829, 36911, 5739, 28, 25, 64, 1238, 70, 11, 581, 28, 25, 9319, 11, 198, 220, 220, 220, 220, 220, 1989, 28, 9031, 11, 1956, 28, 25, 21953, 33282, 11, 15191, 28, 25, 400, 3732, 395, 11, 1660, 28, 25, 2971, 44605, 11, 2336, 7857, 28, 1157, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 23, 4943, 198, 198, 1073, 459, 7, 36996, 2625, 3064, 16327, 3682, 14, 14198, 16327, 23, 81, 1600, 386, 73, 16193, 3672, 28, 25, 301, 567, 6826, 11, 3641, 16193, 12952, 12095, 1270, 36911, 5739, 28, 25, 363, 11, 581, 28, 25, 9319, 11, 198, 220, 220, 220, 220, 220, 1989, 28, 4059, 11, 1956, 28, 25, 14809, 11, 9151, 28, 25, 2971, 17585, 11, 15191, 28, 25, 400, 3732, 395, 11, 2336, 7857, 28, 940, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 16, 4943, 628, 198, 1073, 459, 7, 36996, 28, 25, 70, 11, 386, 73, 2625, 38, 19, 14, 4309, 14, 19214, 14, 3829, 14, 1899, 14, 15259, 14, 1899, 14, 1899, 1600, 2124, 22704, 16193, 34574, 28, 17, 11, 25928, 28, 17, 828, 331, 22704, 16193, 34574, 28, 16, 11, 25928, 28, 16, 828, 198, 220, 220, 220, 220, 220, 18180, 28, 25, 439, 11, 581, 28, 25, 3849, 13857, 11, 1956, 28, 25, 2971, 33282, 11, 9151, 28, 25, 2971, 17585, 11, 15191, 28, 25, 400, 3732, 395, 11, 2336, 7857, 28, 940, 11, 198, 220, 220, 220, 220, 220, 1582, 16193, 25, 33767, 62, 1565, 11929, 62, 23678, 62, 4303, 2246, 2751, 11, 15, 13, 2996, 828, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 24, 4943, 198, 198, 1073, 459, 7, 36996, 28, 25, 70, 11, 386, 73, 16193, 3672, 28, 25, 1506, 78, 11, 3641, 16193, 12, 2425, 11, 3901, 36911, 5739, 28, 25, 70, 11, 581, 28, 25, 6098, 2507, 11, 1989, 28, 27641, 11, 198, 220, 220, 220, 220, 220, 1956, 28, 25, 79, 676, 11, 9151, 28, 25, 400, 12535, 11, 2336, 7857, 28, 940, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 940, 4943, 198, 198, 1073, 459, 7, 36996, 28, 25, 70, 11, 386, 73, 16193, 3672, 28, 25, 1031, 320, 1071, 282, 23588, 312, 10167, 11, 3641, 16193, 12, 3064, 11, 1821, 36911, 5739, 28, 25, 70, 11, 198, 220, 220, 220, 220, 220, 581, 28, 25, 6098, 2507, 11, 1989, 28, 49388, 11, 1956, 28, 25, 2971, 44605, 11, 15191, 28, 25, 400, 3732, 395, 11, 2336, 7857, 28, 940, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1157, 4943, 198, 198, 1073, 459, 7, 36996, 28, 25, 70, 11, 386, 73, 16193, 3672, 28, 25, 38, 26601, 9229, 11, 3641, 16193, 12, 10232, 11, 2327, 828, 17810, 28, 1899, 828, 198, 220, 220, 220, 220, 220, 5739, 16193, 34574, 28, 1270, 11, 10706, 28, 1314, 828, 581, 28, 25, 6098, 2507, 11, 1989, 28, 49388, 11, 1956, 28, 25, 38006, 11, 9151, 28, 25, 948, 272, 11, 198, 220, 220, 220, 220, 220, 15191, 28, 25, 400, 3732, 395, 11, 2336, 7857, 28, 940, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1065, 4943, 198, 198, 1073, 459, 7, 36996, 16193, 15, 11, 15277, 12095, 2154, 11, 2154, 828, 386, 73, 28, 25, 42981, 1352, 11, 2124, 22704, 16193, 34574, 28, 1899, 11, 83, 3378, 28, 1314, 828, 331, 22704, 16193, 34574, 28, 1270, 11, 83, 3378, 28, 1314, 828, 198, 220, 220, 220, 220, 220, 581, 28, 25, 6098, 2507, 11, 1989, 28, 25, 27641, 11, 1956, 28, 25, 445, 11, 5046, 28, 15, 13, 3070, 11, 1582, 16193, 25, 33767, 62, 10913, 10067, 62, 25216, 553, 69, 3883, 10, 12340, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1485, 4943, 198, 198, 1073, 459, 7, 36996, 2625, 1238, 14, 1270, 14, 1120, 14, 2231, 81, 1600, 386, 73, 16193, 3672, 28, 25, 83, 647, 66, 11, 3641, 28, 2327, 828, 5739, 28, 25, 363, 11, 581, 28, 25, 9319, 11, 198, 220, 220, 220, 220, 220, 1989, 28, 9031, 11, 1956, 28, 25, 2971, 33282, 11, 9151, 28, 25, 325, 292, 12758, 11, 15191, 28, 25, 400, 3732, 395, 11, 5046, 28, 15, 13, 2231, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1415, 4943, 198, 198, 1073, 459, 7, 36996, 16193, 15, 11, 15277, 12095, 1795, 11, 1795, 828, 386, 73, 16193, 3672, 28, 25, 83, 647, 66, 11, 3641, 41888, 26073, 532, 2231, 46570, 198, 220, 220, 220, 220, 220, 5739, 16193, 34574, 28, 1270, 11, 10706, 28, 25, 23736, 11, 34197, 28, 25, 19416, 710, 828, 581, 28, 25, 6098, 2507, 11, 1989, 28, 11024, 11, 1956, 28, 25, 13424, 11, 198, 220, 220, 220, 220, 220, 1660, 28, 25, 2971, 17585, 11, 2336, 7857, 28, 24, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1314, 4943, 198, 198, 1073, 459, 7, 36996, 2625, 20233, 14, 1238, 14, 22515, 14, 1495, 10, 81, 1600, 386, 73, 16193, 3672, 28, 25, 296, 2798, 79, 11, 3641, 41888, 21033, 1679, 13, 20, 4357, 30614, 41888, 1828, 8644, 46570, 198, 220, 220, 220, 220, 220, 5739, 28, 25, 363, 11, 581, 28, 25, 72, 11, 1989, 28, 9031, 11, 15191, 28, 25, 400, 3732, 395, 11, 1956, 28, 25, 6236, 306, 3822, 11, 1660, 28, 25, 1031, 495, 11, 198, 220, 220, 220, 220, 220, 8278, 2625, 73, 5446, 10, 86, 16, 10, 69, 17, 10, 75, 10, 78, 15, 13, 19, 1600, 2336, 7857, 28, 1065, 11, 1582, 16193, 37, 35830, 62, 49560, 2538, 28, 23, 11, 34645, 62, 49560, 2538, 62, 27977, 28480, 28, 15, 13, 1065, 828, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1433, 4943, 198, 198, 1073, 459, 7, 36996, 2625, 22, 25, 1270, 14, 2548, 25, 1270, 14, 940, 25, 1270, 14, 3901, 25, 1270, 81, 1600, 386, 73, 16193, 3672, 28, 25, 43529, 5362, 11, 3641, 41888, 23, 13, 2425, 2319, 46570, 198, 220, 220, 220, 220, 220, 5739, 28, 25, 1878, 70, 11, 3975, 62, 9888, 2625, 73, 11473, 10, 66, 1821, 10, 86, 3064, 10, 69, 10, 78, 15, 13, 19, 14, 15, 13, 20, 1600, 1956, 28, 25, 16469, 14809, 11, 198, 220, 220, 220, 220, 220, 581, 28, 25, 8929, 11, 1660, 28, 25, 1031, 495, 11, 15191, 28, 25, 400, 3732, 395, 11, 18180, 16193, 25, 439, 11, 25, 400, 5083, 828, 2336, 7857, 28, 21, 11, 198, 220, 220, 220, 220, 220, 1582, 16193, 25, 37, 35830, 62, 48780, 3698, 11, 1065, 828, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1558, 4943, 198, 198, 1073, 459, 7, 36996, 28, 25, 70, 11, 386, 73, 28, 25, 4853, 312, 396, 34, 2645, 521, 8143, 11, 5739, 16193, 34574, 28, 1899, 11, 36066, 28, 1270, 11, 10706, 28, 1270, 828, 198, 220, 220, 220, 220, 220, 581, 28, 25, 6098, 2507, 11, 1989, 28, 27641, 11, 1956, 28, 25, 38006, 19, 11, 1660, 28, 25, 2971, 948, 272, 11, 2336, 7857, 28, 1065, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1507, 4943, 198, 198, 1073, 459, 7, 36996, 16193, 12, 18781, 11, 23349, 12095, 3829, 11, 3829, 828, 386, 73, 16193, 3672, 28, 25, 38801, 521, 8143, 36, 13255, 30547, 11, 3641, 16193, 2327, 11, 1270, 36911, 198, 220, 220, 220, 220, 220, 5739, 16193, 34574, 28, 2231, 11, 10706, 28, 2231, 828, 581, 28, 25, 6098, 2507, 11, 1989, 28, 49388, 11, 1660, 28, 25, 67, 375, 1362, 17585, 11, 198, 220, 220, 220, 220, 220, 15191, 28, 25, 400, 3732, 395, 11, 2336, 7857, 28, 1065, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1129, 4943, 198, 198, 1073, 459, 7, 36996, 16193, 12, 3829, 11, 20233, 12095, 1795, 11, 3829, 828, 386, 73, 28, 25, 33253, 11, 2124, 22704, 16193, 34574, 28, 2231, 11, 25928, 28, 2231, 828, 198, 220, 220, 220, 220, 220, 331, 22704, 16193, 34574, 28, 1270, 11, 25928, 28, 1270, 828, 581, 28, 25, 6098, 2507, 11, 1989, 28, 49388, 11, 1956, 28, 25, 14636, 8182, 11, 1660, 28, 25, 1031, 495, 11, 198, 220, 220, 220, 220, 220, 15191, 28, 25, 400, 3732, 395, 11, 5046, 2625, 16, 25, 19, 8269, 1600, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1238, 4943, 628, 198, 1073, 459, 7, 36996, 16193, 12, 15259, 11, 15259, 12095, 1899, 11, 1795, 828, 386, 73, 16193, 3672, 28, 25, 38801, 521, 8143, 1273, 567, 6826, 11, 3641, 16193, 15, 11, 2231, 36911, 198, 220, 220, 220, 220, 220, 2124, 22704, 16193, 34574, 28, 1899, 11, 83, 3378, 28, 1270, 11, 10706, 28, 1270, 828, 331, 22704, 16193, 34574, 28, 1270, 11, 25928, 28, 1270, 828, 581, 28, 25, 6098, 2507, 11, 198, 220, 220, 220, 220, 220, 1989, 28, 27641, 11, 15191, 28, 25, 13424, 11, 1956, 28, 25, 325, 292, 12758, 19, 11, 9151, 28, 25, 415, 1557, 413, 71, 578, 16, 11, 2336, 7857, 28, 1065, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 2481, 4943, 198, 198, 1073, 459, 7, 36996, 28, 25, 70, 11, 386, 73, 28, 25, 21281, 647, 11, 5739, 28, 25, 70, 11, 581, 28, 25, 6098, 2507, 11, 1989, 28, 49388, 11, 1956, 28, 25, 13424, 11, 198, 197, 220, 9151, 28, 25, 20772, 18217, 74, 11, 2336, 7857, 28, 1065, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1828, 4943, 198, 198, 1073, 459, 7, 36996, 28, 25, 67, 11, 386, 73, 28, 25, 44, 692, 732, 485, 11, 5739, 28, 25, 70, 11, 581, 28, 25, 6098, 2507, 11, 1989, 28, 49388, 11, 1956, 28, 25, 39532, 5549, 16, 11, 198, 197, 220, 1660, 28, 25, 15688, 17585, 11, 2336, 7857, 28, 1065, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1954, 4943, 198, 198, 1073, 459, 7, 36996, 28, 25, 67, 11, 386, 73, 28, 25, 16643, 7750, 11, 5739, 28, 25, 70, 11, 581, 28, 25, 6098, 2507, 11, 1989, 28, 49388, 11, 1956, 28, 25, 6236, 306, 3822, 19, 11, 198, 197, 220, 1660, 28, 25, 12491, 265, 16, 11, 2336, 7857, 28, 1065, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1731, 4943, 198, 198, 1073, 459, 7, 36996, 28, 25, 67, 11, 386, 73, 28, 25, 14350, 7899, 11, 5739, 28, 25, 70, 11, 581, 28, 25, 6098, 2507, 11, 1989, 28, 49388, 11, 1956, 28, 25, 24267, 268, 14892, 11, 198, 197, 220, 1660, 28, 25, 82, 2197, 17, 11, 2336, 7857, 28, 1065, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1495, 4943, 198, 198, 1073, 459, 7, 36996, 28, 25, 67, 11, 386, 73, 28, 25, 36, 694, 861, 3824, 11, 5739, 28, 25, 70, 11, 581, 28, 25, 6098, 2507, 11, 1989, 28, 49388, 11, 1956, 28, 25, 452, 652, 11, 198, 197, 220, 1660, 28, 25, 41907, 4188, 18, 11, 15191, 28, 25, 400, 3732, 395, 11, 2336, 7857, 28, 1065, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 2075, 4943, 198, 198, 1073, 459, 7, 36996, 28, 25, 67, 11, 386, 73, 28, 25, 36, 694, 861, 12861, 11, 5739, 28, 25, 70, 11, 581, 28, 25, 6098, 2507, 11, 1989, 28, 49388, 11, 1956, 28, 25, 452, 652, 11, 198, 197, 220, 1660, 28, 25, 41907, 4188, 18, 11, 15191, 28, 25, 400, 3732, 395, 11, 2336, 7857, 28, 1065, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1983, 4943, 198, 198, 1073, 459, 7, 36996, 28, 25, 67, 11, 386, 73, 28, 25, 50, 35237, 47502, 11, 2124, 22704, 16193, 25928, 28, 1270, 11, 828, 331, 22704, 16193, 25928, 28, 1314, 11, 828, 581, 28, 25, 6098, 2507, 11, 198, 220, 220, 220, 220, 220, 1989, 28, 49388, 11, 1956, 28, 25, 66, 6864, 19, 11, 1660, 28, 25, 1031, 495, 18, 11, 2336, 7857, 28, 1065, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 2078, 4943, 198, 198, 1073, 459, 7, 36996, 16193, 2167, 11, 23601, 12095, 3829, 11, 3829, 828, 386, 73, 28, 25, 50, 35237, 47502, 11, 5739, 28, 25, 70, 11, 581, 28, 25, 6098, 2507, 11, 1989, 28, 49388, 11, 198, 220, 220, 220, 220, 220, 1956, 28, 25, 21953, 445, 11, 1660, 28, 25, 1031, 495, 11, 5046, 28, 15, 13, 15, 24840, 8, 198, 1073, 459, 0, 7, 36996, 16193, 12, 1238, 11, 1899, 12095, 3829, 11, 3829, 828, 5739, 28, 25, 70, 11, 581, 28, 25, 6098, 2507, 11, 1989, 28, 49388, 11, 1956, 28, 25, 21953, 14809, 11, 198, 220, 220, 220, 220, 220, 220, 1660, 28, 25, 1031, 495, 11, 2124, 2364, 28, 19, 13, 27310, 8, 198, 1073, 459, 0, 7, 36996, 16193, 1899, 11, 2167, 12095, 3829, 11, 3829, 828, 5739, 28, 25, 70, 11, 581, 28, 25, 6098, 2507, 11, 1989, 28, 49388, 11, 1956, 28, 25, 21953, 17585, 11, 198, 220, 220, 220, 220, 220, 220, 1660, 28, 25, 1031, 495, 11, 2124, 2364, 28, 17, 13, 2791, 2414, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1959, 4943, 198, 198, 1073, 459, 7, 36996, 28, 25, 70, 11, 386, 73, 28, 25, 53, 4066, 8642, 600, 268, 11, 2124, 22704, 16193, 25928, 28, 1270, 11, 828, 331, 22704, 16193, 25928, 28, 1314, 11, 828, 411, 28, 25, 6098, 2507, 11, 198, 220, 220, 220, 220, 220, 1956, 28, 25, 2971, 44605, 11, 1660, 28, 25, 20772, 18217, 74, 11, 1989, 28, 49388, 11, 15191, 28, 25, 400, 3732, 395, 11, 2336, 7857, 28, 940, 11, 46996, 28, 25, 11134, 11, 3613, 5647, 2625, 1270, 4943, 198 ]
2.16185
2,941
# ---------------------------------------------------- # --- Accessor.jl # ---------------------------------------------------- # Function to access to radio parameters getError(obj::UHDBinding) = UHDBindings.getError(obj); getError(obj::RadioSim) = RadioSims.getError(obj); getError(obj::SDROverNetwork) = SDROverNetworks.getMD(obj)[3]; getError(obj::RTLSDRBinding) = RTLSDRBindings.getError(obj); getTimestamp(obj::UHDBinding) = UHDBindings.getTimestamp(obj); getTimestamp(obj::RadioSim) = RadioSims.getTimestamp(obj); getTimestamp(obj::SDROverNetwork) = SDROverNetworks.getMD(obj)[1:2]; getTimestamp(obj::RTLSDRBinding) = RTLSDRBindings.getTimestamp(obj); """ Get the current sampling rate of the radio device The second parameter (optionnal) speicfies the Rx or Tx board (default : Rx) """ getSamplingRate(obj::AbstractSDR;mode=:rx) = ((mode == :rx) ? obj.rx.samplingRate : obj.tx.samplingRate) getSamplingRate(obj::PlutoSDR;mode=:rx) = ((mode == :rx) ? obj.rx.effectiveSamplingRate : obj.tx.effectiveSamplingRate) """ Get the current carrier frequency of the radio device The second parameter (optionnal) speicfies the Rx or Tx board (default : Rx) """ getCarrierFreq(obj::AbstractSDR;mode=:rx) = (mode == :rx) ? obj.rx.carrierFreq : obj.tx.carrierFreq getCarrierFreq(obj::PlutoSDR;mode=:rx) = (mode == :rx) ? obj.rx.effectiveCarrierFreq : obj.tx.effectiveCarrierFreq """ Get the current radio gain The second parameter (optionnal) specifies the Rx or Tx board (default : Rx) """ getGain(obj::AbstractSDR;mode=:rx) = (mode == :rx) ? obj.rx.gain : obj.tx.gain getGain(obj::PlutoSDR;mode=:rx) = AdalmPluto.getGain(obj) """ Check if a SDR has already been closed. The falg is true is the SDR ressources have been released and false otherwise. # --- Syntax flag = isClosed(radio) # --- Input parameters - radio : SDR device # --- Output parameters - flag : True is SDR is already closed, false otherwise """ isClosed(obj::AbstractSDR) = Bool(obj.tx.released) || Bool(obj.rx.released) isClosed(obj::PlutoSDR) = Bool(obj.released) """ Returns the radio packet size. Each radio backend encapsulates the IQ samples into chunks of data. The `recv` command can be used with any size but it can be more efficient to match the desired size with the one provided by the radio # --- Syntax bufferSize = getBufferSize(radio) # --- Input parameters - radio : SDR device # --- Output parameters bufferSize : Size of radio internal buffer """ getBufferSize(obj::AbstractSDR) = obj.rx.packetSize # We get the fields getBufferSize(obj::PlutoSDR) = obj.rx.buf.C_sample_size # For Pluto this is hidden in the buffer config
[ 2, 20368, 19351, 198, 2, 11420, 8798, 273, 13, 20362, 198, 2, 20368, 19351, 220, 198, 2, 15553, 284, 1895, 284, 5243, 10007, 198, 198, 1136, 12331, 7, 26801, 3712, 52, 10227, 33, 6020, 8, 796, 471, 10227, 36180, 654, 13, 1136, 12331, 7, 26801, 1776, 198, 1136, 12331, 7, 26801, 3712, 26093, 8890, 8, 796, 8829, 8890, 82, 13, 1136, 12331, 7, 26801, 1776, 198, 1136, 12331, 7, 26801, 3712, 50, 7707, 5886, 26245, 8, 796, 311, 7707, 5886, 7934, 5225, 13, 1136, 12740, 7, 26801, 38381, 18, 11208, 198, 1136, 12331, 7, 26801, 3712, 14181, 6561, 7707, 33, 6020, 8, 796, 11923, 6561, 7707, 36180, 654, 13, 1136, 12331, 7, 26801, 1776, 198, 198, 1136, 14967, 27823, 7, 26801, 3712, 52, 10227, 33, 6020, 8, 796, 471, 10227, 36180, 654, 13, 1136, 14967, 27823, 7, 26801, 1776, 198, 1136, 14967, 27823, 7, 26801, 3712, 26093, 8890, 8, 796, 8829, 8890, 82, 13, 1136, 14967, 27823, 7, 26801, 1776, 198, 1136, 14967, 27823, 7, 26801, 3712, 50, 7707, 5886, 26245, 8, 796, 311, 7707, 5886, 7934, 5225, 13, 1136, 12740, 7, 26801, 38381, 16, 25, 17, 11208, 198, 1136, 14967, 27823, 7, 26801, 3712, 14181, 6561, 7707, 33, 6020, 8, 796, 11923, 6561, 7707, 36180, 654, 13, 1136, 14967, 27823, 7, 26801, 1776, 198, 198, 37811, 220, 198, 3855, 262, 1459, 19232, 2494, 286, 262, 5243, 3335, 220, 198, 464, 1218, 11507, 357, 18076, 77, 282, 8, 693, 291, 69, 444, 262, 49715, 393, 309, 87, 3096, 357, 12286, 1058, 49715, 8, 198, 37811, 220, 198, 1136, 16305, 11347, 32184, 7, 26801, 3712, 23839, 50, 7707, 26, 14171, 28, 25, 40914, 8, 796, 14808, 14171, 6624, 1058, 40914, 8, 5633, 26181, 13, 40914, 13, 37687, 11347, 32184, 1058, 26181, 13, 17602, 13, 37687, 11347, 32184, 8, 198, 1136, 16305, 11347, 32184, 7, 26801, 3712, 3646, 9390, 50, 7707, 26, 14171, 28, 25, 40914, 8, 796, 14808, 14171, 6624, 1058, 40914, 8, 5633, 26181, 13, 40914, 13, 16803, 16305, 11347, 32184, 1058, 26181, 13, 17602, 13, 16803, 16305, 11347, 32184, 8, 198, 198, 37811, 220, 198, 3855, 262, 1459, 11920, 8373, 220, 220, 286, 262, 5243, 3335, 220, 198, 464, 1218, 11507, 357, 18076, 77, 282, 8, 693, 291, 69, 444, 262, 49715, 393, 309, 87, 3096, 357, 12286, 1058, 49715, 8, 198, 37811, 220, 198, 1136, 9914, 5277, 20366, 80, 7, 26801, 3712, 23839, 50, 7707, 26, 14171, 28, 25, 40914, 8, 796, 357, 14171, 6624, 1058, 40914, 8, 5633, 26181, 13, 40914, 13, 7718, 5277, 20366, 80, 1058, 26181, 13, 17602, 13, 7718, 5277, 20366, 80, 198, 1136, 9914, 5277, 20366, 80, 7, 26801, 3712, 3646, 9390, 50, 7707, 26, 14171, 28, 25, 40914, 8, 796, 357, 14171, 6624, 1058, 40914, 8, 5633, 26181, 13, 40914, 13, 16803, 9914, 5277, 20366, 80, 1058, 26181, 13, 17602, 13, 16803, 9914, 5277, 20366, 80, 628, 198, 37811, 220, 198, 3855, 262, 1459, 5243, 4461, 220, 198, 464, 1218, 11507, 357, 18076, 77, 282, 8, 26052, 262, 49715, 393, 309, 87, 3096, 357, 12286, 1058, 49715, 8, 198, 37811, 198, 1136, 38, 391, 7, 26801, 3712, 23839, 50, 7707, 26, 14171, 28, 25, 40914, 8, 796, 357, 14171, 6624, 1058, 40914, 8, 5633, 26181, 13, 40914, 13, 48544, 1058, 26181, 13, 17602, 13, 48544, 220, 198, 1136, 38, 391, 7, 26801, 3712, 3646, 9390, 50, 7707, 26, 14171, 28, 25, 40914, 8, 796, 1215, 38182, 3646, 9390, 13, 1136, 38, 391, 7, 26801, 8, 628, 198, 37811, 220, 198, 9787, 611, 257, 311, 7707, 468, 1541, 587, 4838, 13, 383, 277, 14016, 318, 2081, 318, 262, 311, 7707, 581, 82, 2203, 423, 587, 2716, 290, 3991, 4306, 13, 198, 2, 11420, 26375, 897, 220, 198, 32109, 796, 318, 2601, 1335, 7, 37004, 8, 220, 198, 2, 11420, 23412, 10007, 220, 198, 12, 5243, 197, 220, 1058, 311, 7707, 3335, 198, 2, 11420, 25235, 10007, 220, 198, 12, 6056, 1058, 6407, 318, 311, 7707, 318, 1541, 4838, 11, 3991, 4306, 198, 37811, 220, 198, 271, 2601, 1335, 7, 26801, 3712, 23839, 50, 7707, 8, 220, 796, 347, 970, 7, 26801, 13, 17602, 13, 30147, 8, 8614, 347, 970, 7, 26801, 13, 40914, 13, 30147, 8, 198, 271, 2601, 1335, 7, 26801, 3712, 3646, 9390, 50, 7707, 8, 220, 220, 220, 220, 796, 347, 970, 7, 26801, 13, 30147, 8, 628, 198, 37811, 220, 198, 35561, 262, 5243, 19638, 2546, 13, 5501, 5243, 30203, 32652, 15968, 262, 18248, 8405, 656, 22716, 286, 1366, 13, 383, 4600, 8344, 85, 63, 3141, 460, 307, 973, 351, 597, 2546, 475, 340, 460, 307, 517, 6942, 284, 2872, 262, 10348, 2546, 351, 262, 530, 2810, 416, 262, 5243, 220, 198, 2, 11420, 26375, 897, 220, 198, 22252, 10699, 796, 651, 28632, 10699, 7, 37004, 8, 220, 198, 2, 11420, 23412, 10007, 220, 198, 12, 5243, 197, 220, 1058, 311, 7707, 3335, 198, 2, 11420, 25235, 10007, 220, 198, 22252, 10699, 1058, 12849, 286, 5243, 5387, 11876, 220, 198, 37811, 220, 198, 1136, 28632, 10699, 7, 26801, 3712, 23839, 50, 7707, 8, 796, 26181, 13, 40914, 13, 8002, 316, 10699, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 775, 651, 262, 7032, 220, 198, 1136, 28632, 10699, 7, 26801, 3712, 3646, 9390, 50, 7707, 8, 220, 220, 220, 796, 26181, 13, 40914, 13, 29325, 13, 34, 62, 39873, 62, 7857, 220, 220, 1303, 1114, 32217, 428, 318, 7104, 287, 262, 11876, 4566, 628, 198 ]
2.971047
898
push!(LOAD_PATH, pwd()) const assets = "assets" using Images, ImageMagick, Colors, Photopolarimetry import Tk.ChooseDirectory #include("Photopolar.jl") include("PhotopolarGUIfunctions.jl") path = Input(ChooseDirectory()) flip = Input(false) flop = Input(false) torun = Input{Any}(leftbutton) rotate = Input(0) cropright = Input(100) cropbottom = Input(100) cropleft = Input(0) croptop = Input(0) scale = Input(20) topI = Input(100) topdolp = Input(100) topdolcp = Input(100) topdorcp = Input(100) botprofile = Input(0) topprofile = Input(100) Sp = Input(5) ellipse_window = Input(0.5) minpol = Input(0.2) maxpol = Input(1.0) eccentricity = Input(0.01) torun2 = Input{Any}(leftbutton) fnames = lift(getfnames,path) SZ = lift(x -> getsz(x[1]),fnames) lift(x -> write_originalRGB(x[1]),fnames) row1 = ["Flip", checkbox(false) >>> flip, "Flop", checkbox(false) >>> flop, button("Done!") >>> torun] row2 = ["Rotate", slider(-90:90,value=0) >>> rotate, "Scale", slider(1:100,value=20) >>> scale] row3 = ["Crop top", slider(0:99,value=0) >>> croptop, "Crop bottom", slider(1:100,value=100) >>> cropbottom] row4 = ["Crop left", slider(0:99,value=0) >>> cropleft, "Crop right", slider(1:100,value=100) >>> cropright] mymin(u,l) = u > l ? l : u - 1 botprofile2 = lift(mymin, topprofile, botprofile) s = lift(_ -> path2stokes(value(path),value(flip),value(flop),value(rotate),value(cropright),value(cropbottom),value(cropleft),value(croptop),value(scale), angleoffset = deg2rad(60)), torun, typ=Any, init=empty) polarimgs = lift(calculatepolar, s, typ=Any, init=empty) I = lift((x,t) -> recolor_I(x[1],t),polarimgs,topI,typ=Any, init=empty) dolp = lift((x,t) -> recolor_dolp(x[2],t),polarimgs,topdolp,typ=Any, init=empty) docp = lift((x,b,t) -> recolor_docp(x[4],b,t),polarimgs,topdolcp,topdorcp,typ=Any, init=empty) profileimg = lift(stokes2profile, s, Sp, typ=Any, init=empty) ellipse_img_name = lift(latexellipse, s, ellipse_window, maxpol, minpol, eccentricity, typ=Any, init=empty) orientationtab = vbox(map(pad(0.5em),[ hbox(map(pad(0.5em), row1)), hbox(map(pad(0.5em), row2)), hbox(map(pad(0.5em), row3)), hbox(map(pad(0.5em), row4)), consume(flip,flop,rotate,cropright,cropbottom,cropleft,croptop,scale) do flp, flP, rtt, crprght, crpbttm, crplft, crptp, scl @async cleanassets() name = updateRGB(flp,flP,rtt,crprght,crpbttm,crplft,crptp,scl) image("$assets/$name.jpg") end, ])) intensitytab = vbox(map(pad(0.5em),[ hbox("Intensity", slider(0:100, value = 100) >>> topI), hbox("DoLP", slider(0:100, value = 100) >>> topdolp), hbox("DoLCP", slider(0:100, value = 100) >>> topdolcp), hbox("DoRCP", slider(0:100, value = 100) >>> topdorcp), consume(I, dolp, docp, polarimgs, typ=Any, init=empty) do i, dlp, dcp, p buff = Image(ones(RGB{FixedPointNumbers.UFixed{UInt8,8}},10,size(i,2))) cat(1,i, buff, dlp, buff, p[3], buff, dcp) end ])) profiletab = vbox(map(pad(0.5em),[ hbox(map(pad(0.5em),["upper", slider(2:100, value = 100) >>> topprofile])), consume(topprofile) do x hbox(map(pad(0.5em),["Lower", slider(0:(x - 1), value = 0) >>> botprofile])) end, hbox(map(pad(0.5em),[tex("S_p"), slider(2:10, value = 5) >>> Sp])), iiimg = lift(recolor_profile, profileimg, botprofile2, topprofile, typ=Any, init=empty) ])) lift(_ -> println(join([splitdir(value(path))[2],value(flip),value(flop),value(rotate),value(cropright),value(cropbottom),value(cropleft),value(croptop),value(scale),value(ellipse_window), value(minpol), value(maxpol), value(eccentricity)],",")), torun2, typ=Any, init=empty) ellipsetab = vbox(map(pad(0.5em),[ hbox(map(pad(0.5em),["Cell size (cm)", slider(0.1:0.05:2, value = 0.5) >>> ellipse_window])), hbox(map(pad(0.5em),["Min pol.", slider(0:.01:1, value = 0.2) >>> minpol])), hbox(map(pad(0.5em),["Max pol.", slider(0:.01:1, value = 1.0) >>> maxpol])), hbox(map(pad(0.5em),["Eccentricity", slider(0:.01:1, value = 0.01) >>> eccentricity])), button("Done!") >>> torun2, lift(image,ellipse_img_name, typ=Any, init=empty) ])) #=ok = Input{Any}(leftbutton) donetab = vbox(map(pad(0.5em),[ button("Print", raised = true) >>> ok, consume(ok, typ=Any, init=empty) do o colorimg = load("$assets/RGB.jpg") aopimg = convert(Image, value(X)[3]) Iimg = convert(Image, value(I)) dolpimg = convert(Image, value(dolp)) docpimg = convert(Image, value(docp)) buff = round(Int,0.05*mean(widthheight(colorimg))) buffimg = Iimg[1:buff,:] buffimg[:] = RGB{U8}(1,1,1) img = cat(1,colorimg, buffimg, Iimg, buffimg, dolpimg, buffimg, aopimg, buffimg, docpimg) name = string(abs(rand(Int))) save( "$assets/$name.jpg",img) image("assets/$name.jpg") end ]))=# function main(window) push!(window.assets, "layout2") push!(window.assets, "widgets") push!(window.assets, "tex") tabbar = tabs([ hbox("Orientation"), hbox("Photopolarimetry"), hbox("Interneuron"), hbox("Ellipse")]) tabcontent = pages([ orientationtab, intensitytab, profiletab, ellipsetab]) t, p = wire(tabbar, tabcontent, :tab_channel, :selected) vbox(t, p) end
[ 14689, 0, 7, 35613, 62, 34219, 11, 279, 16993, 28955, 198, 9979, 6798, 796, 366, 19668, 1, 198, 3500, 5382, 11, 7412, 13436, 624, 11, 29792, 11, 5919, 404, 6192, 320, 11973, 198, 11748, 309, 74, 13, 31851, 43055, 198, 2, 17256, 7203, 27248, 404, 6192, 13, 20362, 4943, 198, 17256, 7203, 27248, 404, 6192, 38022, 1532, 46797, 13, 20362, 4943, 198, 198, 6978, 796, 23412, 7, 31851, 43055, 28955, 198, 2704, 541, 796, 23412, 7, 9562, 8, 198, 2704, 404, 796, 23412, 7, 9562, 8, 220, 198, 13165, 403, 796, 23412, 90, 7149, 92, 7, 9464, 16539, 8, 198, 10599, 378, 796, 23412, 7, 15, 8, 198, 19915, 1050, 432, 796, 23412, 7, 3064, 8, 198, 31476, 22487, 796, 23412, 7, 3064, 8, 198, 19915, 1154, 701, 796, 23412, 7, 15, 8, 198, 19915, 457, 404, 796, 23412, 7, 15, 8, 198, 9888, 796, 23412, 7, 1238, 8, 198, 4852, 40, 796, 23412, 7, 3064, 8, 198, 4852, 67, 349, 79, 796, 23412, 7, 3064, 8, 198, 4852, 67, 349, 13155, 796, 23412, 7, 3064, 8, 198, 4852, 40180, 13155, 796, 23412, 7, 3064, 8, 198, 13645, 13317, 796, 23412, 7, 15, 8, 198, 1462, 381, 305, 7753, 796, 23412, 7, 3064, 8, 198, 4561, 796, 23412, 7, 20, 8, 198, 695, 541, 325, 62, 17497, 796, 23412, 7, 15, 13, 20, 8, 198, 1084, 16104, 796, 23412, 7, 15, 13, 17, 8, 198, 9806, 16104, 796, 23412, 7, 16, 13, 15, 8, 198, 68, 535, 22317, 414, 796, 23412, 7, 15, 13, 486, 8, 198, 198, 13165, 403, 17, 796, 23412, 90, 7149, 92, 7, 9464, 16539, 8, 198, 198, 69, 14933, 796, 10303, 7, 1136, 69, 14933, 11, 6978, 8, 198, 50, 57, 796, 10303, 7, 87, 4613, 3011, 89, 7, 87, 58, 16, 46570, 69, 14933, 8, 198, 26282, 7, 87, 4613, 3551, 62, 14986, 36982, 7, 87, 58, 16, 46570, 69, 14933, 8, 198, 198, 808, 16, 796, 14631, 7414, 541, 1600, 2198, 3524, 7, 9562, 8, 13163, 14283, 11, 366, 7414, 404, 1600, 2198, 3524, 7, 9562, 8, 13163, 781, 404, 11, 4936, 7203, 45677, 2474, 8, 13163, 7332, 403, 60, 198, 808, 17, 796, 14631, 24864, 378, 1600, 28982, 32590, 3829, 25, 3829, 11, 8367, 28, 15, 8, 13163, 23064, 11, 366, 29990, 1600, 28982, 7, 16, 25, 3064, 11, 8367, 28, 1238, 8, 13163, 5046, 60, 198, 808, 18, 796, 14631, 34, 1773, 1353, 1600, 28982, 7, 15, 25, 2079, 11, 8367, 28, 15, 8, 13163, 6763, 457, 404, 11, 366, 34, 1773, 4220, 1600, 28982, 7, 16, 25, 3064, 11, 8367, 28, 3064, 8, 13163, 13833, 22487, 60, 198, 808, 19, 796, 14631, 34, 1773, 1364, 1600, 28982, 7, 15, 25, 2079, 11, 8367, 28, 15, 8, 13163, 6763, 1154, 701, 11, 366, 34, 1773, 826, 1600, 28982, 7, 16, 25, 3064, 11, 8367, 28, 3064, 8, 13163, 6763, 1050, 432, 60, 198, 198, 1820, 1084, 7, 84, 11, 75, 8, 796, 334, 1875, 300, 5633, 300, 1058, 334, 532, 352, 198, 13645, 13317, 17, 796, 10303, 7, 1820, 1084, 11, 23126, 305, 7753, 11, 10214, 13317, 8, 628, 198, 198, 82, 796, 10303, 28264, 4613, 3108, 17, 301, 3369, 7, 8367, 7, 6978, 828, 8367, 7, 2704, 541, 828, 8367, 7, 2704, 404, 828, 8367, 7, 10599, 378, 828, 8367, 7, 19915, 1050, 432, 828, 8367, 7, 31476, 22487, 828, 8367, 7, 19915, 1154, 701, 828, 8367, 7, 19915, 457, 404, 828, 8367, 7, 9888, 828, 9848, 28968, 796, 3396, 17, 6335, 7, 1899, 36911, 7332, 403, 11, 2170, 28, 7149, 11, 2315, 28, 28920, 8, 198, 79, 6192, 9600, 82, 796, 10303, 7, 9948, 3129, 378, 79, 6192, 11, 264, 11, 2170, 28, 7149, 11, 2315, 28, 28920, 8, 198, 198, 40, 796, 10303, 19510, 87, 11, 83, 8, 4613, 26330, 273, 62, 40, 7, 87, 58, 16, 4357, 83, 828, 79, 6192, 9600, 82, 11, 4852, 40, 11, 28004, 28, 7149, 11, 2315, 28, 28920, 8, 198, 67, 349, 79, 796, 10303, 19510, 87, 11, 83, 8, 4613, 26330, 273, 62, 67, 349, 79, 7, 87, 58, 17, 4357, 83, 828, 79, 6192, 9600, 82, 11, 4852, 67, 349, 79, 11, 28004, 28, 7149, 11, 2315, 28, 28920, 8, 198, 15390, 79, 796, 10303, 19510, 87, 11, 65, 11, 83, 8, 4613, 26330, 273, 62, 15390, 79, 7, 87, 58, 19, 4357, 65, 11, 83, 828, 79, 6192, 9600, 82, 11, 4852, 67, 349, 13155, 11, 4852, 40180, 13155, 11, 28004, 28, 7149, 11, 2315, 28, 28920, 8, 628, 198, 13317, 9600, 796, 10303, 7, 301, 3369, 17, 13317, 11, 264, 11, 1338, 11, 2170, 28, 7149, 11, 2315, 28, 28920, 8, 198, 695, 541, 325, 62, 9600, 62, 3672, 796, 10303, 7, 17660, 87, 695, 541, 325, 11, 264, 11, 30004, 541, 325, 62, 17497, 11, 3509, 16104, 11, 949, 16104, 11, 29303, 414, 11, 2170, 28, 7149, 11, 2315, 28, 28920, 8, 198, 198, 13989, 341, 8658, 796, 410, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 58, 198, 197, 71, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 5752, 16, 36911, 198, 197, 71, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 5752, 17, 36911, 198, 197, 71, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 5752, 18, 36911, 198, 197, 71, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 5752, 19, 36911, 198, 197, 5936, 2454, 7, 2704, 541, 11, 2704, 404, 11, 10599, 378, 11, 19915, 1050, 432, 11, 31476, 22487, 11, 19915, 1154, 701, 11, 19915, 457, 404, 11, 9888, 8, 466, 781, 79, 11, 781, 47, 11, 374, 926, 11, 1067, 1050, 456, 83, 11, 1067, 40842, 926, 76, 11, 1067, 489, 701, 11, 1067, 457, 79, 11, 264, 565, 198, 197, 197, 31, 292, 13361, 3424, 19668, 3419, 198, 197, 197, 3672, 796, 4296, 36982, 7, 2704, 79, 11, 2704, 47, 11, 81, 926, 11, 6098, 1050, 456, 83, 11, 6098, 40842, 926, 76, 11, 6098, 489, 701, 11, 6098, 457, 79, 11, 38528, 8, 198, 197, 197, 9060, 7203, 3, 19668, 32624, 3672, 13, 9479, 4943, 198, 197, 437, 11, 198, 197, 60, 4008, 220, 198, 198, 47799, 8658, 796, 410, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 58, 198, 197, 71, 3524, 7203, 5317, 6377, 1600, 28982, 7, 15, 25, 3064, 11, 1988, 796, 1802, 8, 13163, 1353, 40, 828, 198, 197, 71, 3524, 7203, 5211, 19930, 1600, 28982, 7, 15, 25, 3064, 11, 1988, 796, 1802, 8, 13163, 1353, 67, 349, 79, 828, 198, 197, 71, 3524, 7203, 5211, 5639, 47, 1600, 28982, 7, 15, 25, 3064, 11, 1988, 796, 1802, 8, 13163, 1353, 67, 349, 13155, 828, 198, 197, 71, 3524, 7203, 5211, 7397, 47, 1600, 28982, 7, 15, 25, 3064, 11, 1988, 796, 1802, 8, 13163, 1353, 40180, 13155, 828, 198, 197, 5936, 2454, 7, 40, 11, 288, 349, 79, 11, 2205, 79, 11, 13559, 9600, 82, 11, 2170, 28, 7149, 11, 2315, 28, 28920, 8, 466, 1312, 11, 288, 34431, 11, 288, 13155, 11, 279, 198, 197, 197, 36873, 796, 7412, 7, 1952, 7, 36982, 90, 13715, 12727, 49601, 13, 52, 13715, 90, 52, 5317, 23, 11, 23, 92, 5512, 940, 11, 7857, 7, 72, 11, 17, 22305, 198, 197, 197, 9246, 7, 16, 11, 72, 11, 6940, 11, 288, 34431, 11, 6940, 11, 279, 58, 18, 4357, 6940, 11, 288, 13155, 8, 198, 197, 437, 198, 197, 60, 4008, 198, 198, 13317, 8658, 796, 410, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 58, 198, 197, 71, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 14692, 45828, 1600, 28982, 7, 17, 25, 3064, 11, 1988, 796, 1802, 8, 13163, 23126, 305, 7753, 12962, 828, 198, 197, 5936, 2454, 7, 1462, 381, 305, 7753, 8, 466, 2124, 198, 197, 197, 71, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 14692, 31426, 1600, 28982, 7, 15, 37498, 87, 532, 352, 828, 1988, 796, 657, 8, 13163, 10214, 13317, 60, 4008, 198, 197, 437, 11, 198, 197, 71, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 58, 16886, 7203, 50, 62, 79, 12340, 28982, 7, 17, 25, 940, 11, 1988, 796, 642, 8, 13163, 1338, 12962, 828, 198, 4178, 9600, 796, 10303, 7, 260, 8043, 62, 13317, 11, 7034, 9600, 11, 10214, 13317, 17, 11, 23126, 305, 7753, 11, 2170, 28, 7149, 11, 2315, 28, 28920, 8, 198, 60, 4008, 198, 198, 26282, 28264, 4613, 44872, 7, 22179, 26933, 35312, 15908, 7, 8367, 7, 6978, 4008, 58, 17, 4357, 8367, 7, 2704, 541, 828, 8367, 7, 2704, 404, 828, 8367, 7, 10599, 378, 828, 8367, 7, 19915, 1050, 432, 828, 8367, 7, 31476, 22487, 828, 8367, 7, 19915, 1154, 701, 828, 8367, 7, 19915, 457, 404, 828, 8367, 7, 9888, 828, 8367, 7, 695, 541, 325, 62, 17497, 828, 1988, 7, 1084, 16104, 828, 1988, 7, 9806, 16104, 828, 1988, 7, 68, 535, 22317, 414, 15437, 553, 553, 36911, 7332, 403, 17, 11, 2170, 28, 7149, 11, 2315, 28, 28920, 8, 198, 198, 695, 2419, 316, 397, 796, 410, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 58, 198, 197, 71, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 14692, 28780, 2546, 357, 11215, 42501, 28982, 7, 15, 13, 16, 25, 15, 13, 2713, 25, 17, 11, 1988, 796, 657, 13, 20, 8, 13163, 30004, 541, 325, 62, 17497, 12962, 828, 198, 197, 71, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 14692, 9452, 755, 33283, 28982, 7, 15, 25, 13, 486, 25, 16, 11, 1988, 796, 657, 13, 17, 8, 13163, 949, 16104, 12962, 828, 198, 197, 71, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 14692, 11518, 755, 33283, 28982, 7, 15, 25, 13, 486, 25, 16, 11, 1988, 796, 352, 13, 15, 8, 13163, 3509, 16104, 12962, 828, 198, 197, 71, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 14692, 36, 535, 22317, 414, 1600, 28982, 7, 15, 25, 13, 486, 25, 16, 11, 1988, 796, 657, 13, 486, 8, 13163, 29303, 414, 12962, 828, 198, 197, 16539, 7203, 45677, 2474, 8, 13163, 7332, 403, 17, 11, 198, 197, 26282, 7, 9060, 11, 695, 541, 325, 62, 9600, 62, 3672, 11, 2170, 28, 7149, 11, 2315, 28, 28920, 8, 198, 60, 4008, 628, 198, 2, 28, 482, 796, 23412, 90, 7149, 92, 7, 9464, 16539, 8, 198, 9099, 316, 397, 796, 410, 3524, 7, 8899, 7, 15636, 7, 15, 13, 20, 368, 828, 58, 198, 197, 16539, 7203, 18557, 1600, 4376, 796, 2081, 8, 13163, 12876, 11, 198, 197, 5936, 2454, 7, 482, 11, 2170, 28, 7149, 11, 2315, 28, 28920, 8, 466, 267, 198, 197, 197, 8043, 9600, 796, 3440, 7203, 3, 19668, 14, 36982, 13, 9479, 4943, 198, 197, 197, 64, 404, 9600, 796, 10385, 7, 5159, 11, 1988, 7, 55, 38381, 18, 12962, 198, 197, 197, 40, 9600, 796, 10385, 7, 5159, 11, 1988, 7, 40, 4008, 198, 197, 197, 67, 349, 79, 9600, 796, 10385, 7, 5159, 11, 1988, 7, 67, 349, 79, 4008, 198, 197, 197, 15390, 79, 9600, 796, 10385, 7, 5159, 11, 1988, 7, 15390, 79, 4008, 198, 197, 197, 36873, 796, 2835, 7, 5317, 11, 15, 13, 2713, 9, 32604, 7, 10394, 17015, 7, 8043, 9600, 22305, 198, 197, 197, 36873, 9600, 796, 314, 9600, 58, 16, 25, 36873, 11, 47715, 198, 197, 197, 36873, 9600, 58, 47715, 796, 25228, 90, 52, 23, 92, 7, 16, 11, 16, 11, 16, 8, 198, 197, 197, 9600, 796, 3797, 7, 16, 11, 8043, 9600, 11, 6940, 9600, 11, 314, 9600, 11, 6940, 9600, 11, 288, 349, 79, 9600, 11, 6940, 9600, 11, 257, 404, 9600, 11, 6940, 9600, 11, 2205, 79, 9600, 8, 220, 198, 197, 197, 3672, 796, 4731, 7, 8937, 7, 25192, 7, 5317, 22305, 198, 197, 197, 21928, 7, 17971, 19668, 32624, 3672, 13, 9479, 1600, 9600, 8, 198, 197, 197, 9060, 7203, 19668, 32624, 3672, 13, 9479, 4943, 198, 197, 437, 198, 197, 60, 4008, 46249, 628, 198, 8818, 1388, 7, 17497, 8, 220, 198, 197, 14689, 0, 7, 17497, 13, 19668, 11, 366, 39786, 17, 4943, 197, 198, 197, 14689, 0, 7, 17497, 13, 19668, 11, 366, 28029, 11407, 4943, 198, 197, 14689, 0, 7, 17497, 13, 19668, 11, 366, 16886, 4943, 628, 197, 8658, 5657, 796, 22524, 26933, 289, 3524, 7203, 46, 8289, 341, 12340, 289, 3524, 7203, 27248, 404, 6192, 320, 11973, 12340, 289, 3524, 7203, 9492, 710, 44372, 12340, 289, 3524, 7203, 30639, 541, 325, 4943, 12962, 198, 197, 8658, 11299, 796, 5468, 26933, 12852, 8658, 11, 12245, 8658, 11, 7034, 8658, 11, 30004, 2419, 316, 397, 12962, 198, 197, 198, 197, 83, 11, 279, 796, 6503, 7, 8658, 5657, 11, 7400, 11299, 11, 1058, 8658, 62, 17620, 11, 1058, 34213, 8, 198, 197, 85, 3524, 7, 83, 11, 279, 8, 628, 628, 198, 198, 437, 198 ]
2.31793
2,164
d = [0 19 17 34 7 20 10 17 28 15 23 29 23 29 21 20 9 16 21 13 12; 19 0 10 41 26 3 27 25 15 17 17 14 18 48 17 6 21 14 17 13 31; 17 10 0 47 23 13 26 15 25 22 26 24 27 44 7 5 23 21 25 18 29; 34 41 47 0 36 39 25 51 36 24 27 38 25 44 54 45 25 28 26 28 27; 7 26 23 36 0 27 11 17 35 22 30 36 30 22 25 26 14 23 28 20 10; 20 3 13 39 27 0 26 27 12 15 14 11 15 49 20 9 20 11 14 11 30; 10 27 26 25 11 26 0 26 31 14 23 32 22 25 31 28 6 17 21 15 4; 17 25 15 51 17 27 26 0 39 31 38 38 38 34 13 20 26 31 36 28 27; 28 15 25 36 35 12 31 39 0 17 9 2 11 56 32 21 24 13 11 15 35; 15 17 22 24 22 15 14 31 17 0 9 18 8 39 29 21 8 4 7 4 18; 23 17 26 27 30 14 23 38 9 9 0 11 2 48 33 23 17 7 2 10 27; 29 14 24 38 36 11 32 38 2 18 11 0 13 57 31 20 25 14 13 17 36; 23 18 27 25 30 15 22 38 11 8 2 13 0 47 34 24 16 7 2 10 26; 29 48 44 44 22 49 25 34 56 39 48 57 47 0 46 48 31 42 46 40 21; 21 17 7 54 25 20 31 13 32 29 33 31 34 46 0 11 29 28 32 25 33; 20 6 5 45 26 9 28 20 21 21 23 20 24 48 11 0 23 19 22 17 32; 9 21 23 25 14 20 6 26 24 8 17 25 16 31 29 23 0 11 15 9 10; 16 14 21 28 23 11 17 31 13 4 7 14 7 42 28 19 11 0 5 3 21; 21 17 25 26 28 14 21 36 11 7 2 13 2 46 32 22 15 5 0 8 25; 13 13 18 28 20 11 15 28 15 4 10 17 10 40 25 17 9 3 8 0 19; 12 31 29 27 10 30 4 27 35 18 27 36 26 21 33 32 10 21 25 19 0] time_windows = [0 408; 62 68; 181 205; 306 324; 214 217; 51 61; 102 129; 175 186; 250 263; 3 23; 21 49; 79 90; 78 96; 140 154; 354 386; 42 63; 2 13; 24 42; 20 33; 9 21; 275 300] # s = [1 17 20 10 18 19 11 6 16 2 12 13 7 14 8 3 5 9 21 4 15] # total_cost = 0 # current_time = 0 # for i in 1:20 # global total_cost += d[s[i], s[i+1]] # println("current_time", current_time) # println("d[s[i], s[i+1]]", d[s[i], s[i+1]]) # println("time_windows[s[i+1], 2]", time_windows[s[i+1], :]) # @assert current_time + d[s[i], s[i+1]] <= time_windows[s[i+1], 2] # global current_time = max(time_windows[s[i+1], 1], current_time + d[s[i], s[i+1]]) # end # println("total_cost", total_cost) # total_cost += d[s[21], s[1]] # println("total_cost", total_cost) using SeaPearl struct TsptwVariableSelection{TakeObjective} <: SeaPearl.AbstractVariableSelection{TakeObjective} end TsptwVariableSelection(;take_objective=false) = TsptwVariableSelection{take_objective}() function (::TsptwVariableSelection{false})(cpmodel::SeaPearl.CPModel; rng=nothing) for i in 1:length(keys(cpmodel.variables)) if haskey(cpmodel.variables, "a_"*string(i)) && !SeaPearl.isbound(cpmodel.variables["a_"*string(i)]) return cpmodel.variables["a_"*string(i)] end end println(cpmodel.variables) end function closer_city(x::SeaPearl.IntVar, dist::Matrix, model::SeaPearl.CPModel) i = 1 while "a_"*string(i) != x.id i += 1 end current_city = SeaPearl.assignedValue(model.variables["v_"*string(i)]) j = 0 minDist = 0 closer = j found_one = false while j < size(dist, 1) j += 1 if (!found_one || dist[current_city, j] < minDist) && j in x.domain minDist = dist[current_city, j] closer = j found_one = true end end return closer end function solve_tsptw(n_city=21) trailer = SeaPearl.Trailer() model = SeaPearl.CPModel(trailer) grid_size = 100 max_tw_gap = 10 max_tw = 100 generator = SeaPearl.TsptwGenerator(n_city, grid_size, max_tw_gap, max_tw) dist, time_windows = SeaPearl.fill_with_generator!(model, generator) variableheuristic = TsptwVariableSelection{false}() my_heuristic(x::SeaPearl.IntVar) = minimum(x.domain) valueheuristic = SeaPearl.BasicHeuristic((x; cpmodel=nothing) -> closer_city(x, dist, model)) SeaPearl.search!(model, SeaPearl.DFSearch, variableheuristic, valueheuristic) solution_found = Int[] for i in 1:(n_city-1) push!(solution_found, model.solutions[end]["a_"*string(i)]) end println("Solution: ", solution_found) println("Nodes visited: ", model.statistics.numberOfNodes) end function solve_tsptw_known_instance() dist = [0 19 17 34 7 20 10 17 28 15 23 29 23 29 21 20 9 16 21 13 12; 19 0 10 41 26 3 27 25 15 17 17 14 18 48 17 6 21 14 17 13 31; 17 10 0 47 23 13 26 15 25 22 26 24 27 44 7 5 23 21 25 18 29; 34 41 47 0 36 39 25 51 36 24 27 38 25 44 54 45 25 28 26 28 27; 7 26 23 36 0 27 11 17 35 22 30 36 30 22 25 26 14 23 28 20 10; 20 3 13 39 27 0 26 27 12 15 14 11 15 49 20 9 20 11 14 11 30; 10 27 26 25 11 26 0 26 31 14 23 32 22 25 31 28 6 17 21 15 4; 17 25 15 51 17 27 26 0 39 31 38 38 38 34 13 20 26 31 36 28 27; 28 15 25 36 35 12 31 39 0 17 9 2 11 56 32 21 24 13 11 15 35; 15 17 22 24 22 15 14 31 17 0 9 18 8 39 29 21 8 4 7 4 18; 23 17 26 27 30 14 23 38 9 9 0 11 2 48 33 23 17 7 2 10 27; 29 14 24 38 36 11 32 38 2 18 11 0 13 57 31 20 25 14 13 17 36; 23 18 27 25 30 15 22 38 11 8 2 13 0 47 34 24 16 7 2 10 26; 29 48 44 44 22 49 25 34 56 39 48 57 47 0 46 48 31 42 46 40 21; 21 17 7 54 25 20 31 13 32 29 33 31 34 46 0 11 29 28 32 25 33; 20 6 5 45 26 9 28 20 21 21 23 20 24 48 11 0 23 19 22 17 32; 9 21 23 25 14 20 6 26 24 8 17 25 16 31 29 23 0 11 15 9 10; 16 14 21 28 23 11 17 31 13 4 7 14 7 42 28 19 11 0 5 3 21; 21 17 25 26 28 14 21 36 11 7 2 13 2 46 32 22 15 5 0 8 25; 13 13 18 28 20 11 15 28 15 4 10 17 10 40 25 17 9 3 8 0 19; 12 31 29 27 10 30 4 27 35 18 27 36 26 21 33 32 10 21 25 19 0] time_windows = [0 408; 62 68; 181 205; 306 324; 214 217; 51 61; 102 129; 175 186; 250 263; 3 23; 21 49; 79 90; 78 96; 140 154; 354 386; 42 63; 2 13; 24 42; 20 33; 9 21; 275 300] trailer = SeaPearl.Trailer() model = SeaPearl.CPModel(trailer) n_city = 21 grid_size = 100 max_tw_gap = 10 max_tw = 100 generator = SeaPearl.TsptwGenerator(n_city, grid_size, max_tw_gap, max_tw) dist, time_windows = SeaPearl.fill_with_generator!(model, generator; dist=dist, time_windows=time_windows) variableheuristic = TsptwVariableSelection{false}() my_heuristic(x::SeaPearl.IntVar) = minimum(x.domain) valueheuristic = SeaPearl.BasicHeuristic((x; cpmodel=nothing) -> closer_city(x, dist, model)) SeaPearl.search!(model, SeaPearl.DFSearch, variableheuristic, valueheuristic) solution_found = Int[] for i in 1:(n_city-1) push!(solution_found, model.solutions[end]["a_"*string(i)]) end println("Solution: ", solution_found) println("Nodes visited: ", model.statistics.numberOfNodes) end
[ 67, 796, 685, 15, 678, 1596, 4974, 767, 1160, 838, 1596, 2579, 1315, 2242, 2808, 2242, 2808, 2310, 1160, 860, 1467, 2310, 1511, 1105, 26, 201, 198, 1129, 657, 838, 6073, 2608, 513, 2681, 1679, 1315, 1596, 1596, 1478, 1248, 4764, 1596, 718, 2310, 1478, 1596, 1511, 3261, 26, 201, 198, 1558, 838, 657, 6298, 2242, 1511, 2608, 1315, 1679, 2534, 2608, 1987, 2681, 5846, 767, 642, 2242, 2310, 1679, 1248, 2808, 26, 201, 198, 2682, 6073, 6298, 657, 4570, 5014, 1679, 6885, 4570, 1987, 2681, 4353, 1679, 5846, 7175, 4153, 1679, 2579, 2608, 2579, 2681, 26, 201, 198, 22, 2608, 2242, 4570, 657, 2681, 1367, 1596, 3439, 2534, 1542, 4570, 1542, 2534, 1679, 2608, 1478, 2242, 2579, 1160, 838, 26, 201, 198, 1238, 513, 1511, 5014, 2681, 657, 2608, 2681, 1105, 1315, 1478, 1367, 1315, 5125, 1160, 860, 1160, 1367, 1478, 1367, 1542, 26, 201, 198, 940, 2681, 2608, 1679, 1367, 2608, 657, 2608, 3261, 1478, 2242, 3933, 2534, 1679, 3261, 2579, 718, 1596, 2310, 1315, 604, 26, 201, 198, 1558, 1679, 1315, 6885, 1596, 2681, 2608, 657, 5014, 3261, 4353, 4353, 4353, 4974, 1511, 1160, 2608, 3261, 4570, 2579, 2681, 26, 201, 198, 2078, 1315, 1679, 4570, 3439, 1105, 3261, 5014, 657, 1596, 860, 362, 1367, 7265, 3933, 2310, 1987, 1511, 1367, 1315, 3439, 26, 201, 198, 1314, 1596, 2534, 1987, 2534, 1315, 1478, 3261, 1596, 657, 860, 1248, 807, 5014, 2808, 2310, 807, 604, 767, 604, 1248, 26, 201, 198, 1954, 1596, 2608, 2681, 1542, 1478, 2242, 4353, 860, 860, 657, 1367, 362, 4764, 4747, 2242, 1596, 767, 362, 838, 2681, 26, 201, 198, 1959, 1478, 1987, 4353, 4570, 1367, 3933, 4353, 362, 1248, 1367, 657, 1511, 7632, 3261, 1160, 1679, 1478, 1511, 1596, 4570, 26, 201, 198, 1954, 1248, 2681, 1679, 1542, 1315, 2534, 4353, 1367, 807, 362, 1511, 657, 6298, 4974, 1987, 1467, 767, 362, 838, 2608, 26, 201, 198, 1959, 4764, 5846, 5846, 2534, 5125, 1679, 4974, 7265, 5014, 4764, 7632, 6298, 657, 6337, 4764, 3261, 5433, 6337, 2319, 2310, 26, 201, 198, 2481, 1596, 767, 7175, 1679, 1160, 3261, 1511, 3933, 2808, 4747, 3261, 4974, 6337, 657, 1367, 2808, 2579, 3933, 1679, 4747, 26, 201, 198, 1238, 718, 642, 4153, 2608, 860, 2579, 1160, 2310, 2310, 2242, 1160, 1987, 4764, 1367, 657, 2242, 678, 2534, 1596, 3933, 26, 201, 198, 24, 2310, 2242, 1679, 1478, 1160, 718, 2608, 1987, 807, 1596, 1679, 1467, 3261, 2808, 2242, 657, 1367, 1315, 860, 838, 26, 201, 198, 1433, 1478, 2310, 2579, 2242, 1367, 1596, 3261, 1511, 604, 767, 1478, 767, 5433, 2579, 678, 1367, 657, 642, 513, 2310, 26, 201, 198, 2481, 1596, 1679, 2608, 2579, 1478, 2310, 4570, 1367, 767, 362, 1511, 362, 6337, 3933, 2534, 1315, 642, 657, 807, 1679, 26, 201, 198, 1485, 1511, 1248, 2579, 1160, 1367, 1315, 2579, 1315, 604, 838, 1596, 838, 2319, 1679, 1596, 860, 513, 807, 657, 678, 26, 201, 198, 1065, 3261, 2808, 2681, 838, 1542, 604, 2681, 3439, 1248, 2681, 4570, 2608, 2310, 4747, 3933, 838, 2310, 1679, 678, 657, 60, 201, 198, 201, 198, 2435, 62, 28457, 796, 685, 15, 220, 220, 220, 220, 220, 220, 220, 220, 41247, 26, 201, 198, 5237, 220, 220, 220, 220, 220, 220, 220, 8257, 26, 201, 198, 27057, 220, 220, 220, 220, 220, 220, 22538, 26, 201, 198, 20548, 220, 220, 220, 220, 220, 220, 38595, 26, 201, 198, 22291, 220, 220, 220, 220, 220, 220, 24894, 26, 201, 198, 4349, 220, 220, 220, 220, 220, 220, 220, 8454, 26, 201, 198, 15377, 220, 220, 220, 220, 220, 220, 20248, 26, 201, 198, 17430, 220, 220, 220, 220, 220, 220, 28481, 26, 201, 198, 9031, 220, 220, 220, 220, 220, 220, 39135, 26, 201, 198, 18, 220, 220, 220, 220, 220, 220, 220, 220, 2242, 26, 201, 198, 2481, 220, 220, 220, 220, 220, 220, 220, 5125, 26, 201, 198, 3720, 220, 220, 220, 220, 220, 220, 220, 4101, 26, 201, 198, 3695, 220, 220, 220, 220, 220, 220, 220, 9907, 26, 201, 198, 15187, 220, 220, 220, 220, 220, 220, 24235, 26, 201, 198, 32182, 220, 220, 220, 220, 220, 220, 48340, 26, 201, 198, 3682, 220, 220, 220, 220, 220, 220, 220, 8093, 26, 201, 198, 17, 220, 220, 220, 220, 220, 220, 220, 220, 1511, 26, 201, 198, 1731, 220, 220, 220, 220, 220, 220, 220, 5433, 26, 201, 198, 1238, 220, 220, 220, 220, 220, 220, 220, 4747, 26, 201, 198, 24, 220, 220, 220, 220, 220, 220, 220, 220, 2310, 26, 201, 198, 23195, 220, 220, 220, 220, 220, 220, 5867, 60, 201, 198, 201, 198, 2, 264, 796, 685, 16, 1596, 1160, 838, 1248, 678, 1367, 718, 1467, 362, 1105, 1511, 767, 1478, 807, 513, 642, 860, 2310, 604, 1315, 60, 201, 198, 201, 198, 2, 2472, 62, 15805, 796, 657, 201, 198, 2, 1459, 62, 2435, 796, 657, 201, 198, 201, 198, 2, 329, 1312, 287, 352, 25, 1238, 201, 198, 2, 220, 220, 220, 220, 3298, 2472, 62, 15805, 15853, 288, 58, 82, 58, 72, 4357, 264, 58, 72, 10, 16, 11907, 201, 198, 2, 220, 220, 220, 220, 44872, 7203, 14421, 62, 2435, 1600, 1459, 62, 2435, 8, 201, 198, 2, 220, 220, 220, 220, 44872, 7203, 67, 58, 82, 58, 72, 4357, 264, 58, 72, 10, 16, 11907, 1600, 288, 58, 82, 58, 72, 4357, 264, 58, 72, 10, 16, 11907, 8, 201, 198, 2, 220, 220, 220, 220, 44872, 7203, 2435, 62, 28457, 58, 82, 58, 72, 10, 16, 4357, 362, 60, 1600, 640, 62, 28457, 58, 82, 58, 72, 10, 16, 4357, 1058, 12962, 201, 198, 2, 220, 220, 220, 220, 2488, 30493, 1459, 62, 2435, 1343, 288, 58, 82, 58, 72, 4357, 264, 58, 72, 10, 16, 11907, 19841, 640, 62, 28457, 58, 82, 58, 72, 10, 16, 4357, 362, 60, 201, 198, 2, 220, 220, 220, 220, 3298, 1459, 62, 2435, 796, 3509, 7, 2435, 62, 28457, 58, 82, 58, 72, 10, 16, 4357, 352, 4357, 1459, 62, 2435, 1343, 288, 58, 82, 58, 72, 4357, 264, 58, 72, 10, 16, 11907, 8, 201, 198, 2, 886, 201, 198, 2, 44872, 7203, 23350, 62, 15805, 1600, 2472, 62, 15805, 8, 201, 198, 201, 198, 2, 2472, 62, 15805, 15853, 288, 58, 82, 58, 2481, 4357, 264, 58, 16, 11907, 201, 198, 201, 198, 2, 44872, 7203, 23350, 62, 15805, 1600, 2472, 62, 15805, 8, 201, 198, 201, 198, 3500, 6896, 46262, 75, 201, 198, 7249, 13146, 457, 86, 43015, 4653, 1564, 90, 12322, 10267, 425, 92, 1279, 25, 6896, 46262, 75, 13, 23839, 43015, 4653, 1564, 90, 12322, 10267, 425, 92, 886, 201, 198, 201, 198, 33758, 457, 86, 43015, 4653, 1564, 7, 26, 20657, 62, 15252, 425, 28, 9562, 8, 796, 13146, 457, 86, 43015, 4653, 1564, 90, 20657, 62, 15252, 425, 92, 3419, 201, 198, 201, 198, 8818, 357, 3712, 33758, 457, 86, 43015, 4653, 1564, 90, 9562, 92, 5769, 66, 4426, 375, 417, 3712, 37567, 46262, 75, 13, 8697, 17633, 26, 374, 782, 28, 22366, 8, 201, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 13664, 7, 13083, 7, 66, 4426, 375, 417, 13, 25641, 2977, 4008, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 468, 2539, 7, 66, 4426, 375, 417, 13, 25641, 2977, 11, 366, 64, 62, 1, 9, 8841, 7, 72, 4008, 11405, 5145, 37567, 46262, 75, 13, 271, 7784, 7, 66, 4426, 375, 417, 13, 25641, 2977, 14692, 64, 62, 1, 9, 8841, 7, 72, 8, 12962, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 269, 4426, 375, 417, 13, 25641, 2977, 14692, 64, 62, 1, 9, 8841, 7, 72, 15437, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 44872, 7, 66, 4426, 375, 417, 13, 25641, 2977, 8, 201, 198, 437, 201, 198, 201, 198, 8818, 5699, 62, 19205, 7, 87, 3712, 37567, 46262, 75, 13, 5317, 19852, 11, 1233, 3712, 46912, 11, 2746, 3712, 37567, 46262, 75, 13, 8697, 17633, 8, 201, 198, 220, 220, 220, 1312, 796, 352, 201, 198, 220, 220, 220, 981, 366, 64, 62, 1, 9, 8841, 7, 72, 8, 14512, 2124, 13, 312, 201, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 15853, 352, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 1459, 62, 19205, 796, 6896, 46262, 75, 13, 562, 3916, 11395, 7, 19849, 13, 25641, 2977, 14692, 85, 62, 1, 9, 8841, 7, 72, 8, 12962, 201, 198, 201, 198, 220, 220, 220, 474, 796, 657, 201, 198, 220, 220, 220, 949, 20344, 796, 657, 201, 198, 220, 220, 220, 5699, 796, 474, 201, 198, 220, 220, 220, 1043, 62, 505, 796, 3991, 201, 198, 220, 220, 220, 981, 474, 1279, 2546, 7, 17080, 11, 352, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 474, 15853, 352, 201, 198, 220, 220, 220, 220, 220, 220, 220, 611, 22759, 9275, 62, 505, 8614, 1233, 58, 14421, 62, 19205, 11, 474, 60, 1279, 949, 20344, 8, 11405, 474, 287, 2124, 13, 27830, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 949, 20344, 796, 1233, 58, 14421, 62, 19205, 11, 474, 60, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5699, 796, 474, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1043, 62, 505, 796, 2081, 201, 198, 220, 220, 220, 220, 220, 220, 220, 886, 201, 198, 220, 220, 220, 886, 201, 198, 220, 220, 220, 1441, 5699, 201, 198, 437, 201, 198, 201, 198, 8818, 8494, 62, 912, 457, 86, 7, 77, 62, 19205, 28, 2481, 8, 201, 198, 220, 220, 220, 12268, 796, 6896, 46262, 75, 13, 15721, 5329, 3419, 201, 198, 220, 220, 220, 2746, 796, 6896, 46262, 75, 13, 8697, 17633, 7, 9535, 5329, 8, 201, 198, 201, 198, 220, 220, 220, 10706, 62, 7857, 796, 1802, 201, 198, 220, 220, 220, 3509, 62, 4246, 62, 43554, 796, 838, 201, 198, 220, 220, 220, 3509, 62, 4246, 796, 1802, 201, 198, 201, 198, 220, 220, 220, 17301, 796, 6896, 46262, 75, 13, 33758, 457, 86, 8645, 1352, 7, 77, 62, 19205, 11, 10706, 62, 7857, 11, 3509, 62, 4246, 62, 43554, 11, 3509, 62, 4246, 8, 201, 198, 201, 198, 220, 220, 220, 1233, 11, 640, 62, 28457, 796, 6896, 46262, 75, 13, 20797, 62, 4480, 62, 8612, 1352, 0, 7, 19849, 11, 17301, 8, 201, 198, 201, 198, 220, 220, 220, 7885, 258, 27915, 796, 13146, 457, 86, 43015, 4653, 1564, 90, 9562, 92, 3419, 201, 198, 220, 220, 220, 616, 62, 258, 27915, 7, 87, 3712, 37567, 46262, 75, 13, 5317, 19852, 8, 796, 5288, 7, 87, 13, 27830, 8, 201, 198, 220, 220, 220, 1988, 258, 27915, 796, 6896, 46262, 75, 13, 26416, 1544, 27915, 19510, 87, 26, 269, 4426, 375, 417, 28, 22366, 8, 4613, 5699, 62, 19205, 7, 87, 11, 1233, 11, 2746, 4008, 201, 198, 201, 198, 220, 220, 220, 6896, 46262, 75, 13, 12947, 0, 7, 19849, 11, 6896, 46262, 75, 13, 8068, 18243, 11, 7885, 258, 27915, 11, 1988, 258, 27915, 8, 201, 198, 201, 198, 220, 220, 220, 4610, 62, 9275, 796, 2558, 21737, 201, 198, 220, 220, 220, 329, 1312, 287, 352, 37498, 77, 62, 19205, 12, 16, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 82, 2122, 62, 9275, 11, 2746, 13, 82, 14191, 58, 437, 7131, 1, 64, 62, 1, 9, 8841, 7, 72, 8, 12962, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 44872, 7203, 46344, 25, 33172, 4610, 62, 9275, 8, 201, 198, 220, 220, 220, 44872, 7203, 45, 4147, 8672, 25, 33172, 2746, 13, 14269, 3969, 13, 17618, 5189, 45, 4147, 8, 201, 198, 437, 201, 198, 201, 198, 8818, 8494, 62, 912, 457, 86, 62, 4002, 62, 39098, 3419, 201, 198, 220, 220, 220, 1233, 796, 685, 15, 678, 1596, 4974, 767, 1160, 838, 1596, 2579, 1315, 2242, 2808, 2242, 2808, 2310, 1160, 860, 1467, 2310, 1511, 1105, 26, 201, 198, 220, 220, 220, 678, 657, 838, 6073, 2608, 513, 2681, 1679, 1315, 1596, 1596, 1478, 1248, 4764, 1596, 718, 2310, 1478, 1596, 1511, 3261, 26, 201, 198, 220, 220, 220, 1596, 838, 657, 6298, 2242, 1511, 2608, 1315, 1679, 2534, 2608, 1987, 2681, 5846, 767, 642, 2242, 2310, 1679, 1248, 2808, 26, 201, 198, 220, 220, 220, 4974, 6073, 6298, 657, 4570, 5014, 1679, 6885, 4570, 1987, 2681, 4353, 1679, 5846, 7175, 4153, 1679, 2579, 2608, 2579, 2681, 26, 201, 198, 220, 220, 220, 767, 2608, 2242, 4570, 657, 2681, 1367, 1596, 3439, 2534, 1542, 4570, 1542, 2534, 1679, 2608, 1478, 2242, 2579, 1160, 838, 26, 201, 198, 220, 220, 220, 1160, 513, 1511, 5014, 2681, 657, 2608, 2681, 1105, 1315, 1478, 1367, 1315, 5125, 1160, 860, 1160, 1367, 1478, 1367, 1542, 26, 201, 198, 220, 220, 220, 838, 2681, 2608, 1679, 1367, 2608, 657, 2608, 3261, 1478, 2242, 3933, 2534, 1679, 3261, 2579, 718, 1596, 2310, 1315, 604, 26, 201, 198, 220, 220, 220, 1596, 1679, 1315, 6885, 1596, 2681, 2608, 657, 5014, 3261, 4353, 4353, 4353, 4974, 1511, 1160, 2608, 3261, 4570, 2579, 2681, 26, 201, 198, 220, 220, 220, 2579, 1315, 1679, 4570, 3439, 1105, 3261, 5014, 657, 1596, 860, 362, 1367, 7265, 3933, 2310, 1987, 1511, 1367, 1315, 3439, 26, 201, 198, 220, 220, 220, 1315, 1596, 2534, 1987, 2534, 1315, 1478, 3261, 1596, 657, 860, 1248, 807, 5014, 2808, 2310, 807, 604, 767, 604, 1248, 26, 201, 198, 220, 220, 220, 2242, 1596, 2608, 2681, 1542, 1478, 2242, 4353, 860, 860, 657, 1367, 362, 4764, 4747, 2242, 1596, 767, 362, 838, 2681, 26, 201, 198, 220, 220, 220, 2808, 1478, 1987, 4353, 4570, 1367, 3933, 4353, 362, 1248, 1367, 657, 1511, 7632, 3261, 1160, 1679, 1478, 1511, 1596, 4570, 26, 201, 198, 220, 220, 220, 2242, 1248, 2681, 1679, 1542, 1315, 2534, 4353, 1367, 807, 362, 1511, 657, 6298, 4974, 1987, 1467, 767, 362, 838, 2608, 26, 201, 198, 220, 220, 220, 2808, 4764, 5846, 5846, 2534, 5125, 1679, 4974, 7265, 5014, 4764, 7632, 6298, 657, 6337, 4764, 3261, 5433, 6337, 2319, 2310, 26, 201, 198, 220, 220, 220, 2310, 1596, 767, 7175, 1679, 1160, 3261, 1511, 3933, 2808, 4747, 3261, 4974, 6337, 657, 1367, 2808, 2579, 3933, 1679, 4747, 26, 201, 198, 220, 220, 220, 1160, 718, 642, 4153, 2608, 860, 2579, 1160, 2310, 2310, 2242, 1160, 1987, 4764, 1367, 657, 2242, 678, 2534, 1596, 3933, 26, 201, 198, 220, 220, 220, 860, 2310, 2242, 1679, 1478, 1160, 718, 2608, 1987, 807, 1596, 1679, 1467, 3261, 2808, 2242, 657, 1367, 1315, 860, 838, 26, 201, 198, 220, 220, 220, 1467, 1478, 2310, 2579, 2242, 1367, 1596, 3261, 1511, 604, 767, 1478, 767, 5433, 2579, 678, 1367, 657, 642, 513, 2310, 26, 201, 198, 220, 220, 220, 2310, 1596, 1679, 2608, 2579, 1478, 2310, 4570, 1367, 767, 362, 1511, 362, 6337, 3933, 2534, 1315, 642, 657, 807, 1679, 26, 201, 198, 220, 220, 220, 1511, 1511, 1248, 2579, 1160, 1367, 1315, 2579, 1315, 604, 838, 1596, 838, 2319, 1679, 1596, 860, 513, 807, 657, 678, 26, 201, 198, 220, 220, 220, 1105, 3261, 2808, 2681, 838, 1542, 604, 2681, 3439, 1248, 2681, 4570, 2608, 2310, 4747, 3933, 838, 2310, 1679, 678, 657, 60, 201, 198, 201, 198, 220, 220, 220, 640, 62, 28457, 796, 685, 15, 220, 220, 220, 220, 220, 220, 220, 220, 41247, 26, 201, 198, 220, 220, 220, 8190, 220, 220, 220, 220, 220, 220, 220, 8257, 26, 201, 198, 220, 220, 220, 30110, 220, 220, 220, 220, 220, 220, 22538, 26, 201, 198, 220, 220, 220, 37255, 220, 220, 220, 220, 220, 220, 38595, 26, 201, 198, 220, 220, 220, 28277, 220, 220, 220, 220, 220, 220, 24894, 26, 201, 198, 220, 220, 220, 6885, 220, 220, 220, 220, 220, 220, 220, 8454, 26, 201, 198, 220, 220, 220, 15143, 220, 220, 220, 220, 220, 220, 20248, 26, 201, 198, 220, 220, 220, 19038, 220, 220, 220, 220, 220, 220, 28481, 26, 201, 198, 220, 220, 220, 8646, 220, 220, 220, 220, 220, 220, 39135, 26, 201, 198, 220, 220, 220, 513, 220, 220, 220, 220, 220, 220, 220, 220, 2242, 26, 201, 198, 220, 220, 220, 2310, 220, 220, 220, 220, 220, 220, 220, 5125, 26, 201, 198, 220, 220, 220, 9225, 220, 220, 220, 220, 220, 220, 220, 4101, 26, 201, 198, 220, 220, 220, 8699, 220, 220, 220, 220, 220, 220, 220, 9907, 26, 201, 198, 220, 220, 220, 12713, 220, 220, 220, 220, 220, 220, 24235, 26, 201, 198, 220, 220, 220, 46752, 220, 220, 220, 220, 220, 220, 48340, 26, 201, 198, 220, 220, 220, 5433, 220, 220, 220, 220, 220, 220, 220, 8093, 26, 201, 198, 220, 220, 220, 362, 220, 220, 220, 220, 220, 220, 220, 220, 1511, 26, 201, 198, 220, 220, 220, 1987, 220, 220, 220, 220, 220, 220, 220, 5433, 26, 201, 198, 220, 220, 220, 1160, 220, 220, 220, 220, 220, 220, 220, 4747, 26, 201, 198, 220, 220, 220, 860, 220, 220, 220, 220, 220, 220, 220, 220, 2310, 26, 201, 198, 220, 220, 220, 25829, 220, 220, 220, 220, 220, 220, 5867, 60, 201, 198, 201, 198, 220, 220, 220, 12268, 796, 6896, 46262, 75, 13, 15721, 5329, 3419, 201, 198, 220, 220, 220, 2746, 796, 6896, 46262, 75, 13, 8697, 17633, 7, 9535, 5329, 8, 201, 198, 201, 198, 220, 220, 220, 299, 62, 19205, 796, 2310, 201, 198, 220, 220, 220, 10706, 62, 7857, 796, 1802, 201, 198, 220, 220, 220, 3509, 62, 4246, 62, 43554, 796, 838, 201, 198, 220, 220, 220, 3509, 62, 4246, 796, 1802, 201, 198, 201, 198, 220, 220, 220, 17301, 796, 6896, 46262, 75, 13, 33758, 457, 86, 8645, 1352, 7, 77, 62, 19205, 11, 10706, 62, 7857, 11, 3509, 62, 4246, 62, 43554, 11, 3509, 62, 4246, 8, 201, 198, 201, 198, 220, 220, 220, 1233, 11, 640, 62, 28457, 796, 6896, 46262, 75, 13, 20797, 62, 4480, 62, 8612, 1352, 0, 7, 19849, 11, 17301, 26, 1233, 28, 17080, 11, 640, 62, 28457, 28, 2435, 62, 28457, 8, 201, 198, 201, 198, 220, 220, 220, 7885, 258, 27915, 796, 13146, 457, 86, 43015, 4653, 1564, 90, 9562, 92, 3419, 201, 198, 220, 220, 220, 616, 62, 258, 27915, 7, 87, 3712, 37567, 46262, 75, 13, 5317, 19852, 8, 796, 5288, 7, 87, 13, 27830, 8, 201, 198, 220, 220, 220, 1988, 258, 27915, 796, 6896, 46262, 75, 13, 26416, 1544, 27915, 19510, 87, 26, 269, 4426, 375, 417, 28, 22366, 8, 4613, 5699, 62, 19205, 7, 87, 11, 1233, 11, 2746, 4008, 201, 198, 201, 198, 220, 220, 220, 6896, 46262, 75, 13, 12947, 0, 7, 19849, 11, 6896, 46262, 75, 13, 8068, 18243, 11, 7885, 258, 27915, 11, 1988, 258, 27915, 8, 201, 198, 201, 198, 220, 220, 220, 4610, 62, 9275, 796, 2558, 21737, 201, 198, 220, 220, 220, 329, 1312, 287, 352, 37498, 77, 62, 19205, 12, 16, 8, 201, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 82, 2122, 62, 9275, 11, 2746, 13, 82, 14191, 58, 437, 7131, 1, 64, 62, 1, 9, 8841, 7, 72, 8, 12962, 201, 198, 220, 220, 220, 886, 201, 198, 201, 198, 220, 220, 220, 44872, 7203, 46344, 25, 33172, 4610, 62, 9275, 8, 201, 198, 220, 220, 220, 44872, 7203, 45, 4147, 8672, 25, 33172, 2746, 13, 14269, 3969, 13, 17618, 5189, 45, 4147, 8, 201, 198, 437 ]
2.158105
3,251
immutable NGramModel ml::Dict{UTF8String, Float64} n::Integer end getindex(m::NGramModel, gram::String) = get(m.ml, utf8(gram), 0.0) function NGramModel(sentences::Vector{String}, n) # Tokenize string tokenize(s) = TextAnalysis.tokenize(TextAnalysis.EnglishLanguage, s) # NGramize tokens function ngramize(words) # Use "*" symbol start and "STOP" for end of sentence words = vcat("*", "*", words, "STOP") n_words = length(words) tokens = Dict{UTF8String, Int}() for m in 1:n for index in 1:(n_words - m + 1) token = join(words[index:(index + m - 1)], " ") tokens[token] = get(tokens, token, 0) + 1 end end tokens end # Create a NGramDocument from a gram dict document(gram) = NGramDocument(gram, n) togeneric(docs) = convert(Array{GenericDocument, 1}, docs) # Create corpus corpus= Corpus(map(x -> x |> tokenize |> ngramize |> document, sentences) |> togeneric) # Create lexicon update_lexicon!(corpus) # Create model with maximum likelihood estimation # => Linear approximation ml = Dict{UTF8String, Float64}() words = collect(UTF8String, keys(lexicon(corpus))) n_words = length(words) gramcount = lexicon(corpus) function likelihood(gram) println(join(gram, " ")) res = 0 for i = 1:(n-1) println("$(i) => $(join(gram[i:end], " ")) / $(join(gram[i:(end - 1)], " "))") res += (1 / n) * gramcount[join(gram[i:end], " ")] / gramcount[join(gram[i:(end - 1)], " ")] end println("$(n) => $(gram[end]) / $(n_words)") res += (1 / n) * gramcount[gram[end]] / n_words res end for w in words trigram = tokenize(w) if length(trigram) == n ml[w] = likelihood(trigram) end end NGramModel(ml, n) end
[ 198, 198, 8608, 18187, 39058, 859, 17633, 198, 220, 220, 220, 25962, 3712, 35, 713, 90, 48504, 23, 10100, 11, 48436, 2414, 92, 198, 220, 220, 220, 299, 3712, 46541, 198, 437, 198, 198, 1136, 9630, 7, 76, 3712, 10503, 859, 17633, 11, 14599, 3712, 10100, 8, 796, 651, 7, 76, 13, 4029, 11, 3384, 69, 23, 7, 4546, 828, 657, 13, 15, 8, 198, 198, 8818, 39058, 859, 17633, 7, 34086, 3007, 3712, 38469, 90, 10100, 5512, 299, 8, 628, 220, 220, 220, 1303, 29130, 1096, 4731, 198, 220, 220, 220, 11241, 1096, 7, 82, 8, 796, 8255, 32750, 13, 30001, 1096, 7, 8206, 32750, 13, 15823, 32065, 11, 264, 8, 628, 220, 220, 220, 1303, 39058, 859, 1096, 16326, 198, 220, 220, 220, 2163, 299, 4546, 1096, 7, 10879, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 5765, 366, 9, 1, 6194, 923, 290, 366, 2257, 3185, 1, 329, 886, 286, 6827, 198, 220, 220, 220, 220, 220, 220, 220, 2456, 796, 410, 9246, 7203, 9, 1600, 366, 9, 1600, 2456, 11, 366, 2257, 3185, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 299, 62, 10879, 796, 4129, 7, 10879, 8, 198, 220, 220, 220, 220, 220, 220, 220, 16326, 796, 360, 713, 90, 48504, 23, 10100, 11, 2558, 92, 3419, 628, 220, 220, 220, 220, 220, 220, 220, 329, 285, 287, 352, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 6376, 287, 352, 37498, 77, 62, 10879, 532, 285, 1343, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11241, 796, 4654, 7, 10879, 58, 9630, 37498, 9630, 1343, 285, 532, 352, 8, 4357, 366, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16326, 58, 30001, 60, 796, 651, 7, 83, 482, 641, 11, 11241, 11, 657, 8, 1343, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 16326, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 13610, 257, 39058, 859, 24941, 422, 257, 14599, 8633, 198, 220, 220, 220, 3188, 7, 4546, 8, 796, 39058, 859, 24941, 7, 4546, 11, 299, 8, 198, 220, 220, 220, 284, 41357, 7, 31628, 8, 796, 10385, 7, 19182, 90, 46189, 24941, 11, 352, 5512, 34165, 8, 628, 220, 220, 220, 1303, 13610, 35789, 198, 220, 220, 220, 35789, 28, 44874, 7, 8899, 7, 87, 4613, 2124, 930, 29, 11241, 1096, 930, 29, 299, 4546, 1096, 930, 29, 3188, 11, 13439, 8, 930, 29, 284, 41357, 8, 628, 220, 220, 220, 1303, 13610, 31191, 4749, 198, 220, 220, 220, 4296, 62, 2588, 4749, 0, 7, 10215, 79, 385, 8, 628, 220, 220, 220, 1303, 13610, 2746, 351, 5415, 14955, 31850, 198, 220, 220, 220, 1303, 5218, 44800, 40874, 198, 220, 220, 220, 25962, 796, 360, 713, 90, 48504, 23, 10100, 11, 48436, 2414, 92, 3419, 198, 220, 220, 220, 2456, 796, 2824, 7, 48504, 23, 10100, 11, 8251, 7, 2588, 4749, 7, 10215, 79, 385, 22305, 198, 220, 220, 220, 299, 62, 10879, 796, 4129, 7, 10879, 8, 198, 220, 220, 220, 14599, 9127, 796, 31191, 4749, 7, 10215, 79, 385, 8, 628, 198, 220, 220, 220, 2163, 14955, 7, 4546, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7, 22179, 7, 4546, 11, 366, 366, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 581, 796, 657, 628, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 796, 352, 37498, 77, 12, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 3, 7, 72, 8, 5218, 29568, 22179, 7, 4546, 58, 72, 25, 437, 4357, 366, 366, 4008, 1220, 29568, 22179, 7, 4546, 58, 72, 37498, 437, 532, 352, 8, 4357, 366, 366, 4008, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 581, 15853, 357, 16, 1220, 299, 8, 1635, 14599, 9127, 58, 22179, 7, 4546, 58, 72, 25, 437, 4357, 366, 366, 15437, 1220, 14599, 9127, 58, 22179, 7, 4546, 58, 72, 37498, 437, 532, 352, 8, 4357, 366, 366, 15437, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 3, 7, 77, 8, 5218, 29568, 4546, 58, 437, 12962, 1220, 29568, 77, 62, 10879, 8, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 581, 15853, 357, 16, 1220, 299, 8, 1635, 14599, 9127, 58, 4546, 58, 437, 11907, 1220, 299, 62, 10879, 628, 220, 220, 220, 220, 220, 220, 220, 581, 198, 220, 220, 220, 886, 628, 220, 220, 220, 329, 266, 287, 2456, 198, 220, 220, 220, 220, 220, 220, 220, 5192, 859, 796, 11241, 1096, 7, 86, 8, 628, 220, 220, 220, 220, 220, 220, 220, 611, 4129, 7, 2213, 328, 859, 8, 6624, 299, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25962, 58, 86, 60, 796, 14955, 7, 2213, 328, 859, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 39058, 859, 17633, 7, 4029, 11, 299, 8, 198, 437, 198 ]
2.196591
880
abstract type CIService end struct GitHubActions <: CIService username::String email::String api_hostname::String clone_hostname::String function GitHubActions(; username="github-actions[bot]", email="41898282+github-actions[bot]@users.noreply.github.com", api_hostname="https://api.github.com", clone_hostname="github.com", ) return new(username, email, api_hostname, clone_hostname) end end struct GitLabCI <: CIService username::String email::String api_hostname::String clone_hostname::String function GitLabCI(; username="gitlab-ci[bot]", email="gitlab-ci[bot]@gitlab.com", api_hostname="https://gitlab.com/api/v4", clone_hostname="gitlab.com", ) return new(username, email, api_hostname, clone_hostname) end end ci_repository(::GitHubActions, env::AbstractDict=ENV) = env["GITHUB_REPOSITORY"] ci_repository(::GitLabCI, env::AbstractDict=ENV) = env["CI_PROJECT_PATH"] ci_token(::GitHubActions, env::AbstractDict=ENV) = env["GITHUB_TOKEN"] ci_token(::GitLabCI, env::AbstractDict=ENV) = env["GITLAB_TOKEN"] function get_api_and_repo(ci::GitHubActions; env=ENV) token = GitHub.Token(ci_token(ci, env)) api = GitHub.GitHubAPI(; token=token, url=ci.api_hostname) repo, _ = @mock GitForge.get_repo(api, ci_repository(ci, env)) return api, repo end function get_api_and_repo(ci::GitLabCI; env=ENV) token = GitLab.PersonalAccessToken(ci_token(ci, env)) api = GitLab.GitLabAPI(; token=token, url=ci.api_hostname) repo, _ = @mock GitForge.get_repo(api, ci_repository(ci, env)) return api, repo end function get_api_and_repo(ci::Any) err = "Unknown CI Config: $(typeof(ci))" @error(err) return throw(ErrorException(err)) end function auto_detect_ci_service(; env::AbstractDict=ENV) if haskey(env, "GITHUB_REPOSITORY") return GitHubActions() elseif haskey(env, "GITLAB_CI") return GitLabCI() else throw(UnableToDetectCIService("Could not detect CI service")) end end
[ 397, 8709, 2099, 36159, 712, 501, 886, 198, 198, 7249, 21722, 32, 2733, 1279, 25, 36159, 712, 501, 198, 220, 220, 220, 20579, 3712, 10100, 198, 220, 220, 220, 3053, 3712, 10100, 198, 220, 220, 220, 40391, 62, 4774, 3672, 3712, 10100, 198, 220, 220, 220, 17271, 62, 4774, 3672, 3712, 10100, 628, 220, 220, 220, 2163, 21722, 32, 2733, 7, 26, 198, 220, 220, 220, 220, 220, 220, 220, 20579, 2625, 12567, 12, 4658, 58, 13645, 60, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 3053, 2625, 39667, 4089, 32568, 10, 12567, 12, 4658, 58, 13645, 60, 31, 18417, 13, 77, 382, 2145, 13, 12567, 13, 785, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 40391, 62, 4774, 3672, 2625, 5450, 1378, 15042, 13, 12567, 13, 785, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 17271, 62, 4774, 3672, 2625, 12567, 13, 785, 1600, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 649, 7, 29460, 11, 3053, 11, 40391, 62, 4774, 3672, 11, 17271, 62, 4774, 3672, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 7249, 15151, 17822, 25690, 1279, 25, 36159, 712, 501, 198, 220, 220, 220, 20579, 3712, 10100, 198, 220, 220, 220, 3053, 3712, 10100, 198, 220, 220, 220, 40391, 62, 4774, 3672, 3712, 10100, 198, 220, 220, 220, 17271, 62, 4774, 3672, 3712, 10100, 628, 220, 220, 220, 2163, 15151, 17822, 25690, 7, 26, 198, 220, 220, 220, 220, 220, 220, 220, 20579, 2625, 18300, 23912, 12, 979, 58, 13645, 60, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 3053, 2625, 18300, 23912, 12, 979, 58, 13645, 60, 31, 18300, 23912, 13, 785, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 40391, 62, 4774, 3672, 2625, 5450, 1378, 18300, 23912, 13, 785, 14, 15042, 14, 85, 19, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 17271, 62, 4774, 3672, 2625, 18300, 23912, 13, 785, 1600, 198, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 649, 7, 29460, 11, 3053, 11, 40391, 62, 4774, 3672, 11, 17271, 62, 4774, 3672, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 979, 62, 260, 1930, 37765, 7, 3712, 38, 270, 16066, 32, 2733, 11, 17365, 3712, 23839, 35, 713, 28, 1677, 53, 8, 796, 17365, 14692, 38, 10554, 10526, 62, 35316, 2640, 2043, 15513, 8973, 198, 979, 62, 260, 1930, 37765, 7, 3712, 38, 270, 17822, 25690, 11, 17365, 3712, 23839, 35, 713, 28, 1677, 53, 8, 796, 17365, 14692, 25690, 62, 31190, 23680, 62, 34219, 8973, 198, 198, 979, 62, 30001, 7, 3712, 38, 270, 16066, 32, 2733, 11, 17365, 3712, 23839, 35, 713, 28, 1677, 53, 8, 796, 17365, 14692, 38, 10554, 10526, 62, 10468, 43959, 8973, 198, 979, 62, 30001, 7, 3712, 38, 270, 17822, 25690, 11, 17365, 3712, 23839, 35, 713, 28, 1677, 53, 8, 796, 17365, 14692, 38, 2043, 48780, 62, 10468, 43959, 8973, 198, 198, 8818, 651, 62, 15042, 62, 392, 62, 260, 7501, 7, 979, 3712, 38, 270, 16066, 32, 2733, 26, 17365, 28, 1677, 53, 8, 198, 220, 220, 220, 11241, 796, 21722, 13, 30642, 7, 979, 62, 30001, 7, 979, 11, 17365, 4008, 198, 220, 220, 220, 40391, 796, 21722, 13, 38, 270, 16066, 17614, 7, 26, 11241, 28, 30001, 11, 19016, 28, 979, 13, 15042, 62, 4774, 3672, 8, 198, 220, 220, 220, 29924, 11, 4808, 796, 2488, 76, 735, 15151, 19857, 13, 1136, 62, 260, 7501, 7, 15042, 11, 269, 72, 62, 260, 1930, 37765, 7, 979, 11, 17365, 4008, 628, 220, 220, 220, 1441, 40391, 11, 29924, 198, 437, 198, 198, 8818, 651, 62, 15042, 62, 392, 62, 260, 7501, 7, 979, 3712, 38, 270, 17822, 25690, 26, 17365, 28, 1677, 53, 8, 198, 220, 220, 220, 11241, 796, 15151, 17822, 13, 30228, 15457, 30642, 7, 979, 62, 30001, 7, 979, 11, 17365, 4008, 198, 220, 220, 220, 40391, 796, 15151, 17822, 13, 38, 270, 17822, 17614, 7, 26, 11241, 28, 30001, 11, 19016, 28, 979, 13, 15042, 62, 4774, 3672, 8, 198, 220, 220, 220, 29924, 11, 4808, 796, 2488, 76, 735, 15151, 19857, 13, 1136, 62, 260, 7501, 7, 15042, 11, 269, 72, 62, 260, 1930, 37765, 7, 979, 11, 17365, 4008, 628, 220, 220, 220, 1441, 40391, 11, 29924, 198, 437, 198, 198, 8818, 651, 62, 15042, 62, 392, 62, 260, 7501, 7, 979, 3712, 7149, 8, 198, 220, 220, 220, 11454, 796, 366, 20035, 14514, 17056, 25, 29568, 4906, 1659, 7, 979, 4008, 1, 198, 220, 220, 220, 2488, 18224, 7, 8056, 8, 198, 220, 220, 220, 1441, 3714, 7, 12331, 16922, 7, 8056, 4008, 198, 437, 198, 198, 8818, 8295, 62, 15255, 478, 62, 979, 62, 15271, 7, 26, 17365, 3712, 23839, 35, 713, 28, 1677, 53, 8, 198, 220, 220, 220, 611, 468, 2539, 7, 24330, 11, 366, 38, 10554, 10526, 62, 35316, 2640, 2043, 15513, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 21722, 32, 2733, 3419, 198, 220, 220, 220, 2073, 361, 468, 2539, 7, 24330, 11, 366, 38, 2043, 48780, 62, 25690, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 15151, 17822, 25690, 3419, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 3118, 540, 2514, 47504, 34, 1797, 712, 501, 7203, 23722, 407, 4886, 14514, 2139, 48774, 198, 220, 220, 220, 886, 198, 437, 198 ]
2.32703
899
# Use Julia's `jl_type_morespecific` function to emulate Julia's multiple dispatch across # generic functions. # # Origin: # https://github.com/JuliaLang/julia/blob/master/doc/src/devdocs/types.md#subtyping-and-method-sorting type_morespecific(a, b) = ccall(:jl_type_morespecific, Bool, (Any, Any), a, b) """ anonymous_signature(m::Method) -> Type{<:Tuple} Construct a Tuple of the methods signature with the function type removed # Example ```jldoctest julia> m = first(methods(first, (String,))); julia> m.sig Tuple{typeof(first),Any} julia> anonymous_signature(m) Tuple{Any} ``` """ anonymous_signature(m::Method) = anonymous_signature(m.sig) anonymous_signature(sig::DataType) = Tuple{sig.parameters[2:end]...} anonymous_signature(sig::UnionAll) = UnionAll(sig.var, anonymous_signature(sig.body)) """ anon_morespecific(a::Method, b::Method) -> Bool Determine which method is more specific for multiple dispatch without considering the function type. By not considering the function type we can determine which method is more specific as if they are a part of the same generic function. """ function anon_morespecific(a::Method, b::Method) # Drop the function type from the parameter a_sig = anonymous_signature(a) b_sig = anonymous_signature(b) return type_morespecific(a_sig, b_sig) end """ dispatch(funcs::AbstractVector, args...) -> Tuple{Method, Any} Choose which method to execute based upon the provided arguments (values not types). Emulates Julia's multiple dispatch system but allows for dispatching between methods of multiple generic functions instead of just methods of a single generic function. Returns a tuple of the selected method and the generic function of the method. When the function to dispatch to is ambiguous last ambiguous function in the vector is used. """ function dispatch(funcs::AbstractVector, args...) arg_types = map(Core.Typeof, args) best_method = nothing best_function = nothing for f in reverse(funcs) # Since arguments will be using concrete types `methods` should only return up to # one method. for m in methods(f, arg_types) if best_method === nothing || anon_morespecific(m, best_method) best_method = m best_function = f end end end return best_method, best_function end
[ 2, 5765, 22300, 338, 4600, 20362, 62, 4906, 62, 76, 2850, 431, 7790, 63, 2163, 284, 33836, 22300, 338, 3294, 27965, 1973, 198, 2, 14276, 5499, 13, 198, 2, 198, 2, 19349, 25, 198, 2, 3740, 1378, 12567, 13, 785, 14, 16980, 544, 43, 648, 14, 73, 43640, 14, 2436, 672, 14, 9866, 14, 15390, 14, 10677, 14, 7959, 31628, 14, 19199, 13, 9132, 2, 7266, 774, 13886, 12, 392, 12, 24396, 12, 82, 24707, 198, 4906, 62, 76, 2850, 431, 7790, 7, 64, 11, 275, 8, 796, 269, 13345, 7, 25, 20362, 62, 4906, 62, 76, 2850, 431, 7790, 11, 347, 970, 11, 357, 7149, 11, 4377, 828, 257, 11, 275, 8, 628, 198, 37811, 198, 220, 220, 220, 11614, 62, 12683, 1300, 7, 76, 3712, 17410, 8, 4613, 5994, 90, 27, 25, 51, 29291, 92, 198, 198, 42316, 257, 309, 29291, 286, 262, 5050, 9877, 351, 262, 2163, 2099, 4615, 198, 198, 2, 17934, 198, 15506, 63, 73, 335, 38441, 395, 198, 73, 43640, 29, 285, 796, 717, 7, 24396, 82, 7, 11085, 11, 357, 10100, 11, 4008, 1776, 198, 198, 73, 43640, 29, 285, 13, 82, 328, 198, 51, 29291, 90, 4906, 1659, 7, 11085, 828, 7149, 92, 198, 198, 73, 43640, 29, 11614, 62, 12683, 1300, 7, 76, 8, 198, 51, 29291, 90, 7149, 92, 198, 15506, 63, 198, 37811, 198, 272, 6704, 62, 12683, 1300, 7, 76, 3712, 17410, 8, 796, 11614, 62, 12683, 1300, 7, 76, 13, 82, 328, 8, 198, 272, 6704, 62, 12683, 1300, 7, 82, 328, 3712, 6601, 6030, 8, 796, 309, 29291, 90, 82, 328, 13, 17143, 7307, 58, 17, 25, 437, 60, 986, 92, 198, 272, 6704, 62, 12683, 1300, 7, 82, 328, 3712, 38176, 3237, 8, 796, 4479, 3237, 7, 82, 328, 13, 7785, 11, 11614, 62, 12683, 1300, 7, 82, 328, 13, 2618, 4008, 628, 198, 37811, 198, 220, 220, 220, 281, 261, 62, 76, 2850, 431, 7790, 7, 64, 3712, 17410, 11, 275, 3712, 17410, 8, 4613, 347, 970, 198, 198, 35, 2357, 3810, 543, 2446, 318, 517, 2176, 329, 3294, 27965, 1231, 6402, 262, 198, 8818, 2099, 13, 2750, 407, 6402, 262, 2163, 2099, 356, 460, 5004, 543, 2446, 318, 517, 198, 11423, 355, 611, 484, 389, 257, 636, 286, 262, 976, 14276, 2163, 13, 198, 37811, 198, 8818, 281, 261, 62, 76, 2850, 431, 7790, 7, 64, 3712, 17410, 11, 275, 3712, 17410, 8, 198, 220, 220, 220, 1303, 14258, 262, 2163, 2099, 422, 262, 11507, 198, 220, 220, 220, 257, 62, 82, 328, 796, 11614, 62, 12683, 1300, 7, 64, 8, 198, 220, 220, 220, 275, 62, 82, 328, 796, 11614, 62, 12683, 1300, 7, 65, 8, 628, 220, 220, 220, 1441, 2099, 62, 76, 2850, 431, 7790, 7, 64, 62, 82, 328, 11, 275, 62, 82, 328, 8, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 27965, 7, 12543, 6359, 3712, 23839, 38469, 11, 26498, 23029, 4613, 309, 29291, 90, 17410, 11, 4377, 92, 198, 198, 31851, 543, 2446, 284, 12260, 1912, 2402, 262, 2810, 7159, 357, 27160, 407, 3858, 737, 198, 10161, 15968, 22300, 338, 3294, 27965, 1080, 475, 3578, 329, 4596, 19775, 1022, 5050, 286, 198, 48101, 14276, 5499, 2427, 286, 655, 5050, 286, 257, 2060, 14276, 2163, 13, 16409, 257, 198, 83, 29291, 286, 262, 6163, 2446, 290, 262, 14276, 2163, 286, 262, 2446, 13, 198, 198, 2215, 262, 2163, 284, 27965, 284, 318, 27102, 938, 27102, 2163, 287, 262, 15879, 318, 973, 13, 198, 37811, 198, 8818, 27965, 7, 12543, 6359, 3712, 23839, 38469, 11, 26498, 23029, 198, 220, 220, 220, 1822, 62, 19199, 796, 3975, 7, 14055, 13, 6030, 1659, 11, 26498, 8, 628, 220, 220, 220, 1266, 62, 24396, 796, 2147, 198, 220, 220, 220, 1266, 62, 8818, 796, 2147, 198, 220, 220, 220, 329, 277, 287, 9575, 7, 12543, 6359, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 4619, 7159, 481, 307, 1262, 10017, 3858, 4600, 24396, 82, 63, 815, 691, 1441, 510, 284, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 530, 2446, 13, 198, 220, 220, 220, 220, 220, 220, 220, 329, 285, 287, 5050, 7, 69, 11, 1822, 62, 19199, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 1266, 62, 24396, 24844, 2147, 8614, 281, 261, 62, 76, 2850, 431, 7790, 7, 76, 11, 1266, 62, 24396, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1266, 62, 24396, 796, 285, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1266, 62, 8818, 796, 277, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 1266, 62, 24396, 11, 1266, 62, 8818, 198, 437, 198 ]
2.932099
810
""" Facet (`Vector{Int64}`) -> `BellGame` convert( ::Type{BellGame}, facet::Vector{Int64}, scenario::Union{BlackBox, LocalSignaling}; rep = "normalized"::String ) """ function convert( ::Type{BellGame}, facet::Vector{Int64}, scenario::Union{BlackBox,LocalSignaling}; rep = "normalized"::String ) if !(rep in ("normalized", "generalized")) throw(DomainError(rep, "Argument `rep` must be either 'normalized' or 'generalized'")) end game_dims = strategy_dims(scenario) div_facet = facet .÷ gcd(facet...) bound = div_facet[end] game_matrix = (rep == "normalized") ? cat( reshape(div_facet[1:end-1], (game_dims[1]-1, game_dims[2])), zeros(Int64, (1,game_dims[2])), dims=1 ) : reshape(div_facet[1:end-1], game_dims) BellGame(_reverse_game_normalization(game_matrix, bound)...) end """ Facet (`Vector{Int64}`) -> `BellGame` convert( ::Type{BellGame}, facet::Vector{Int64}, scenario::BipartiteNonSignaling; rep = "non-signaling"::String ) Transforms LocalPolytope facets into `BellGame` types. """ function convert(::Type{BellGame}, facet::Vector{Int64}, scenario::BipartiteNonSignaling; rep = "non-signaling"::String ) if !(rep in ["non-signaling","normalized","generalized"]) throw(DomainError(rep, "input `rep` must be in [\"non-signaling\",\"normalized\",\"generalized\"]")) end game_dims = strategy_dims(scenario) game = (rep == "generalized") ? reshape(facet[1:end-1], game_dims) : zeros(Int64, game_dims) bound = facet[end] if rep == "non-signaling" α_dim = (scenario.A-1)*scenario.X β_dim = (scenario.B-1)*scenario.Y α_game = reshape(facet[1:α_dim], (scenario.A-1, scenario.X)) β_game = reshape(facet[α_dim+1:α_dim+β_dim], (scenario.B-1, scenario.Y)) αβ_game = reshape(facet[α_dim+β_dim+1:end-1], ((scenario.A-1)*(scenario.B-1), scenario.X*scenario.Y)) αβ_col_sum = sum.(eachcol(αβ_game)) # using non-signaling constraints to remove g_a,x for a in 1:scenario.A-1 game[(a-1)*scenario.B+1:(a-1)*scenario.B + scenario.B-1,:] = αβ_game[(a-1)*(scenario.B-1)+1:a*(scenario.B-1),:] for x in 1:scenario.X if α_game[a,x] != 0 x_vec = zeros(Int64, scenario.X) x_vec[x] = 1 y_vec = ones(Int64,scenario.Y) αβ_col_id = findfirst(i -> i != 0, kron(x_vec,y_vec).*αβ_col_sum) game[(a-1)*scenario.B+1:a*scenario.B,αβ_col_id] += α_game[a,x]*ones(Int64,scenario.B) end end end # using non-signaling constraints to remove g_b,y for b in 1:scenario.B-1 game_row_ids = b:scenario.B:scenario.A*scenario.B-1 for y in 1:scenario.Y if β_game[b,y] != 0 y_vec = zeros(Int64, scenario.Y) y_vec[y] = 1 x_vec = ones(Int64, scenario.X) αβ_col_id = findfirst(i -> i != 0, kron(x_vec,y_vec).*αβ_col_sum) game[game_row_ids,αβ_col_id] += β_game[b,y]*ones(Int64,scenario.A) end end end elseif rep == "normalized" game[1:game_dims[1]-1,:] = reshape(facet[1:end-1], (game_dims[1]-1, game_dims[2])) end (game, bound) = _reverse_game_normalization(game,bound) BellGame(game,bound) end """ `XPORTA.IEQ` to `BellGame`'s convert( ::Type{Vector{BellGame}}, ieq::IEQ, scenario::Union{BlackBox, LocalSignaling}; rep = "normalized" :: String ) """ function convert(::Type{Vector{BellGame}}, ieq::IEQ, scenario::Union{BlackBox,LocalSignaling}; rep = "normalized"::String ) inequalities = convert.(Int64, ieq.inequalities) map( row_id -> convert(BellGame, inequalities[row_id,:], scenario, rep=rep), 1:size(inequalities,1)) end """ `BellGame` -> Facet (`Vector{Int64}`) convert(::Type{Vector{Int64}}, BG::BellGame; rep = "normalized" :: String) """ function convert(::Type{Vector{Int64}}, BG::BellGame; rep = "normalized"::String) if !(rep in ("normalized", "generalized")) throw(DomainError(rep, "Argument `rep` must be either 'normalized' or 'generalized'")) end bound = BG.β game_matrix = BG.game[:,:] game_dims = size(game_matrix) if rep == "normalized" (game_matrix, bound) = _apply_game_normalization!(game_matrix, bound) game_matrix = game_matrix[1:(end-1),:] end vcat(game_matrix[:], bound) end """ BellGame -> Vector{Int64} convert(::Type{Vector{Int64}}, BG::BellGame, scenario::BipartiteNonSignaling; rep = "non-signaling" :: String ) Transforms a `BellGame` for a `BipartiteNonSignaling` scenario into a facet vector. """ function convert(::Type{Vector{Int64}}, BG::BellGame, scenario::BipartiteNonSignaling; rep = "non-signaling" :: String ) if !(rep in ["non-signaling","normalized","generalized"]) throw(DomainError(rep, "input `rep` must be in [\"non-signaling\",\"normalized\",\"generalized\"]")) end game_dims = size(BG) v_dim = LocalPolytope.vertex_dims(scenario, rep) facet = (rep == "generalized") ? vcat(BG[:], BG.β) : zeros(Int64, v_dim+1) if rep == "normalized" (game_matrix, bound) = _apply_game_normalization(BG[:,:], BG.β) facet = vcat(game_matrix[1:game_dims[1]-1,:][:], bound) elseif rep == "non-signaling" (game_matrix, bound) = _apply_game_normalization!(BG[:,:], BG.β) # construct G(a|x) and G(b|y) # in each column, subtract off from each Alice/Bob column the values excluded from the non-signaling α_game = zeros(Int64, (scenario.A-1, scenario.X)) β_game = zeros(Int64, (scenario.B-1, scenario.Y)) # removing greatest output for Alice using non-signaling constraint for a in 1:scenario.A-1 target_row = a * scenario.B subtract_vals = game_matrix[target_row,:] a_dims = (a-1)*scenario.B +1: a * scenario.B game_matrix[a_dims,:] -= ones(Int64, scenario.B) * subtract_vals' α_game_rows = map(x -> begin x_dims = (x-1)*scenario.Y+1:x*scenario.Y sum(subtract_vals[x_dims]) end, 1:scenario.X) α_game[a,:] = α_game_rows end # removing greatest outputs for Bob using non-signaling constraint for b in 1:scenario.B-1 target_row = (scenario.A-1) * (scenario.B) + b subtract_vals = game_matrix[target_row,:] b_dims = b:scenario.B:scenario.A * scenario.B -1 game_matrix[b_dims,:] -= ones(Int64, scenario.A) * subtract_vals' β_game_rows = map(y -> begin y_dims = y:scenario.Y:scenario.X*scenario.Y sum(subtract_vals[y_dims]) end, 1:scenario.Y) β_game[b,:] = β_game_rows end # All remaining terms are in the no-sig subspace and are taken as is αβ_game = zeros(Int64, ((scenario.A-1)*(scenario.B-1), scenario.X*scenario.Y)) for a in 1:scenario.A-1 αβ_game[(a-1)*(scenario.B-1) + 1:a*(scenario.B-1),:] = game_matrix[(a-1)*scenario.B+1:a*scenario.B-1,:] end facet = vcat(α_game[:], β_game[:], αβ_game[:], bound) end facet end """ `BellGame`'s to `XPORTA.IEQ` convert(::Type{IEQ}, bell_games::Vector{BellGame}; rep = "normalized" :: String) """ function convert(::Type{IEQ}, bell_games::Vector{BellGame}; rep = "normalized"::String) ieq_vectors = map( bg -> convert(Vector{Int64}, bg, rep=rep), bell_games ) IEQ(inequalities = hcat(ieq_vectors...)'[:,:]) end """ Applies the normalization constraint to remove all negative values in the provided `game_matrix`. Returns a tuple `(new_game_matrix, new_bound)` """ function _reverse_game_normalization(game_matrix::Matrix{Int64}, bound::Int64) :: Tuple{Matrix{Int64}, Int64} new_bound = bound new_game_matrix = game_matrix for col_id in 1:size(game_matrix,2) col = game_matrix[:,col_id] col_min = min(col...) if col_min != 0 new_game_matrix[:,col_id] .-= col_min new_bound -= col_min end end (new_game_matrix, new_bound) end function _apply_game_normalization!(game_matrix::Matrix{Int64}, bound::Int64) :: Tuple{Matrix{Int64}, Int64} for col_id in 1:size(game_matrix,2) col = game_matrix[:,col_id] if col[end] !== 0 game_matrix[:,col_id] .-= col[end] bound -= col[end] end end (game_matrix, bound) end
[ 37811, 198, 37, 23253, 357, 63, 38469, 90, 5317, 2414, 92, 63, 8, 4613, 4600, 36488, 8777, 63, 628, 220, 220, 220, 10385, 7, 198, 220, 220, 220, 220, 220, 220, 220, 7904, 6030, 90, 36488, 8777, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 39144, 3712, 38469, 90, 5317, 2414, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 8883, 3712, 38176, 90, 9915, 14253, 11, 10714, 11712, 4272, 19629, 198, 220, 220, 220, 220, 220, 220, 220, 1128, 796, 366, 11265, 1143, 1298, 25, 10100, 198, 220, 220, 220, 1267, 198, 37811, 198, 8818, 10385, 7, 7904, 6030, 90, 36488, 8777, 5512, 198, 220, 220, 220, 39144, 3712, 38469, 90, 5317, 2414, 5512, 198, 220, 220, 220, 8883, 3712, 38176, 90, 9915, 14253, 11, 14565, 11712, 4272, 19629, 198, 220, 220, 220, 1128, 796, 366, 11265, 1143, 1298, 25, 10100, 198, 8, 198, 220, 220, 220, 611, 5145, 7, 7856, 287, 5855, 11265, 1143, 1600, 366, 24622, 1143, 48774, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 43961, 12331, 7, 7856, 11, 366, 28100, 1713, 4600, 7856, 63, 1276, 307, 2035, 705, 11265, 1143, 6, 393, 705, 24622, 1143, 29653, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 983, 62, 67, 12078, 796, 4811, 62, 67, 12078, 7, 1416, 39055, 8, 628, 220, 220, 220, 2659, 62, 69, 23253, 796, 39144, 764, 127, 115, 308, 10210, 7, 69, 23253, 23029, 628, 220, 220, 220, 5421, 796, 2659, 62, 69, 23253, 58, 437, 60, 198, 220, 220, 220, 983, 62, 6759, 8609, 796, 357, 7856, 6624, 366, 11265, 1143, 4943, 5633, 3797, 7, 198, 220, 220, 220, 220, 220, 220, 220, 27179, 1758, 7, 7146, 62, 69, 23253, 58, 16, 25, 437, 12, 16, 4357, 357, 6057, 62, 67, 12078, 58, 16, 45297, 16, 11, 983, 62, 67, 12078, 58, 17, 12962, 828, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 27498, 7, 5317, 2414, 11, 357, 16, 11, 6057, 62, 67, 12078, 58, 17, 12962, 828, 198, 220, 220, 220, 220, 220, 220, 220, 5391, 82, 28, 16, 198, 220, 220, 220, 1267, 1058, 27179, 1758, 7, 7146, 62, 69, 23253, 58, 16, 25, 437, 12, 16, 4357, 983, 62, 67, 12078, 8, 628, 220, 220, 220, 7459, 8777, 28264, 50188, 62, 6057, 62, 11265, 1634, 7, 6057, 62, 6759, 8609, 11, 5421, 8, 23029, 198, 437, 198, 198, 37811, 198, 37, 23253, 357, 63, 38469, 90, 5317, 2414, 92, 63, 8, 4613, 4600, 36488, 8777, 63, 628, 220, 220, 220, 10385, 7, 198, 220, 220, 220, 220, 220, 220, 220, 7904, 6030, 90, 36488, 8777, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 39144, 3712, 38469, 90, 5317, 2414, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 8883, 3712, 33, 541, 433, 578, 15419, 11712, 4272, 26, 198, 220, 220, 220, 220, 220, 220, 220, 1128, 796, 366, 13159, 12, 12683, 4272, 1298, 25, 10100, 198, 220, 220, 220, 1267, 198, 198, 8291, 23914, 10714, 34220, 83, 3008, 44497, 656, 4600, 36488, 8777, 63, 220, 3858, 13, 198, 37811, 198, 8818, 10385, 7, 3712, 6030, 90, 36488, 8777, 5512, 198, 220, 220, 220, 39144, 3712, 38469, 90, 5317, 2414, 5512, 198, 220, 220, 220, 8883, 3712, 33, 541, 433, 578, 15419, 11712, 4272, 26, 198, 220, 220, 220, 1128, 796, 366, 13159, 12, 12683, 4272, 1298, 25, 10100, 198, 8, 198, 220, 220, 220, 611, 5145, 7, 7856, 287, 14631, 13159, 12, 12683, 4272, 2430, 11265, 1143, 2430, 24622, 1143, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 43961, 12331, 7, 7856, 11, 366, 15414, 4600, 7856, 63, 1276, 307, 287, 685, 7879, 13159, 12, 12683, 4272, 34607, 7879, 11265, 1143, 34607, 7879, 24622, 1143, 7879, 30866, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 983, 62, 67, 12078, 796, 4811, 62, 67, 12078, 7, 1416, 39055, 8, 198, 220, 220, 220, 983, 796, 357, 7856, 6624, 366, 24622, 1143, 4943, 5633, 27179, 1758, 7, 69, 23253, 58, 16, 25, 437, 12, 16, 4357, 983, 62, 67, 12078, 8, 1058, 1976, 27498, 7, 5317, 2414, 11, 983, 62, 67, 12078, 8, 198, 220, 220, 220, 5421, 796, 39144, 58, 437, 60, 628, 220, 220, 220, 611, 1128, 6624, 366, 13159, 12, 12683, 4272, 1, 198, 220, 220, 220, 220, 220, 220, 220, 26367, 62, 27740, 796, 357, 1416, 39055, 13, 32, 12, 16, 27493, 1416, 39055, 13, 55, 198, 220, 220, 220, 220, 220, 220, 220, 27169, 62, 27740, 796, 357, 1416, 39055, 13, 33, 12, 16, 27493, 1416, 39055, 13, 56, 628, 220, 220, 220, 220, 220, 220, 220, 26367, 62, 6057, 796, 27179, 1758, 7, 69, 23253, 58, 16, 25, 17394, 62, 27740, 4357, 357, 1416, 39055, 13, 32, 12, 16, 11, 8883, 13, 55, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 27169, 62, 6057, 796, 27179, 1758, 7, 69, 23253, 58, 17394, 62, 27740, 10, 16, 25, 17394, 62, 27740, 10, 26638, 62, 27740, 4357, 357, 1416, 39055, 13, 33, 12, 16, 11, 8883, 13, 56, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 26367, 26638, 62, 6057, 796, 27179, 1758, 7, 69, 23253, 58, 17394, 62, 27740, 10, 26638, 62, 27740, 10, 16, 25, 437, 12, 16, 4357, 14808, 1416, 39055, 13, 32, 12, 16, 27493, 7, 1416, 39055, 13, 33, 12, 16, 828, 8883, 13, 55, 9, 1416, 39055, 13, 56, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 26367, 26638, 62, 4033, 62, 16345, 796, 2160, 12195, 27379, 4033, 7, 17394, 26638, 62, 6057, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1262, 1729, 12, 12683, 4272, 17778, 284, 4781, 308, 62, 64, 11, 87, 198, 220, 220, 220, 220, 220, 220, 220, 329, 257, 287, 352, 25, 1416, 39055, 13, 32, 12, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 983, 58, 7, 64, 12, 16, 27493, 1416, 39055, 13, 33, 10, 16, 37498, 64, 12, 16, 27493, 1416, 39055, 13, 33, 1343, 8883, 13, 33, 12, 16, 11, 47715, 796, 26367, 26638, 62, 6057, 58, 7, 64, 12, 16, 27493, 7, 1416, 39055, 13, 33, 12, 16, 47762, 16, 25, 64, 9, 7, 1416, 39055, 13, 33, 12, 16, 828, 47715, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 2124, 287, 352, 25, 1416, 39055, 13, 55, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 26367, 62, 6057, 58, 64, 11, 87, 60, 14512, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 62, 35138, 796, 1976, 27498, 7, 5317, 2414, 11, 8883, 13, 55, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 62, 35138, 58, 87, 60, 796, 352, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 62, 35138, 796, 3392, 7, 5317, 2414, 11, 1416, 39055, 13, 56, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26367, 26638, 62, 4033, 62, 312, 796, 1064, 11085, 7, 72, 4613, 1312, 14512, 657, 11, 479, 1313, 7, 87, 62, 35138, 11, 88, 62, 35138, 737, 9, 17394, 26638, 62, 4033, 62, 16345, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 983, 58, 7, 64, 12, 16, 27493, 1416, 39055, 13, 33, 10, 16, 25, 64, 9, 1416, 39055, 13, 33, 11, 17394, 26638, 62, 4033, 62, 312, 60, 15853, 26367, 62, 6057, 58, 64, 11, 87, 60, 9, 1952, 7, 5317, 2414, 11, 1416, 39055, 13, 33, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1262, 1729, 12, 12683, 4272, 17778, 284, 4781, 308, 62, 65, 11, 88, 198, 220, 220, 220, 220, 220, 220, 220, 329, 275, 287, 352, 25, 1416, 39055, 13, 33, 12, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 983, 62, 808, 62, 2340, 796, 275, 25, 1416, 39055, 13, 33, 25, 1416, 39055, 13, 32, 9, 1416, 39055, 13, 33, 12, 16, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 331, 287, 352, 25, 1416, 39055, 13, 56, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 27169, 62, 6057, 58, 65, 11, 88, 60, 14512, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 62, 35138, 796, 1976, 27498, 7, 5317, 2414, 11, 8883, 13, 56, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 62, 35138, 58, 88, 60, 796, 352, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 62, 35138, 796, 3392, 7, 5317, 2414, 11, 8883, 13, 55, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26367, 26638, 62, 4033, 62, 312, 796, 1064, 11085, 7, 72, 4613, 1312, 14512, 657, 11, 479, 1313, 7, 87, 62, 35138, 11, 88, 62, 35138, 737, 9, 17394, 26638, 62, 4033, 62, 16345, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 983, 58, 6057, 62, 808, 62, 2340, 11, 17394, 26638, 62, 4033, 62, 312, 60, 15853, 27169, 62, 6057, 58, 65, 11, 88, 60, 9, 1952, 7, 5317, 2414, 11, 1416, 39055, 13, 32, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 2073, 361, 1128, 6624, 366, 11265, 1143, 1, 198, 220, 220, 220, 220, 220, 220, 220, 983, 58, 16, 25, 6057, 62, 67, 12078, 58, 16, 45297, 16, 11, 47715, 796, 27179, 1758, 7, 69, 23253, 58, 16, 25, 437, 12, 16, 4357, 357, 6057, 62, 67, 12078, 58, 16, 45297, 16, 11, 983, 62, 67, 12078, 58, 17, 60, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 357, 6057, 11, 5421, 8, 796, 4808, 50188, 62, 6057, 62, 11265, 1634, 7, 6057, 11, 7784, 8, 628, 220, 220, 220, 7459, 8777, 7, 6057, 11, 7784, 8, 198, 437, 198, 198, 37811, 198, 63, 27481, 1581, 5603, 13, 10008, 48, 63, 284, 4600, 36488, 8777, 63, 6, 82, 628, 220, 220, 220, 10385, 7, 198, 220, 220, 220, 220, 220, 220, 220, 7904, 6030, 90, 38469, 90, 36488, 8777, 92, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 37941, 80, 3712, 10008, 48, 11, 198, 220, 220, 220, 220, 220, 220, 220, 8883, 3712, 38176, 90, 9915, 14253, 11, 10714, 11712, 4272, 19629, 198, 220, 220, 220, 220, 220, 220, 220, 1128, 796, 366, 11265, 1143, 1, 7904, 10903, 198, 220, 220, 220, 1267, 198, 37811, 198, 8818, 10385, 7, 3712, 6030, 90, 38469, 90, 36488, 8777, 92, 5512, 198, 220, 220, 220, 37941, 80, 3712, 10008, 48, 11, 198, 220, 220, 220, 8883, 3712, 38176, 90, 9915, 14253, 11, 14565, 11712, 4272, 19629, 198, 220, 220, 220, 1128, 796, 366, 11265, 1143, 1298, 25, 10100, 198, 8, 198, 220, 220, 220, 45460, 796, 10385, 12195, 5317, 2414, 11, 37941, 80, 13, 500, 13255, 871, 8, 198, 220, 220, 220, 3975, 7, 5752, 62, 312, 4613, 10385, 7, 36488, 8777, 11, 45460, 58, 808, 62, 312, 11, 25, 4357, 8883, 11, 1128, 28, 7856, 828, 352, 25, 7857, 7, 500, 13255, 871, 11, 16, 4008, 198, 437, 198, 198, 37811, 198, 63, 36488, 8777, 63, 4613, 13585, 316, 357, 63, 38469, 90, 5317, 2414, 92, 63, 8, 628, 220, 220, 220, 10385, 7, 3712, 6030, 90, 38469, 90, 5317, 2414, 92, 5512, 34839, 3712, 36488, 8777, 26, 1128, 796, 366, 11265, 1143, 1, 7904, 10903, 8, 198, 37811, 198, 8818, 10385, 7, 3712, 6030, 90, 38469, 90, 5317, 2414, 92, 5512, 34839, 3712, 36488, 8777, 26, 1128, 796, 366, 11265, 1143, 1298, 25, 10100, 8, 198, 220, 220, 220, 611, 5145, 7, 7856, 287, 5855, 11265, 1143, 1600, 366, 24622, 1143, 48774, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 43961, 12331, 7, 7856, 11, 366, 28100, 1713, 4600, 7856, 63, 1276, 307, 2035, 705, 11265, 1143, 6, 393, 705, 24622, 1143, 29653, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 5421, 796, 34839, 13, 26638, 198, 220, 220, 220, 983, 62, 6759, 8609, 796, 34839, 13, 6057, 58, 45299, 47715, 628, 220, 220, 220, 983, 62, 67, 12078, 796, 2546, 7, 6057, 62, 6759, 8609, 8, 628, 220, 220, 220, 611, 1128, 6624, 366, 11265, 1143, 1, 198, 220, 220, 220, 220, 220, 220, 220, 357, 6057, 62, 6759, 8609, 11, 5421, 8, 796, 4808, 39014, 62, 6057, 62, 11265, 1634, 0, 7, 6057, 62, 6759, 8609, 11, 5421, 8, 628, 220, 220, 220, 220, 220, 220, 220, 983, 62, 6759, 8609, 796, 983, 62, 6759, 8609, 58, 16, 37498, 437, 12, 16, 828, 47715, 198, 220, 220, 220, 886, 628, 220, 220, 220, 410, 9246, 7, 6057, 62, 6759, 8609, 58, 25, 4357, 5421, 8, 198, 437, 198, 198, 37811, 198, 36488, 8777, 4613, 20650, 90, 5317, 2414, 92, 628, 220, 220, 220, 10385, 7, 3712, 6030, 90, 38469, 90, 5317, 2414, 92, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 34839, 3712, 36488, 8777, 11, 198, 220, 220, 220, 220, 220, 220, 220, 8883, 3712, 33, 541, 433, 578, 15419, 11712, 4272, 26, 198, 220, 220, 220, 220, 220, 220, 220, 1128, 796, 366, 13159, 12, 12683, 4272, 1, 7904, 10903, 198, 220, 220, 220, 1267, 198, 198, 8291, 23914, 257, 4600, 36488, 8777, 63, 329, 257, 4600, 33, 541, 433, 578, 15419, 11712, 4272, 63, 8883, 656, 257, 39144, 15879, 13, 198, 37811, 198, 8818, 10385, 7, 3712, 6030, 90, 38469, 90, 5317, 2414, 92, 5512, 198, 220, 220, 220, 34839, 3712, 36488, 8777, 11, 198, 220, 220, 220, 8883, 3712, 33, 541, 433, 578, 15419, 11712, 4272, 26, 198, 220, 220, 220, 1128, 796, 366, 13159, 12, 12683, 4272, 1, 7904, 10903, 198, 8, 198, 220, 220, 220, 611, 5145, 7, 7856, 287, 14631, 13159, 12, 12683, 4272, 2430, 11265, 1143, 2430, 24622, 1143, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 43961, 12331, 7, 7856, 11, 366, 15414, 4600, 7856, 63, 1276, 307, 287, 685, 7879, 13159, 12, 12683, 4272, 34607, 7879, 11265, 1143, 34607, 7879, 24622, 1143, 7879, 30866, 4008, 198, 220, 220, 220, 886, 628, 220, 220, 220, 983, 62, 67, 12078, 796, 2546, 7, 40469, 8, 198, 220, 220, 220, 410, 62, 27740, 796, 10714, 34220, 83, 3008, 13, 332, 16886, 62, 67, 12078, 7, 1416, 39055, 11, 1128, 8, 628, 220, 220, 220, 39144, 796, 357, 7856, 6624, 366, 24622, 1143, 4943, 5633, 410, 9246, 7, 40469, 58, 25, 4357, 34839, 13, 26638, 8, 1058, 1976, 27498, 7, 5317, 2414, 11, 410, 62, 27740, 10, 16, 8, 628, 220, 220, 220, 611, 1128, 6624, 366, 11265, 1143, 1, 198, 220, 220, 220, 220, 220, 220, 220, 357, 6057, 62, 6759, 8609, 11, 5421, 8, 796, 4808, 39014, 62, 6057, 62, 11265, 1634, 7, 40469, 58, 45299, 25, 4357, 34839, 13, 26638, 8, 628, 220, 220, 220, 220, 220, 220, 220, 39144, 796, 410, 9246, 7, 6057, 62, 6759, 8609, 58, 16, 25, 6057, 62, 67, 12078, 58, 16, 45297, 16, 11, 25, 7131, 25, 4357, 5421, 8, 198, 220, 220, 220, 2073, 361, 1128, 6624, 366, 13159, 12, 12683, 4272, 1, 198, 220, 220, 220, 220, 220, 220, 220, 357, 6057, 62, 6759, 8609, 11, 5421, 8, 796, 4808, 39014, 62, 6057, 62, 11265, 1634, 0, 7, 40469, 58, 45299, 25, 4357, 34839, 13, 26638, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 5678, 402, 7, 64, 91, 87, 8, 290, 402, 7, 65, 91, 88, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 287, 1123, 5721, 11, 34128, 572, 422, 1123, 14862, 14, 18861, 5721, 262, 3815, 15009, 422, 262, 1729, 12, 12683, 4272, 198, 220, 220, 220, 220, 220, 220, 220, 26367, 62, 6057, 796, 1976, 27498, 7, 5317, 2414, 11, 357, 1416, 39055, 13, 32, 12, 16, 11, 8883, 13, 55, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 27169, 62, 6057, 796, 1976, 27498, 7, 5317, 2414, 11, 357, 1416, 39055, 13, 33, 12, 16, 11, 8883, 13, 56, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 10829, 6000, 5072, 329, 14862, 1262, 1729, 12, 12683, 4272, 32315, 198, 220, 220, 220, 220, 220, 220, 220, 329, 257, 287, 352, 25, 1416, 39055, 13, 32, 12, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2496, 62, 808, 796, 257, 1635, 8883, 13, 33, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 34128, 62, 12786, 796, 983, 62, 6759, 8609, 58, 16793, 62, 808, 11, 47715, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 62, 67, 12078, 796, 357, 64, 12, 16, 27493, 1416, 39055, 13, 33, 1343, 16, 25, 257, 1635, 8883, 13, 33, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 983, 62, 6759, 8609, 58, 64, 62, 67, 12078, 11, 47715, 48185, 3392, 7, 5317, 2414, 11, 8883, 13, 33, 8, 1635, 34128, 62, 12786, 6, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26367, 62, 6057, 62, 8516, 796, 3975, 7, 87, 4613, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 62, 67, 12078, 796, 357, 87, 12, 16, 27493, 1416, 39055, 13, 56, 10, 16, 25, 87, 9, 1416, 39055, 13, 56, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2160, 7, 7266, 83, 974, 62, 12786, 58, 87, 62, 67, 12078, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 11, 352, 25, 1416, 39055, 13, 55, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26367, 62, 6057, 58, 64, 11, 47715, 796, 26367, 62, 6057, 62, 8516, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 10829, 6000, 23862, 329, 5811, 1262, 1729, 12, 12683, 4272, 32315, 198, 220, 220, 220, 220, 220, 220, 220, 329, 275, 287, 352, 25, 1416, 39055, 13, 33, 12, 16, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2496, 62, 808, 796, 357, 1416, 39055, 13, 32, 12, 16, 8, 1635, 357, 1416, 39055, 13, 33, 8, 1343, 275, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 34128, 62, 12786, 796, 983, 62, 6759, 8609, 58, 16793, 62, 808, 11, 47715, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 275, 62, 67, 12078, 796, 275, 25, 1416, 39055, 13, 33, 25, 1416, 39055, 13, 32, 1635, 8883, 13, 33, 532, 16, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 983, 62, 6759, 8609, 58, 65, 62, 67, 12078, 11, 47715, 48185, 3392, 7, 5317, 2414, 11, 8883, 13, 32, 8, 1635, 34128, 62, 12786, 6, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27169, 62, 6057, 62, 8516, 796, 3975, 7, 88, 4613, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 331, 62, 67, 12078, 796, 331, 25, 1416, 39055, 13, 56, 25, 1416, 39055, 13, 55, 9, 1416, 39055, 13, 56, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2160, 7, 7266, 83, 974, 62, 12786, 58, 88, 62, 67, 12078, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 11, 352, 25, 1416, 39055, 13, 56, 8, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27169, 62, 6057, 58, 65, 11, 47715, 796, 27169, 62, 6057, 62, 8516, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1439, 5637, 2846, 389, 287, 262, 645, 12, 82, 328, 850, 13200, 290, 389, 2077, 355, 318, 198, 220, 220, 220, 220, 220, 220, 220, 26367, 26638, 62, 6057, 796, 1976, 27498, 7, 5317, 2414, 11, 14808, 1416, 39055, 13, 32, 12, 16, 27493, 7, 1416, 39055, 13, 33, 12, 16, 828, 8883, 13, 55, 9, 1416, 39055, 13, 56, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 329, 257, 287, 352, 25, 1416, 39055, 13, 32, 12, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26367, 26638, 62, 6057, 58, 7, 64, 12, 16, 27493, 7, 1416, 39055, 13, 33, 12, 16, 8, 1343, 352, 25, 64, 9, 7, 1416, 39055, 13, 33, 12, 16, 828, 47715, 796, 983, 62, 6759, 8609, 58, 7, 64, 12, 16, 27493, 1416, 39055, 13, 33, 10, 16, 25, 64, 9, 1416, 39055, 13, 33, 12, 16, 11, 47715, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 39144, 796, 410, 9246, 7, 17394, 62, 6057, 58, 25, 4357, 27169, 62, 6057, 58, 25, 4357, 26367, 26638, 62, 6057, 58, 25, 4357, 5421, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 39144, 198, 437, 198, 198, 37811, 198, 63, 36488, 8777, 63, 6, 82, 284, 4600, 27481, 1581, 5603, 13, 10008, 48, 63, 628, 220, 220, 220, 10385, 7, 3712, 6030, 90, 10008, 48, 5512, 8966, 62, 19966, 3712, 38469, 90, 36488, 8777, 19629, 1128, 796, 366, 11265, 1143, 1, 7904, 10903, 8, 198, 37811, 198, 8818, 10385, 7, 3712, 6030, 90, 10008, 48, 5512, 8966, 62, 19966, 3712, 38469, 90, 36488, 8777, 19629, 1128, 796, 366, 11265, 1143, 1298, 25, 10100, 8, 198, 220, 220, 220, 37941, 80, 62, 303, 5217, 796, 3975, 7, 275, 70, 4613, 10385, 7, 38469, 90, 5317, 2414, 5512, 275, 70, 11, 1128, 28, 7856, 828, 8966, 62, 19966, 1267, 198, 220, 220, 220, 28157, 48, 7, 500, 13255, 871, 796, 289, 9246, 7, 494, 80, 62, 303, 5217, 23029, 6, 58, 45299, 25, 12962, 198, 437, 198, 198, 37811, 198, 198, 4677, 13508, 262, 3487, 1634, 32315, 284, 4781, 477, 4633, 3815, 287, 262, 2810, 198, 63, 6057, 62, 6759, 8609, 44646, 16409, 257, 46545, 4600, 7, 3605, 62, 6057, 62, 6759, 8609, 11, 649, 62, 7784, 8, 63, 198, 37811, 198, 8818, 4808, 50188, 62, 6057, 62, 11265, 1634, 7, 6057, 62, 6759, 8609, 3712, 46912, 90, 5317, 2414, 5512, 5421, 3712, 5317, 2414, 8, 7904, 309, 29291, 90, 46912, 90, 5317, 2414, 5512, 2558, 2414, 92, 198, 220, 220, 220, 649, 62, 7784, 796, 5421, 198, 220, 220, 220, 649, 62, 6057, 62, 6759, 8609, 796, 983, 62, 6759, 8609, 628, 220, 220, 220, 329, 951, 62, 312, 287, 352, 25, 7857, 7, 6057, 62, 6759, 8609, 11, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 951, 796, 983, 62, 6759, 8609, 58, 45299, 4033, 62, 312, 60, 198, 220, 220, 220, 220, 220, 220, 220, 951, 62, 1084, 796, 220, 949, 7, 4033, 23029, 628, 220, 220, 220, 220, 220, 220, 220, 611, 951, 62, 1084, 14512, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 62, 6057, 62, 6759, 8609, 58, 45299, 4033, 62, 312, 60, 764, 12, 28, 951, 62, 1084, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 649, 62, 7784, 48185, 951, 62, 1084, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 357, 3605, 62, 6057, 62, 6759, 8609, 11, 649, 62, 7784, 8, 198, 437, 198, 198, 8818, 4808, 39014, 62, 6057, 62, 11265, 1634, 0, 7, 6057, 62, 6759, 8609, 3712, 46912, 90, 5317, 2414, 5512, 5421, 3712, 5317, 2414, 8, 7904, 309, 29291, 90, 46912, 90, 5317, 2414, 5512, 2558, 2414, 92, 628, 220, 220, 220, 329, 951, 62, 312, 287, 352, 25, 7857, 7, 6057, 62, 6759, 8609, 11, 17, 8, 198, 220, 220, 220, 220, 220, 220, 220, 951, 796, 983, 62, 6759, 8609, 58, 45299, 4033, 62, 312, 60, 198, 220, 220, 220, 220, 220, 220, 220, 611, 951, 58, 437, 60, 5145, 855, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 983, 62, 6759, 8609, 58, 45299, 4033, 62, 312, 60, 764, 12, 28, 951, 58, 437, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5421, 48185, 951, 58, 437, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 357, 6057, 62, 6759, 8609, 11, 5421, 8, 198, 437, 198 ]
2.071243
4,239
""" KMarkovEnvironment{OV, M<:POMDP, S, R<:AbstractRNG} <: AbstractEnvironment{OV} A k-markov wrapper for MDPs and POMDPs, given a MDP or POMDP create an AbstractEnvironment where s_t = (o_t, ..., o_t-k) The K-Markov observation is represented by a vector of k observations. """ mutable struct KMarkovEnvironment{OV, M<:POMDP, S, R<:AbstractRNG} <: AbstractEnvironment{OV} problem::M k::Int64 state::S obs::Vector{OV} rng::R end function KMarkovEnvironment(problem::M, ov::Type{<:AbstractArray} = obsvector_type(problem); k::Int64=1, rng::AbstractRNG=MersenneTwister(0) ) where {M<:POMDP} # determine size of obs vector s = rand(rng, initialstate(problem)) o = rand(rng, initialobs(problem, s)) obs = convert_o(ov, o, problem) # init vector of obs obsvec = fill(zeros(eltype(ov), size(obs)...), k) return KMarkovEnvironment{ov, M, typeof(s), typeof(rng)}( problem, k, rand(rng, initialstate(problem)), obsvec, rng) end """ reset!(env::KMarkovEnvironment{OV}) Reset an POMDP environment by sampling an initial state, generating an observation and returning it. """ function reset!(env::KMarkovEnvironment{OV}) where OV s = rand(env.rng, initialstate(env.problem)) env.state = s o = rand(env.rng, initialobs(env.problem, s)) obs = convert_o(OV, o, env.problem) fill!(env.obs, obs) return env.obs end """ step!(env::POMDPEnvironment{OV}, a::A) Take in an POMDP environment, and an action to execute, and step the environment forward. Return the observation, reward, terminal flag and info """ function step!(env::KMarkovEnvironment{OV}, a::A) where {OV, A} s, o, r, info = @gen(:sp, :o, :r, :info)(env.problem, env.state, a, env.rng) env.state = s t = isterminal(env.problem, s) obs = convert_o(OV, o, env.problem) # shift the old observation to lower indices for i=1:env.k-1 env.obs[i] = env.obs[i + 1] end env.obs[env.k] = obs return env.obs, r, t, info end """ actions(env::KMarkovEnvironment) Return an action object that can be sampled with rand. """ function POMDPs.actions(env::KMarkovEnvironment) return actions(env.problem) end """ sample_action(env::Union{POMDPEnvironment, MDPEnvironment}) Sample an action from the action space of the environment. """ function sample_action(env::KMarkovEnvironment) return rand(env.rng, actions(env)) end """ obs_dimensions(env::KMarkovEnvironment{OV}) returns the size of the observation vector. The object return by `step!` and `reset!` is a vector of k observation vector of size `obs_dimensions(env)` It generates an initial state, converts it to an array and returns its size. """ function obs_dimensions(env::KMarkovEnvironment{OV}) where OV s = rand(env.rng, initialstate(env.problem)) o = rand(env.rng, initialobs(env.problem, s)) obs_dim = size(convert_o(OV, o, env.problem)) return (obs_dim..., env.k) end
[ 37811, 198, 220, 220, 220, 509, 9704, 709, 31441, 90, 8874, 11, 337, 27, 25, 47, 2662, 6322, 11, 311, 11, 371, 27, 25, 23839, 49, 10503, 92, 1279, 25, 27741, 31441, 90, 8874, 92, 198, 32, 479, 12, 4102, 709, 29908, 329, 337, 6322, 82, 290, 350, 2662, 6322, 82, 11, 1813, 257, 337, 6322, 393, 350, 2662, 6322, 2251, 281, 27741, 31441, 810, 264, 62, 83, 796, 357, 78, 62, 83, 11, 2644, 11, 267, 62, 83, 12, 74, 8, 198, 464, 509, 12, 9704, 709, 13432, 318, 7997, 416, 257, 15879, 286, 479, 13050, 13, 198, 37811, 198, 76, 18187, 2878, 509, 9704, 709, 31441, 90, 8874, 11, 337, 27, 25, 47, 2662, 6322, 11, 311, 11, 371, 27, 25, 23839, 49, 10503, 92, 1279, 25, 27741, 31441, 90, 8874, 92, 198, 220, 220, 220, 1917, 3712, 44, 198, 220, 220, 220, 479, 3712, 5317, 2414, 198, 220, 220, 220, 1181, 3712, 50, 198, 220, 220, 220, 10201, 3712, 38469, 90, 8874, 92, 198, 220, 220, 220, 374, 782, 3712, 49, 198, 437, 198, 8818, 509, 9704, 709, 31441, 7, 45573, 3712, 44, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19643, 3712, 6030, 90, 27, 25, 23839, 19182, 92, 796, 10201, 31364, 62, 4906, 7, 45573, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 479, 3712, 5317, 2414, 28, 16, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 782, 3712, 23839, 49, 10503, 28, 44, 364, 29727, 5080, 1694, 7, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 810, 1391, 44, 27, 25, 47, 2662, 6322, 92, 198, 220, 220, 220, 1303, 5004, 2546, 286, 10201, 15879, 198, 220, 220, 220, 264, 796, 43720, 7, 81, 782, 11, 4238, 5219, 7, 45573, 4008, 198, 220, 220, 220, 267, 796, 43720, 7, 81, 782, 11, 4238, 8158, 7, 45573, 11, 264, 4008, 198, 220, 220, 220, 10201, 796, 10385, 62, 78, 7, 709, 11, 267, 11, 1917, 8, 198, 220, 220, 220, 1303, 2315, 15879, 286, 10201, 198, 220, 220, 220, 10201, 35138, 796, 6070, 7, 9107, 418, 7, 417, 4906, 7, 709, 828, 2546, 7, 8158, 26513, 828, 479, 8, 198, 220, 220, 220, 1441, 509, 9704, 709, 31441, 90, 709, 11, 337, 11, 2099, 1659, 7, 82, 828, 2099, 1659, 7, 81, 782, 38165, 7, 198, 220, 220, 220, 220, 220, 220, 220, 1917, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 479, 11, 198, 220, 220, 220, 220, 220, 220, 220, 43720, 7, 81, 782, 11, 4238, 5219, 7, 45573, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 10201, 35138, 11, 198, 220, 220, 220, 220, 220, 220, 220, 374, 782, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 13259, 0, 7, 24330, 3712, 42, 9704, 709, 31441, 90, 8874, 30072, 198, 4965, 316, 281, 350, 2662, 6322, 2858, 416, 19232, 281, 4238, 1181, 11, 198, 8612, 803, 281, 13432, 290, 8024, 340, 13, 198, 37811, 198, 8818, 13259, 0, 7, 24330, 3712, 42, 9704, 709, 31441, 90, 8874, 30072, 810, 440, 53, 198, 220, 220, 220, 264, 796, 43720, 7, 24330, 13, 81, 782, 11, 4238, 5219, 7, 24330, 13, 45573, 4008, 198, 220, 220, 220, 17365, 13, 5219, 796, 264, 198, 220, 220, 220, 267, 796, 43720, 7, 24330, 13, 81, 782, 11, 4238, 8158, 7, 24330, 13, 45573, 11, 264, 4008, 198, 220, 220, 220, 10201, 796, 10385, 62, 78, 7, 8874, 11, 267, 11, 17365, 13, 45573, 8, 198, 220, 220, 220, 6070, 0, 7, 24330, 13, 8158, 11, 10201, 8, 198, 220, 220, 220, 1441, 17365, 13, 8158, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 2239, 0, 7, 24330, 3712, 47, 2662, 6322, 31441, 90, 8874, 5512, 257, 3712, 32, 8, 198, 12322, 287, 281, 350, 2662, 6322, 2858, 11, 290, 281, 2223, 284, 12260, 11, 290, 198, 9662, 262, 2858, 2651, 13, 8229, 262, 13432, 11, 6721, 11, 198, 23705, 282, 6056, 290, 7508, 198, 37811, 198, 8818, 2239, 0, 7, 24330, 3712, 42, 9704, 709, 31441, 90, 8874, 5512, 257, 3712, 32, 8, 810, 1391, 8874, 11, 317, 92, 198, 220, 220, 220, 264, 11, 267, 11, 374, 11, 7508, 796, 2488, 5235, 7, 25, 2777, 11, 1058, 78, 11, 1058, 81, 11, 1058, 10951, 5769, 24330, 13, 45573, 11, 17365, 13, 5219, 11, 257, 11, 17365, 13, 81, 782, 8, 198, 220, 220, 220, 17365, 13, 5219, 796, 264, 198, 220, 220, 220, 256, 796, 318, 23705, 282, 7, 24330, 13, 45573, 11, 264, 8, 198, 220, 220, 220, 10201, 796, 10385, 62, 78, 7, 8874, 11, 267, 11, 17365, 13, 45573, 8, 198, 220, 220, 220, 1303, 6482, 262, 1468, 13432, 284, 2793, 36525, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 24330, 13, 74, 12, 16, 198, 220, 220, 220, 220, 220, 220, 220, 17365, 13, 8158, 58, 72, 60, 796, 17365, 13, 8158, 58, 72, 1343, 352, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 17365, 13, 8158, 58, 24330, 13, 74, 60, 796, 10201, 198, 220, 220, 220, 1441, 17365, 13, 8158, 11, 374, 11, 256, 11, 7508, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 4028, 7, 24330, 3712, 42, 9704, 709, 31441, 8, 198, 13615, 281, 2223, 2134, 326, 460, 307, 35846, 351, 43720, 13, 198, 37811, 198, 8818, 350, 2662, 6322, 82, 13, 4658, 7, 24330, 3712, 42, 9704, 709, 31441, 8, 198, 220, 220, 220, 1441, 4028, 7, 24330, 13, 45573, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 6291, 62, 2673, 7, 24330, 3712, 38176, 90, 47, 2662, 6322, 31441, 11, 337, 6322, 31441, 30072, 198, 36674, 281, 2223, 422, 262, 2223, 2272, 286, 262, 2858, 13, 198, 37811, 198, 8818, 6291, 62, 2673, 7, 24330, 3712, 42, 9704, 709, 31441, 8, 198, 220, 220, 220, 1441, 43720, 7, 24330, 13, 81, 782, 11, 4028, 7, 24330, 4008, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 10201, 62, 27740, 5736, 7, 24330, 3712, 42, 9704, 709, 31441, 90, 8874, 30072, 198, 7783, 82, 262, 2546, 286, 262, 13432, 15879, 13, 198, 464, 2134, 1441, 416, 4600, 9662, 0, 63, 290, 4600, 42503, 0, 63, 318, 257, 15879, 286, 479, 13432, 15879, 286, 2546, 4600, 8158, 62, 27740, 5736, 7, 24330, 8, 63, 198, 1026, 18616, 281, 4238, 1181, 11, 26161, 340, 284, 281, 7177, 290, 5860, 663, 2546, 13, 198, 37811, 198, 8818, 10201, 62, 27740, 5736, 7, 24330, 3712, 42, 9704, 709, 31441, 90, 8874, 30072, 810, 440, 53, 198, 220, 220, 220, 264, 796, 43720, 7, 24330, 13, 81, 782, 11, 4238, 5219, 7, 24330, 13, 45573, 4008, 198, 220, 220, 220, 267, 796, 43720, 7, 24330, 13, 81, 782, 11, 4238, 8158, 7, 24330, 13, 45573, 11, 264, 4008, 198, 220, 220, 220, 10201, 62, 27740, 796, 2546, 7, 1102, 1851, 62, 78, 7, 8874, 11, 267, 11, 17365, 13, 45573, 4008, 198, 220, 220, 220, 1441, 357, 8158, 62, 27740, 986, 11, 17365, 13, 74, 8, 198, 437, 198 ]
2.470353
1,248
module QuadOsc export quadosc include("SeriesAccelerations.jl") using .SeriesAccelerations using QuadGK @doc raw""" quadosc(fn, a, Inf, fnzeros; ...) Integrate the function `fn(x)` from `a` to `Inf`. The function `fnzeros(n)` takes an integer `n` and is such that `fn(fnzeros(n)) == 0`. The algorithm works by integrating between successive zeros, and accelerating the alternating series. The argument `pren` is the number of intervals to integrate before applying the series acceleration. `atol` and `rtol` specify the absolute and relative tolerances for determining convergence. `order` is passed on to `quadgk()` of the [QuadGK](https://github.com/JuliaMath/QuadGK.jl) package. `nconvergences` is the number of iterations before convergence is declared. See `?QuadOsc.accel_cohen_villegas_zagier` for details on the series acceleration. """ function quadosc(f::Function, a::Number, b::Number, zerosf::Function; pren=2, atol=zero(Float64), rtol=sqrt(eps(Float64)), order=7, #nconvergences=ceil(Int,-1.31*log10(rtol)), #accelerator=accel_cohen_villegas_zagier) nconvergences=5, accelerator=accel_wynn_eps) @assert b == Inf T = Float64 i1 = findfirst(n -> zerosf(n) - a >= 0, 1:typemax(Int)) z1 = zerosf(i1) Ipre, Epre = quadgk(f, a, z1; atol=atol, rtol=rtol, order=order) z0 = z1 for i=1:pren i1 += 1 z1 = zerosf(i1) I, E = quadgk(f, z0, z1; atol=atol, rtol=rtol, order=order) Ipre += I Epre += E z0 = z1 end I = T(0) oldI = T(0) ak = T[] ek = T[] while nconvergences > 0 i1 += 1 z1 = zerosf(i1) I, E = quadgk(f, z0, z1; atol=atol, rtol=rtol) push!(ak, I) push!(ek, E) z0 = z1 I = accelerator(ak) adiff = abs(I - oldI) rdiff = adiff * 2 / abs(I + oldI) if adiff <= atol || rdiff <= rtol nconvergences -= 1 end oldI = I end I = Ipre + I E = Epre + abs(accelerator(ek)) return I, E end end # module # vim: set sw=4 et sts=4 :
[ 21412, 20648, 46, 1416, 198, 198, 39344, 15094, 17500, 198, 198, 17256, 7203, 27996, 12832, 7015, 602, 13, 20362, 4943, 198, 3500, 764, 27996, 12832, 7015, 602, 198, 3500, 20648, 38, 42, 628, 198, 31, 15390, 8246, 37811, 198, 220, 220, 220, 15094, 17500, 7, 22184, 11, 257, 11, 4806, 11, 24714, 9107, 418, 26, 2644, 8, 198, 198, 34500, 4873, 262, 2163, 4600, 22184, 7, 87, 8, 63, 422, 4600, 64, 63, 284, 4600, 18943, 44646, 383, 2163, 4600, 22184, 9107, 418, 7, 77, 8, 63, 198, 83, 1124, 281, 18253, 4600, 77, 63, 290, 318, 884, 326, 4600, 22184, 7, 22184, 9107, 418, 7, 77, 4008, 6624, 657, 44646, 383, 11862, 198, 5225, 416, 32029, 1022, 25175, 1976, 27498, 11, 290, 32253, 262, 39623, 198, 25076, 13, 198, 198, 464, 4578, 4600, 79, 918, 63, 318, 262, 1271, 286, 20016, 284, 19386, 878, 11524, 262, 198, 25076, 20309, 13, 198, 198, 63, 265, 349, 63, 290, 4600, 17034, 349, 63, 11986, 262, 4112, 290, 3585, 8214, 1817, 329, 13213, 198, 1102, 332, 12745, 13, 198, 198, 63, 2875, 63, 318, 3804, 319, 284, 4600, 47003, 70, 74, 3419, 63, 286, 262, 198, 58, 4507, 324, 38, 42, 16151, 5450, 1378, 12567, 13, 785, 14, 16980, 544, 37372, 14, 4507, 324, 38, 42, 13, 20362, 8, 5301, 13, 198, 198, 63, 77, 1102, 332, 70, 3007, 63, 318, 262, 1271, 286, 34820, 878, 40826, 318, 6875, 13, 198, 198, 6214, 4600, 30, 4507, 324, 46, 1416, 13, 330, 5276, 62, 1073, 831, 62, 2991, 1455, 292, 62, 50183, 959, 63, 329, 3307, 319, 262, 2168, 198, 330, 7015, 341, 13, 198, 37811, 198, 8818, 15094, 17500, 7, 69, 3712, 22203, 11, 257, 3712, 15057, 11, 275, 3712, 15057, 11, 1976, 27498, 69, 3712, 22203, 26, 662, 77, 28, 17, 11, 198, 197, 197, 379, 349, 28, 22570, 7, 43879, 2414, 828, 374, 83, 349, 28, 31166, 17034, 7, 25386, 7, 43879, 2414, 36911, 1502, 28, 22, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 77, 1102, 332, 70, 3007, 28, 344, 346, 7, 5317, 12095, 16, 13, 3132, 9, 6404, 940, 7, 17034, 349, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 330, 7015, 1352, 28, 330, 5276, 62, 1073, 831, 62, 2991, 1455, 292, 62, 50183, 959, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 1102, 332, 70, 3007, 28, 20, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44219, 28, 330, 5276, 62, 27612, 77, 62, 25386, 8, 198, 220, 220, 220, 2488, 30493, 275, 6624, 4806, 198, 220, 220, 220, 309, 796, 48436, 2414, 628, 220, 220, 220, 1312, 16, 796, 1064, 11085, 7, 77, 4613, 1976, 27498, 69, 7, 77, 8, 532, 257, 18189, 657, 11, 352, 25, 28004, 368, 897, 7, 5317, 4008, 198, 220, 220, 220, 1976, 16, 796, 1976, 27498, 69, 7, 72, 16, 8, 198, 220, 220, 220, 314, 3866, 11, 412, 3866, 796, 15094, 70, 74, 7, 69, 11, 257, 11, 1976, 16, 26, 379, 349, 28, 265, 349, 11, 374, 83, 349, 28, 17034, 349, 11, 1502, 28, 2875, 8, 628, 220, 220, 220, 1976, 15, 796, 1976, 16, 198, 220, 220, 220, 329, 1312, 28, 16, 25, 79, 918, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 16, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 16, 796, 1976, 27498, 69, 7, 72, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 314, 11, 412, 796, 15094, 70, 74, 7, 69, 11, 1976, 15, 11, 1976, 16, 26, 379, 349, 28, 265, 349, 11, 374, 83, 349, 28, 17034, 349, 11, 1502, 28, 2875, 8, 198, 220, 220, 220, 220, 220, 220, 220, 314, 3866, 15853, 314, 198, 220, 220, 220, 220, 220, 220, 220, 412, 3866, 15853, 412, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 15, 796, 1976, 16, 198, 220, 220, 220, 886, 628, 220, 220, 220, 314, 796, 309, 7, 15, 8, 198, 220, 220, 220, 1468, 40, 796, 309, 7, 15, 8, 198, 220, 220, 220, 47594, 796, 309, 21737, 198, 220, 220, 220, 304, 74, 796, 309, 21737, 198, 220, 220, 220, 981, 299, 1102, 332, 70, 3007, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 1312, 16, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 16, 796, 1976, 27498, 69, 7, 72, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 314, 11, 412, 796, 15094, 70, 74, 7, 69, 11, 1976, 15, 11, 1976, 16, 26, 379, 349, 28, 265, 349, 11, 374, 83, 349, 28, 17034, 349, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 461, 11, 314, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 988, 11, 412, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1976, 15, 796, 1976, 16, 198, 220, 220, 220, 220, 220, 220, 220, 314, 796, 44219, 7, 461, 8, 628, 220, 220, 220, 220, 220, 220, 220, 512, 733, 796, 2352, 7, 40, 532, 1468, 40, 8, 198, 220, 220, 220, 220, 220, 220, 220, 374, 26069, 796, 512, 733, 1635, 362, 1220, 2352, 7, 40, 1343, 1468, 40, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 512, 733, 19841, 379, 349, 8614, 374, 26069, 19841, 374, 83, 349, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 1102, 332, 70, 3007, 48185, 352, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1468, 40, 796, 314, 198, 220, 220, 220, 886, 198, 220, 220, 220, 314, 796, 314, 3866, 1343, 314, 198, 220, 220, 220, 412, 796, 412, 3866, 1343, 2352, 7, 330, 7015, 1352, 7, 988, 4008, 198, 220, 220, 220, 1441, 314, 11, 412, 198, 437, 628, 198, 437, 1303, 8265, 628, 198, 2, 43907, 25, 900, 1509, 28, 19, 2123, 39747, 28, 19, 1058, 198 ]
2.090732
1,025
module HartreeFock export extract_tij_Uijlk, solve_scf using LinearAlgebra import PyCall: pyimport """ Extract tij and Uijlk from a FermionOperator object, representing a Hamiltonian. The Hamiltonian must be number conserving, and is allowed to contain upto two-body operators. """ function extract_tij_Uijlk(ham) ofermion = pyimport("openfermion") FermionOperator = ofermion.ops.operators.FermionOperator count_qubits = ofermion.utils.operator_utils.count_qubits normal_ordered = ofermion.transforms.opconversions.normal_ordered ham = normal_ordered(ham) if ham.many_body_order() > 4 throw(DomainError("Allowed only upto two-body operators!")) end if !ham.is_two_body_number_conserving() throw(DomainError("ham must be number conserving!")) end nflavors = count_qubits(ham) T = ham.zero().constant isa Real ? Float64 : Complex{Float64} tij = zeros(T, nflavors, nflavors) Uijlk = zeros(T, nflavors, nflavors, nflavors, nflavors) for (ops, constant) in ham.terms flavors = collect((o[1]+1 for o in ops)) if length(ops) == 2 tij[flavors[1], flavors[2]] += constant elseif length(ops) == 4 Uijlk[flavors[1], flavors[2], flavors[3], flavors[4]] += 2*constant else throw(DomainError("Invalid many_body_order!")) end end tij, Uijlk end """ Compute Tij """ function compute_Tij(tij, barUijlk, rhoij) Tij = copy(tij) N = size(tij)[1] for i in 1:N, j in 1:N for k in 1:N, l in 1:N Tij[i,j] += barUijlk[i,k,j,l] * rhoij[k,l] end end Tij end function compute_rhoij!(rhoij, evecs, nelec) rhoij .= 0.0 N = size(rhoij)[1] for e in 1:nelec for i in 1:N, j in 1:N rhoij[i, j] += conj(evecs[i,e]) * evecs[j,e] end end end """ Solve the Hartree-Fock equation self-consistently: hat{H} = sum_{ij=1}^N t_{ij} hat{c}^dagger_i hat{c}_j + frac{1}{2} sum_{ijkl=1}^N U_{ijlk}hat{c}^dagger_i hat{c}^dagger_j hat{c}_k hat{c}_l """ function solve_scf(tij::Array{T,2}, Uijlk::Array{T,4}, rhoij0::Array{T,2}, nelec::Integer, niter::Integer, mixing::Float64) where T # Antisymmetric Coulomb tensor barUijlk = Uijlk - permutedims(Uijlk, [1, 2, 4, 3]) rhoij = copy(rhoij0) rhoij_out = copy(rhoij) for iter in 1:niter Tij = compute_Tij(tij, Uijlk, rhoij) e = eigen(Hermitian(Tij)) compute_rhoij!(rhoij_out, e.vectors, nelec) @. rhoij = (1-mixing) * rhoij + mixing * rhoij_out end rhoij end end
[ 21412, 11345, 631, 37, 735, 198, 198, 39344, 7925, 62, 83, 2926, 62, 52, 2926, 75, 74, 11, 8494, 62, 1416, 69, 198, 198, 3500, 44800, 2348, 29230, 198, 11748, 9485, 14134, 25, 12972, 11748, 628, 198, 37811, 198, 11627, 974, 256, 2926, 290, 471, 2926, 75, 74, 422, 257, 376, 7780, 295, 18843, 1352, 2134, 11, 10200, 257, 11582, 666, 13, 198, 464, 11582, 666, 1276, 307, 1271, 4055, 278, 11, 290, 318, 3142, 284, 3994, 18529, 78, 734, 12, 2618, 12879, 13, 198, 37811, 198, 8818, 7925, 62, 83, 2926, 62, 52, 2926, 75, 74, 7, 2763, 8, 198, 220, 220, 220, 286, 7780, 295, 796, 12972, 11748, 7203, 9654, 2232, 76, 295, 4943, 198, 220, 220, 220, 376, 7780, 295, 18843, 1352, 796, 286, 7780, 295, 13, 2840, 13, 3575, 2024, 13, 37, 7780, 295, 18843, 1352, 198, 220, 220, 220, 954, 62, 421, 9895, 796, 286, 7780, 295, 13, 26791, 13, 46616, 62, 26791, 13, 9127, 62, 421, 9895, 198, 220, 220, 220, 3487, 62, 24071, 796, 286, 7780, 295, 13, 7645, 23914, 13, 404, 1102, 47178, 13, 11265, 62, 24071, 628, 220, 220, 220, 8891, 796, 3487, 62, 24071, 7, 2763, 8, 198, 220, 220, 220, 611, 8891, 13, 21834, 62, 2618, 62, 2875, 3419, 1875, 604, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 43961, 12331, 7203, 3237, 6972, 691, 18529, 78, 734, 12, 2618, 12879, 2474, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 611, 5145, 2763, 13, 271, 62, 11545, 62, 2618, 62, 17618, 62, 5936, 14344, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 43961, 12331, 7203, 2763, 1276, 307, 1271, 4055, 278, 2474, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 299, 2704, 615, 669, 796, 954, 62, 421, 9895, 7, 2763, 8, 198, 220, 220, 220, 309, 796, 8891, 13, 22570, 22446, 9979, 415, 318, 64, 6416, 5633, 48436, 2414, 1058, 19157, 90, 43879, 2414, 92, 198, 220, 220, 220, 256, 2926, 796, 1976, 27498, 7, 51, 11, 299, 2704, 615, 669, 11, 299, 2704, 615, 669, 8, 198, 220, 220, 220, 471, 2926, 75, 74, 796, 1976, 27498, 7, 51, 11, 299, 2704, 615, 669, 11, 299, 2704, 615, 669, 11, 299, 2704, 615, 669, 11, 299, 2704, 615, 669, 8, 198, 220, 220, 220, 329, 357, 2840, 11, 6937, 8, 287, 8891, 13, 38707, 198, 220, 220, 220, 220, 220, 220, 220, 17361, 796, 2824, 19510, 78, 58, 16, 48688, 16, 329, 267, 287, 39628, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 611, 4129, 7, 2840, 8, 6624, 362, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 2926, 58, 2704, 615, 669, 58, 16, 4357, 17361, 58, 17, 11907, 15853, 6937, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 361, 4129, 7, 2840, 8, 6624, 604, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 471, 2926, 75, 74, 58, 2704, 615, 669, 58, 16, 4357, 17361, 58, 17, 4357, 17361, 58, 18, 4357, 17361, 58, 19, 11907, 15853, 362, 9, 9979, 415, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 43961, 12331, 7203, 44651, 867, 62, 2618, 62, 2875, 2474, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 256, 2926, 11, 471, 2926, 75, 74, 198, 437, 198, 198, 37811, 198, 7293, 1133, 309, 2926, 198, 37811, 198, 8818, 24061, 62, 51, 2926, 7, 83, 2926, 11, 2318, 52, 2926, 75, 74, 11, 374, 8873, 2926, 8, 198, 220, 220, 220, 309, 2926, 796, 4866, 7, 83, 2926, 8, 198, 220, 220, 220, 399, 796, 2546, 7, 83, 2926, 38381, 16, 60, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 45, 11, 474, 287, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 329, 479, 287, 352, 25, 45, 11, 300, 287, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 2926, 58, 72, 11, 73, 60, 15853, 2318, 52, 2926, 75, 74, 58, 72, 11, 74, 11, 73, 11, 75, 60, 1635, 374, 8873, 2926, 58, 74, 11, 75, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 309, 2926, 198, 437, 198, 198, 8818, 24061, 62, 81, 8873, 2926, 0, 7, 81, 8873, 2926, 11, 28001, 6359, 11, 497, 293, 66, 8, 198, 220, 220, 220, 374, 8873, 2926, 764, 28, 657, 13, 15, 198, 220, 220, 220, 399, 796, 2546, 7, 81, 8873, 2926, 38381, 16, 60, 198, 220, 220, 220, 329, 304, 287, 352, 25, 710, 293, 66, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 45, 11, 474, 287, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 8873, 2926, 58, 72, 11, 474, 60, 15853, 11644, 7, 44655, 6359, 58, 72, 11, 68, 12962, 1635, 28001, 6359, 58, 73, 11, 68, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 628, 198, 37811, 198, 50, 6442, 262, 11345, 631, 12, 37, 735, 16022, 2116, 12, 5936, 396, 1473, 25, 198, 220, 220, 6877, 90, 39, 92, 796, 2160, 23330, 2926, 28, 16, 92, 61, 45, 256, 23330, 2926, 92, 6877, 90, 66, 92, 61, 67, 7928, 62, 72, 6877, 90, 66, 92, 62, 73, 220, 198, 220, 220, 220, 220, 220, 220, 1343, 1216, 330, 90, 16, 18477, 17, 92, 2160, 23330, 2926, 41582, 28, 16, 92, 61, 45, 471, 23330, 2926, 75, 74, 92, 5183, 90, 66, 92, 61, 67, 7928, 62, 72, 6877, 90, 66, 92, 61, 67, 7928, 62, 73, 6877, 90, 66, 92, 62, 74, 6877, 90, 66, 92, 62, 75, 198, 37811, 198, 8818, 8494, 62, 1416, 69, 7, 83, 2926, 3712, 19182, 90, 51, 11, 17, 5512, 471, 2926, 75, 74, 3712, 19182, 90, 51, 11, 19, 5512, 374, 8873, 2926, 15, 3712, 19182, 90, 51, 11, 17, 5512, 497, 293, 66, 3712, 46541, 11, 299, 2676, 3712, 46541, 11, 17090, 3712, 43879, 2414, 8, 810, 309, 198, 220, 220, 220, 1303, 3738, 13560, 3020, 19482, 27854, 2381, 11192, 273, 198, 220, 220, 220, 2318, 52, 2926, 75, 74, 796, 471, 2926, 75, 74, 532, 9943, 7241, 12078, 7, 52, 2926, 75, 74, 11, 685, 16, 11, 362, 11, 604, 11, 513, 12962, 198, 220, 220, 220, 374, 8873, 2926, 796, 4866, 7, 81, 8873, 2926, 15, 8, 198, 220, 220, 220, 374, 8873, 2926, 62, 448, 796, 4866, 7, 81, 8873, 2926, 8, 198, 220, 220, 220, 329, 11629, 287, 352, 25, 77, 2676, 198, 220, 220, 220, 220, 220, 220, 220, 309, 2926, 796, 24061, 62, 51, 2926, 7, 83, 2926, 11, 471, 2926, 75, 74, 11, 374, 8873, 2926, 8, 198, 220, 220, 220, 220, 220, 220, 220, 304, 796, 304, 9324, 7, 9360, 2781, 666, 7, 51, 2926, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 24061, 62, 81, 8873, 2926, 0, 7, 81, 8873, 2926, 62, 448, 11, 304, 13, 303, 5217, 11, 497, 293, 66, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 13, 374, 8873, 2926, 796, 357, 16, 12, 19816, 278, 8, 1635, 374, 8873, 2926, 1343, 17090, 1635, 374, 8873, 2926, 62, 448, 198, 220, 220, 220, 886, 198, 220, 220, 220, 374, 8873, 2926, 198, 437, 198, 198, 437 ]
2.064645
1,253
module VlasovBenchmarks using BenchmarkTools const SUITE = BenchmarkGroup() include(joinpath(dirname(@__FILE__),"..","src","VlasovSolver","LaxWendroff.jl")) import .LaxWendroff SUITE["LaxWendroff"] = BenchmarkGroup() SUITE["LaxWendroff c"] = BenchmarkGroup() include(joinpath(dirname(@__FILE__),"..","src","VlasovSolver","Upwind.jl")) import .Upwind SUITE["Upwind"] = BenchmarkGroup() SUITE["Upwind с"] = BenchmarkGroup() include(joinpath(dirname(@__FILE__),"..","src","VlasovSolver","Godunov.jl")) import .Godunov SUITE["Godunov constant"] = BenchmarkGroup() SUITE["Godunov linear"] = BenchmarkGroup() SUITE["Godunov linear VanLeer"] = BenchmarkGroup() include(joinpath(dirname(@__FILE__),"..","src","VlasovSolver","SemiLagrangian.jl")) import .SemiLagrangian SUITE["SemiLagrangian linear"] = BenchmarkGroup() SUITE["SemiLagrangian quadratic"] = BenchmarkGroup() SUITE["SemiLagrangian cubic"] = BenchmarkGroup() include(joinpath(dirname(@__FILE__),"..","src","VlasovSolver","PFC.jl")) import .PFC SUITE["PFC"] = BenchmarkGroup() Δx = Dict() Δt = Dict() v = Dict() f₀ = Dict() f = Dict() advect! = Dict() for N in [100, 1000, 10000] Δx[N] = 0.01 Δt[N] = 0.8*Δx[N] v[N] = 1 f₀[N] = [1.0 + 0.01*sin(2π*i*Δx[N]) for i = 0:N] f[N] = similar(f₀[N]) advect![N] = Dict() advect![N][:LaxWendroff] = LaxWendroff.generate_solver(f₀[N], f[N], v[N]*Δt[N]/Δx[N]) SUITE["LaxWendroff"]["advect $N"] = @benchmarkable advect![$N][:LaxWendroff]() advect![N][:LaxWendroff_c] = LaxWendroff.generate_solver(f₀[N], f[N]) SUITE["LaxWendroff c"]["advect $N"] = @benchmarkable advect![$N][:LaxWendroff_c]($(v[N]*Δt[N]/Δx[N])) advect![N][:Upwind] = Upwind.generate_solver(f₀[N], f[N], v[N]*Δt[N]/Δx[N]) SUITE["Upwind"]["advect $N"] = @benchmarkable advect![$N][:Upwind]() advect![N][:Upwind_с] = Upwind.generate_solver(f₀[N], f[N]) SUITE["Upwind с"]["advect $N"] = @benchmarkable advect![$N][:Upwind_с]($(v[N]*Δt[N]/Δx[N])) advect![N][:Godunov_constant] = Godunov.generate_solver(f₀[N], f[N], :Riemann_constant) SUITE["Godunov constant"]["advect $N"] = @benchmarkable advect![$N][:Godunov_constant]($(v[N]*Δt[N]/Δx[N])) advect![N][:Godunov_linear] = Godunov.generate_solver(f₀[N], f[N], :Riemann_linear) SUITE["Godunov linear"]["advect $N"] = @benchmarkable advect![$N][:Godunov_linear]($(v[N]*Δt[N]/Δx[N])) advect![N][:Godunov_linear_VanLeer] = Godunov.generate_solver(f₀[N], f[N], :Riemann_linear; flux_limiter = :VanLeer) SUITE["Godunov linear VanLeer"]["advect $N"] = @benchmarkable advect![$N][:Godunov_linear_VanLeer]($(v[N]*Δt[N]/Δx[N])) advect![N][:SemiLagrangian_linear] = SemiLagrangian.generate_solver(f₀[N], f[N]; interpolation_order = :Linear) SUITE["SemiLagrangian linear"]["advect $N"] = @benchmarkable advect![$N][:SemiLagrangian_linear]($(v[N]*Δt[N]/Δx[N])) advect![N][:SemiLagrangian_quadratic] = SemiLagrangian.generate_solver(f₀[N], f[N]; interpolation_order = :Quadratic) SUITE["SemiLagrangian quadratic"]["advect $N"] = @benchmarkable advect![$N][:SemiLagrangian_quadratic]($(v[N]*Δt[N]/Δx[N])) advect![N][:SemiLagrangian_cubic] = SemiLagrangian.generate_solver(f₀[N], f[N]; interpolation_order = :Cubic) SUITE["SemiLagrangian cubic"]["advect $N"] = @benchmarkable advect![$N][:SemiLagrangian_cubic]($(v[N]*Δt[N]/Δx[N])) advect![N][:PFC] = PFC.generate_solver(f₀[N], f[N]) SUITE["PFC"]["advect $N"] = @benchmarkable advect![$N][:PFC]($(v[N]*Δt[N]/Δx[N])) end end # module
[ 21412, 569, 21921, 709, 44199, 14306, 198, 198, 3500, 25187, 4102, 33637, 198, 198, 9979, 13558, 12709, 796, 25187, 4102, 13247, 3419, 198, 198, 17256, 7, 22179, 6978, 7, 15908, 3672, 7, 31, 834, 25664, 834, 27267, 492, 2430, 10677, 2430, 53, 21921, 709, 50, 14375, 2430, 43, 897, 54, 437, 305, 487, 13, 20362, 48774, 198, 11748, 764, 43, 897, 54, 437, 305, 487, 198, 12564, 12709, 14692, 43, 897, 54, 437, 305, 487, 8973, 796, 25187, 4102, 13247, 3419, 198, 12564, 12709, 14692, 43, 897, 54, 437, 305, 487, 269, 8973, 796, 25187, 4102, 13247, 3419, 198, 198, 17256, 7, 22179, 6978, 7, 15908, 3672, 7, 31, 834, 25664, 834, 27267, 492, 2430, 10677, 2430, 53, 21921, 709, 50, 14375, 2430, 4933, 7972, 13, 20362, 48774, 198, 11748, 764, 4933, 7972, 198, 12564, 12709, 14692, 4933, 7972, 8973, 796, 25187, 4102, 13247, 3419, 198, 12564, 12709, 14692, 4933, 7972, 220, 21727, 8973, 796, 25187, 4102, 13247, 3419, 198, 198, 17256, 7, 22179, 6978, 7, 15908, 3672, 7, 31, 834, 25664, 834, 27267, 492, 2430, 10677, 2430, 53, 21921, 709, 50, 14375, 2430, 13482, 403, 709, 13, 20362, 48774, 198, 11748, 764, 13482, 403, 709, 198, 12564, 12709, 14692, 13482, 403, 709, 6937, 8973, 796, 25187, 4102, 13247, 3419, 198, 12564, 12709, 14692, 13482, 403, 709, 14174, 8973, 796, 25187, 4102, 13247, 3419, 198, 12564, 12709, 14692, 13482, 403, 709, 14174, 6656, 3123, 263, 8973, 796, 25187, 4102, 13247, 3419, 198, 198, 17256, 7, 22179, 6978, 7, 15908, 3672, 7, 31, 834, 25664, 834, 27267, 492, 2430, 10677, 2430, 53, 21921, 709, 50, 14375, 2430, 13900, 72, 43, 363, 36985, 666, 13, 20362, 48774, 198, 11748, 764, 13900, 72, 43, 363, 36985, 666, 198, 12564, 12709, 14692, 13900, 72, 43, 363, 36985, 666, 14174, 8973, 796, 25187, 4102, 13247, 3419, 198, 12564, 12709, 14692, 13900, 72, 43, 363, 36985, 666, 15094, 81, 1512, 8973, 796, 25187, 4102, 13247, 3419, 198, 12564, 12709, 14692, 13900, 72, 43, 363, 36985, 666, 27216, 8973, 796, 25187, 4102, 13247, 3419, 198, 198, 17256, 7, 22179, 6978, 7, 15908, 3672, 7, 31, 834, 25664, 834, 27267, 492, 2430, 10677, 2430, 53, 21921, 709, 50, 14375, 2430, 47, 4851, 13, 20362, 48774, 198, 11748, 764, 47, 4851, 198, 12564, 12709, 14692, 47, 4851, 8973, 796, 25187, 4102, 13247, 3419, 198, 198, 138, 242, 87, 796, 360, 713, 3419, 198, 138, 242, 83, 796, 360, 713, 3419, 198, 85, 796, 360, 713, 3419, 198, 69, 158, 224, 222, 796, 360, 713, 3419, 198, 69, 796, 360, 713, 3419, 198, 324, 303, 310, 0, 796, 360, 713, 3419, 198, 198, 1640, 399, 287, 685, 3064, 11, 8576, 11, 33028, 60, 198, 220, 220, 220, 37455, 87, 58, 45, 60, 796, 657, 13, 486, 198, 220, 220, 220, 37455, 83, 58, 45, 60, 796, 657, 13, 23, 9, 138, 242, 87, 58, 45, 60, 198, 220, 220, 220, 410, 58, 45, 60, 796, 352, 198, 220, 220, 220, 277, 158, 224, 222, 58, 45, 60, 796, 685, 16, 13, 15, 1343, 657, 13, 486, 9, 31369, 7, 17, 46582, 9, 72, 9, 138, 242, 87, 58, 45, 12962, 329, 1312, 796, 657, 25, 45, 60, 198, 220, 220, 220, 277, 58, 45, 60, 796, 2092, 7, 69, 158, 224, 222, 58, 45, 12962, 198, 220, 220, 220, 512, 303, 310, 0, 58, 45, 60, 796, 360, 713, 3419, 628, 220, 220, 220, 512, 303, 310, 0, 58, 45, 7131, 25, 43, 897, 54, 437, 305, 487, 60, 796, 406, 897, 54, 437, 305, 487, 13, 8612, 378, 62, 82, 14375, 7, 69, 158, 224, 222, 58, 45, 4357, 277, 58, 45, 4357, 410, 58, 45, 60, 9, 138, 242, 83, 58, 45, 60, 14, 138, 242, 87, 58, 45, 12962, 198, 220, 220, 220, 13558, 12709, 14692, 43, 897, 54, 437, 305, 487, 1, 7131, 1, 324, 303, 310, 720, 45, 8973, 796, 2488, 26968, 4102, 540, 512, 303, 310, 0, 58, 3, 45, 7131, 25, 43, 897, 54, 437, 305, 487, 60, 3419, 628, 220, 220, 220, 512, 303, 310, 0, 58, 45, 7131, 25, 43, 897, 54, 437, 305, 487, 62, 66, 60, 796, 406, 897, 54, 437, 305, 487, 13, 8612, 378, 62, 82, 14375, 7, 69, 158, 224, 222, 58, 45, 4357, 277, 58, 45, 12962, 198, 220, 220, 220, 13558, 12709, 14692, 43, 897, 54, 437, 305, 487, 269, 1, 7131, 1, 324, 303, 310, 720, 45, 8973, 796, 2488, 26968, 4102, 540, 512, 303, 310, 0, 58, 3, 45, 7131, 25, 43, 897, 54, 437, 305, 487, 62, 66, 16151, 3, 7, 85, 58, 45, 60, 9, 138, 242, 83, 58, 45, 60, 14, 138, 242, 87, 58, 45, 60, 4008, 628, 220, 220, 220, 512, 303, 310, 0, 58, 45, 7131, 25, 4933, 7972, 60, 796, 3205, 7972, 13, 8612, 378, 62, 82, 14375, 7, 69, 158, 224, 222, 58, 45, 4357, 277, 58, 45, 4357, 410, 58, 45, 60, 9, 138, 242, 83, 58, 45, 60, 14, 138, 242, 87, 58, 45, 12962, 198, 220, 220, 220, 13558, 12709, 14692, 4933, 7972, 1, 7131, 1, 324, 303, 310, 720, 45, 8973, 796, 2488, 26968, 4102, 540, 512, 303, 310, 0, 58, 3, 45, 7131, 25, 4933, 7972, 60, 3419, 628, 220, 220, 220, 512, 303, 310, 0, 58, 45, 7131, 25, 4933, 7972, 62, 21727, 60, 796, 3205, 7972, 13, 8612, 378, 62, 82, 14375, 7, 69, 158, 224, 222, 58, 45, 4357, 277, 58, 45, 12962, 198, 220, 220, 220, 13558, 12709, 14692, 4933, 7972, 220, 21727, 1, 7131, 1, 324, 303, 310, 720, 45, 8973, 796, 2488, 26968, 4102, 540, 512, 303, 310, 0, 58, 3, 45, 7131, 25, 4933, 7972, 62, 21727, 16151, 3, 7, 85, 58, 45, 60, 9, 138, 242, 83, 58, 45, 60, 14, 138, 242, 87, 58, 45, 60, 4008, 628, 220, 220, 220, 512, 303, 310, 0, 58, 45, 7131, 25, 13482, 403, 709, 62, 9979, 415, 60, 796, 1793, 403, 709, 13, 8612, 378, 62, 82, 14375, 7, 69, 158, 224, 222, 58, 45, 4357, 277, 58, 45, 4357, 1058, 49, 26597, 1236, 62, 9979, 415, 8, 198, 220, 220, 220, 13558, 12709, 14692, 13482, 403, 709, 6937, 1, 7131, 1, 324, 303, 310, 720, 45, 8973, 796, 2488, 26968, 4102, 540, 512, 303, 310, 0, 58, 3, 45, 7131, 25, 13482, 403, 709, 62, 9979, 415, 16151, 3, 7, 85, 58, 45, 60, 9, 138, 242, 83, 58, 45, 60, 14, 138, 242, 87, 58, 45, 60, 4008, 628, 220, 220, 220, 512, 303, 310, 0, 58, 45, 7131, 25, 13482, 403, 709, 62, 29127, 60, 796, 1793, 403, 709, 13, 8612, 378, 62, 82, 14375, 7, 69, 158, 224, 222, 58, 45, 4357, 277, 58, 45, 4357, 1058, 49, 26597, 1236, 62, 29127, 8, 198, 220, 220, 220, 13558, 12709, 14692, 13482, 403, 709, 14174, 1, 7131, 1, 324, 303, 310, 720, 45, 8973, 796, 2488, 26968, 4102, 540, 512, 303, 310, 0, 58, 3, 45, 7131, 25, 13482, 403, 709, 62, 29127, 16151, 3, 7, 85, 58, 45, 60, 9, 138, 242, 83, 58, 45, 60, 14, 138, 242, 87, 58, 45, 60, 4008, 628, 220, 220, 220, 512, 303, 310, 0, 58, 45, 7131, 25, 13482, 403, 709, 62, 29127, 62, 25298, 3123, 263, 60, 796, 1793, 403, 709, 13, 8612, 378, 62, 82, 14375, 7, 69, 158, 224, 222, 58, 45, 4357, 277, 58, 45, 4357, 1058, 49, 26597, 1236, 62, 29127, 26, 28462, 62, 2475, 2676, 796, 1058, 25298, 3123, 263, 8, 198, 220, 220, 220, 13558, 12709, 14692, 13482, 403, 709, 14174, 6656, 3123, 263, 1, 7131, 1, 324, 303, 310, 720, 45, 8973, 796, 2488, 26968, 4102, 540, 512, 303, 310, 0, 58, 3, 45, 7131, 25, 13482, 403, 709, 62, 29127, 62, 25298, 3123, 263, 16151, 3, 7, 85, 58, 45, 60, 9, 138, 242, 83, 58, 45, 60, 14, 138, 242, 87, 58, 45, 60, 4008, 628, 220, 220, 220, 512, 303, 310, 0, 58, 45, 7131, 25, 13900, 72, 43, 363, 36985, 666, 62, 29127, 60, 796, 35525, 43, 363, 36985, 666, 13, 8612, 378, 62, 82, 14375, 7, 69, 158, 224, 222, 58, 45, 4357, 277, 58, 45, 11208, 39555, 341, 62, 2875, 796, 1058, 14993, 451, 8, 198, 220, 220, 220, 13558, 12709, 14692, 13900, 72, 43, 363, 36985, 666, 14174, 1, 7131, 1, 324, 303, 310, 720, 45, 8973, 796, 2488, 26968, 4102, 540, 512, 303, 310, 0, 58, 3, 45, 7131, 25, 13900, 72, 43, 363, 36985, 666, 62, 29127, 16151, 3, 7, 85, 58, 45, 60, 9, 138, 242, 83, 58, 45, 60, 14, 138, 242, 87, 58, 45, 60, 4008, 628, 220, 220, 220, 512, 303, 310, 0, 58, 45, 7131, 25, 13900, 72, 43, 363, 36985, 666, 62, 421, 41909, 1512, 60, 796, 35525, 43, 363, 36985, 666, 13, 8612, 378, 62, 82, 14375, 7, 69, 158, 224, 222, 58, 45, 4357, 277, 58, 45, 11208, 39555, 341, 62, 2875, 796, 1058, 4507, 41909, 1512, 8, 198, 220, 220, 220, 13558, 12709, 14692, 13900, 72, 43, 363, 36985, 666, 15094, 81, 1512, 1, 7131, 1, 324, 303, 310, 720, 45, 8973, 796, 2488, 26968, 4102, 540, 512, 303, 310, 0, 58, 3, 45, 7131, 25, 13900, 72, 43, 363, 36985, 666, 62, 421, 41909, 1512, 16151, 3, 7, 85, 58, 45, 60, 9, 138, 242, 83, 58, 45, 60, 14, 138, 242, 87, 58, 45, 60, 4008, 628, 220, 220, 220, 512, 303, 310, 0, 58, 45, 7131, 25, 13900, 72, 43, 363, 36985, 666, 62, 66, 549, 291, 60, 796, 35525, 43, 363, 36985, 666, 13, 8612, 378, 62, 82, 14375, 7, 69, 158, 224, 222, 58, 45, 4357, 277, 58, 45, 11208, 39555, 341, 62, 2875, 796, 1058, 43632, 291, 8, 198, 220, 220, 220, 13558, 12709, 14692, 13900, 72, 43, 363, 36985, 666, 27216, 1, 7131, 1, 324, 303, 310, 720, 45, 8973, 796, 2488, 26968, 4102, 540, 512, 303, 310, 0, 58, 3, 45, 7131, 25, 13900, 72, 43, 363, 36985, 666, 62, 66, 549, 291, 16151, 3, 7, 85, 58, 45, 60, 9, 138, 242, 83, 58, 45, 60, 14, 138, 242, 87, 58, 45, 60, 4008, 628, 220, 220, 220, 512, 303, 310, 0, 58, 45, 7131, 25, 47, 4851, 60, 796, 350, 4851, 13, 8612, 378, 62, 82, 14375, 7, 69, 158, 224, 222, 58, 45, 4357, 277, 58, 45, 12962, 198, 220, 220, 220, 13558, 12709, 14692, 47, 4851, 1, 7131, 1, 324, 303, 310, 720, 45, 8973, 796, 2488, 26968, 4102, 540, 512, 303, 310, 0, 58, 3, 45, 7131, 25, 47, 4851, 16151, 3, 7, 85, 58, 45, 60, 9, 138, 242, 83, 58, 45, 60, 14, 138, 242, 87, 58, 45, 60, 4008, 198, 437, 198, 198, 437, 1303, 8265, 198 ]
1.956959
1,789
export mutate "Mutate: Change weights" function mutate_weights(indiv::NEATInd, cfg::Dict) # TODO: check original weight mutation ind = NEATInd(indiv) for c in ind.connections if rand() < cfg["p_mut_weights"] c.weight = c.weight + randn()*cfg["weight_factor"] end end ind end "split a connection by adding a neuron" function split_connection(c::Connection, neuron_nb::Int, cfg::Dict) # Create neuron n = Neuron(0.0, 0.0, false) # Create 2 new connections # TODO: neuron number does not correspond to order for recurrence checks c1 = Connection(c.in_node, neuron_nb, 1.0, true, cfg["innovation_max"]+1) c2 = Connection(neuron_nb, c.out_node, c.weight, true, cfg["innovation_max"]+2) cfg["innovation_max"] += 2 c1, c2, n end "Mutation: Add a node in a connection" function mutate_add_neuron(indiv::NEATInd, cfg::Dict) ind = NEATInd(indiv) ci = rand(1:length(ind.connections)) c = ind.connections[ci] c1, c2, n = split_connection(c, length(ind.neurons), cfg) deleteat!(ind.connections, ci) append!(ind.connections, [c1, c2]) push!(ind.neurons, n) ind end "Mutation: Add a connection between 2 random nodes" function mutate_add_connection(indiv::NEATInd, cfg::Dict, allow_recurrent::Bool=false) ind = NEATInd(indiv) # Select 2 different neurons at random, can't create a connection that already exists nn = length(ind.neurons) valid = trues(nn, nn) for c in ind.connections valid[c.in_node, c.out_node] = false end conns = findall(valid) if length(conns) > 0 shuffle!(conns) cfg["innovation_max"] += 1 c = Connection(conns[1][1], conns[1][2], rand_weight(), true, cfg["innovation_max"]) push!(ind.connections, c) end ind end "Mutation: Toggle Enabled" function mutate_enabled(indiv::NEATInd; n_times=1) ind = NEATInd(indiv) ids = randperm(length(ind.connections)) for i in 1:n_times ind.connections[ids[i]].enabled = !ind.connections[ids[i]].enabled end ind end "mutate(ind::NEATInd, cfg::Dict): return a new mutated individual" function mutate(indiv::NEATInd, cfg::Dict) if rand() < cfg["p_mutate_add_neuron"] return mutate_add_neuron(indiv, cfg) elseif rand() < cfg["p_mutate_add_connection"] return mutate_add_connection(indiv, cfg) elseif rand() < cfg["p_mutate_weights"] return mutate_weights(indiv, cfg) elseif rand() < cfg["p_mutate_enabled"] return mutate_enabled(indiv, cfg) end # return clone if no mutation occurs NEATInd(indiv) end
[ 39344, 4517, 378, 198, 198, 1, 41603, 378, 25, 9794, 19590, 1, 198, 8818, 4517, 378, 62, 43775, 7, 521, 452, 3712, 12161, 1404, 5497, 11, 30218, 70, 3712, 35, 713, 8, 198, 220, 220, 220, 1303, 16926, 46, 25, 2198, 2656, 3463, 15148, 198, 220, 220, 220, 773, 796, 10635, 1404, 5497, 7, 521, 452, 8, 198, 220, 220, 220, 329, 269, 287, 773, 13, 8443, 507, 198, 220, 220, 220, 220, 220, 220, 220, 611, 43720, 3419, 1279, 30218, 70, 14692, 79, 62, 21973, 62, 43775, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 269, 13, 6551, 796, 269, 13, 6551, 1343, 43720, 77, 3419, 9, 37581, 14692, 6551, 62, 31412, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 773, 198, 437, 198, 198, 1, 35312, 257, 4637, 416, 4375, 257, 43164, 1, 198, 8818, 6626, 62, 38659, 7, 66, 3712, 32048, 11, 43164, 62, 46803, 3712, 5317, 11, 30218, 70, 3712, 35, 713, 8, 198, 220, 220, 220, 1303, 13610, 43164, 198, 220, 220, 220, 299, 796, 3169, 44372, 7, 15, 13, 15, 11, 657, 13, 15, 11, 3991, 8, 628, 220, 220, 220, 1303, 13610, 362, 649, 8787, 198, 220, 220, 220, 1303, 16926, 46, 25, 43164, 1271, 857, 407, 6053, 284, 1502, 329, 664, 33928, 8794, 198, 220, 220, 220, 269, 16, 796, 26923, 7, 66, 13, 259, 62, 17440, 11, 43164, 62, 46803, 11, 352, 13, 15, 11, 2081, 11, 30218, 70, 14692, 3732, 17882, 62, 9806, 8973, 10, 16, 8, 198, 220, 220, 220, 269, 17, 796, 26923, 7, 710, 44372, 62, 46803, 11, 269, 13, 448, 62, 17440, 11, 269, 13, 6551, 11, 2081, 11, 30218, 70, 14692, 3732, 17882, 62, 9806, 8973, 10, 17, 8, 198, 220, 220, 220, 30218, 70, 14692, 3732, 17882, 62, 9806, 8973, 15853, 362, 628, 220, 220, 220, 269, 16, 11, 269, 17, 11, 299, 198, 437, 198, 198, 1, 44, 7094, 25, 3060, 257, 10139, 287, 257, 4637, 1, 198, 8818, 4517, 378, 62, 2860, 62, 710, 44372, 7, 521, 452, 3712, 12161, 1404, 5497, 11, 30218, 70, 3712, 35, 713, 8, 198, 220, 220, 220, 773, 796, 10635, 1404, 5497, 7, 521, 452, 8, 628, 220, 220, 220, 269, 72, 796, 43720, 7, 16, 25, 13664, 7, 521, 13, 8443, 507, 4008, 198, 220, 220, 220, 269, 796, 773, 13, 8443, 507, 58, 979, 60, 198, 220, 220, 220, 269, 16, 11, 269, 17, 11, 299, 796, 6626, 62, 38659, 7, 66, 11, 4129, 7, 521, 13, 710, 333, 684, 828, 30218, 70, 8, 198, 220, 220, 220, 12233, 265, 0, 7, 521, 13, 8443, 507, 11, 269, 72, 8, 198, 220, 220, 220, 24443, 0, 7, 521, 13, 8443, 507, 11, 685, 66, 16, 11, 269, 17, 12962, 198, 220, 220, 220, 4574, 0, 7, 521, 13, 710, 333, 684, 11, 299, 8, 628, 220, 220, 220, 773, 198, 437, 198, 198, 1, 44, 7094, 25, 3060, 257, 4637, 1022, 362, 4738, 13760, 1, 198, 8818, 4517, 378, 62, 2860, 62, 38659, 7, 521, 452, 3712, 12161, 1404, 5497, 11, 30218, 70, 3712, 35, 713, 11, 1249, 62, 8344, 6657, 3712, 33, 970, 28, 9562, 8, 198, 220, 220, 220, 773, 796, 10635, 1404, 5497, 7, 521, 452, 8, 628, 220, 220, 220, 1303, 9683, 362, 1180, 16890, 379, 4738, 11, 460, 470, 2251, 257, 4637, 326, 1541, 7160, 198, 220, 220, 220, 299, 77, 796, 4129, 7, 521, 13, 710, 333, 684, 8, 198, 220, 220, 220, 4938, 796, 491, 947, 7, 20471, 11, 299, 77, 8, 198, 220, 220, 220, 329, 269, 287, 773, 13, 8443, 507, 198, 220, 220, 220, 220, 220, 220, 220, 4938, 58, 66, 13, 259, 62, 17440, 11, 269, 13, 448, 62, 17440, 60, 796, 3991, 198, 220, 220, 220, 886, 198, 220, 220, 220, 369, 5907, 796, 1064, 439, 7, 12102, 8, 198, 220, 220, 220, 611, 4129, 7, 1102, 5907, 8, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 36273, 0, 7, 1102, 5907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 70, 14692, 3732, 17882, 62, 9806, 8973, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 269, 796, 26923, 7, 1102, 5907, 58, 16, 7131, 16, 4357, 369, 5907, 58, 16, 7131, 17, 4357, 43720, 62, 6551, 22784, 2081, 11, 30218, 70, 14692, 3732, 17882, 62, 9806, 8973, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 521, 13, 8443, 507, 11, 269, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 773, 198, 437, 198, 198, 1, 44, 7094, 25, 34098, 37344, 1, 198, 8818, 4517, 378, 62, 25616, 7, 521, 452, 3712, 12161, 1404, 5497, 26, 299, 62, 22355, 28, 16, 8, 198, 220, 220, 220, 773, 796, 10635, 1404, 5497, 7, 521, 452, 8, 198, 220, 220, 220, 220, 2340, 796, 43720, 16321, 7, 13664, 7, 521, 13, 8443, 507, 4008, 198, 220, 220, 220, 329, 1312, 287, 352, 25, 77, 62, 22355, 198, 220, 220, 220, 220, 220, 220, 220, 773, 13, 8443, 507, 58, 2340, 58, 72, 60, 4083, 25616, 796, 5145, 521, 13, 8443, 507, 58, 2340, 58, 72, 60, 4083, 25616, 198, 220, 220, 220, 886, 198, 220, 220, 220, 773, 198, 437, 198, 198, 1, 21973, 378, 7, 521, 3712, 12161, 1404, 5497, 11, 30218, 70, 3712, 35, 713, 2599, 1441, 257, 649, 48865, 1981, 1, 198, 8818, 4517, 378, 7, 521, 452, 3712, 12161, 1404, 5497, 11, 30218, 70, 3712, 35, 713, 8, 198, 220, 220, 220, 611, 43720, 3419, 1279, 30218, 70, 14692, 79, 62, 21973, 378, 62, 2860, 62, 710, 44372, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 4517, 378, 62, 2860, 62, 710, 44372, 7, 521, 452, 11, 30218, 70, 8, 198, 220, 220, 220, 2073, 361, 43720, 3419, 1279, 30218, 70, 14692, 79, 62, 21973, 378, 62, 2860, 62, 38659, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 4517, 378, 62, 2860, 62, 38659, 7, 521, 452, 11, 30218, 70, 8, 198, 220, 220, 220, 2073, 361, 43720, 3419, 1279, 30218, 70, 14692, 79, 62, 21973, 378, 62, 43775, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 4517, 378, 62, 43775, 7, 521, 452, 11, 30218, 70, 8, 198, 220, 220, 220, 2073, 361, 43720, 3419, 1279, 30218, 70, 14692, 79, 62, 21973, 378, 62, 25616, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 4517, 378, 62, 25616, 7, 521, 452, 11, 30218, 70, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 1441, 17271, 611, 645, 15148, 8833, 198, 220, 220, 220, 10635, 1404, 5497, 7, 521, 452, 8, 198, 437, 198 ]
2.349107
1,120
## Imports using Base.Threads using Flux using Graphs using InferOpt using MultiAgentPathFinding using PythonCall using ProgressMeter using UnicodePlots ## Test rail_generators = pyimport("flatland.envs.rail_generators") line_generators = pyimport("flatland.envs.line_generators") rail_env = pyimport("flatland.envs.rail_env") rail_generator = rail_generators.sparse_rail_generator(; max_num_cities=4) line_generator = line_generators.sparse_line_generator() pyenv = rail_env.RailEnv(; width=30, height=30, number_of_agents=20, rail_generator=rail_generator, line_generator=line_generator, random_seed=11, ) pyenv.reset(); ## Data generation nb_instances = 10 instances = Vector{typeof(flatland_mapf(pyenv))}(undef, nb_instances); @showprogress "Generating instances: " for k in 1:nb_instances pyenv.reset() instances[k] = flatland_mapf(pyenv) end solutions = Vector{Solution}(undef, nb_instances); @threads for k in 1:nb_instances @info "Instance $k solved by thread $(threadid())" solutions[k] = large_neighborhood_search(instances[k]; N=10, steps=100, progress=false) end T = maximum(max_time(solution) for solution in solutions) * 2 X = [agents_embedding(mapf) for mapf in instances]; Y = [solution_to_vec(solution, mapf; T=T) for (solution, mapf) in zip(solutions, instances)]; function maximizer(θ; mapf) permutation = sortperm(θ; rev=true) solution = cooperative_astar(mapf, permutation) ŷ = solution_to_vec(solution, mapf; T=T) return ŷ end ## Initialization encoder = Chain(Dense(size(X[1], 1), 1), vec) model = Perturbed(maximizer; ε=0.1, M=10) squared_loss(ŷ, y) = sum(abs2, y - ŷ) / T; λ = 30 opt = ADAGrad(); par = Flux.params(encoder) losses = Float64[] ## Training for epoch in 1:100 l = 0.0 @showprogress "Epoch $epoch/100 - " for k in 1:nb_instances gs = gradient(par) do l += ( squared_loss(model(encoder(X[k]); mapf=instances[k]), Y[k]) + (λ / nb_instances) * sum(abs, encoder[1].weight) ) end Flux.update!(opt, par, gs) end push!(losses, l) end; println(lineplot(losses)) ## Evaluation solutions_naive = Vector{Solution}(undef, nb_instances); solutions_pred = Vector{Solution}(undef, nb_instances); for k in 1:nb_instances solutions_naive[k] = cooperative_astar(instances[k], 1:nb_agents(instances[k])) θ = encoder(X[k]) permutation = sortperm(θ; rev=true) solutions_pred[k] = cooperative_astar(instances[k], permutation) end avg_flowtime = sum(flowtime(solution, mapf) for (solution, mapf) in zip(solutions, instances)) / nb_instances avg_flowtime_pred = sum(flowtime(solution, mapf) for (solution, mapf) in zip(solutions_pred, instances)) / nb_instances avg_flowtime_naive = sum(flowtime(solution, mapf) for (solution, mapf) in zip(solutions_naive, instances)) / nb_instances
[ 2235, 1846, 3742, 198, 198, 3500, 7308, 13, 16818, 82, 198, 3500, 1610, 2821, 198, 3500, 29681, 82, 198, 3500, 554, 2232, 27871, 198, 3500, 15237, 36772, 15235, 36276, 198, 3500, 11361, 14134, 198, 3500, 18387, 44, 2357, 198, 3500, 34371, 3646, 1747, 198, 198, 2235, 6208, 198, 198, 30224, 62, 8612, 2024, 796, 12972, 11748, 7203, 38568, 1044, 13, 268, 14259, 13, 30224, 62, 8612, 2024, 4943, 198, 1370, 62, 8612, 2024, 796, 12972, 11748, 7203, 38568, 1044, 13, 268, 14259, 13, 1370, 62, 8612, 2024, 4943, 198, 30224, 62, 24330, 796, 12972, 11748, 7203, 38568, 1044, 13, 268, 14259, 13, 30224, 62, 24330, 4943, 198, 198, 30224, 62, 8612, 1352, 796, 6787, 62, 8612, 2024, 13, 82, 29572, 62, 30224, 62, 8612, 1352, 7, 26, 3509, 62, 22510, 62, 66, 871, 28, 19, 8, 198, 1370, 62, 8612, 1352, 796, 1627, 62, 8612, 2024, 13, 82, 29572, 62, 1370, 62, 8612, 1352, 3419, 198, 198, 9078, 24330, 796, 6787, 62, 24330, 13, 44631, 4834, 85, 7, 26, 198, 220, 220, 220, 9647, 28, 1270, 11, 198, 220, 220, 220, 6001, 28, 1270, 11, 198, 220, 220, 220, 1271, 62, 1659, 62, 49638, 28, 1238, 11, 198, 220, 220, 220, 6787, 62, 8612, 1352, 28, 30224, 62, 8612, 1352, 11, 198, 220, 220, 220, 1627, 62, 8612, 1352, 28, 1370, 62, 8612, 1352, 11, 198, 220, 220, 220, 4738, 62, 28826, 28, 1157, 11, 198, 8, 198, 9078, 24330, 13, 42503, 9783, 198, 198, 2235, 6060, 5270, 198, 198, 46803, 62, 8625, 1817, 796, 838, 198, 198, 8625, 1817, 796, 20650, 90, 4906, 1659, 7, 38568, 1044, 62, 8899, 69, 7, 9078, 24330, 4008, 92, 7, 917, 891, 11, 299, 65, 62, 8625, 1817, 1776, 198, 31, 12860, 33723, 366, 8645, 803, 10245, 25, 366, 329, 479, 287, 352, 25, 46803, 62, 8625, 1817, 198, 220, 220, 220, 12972, 24330, 13, 42503, 3419, 198, 220, 220, 220, 10245, 58, 74, 60, 796, 6228, 1044, 62, 8899, 69, 7, 9078, 24330, 8, 198, 437, 198, 198, 82, 14191, 796, 20650, 90, 46344, 92, 7, 917, 891, 11, 299, 65, 62, 8625, 1817, 1776, 198, 31, 16663, 82, 329, 479, 287, 352, 25, 46803, 62, 8625, 1817, 198, 220, 220, 220, 2488, 10951, 366, 33384, 720, 74, 16019, 416, 4704, 29568, 16663, 312, 3419, 16725, 198, 220, 220, 220, 8136, 58, 74, 60, 796, 1588, 62, 710, 394, 2865, 2894, 62, 12947, 7, 8625, 1817, 58, 74, 11208, 399, 28, 940, 11, 4831, 28, 3064, 11, 4371, 28, 9562, 8, 198, 437, 198, 198, 51, 796, 5415, 7, 9806, 62, 2435, 7, 82, 2122, 8, 329, 4610, 287, 8136, 8, 1635, 362, 198, 55, 796, 685, 49638, 62, 20521, 12083, 7, 8899, 69, 8, 329, 3975, 69, 287, 10245, 11208, 198, 56, 796, 685, 82, 2122, 62, 1462, 62, 35138, 7, 82, 2122, 11, 3975, 69, 26, 309, 28, 51, 8, 329, 357, 82, 2122, 11, 3975, 69, 8, 287, 19974, 7, 82, 14191, 11, 10245, 8, 11208, 198, 198, 8818, 12991, 7509, 7, 138, 116, 26, 3975, 69, 8, 198, 220, 220, 220, 9943, 7094, 796, 3297, 16321, 7, 138, 116, 26, 2710, 28, 7942, 8, 198, 220, 220, 220, 4610, 796, 22849, 62, 459, 283, 7, 8899, 69, 11, 9943, 7094, 8, 198, 220, 220, 220, 331, 136, 224, 796, 4610, 62, 1462, 62, 35138, 7, 82, 2122, 11, 3975, 69, 26, 309, 28, 51, 8, 198, 220, 220, 220, 1441, 331, 136, 224, 198, 437, 198, 198, 2235, 20768, 1634, 198, 198, 12685, 12342, 796, 21853, 7, 35, 1072, 7, 7857, 7, 55, 58, 16, 4357, 352, 828, 352, 828, 43030, 8, 198, 19849, 796, 350, 861, 37694, 7, 9806, 320, 7509, 26, 7377, 113, 28, 15, 13, 16, 11, 337, 28, 940, 8, 198, 16485, 1144, 62, 22462, 7, 88, 136, 224, 11, 331, 8, 796, 2160, 7, 8937, 17, 11, 331, 532, 331, 136, 224, 8, 1220, 309, 26, 198, 198, 39377, 796, 1542, 198, 8738, 796, 5984, 4760, 6335, 9783, 198, 1845, 796, 1610, 2821, 13, 37266, 7, 12685, 12342, 8, 198, 198, 22462, 274, 796, 48436, 2414, 21737, 198, 198, 2235, 13614, 198, 198, 1640, 36835, 287, 352, 25, 3064, 198, 220, 220, 220, 300, 796, 657, 13, 15, 198, 220, 220, 220, 2488, 12860, 33723, 366, 13807, 5374, 720, 538, 5374, 14, 3064, 532, 366, 329, 479, 287, 352, 25, 46803, 62, 8625, 1817, 198, 220, 220, 220, 220, 220, 220, 220, 308, 82, 796, 31312, 7, 1845, 8, 466, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 300, 15853, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 44345, 62, 22462, 7, 19849, 7, 12685, 12342, 7, 55, 58, 74, 36563, 3975, 69, 28, 8625, 1817, 58, 74, 46570, 575, 58, 74, 12962, 1343, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 357, 39377, 1220, 299, 65, 62, 8625, 1817, 8, 1635, 2160, 7, 8937, 11, 2207, 12342, 58, 16, 4083, 6551, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1610, 2821, 13, 19119, 0, 7, 8738, 11, 1582, 11, 308, 82, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 4574, 0, 7, 22462, 274, 11, 300, 8, 198, 437, 26, 198, 198, 35235, 7, 1370, 29487, 7, 22462, 274, 4008, 198, 198, 2235, 34959, 198, 198, 82, 14191, 62, 2616, 425, 796, 20650, 90, 46344, 92, 7, 917, 891, 11, 299, 65, 62, 8625, 1817, 1776, 198, 82, 14191, 62, 28764, 796, 20650, 90, 46344, 92, 7, 917, 891, 11, 299, 65, 62, 8625, 1817, 1776, 198, 1640, 479, 287, 352, 25, 46803, 62, 8625, 1817, 198, 220, 220, 220, 8136, 62, 2616, 425, 58, 74, 60, 796, 22849, 62, 459, 283, 7, 8625, 1817, 58, 74, 4357, 352, 25, 46803, 62, 49638, 7, 8625, 1817, 58, 74, 60, 4008, 198, 220, 220, 220, 7377, 116, 796, 2207, 12342, 7, 55, 58, 74, 12962, 198, 220, 220, 220, 9943, 7094, 796, 3297, 16321, 7, 138, 116, 26, 2710, 28, 7942, 8, 198, 220, 220, 220, 8136, 62, 28764, 58, 74, 60, 796, 22849, 62, 459, 283, 7, 8625, 1817, 58, 74, 4357, 9943, 7094, 8, 198, 437, 198, 198, 615, 70, 62, 11125, 2435, 796, 198, 220, 220, 220, 2160, 7, 11125, 2435, 7, 82, 2122, 11, 3975, 69, 8, 329, 357, 82, 2122, 11, 3975, 69, 8, 287, 19974, 7, 82, 14191, 11, 10245, 4008, 1220, 198, 220, 220, 220, 299, 65, 62, 8625, 1817, 198, 198, 615, 70, 62, 11125, 2435, 62, 28764, 796, 198, 220, 220, 220, 2160, 7, 11125, 2435, 7, 82, 2122, 11, 3975, 69, 8, 329, 357, 82, 2122, 11, 3975, 69, 8, 287, 19974, 7, 82, 14191, 62, 28764, 11, 10245, 4008, 1220, 198, 220, 220, 220, 299, 65, 62, 8625, 1817, 198, 198, 615, 70, 62, 11125, 2435, 62, 2616, 425, 796, 198, 220, 220, 220, 2160, 7, 11125, 2435, 7, 82, 2122, 11, 3975, 69, 8, 329, 357, 82, 2122, 11, 3975, 69, 8, 287, 19974, 7, 82, 14191, 62, 2616, 425, 11, 10245, 4008, 1220, 198, 220, 220, 220, 299, 65, 62, 8625, 1817, 198 ]
2.392945
1,219
using Oceananigans.Architectures using Oceananigans.BoundaryConditions using Oceananigans.TurbulenceClosures: calculate_diffusivities! import Oceananigans.TimeSteppers: update_state! """ update_state!(model::IncompressibleModel) Update peripheral aspects of the model (halo regions, diffusivities, hydrostatic pressure) to the current model state. """ function update_state!(model::IncompressibleModel) # Fill halos for velocities and tracers fill_halo_regions!(merge(model.velocities, model.tracers), model.architecture, model.clock, fields(model)) # Calculate diffusivities calculate_diffusivities!(model.diffusivities, model.architecture, model.grid, model.closure, model.buoyancy, model.velocities, model.tracers) fill_halo_regions!(model.diffusivities, model.architecture, model.clock, fields(model)) # Calculate hydrostatic pressure pressure_calculation = launch!(model.architecture, model.grid, :xy, update_hydrostatic_pressure!, model.pressures.pHY′, model.grid, model.buoyancy, model.tracers, dependencies=Event(device(model.architecture))) # Fill halo regions for pressure wait(device(model.architecture), pressure_calculation) fill_halo_regions!(model.pressures.pHY′, model.architecture) return nothing end
[ 3500, 10692, 272, 34090, 13, 19895, 5712, 942, 198, 3500, 10692, 272, 34090, 13, 49646, 560, 25559, 1756, 198, 3500, 10692, 272, 34090, 13, 51, 5945, 32401, 2601, 16091, 25, 15284, 62, 26069, 385, 28720, 0, 198, 198, 11748, 10692, 272, 34090, 13, 7575, 7447, 11799, 25, 4296, 62, 5219, 0, 198, 198, 37811, 198, 220, 220, 220, 4296, 62, 5219, 0, 7, 19849, 3712, 818, 5589, 601, 856, 17633, 8, 198, 198, 10260, 25514, 7612, 286, 262, 2746, 357, 71, 7335, 7652, 11, 814, 385, 28720, 11, 17173, 12708, 3833, 8, 284, 262, 1459, 2746, 1181, 13, 198, 37811, 198, 8818, 4296, 62, 5219, 0, 7, 19849, 3712, 818, 5589, 601, 856, 17633, 8, 628, 220, 220, 220, 1303, 27845, 10284, 418, 329, 11555, 420, 871, 290, 491, 49908, 198, 220, 220, 220, 6070, 62, 71, 7335, 62, 2301, 507, 0, 7, 647, 469, 7, 19849, 13, 626, 420, 871, 11, 2746, 13, 2213, 49908, 828, 2746, 13, 998, 5712, 495, 11, 220, 2746, 13, 15750, 11, 7032, 7, 19849, 4008, 628, 220, 220, 220, 1303, 27131, 378, 814, 385, 28720, 198, 220, 220, 220, 15284, 62, 26069, 385, 28720, 0, 7, 19849, 13, 26069, 385, 28720, 11, 2746, 13, 998, 5712, 495, 11, 2746, 13, 25928, 11, 2746, 13, 17966, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 13, 11110, 726, 3883, 11, 2746, 13, 626, 420, 871, 11, 2746, 13, 2213, 49908, 8, 628, 220, 220, 220, 6070, 62, 71, 7335, 62, 2301, 507, 0, 7, 19849, 13, 26069, 385, 28720, 11, 2746, 13, 998, 5712, 495, 11, 2746, 13, 15750, 11, 7032, 7, 19849, 4008, 628, 220, 220, 220, 1303, 27131, 378, 17173, 12708, 3833, 198, 220, 220, 220, 3833, 62, 9948, 14902, 796, 4219, 0, 7, 19849, 13, 998, 5712, 495, 11, 2746, 13, 25928, 11, 1058, 5431, 11, 4296, 62, 15511, 305, 12708, 62, 36151, 28265, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 13, 8439, 942, 13, 79, 42598, 17478, 11, 2746, 13, 25928, 11, 2746, 13, 11110, 726, 3883, 11, 2746, 13, 2213, 49908, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20086, 28, 9237, 7, 25202, 7, 19849, 13, 998, 5712, 495, 22305, 628, 220, 220, 220, 1303, 27845, 289, 7335, 7652, 329, 3833, 198, 220, 220, 220, 4043, 7, 25202, 7, 19849, 13, 998, 5712, 495, 828, 3833, 62, 9948, 14902, 8, 628, 220, 220, 220, 6070, 62, 71, 7335, 62, 2301, 507, 0, 7, 19849, 13, 8439, 942, 13, 79, 42598, 17478, 11, 2746, 13, 998, 5712, 495, 8, 628, 220, 220, 220, 1441, 2147, 198, 437, 628 ]
2.71063
508
export CSMOccuranceType export parseCSMVerboseLog, calcCSMOccurancesFolders, calcCSMOccuranceMax, printCSMOccuranceMax, reconstructCSMHistoryLogical # [cliqId][fsmIterNumber][fsmFunctionName] => (nr. call occurances, list global call sequence position, list of status) const CSMOccuranceType = Dict{Int, Dict{Int, Dict{Symbol, Tuple{Int, Vector{Int}, Vector{String}}}}} function parseCSMVerboseLog(resultsDir::AbstractString;verboseName::AbstractString="csmVerbose.log") # fid = open(joinpath(resultsDir, verboseName), "r") fsmLines = readlines(fid) close(fid) # parse lines into usable format sfsmL = split.(fsmLines, r" -- ") cids = split.(sfsmL .|> x->match(r"cliq\d+", x[1]).match, r"cliq") .|> x->parse(Int,x[end]) iters = split.(sfsmL .|> x->match(r"iter=\d+", x[1]).match, r"iter=") .|> x->parse(Int,x[end]) smfnc = sfsmL .|> x->split(x[2], ',')[1] .|> Symbol statu = sfsmL .|> x->split(x[2], ',')[2] .|> x->lstrip(rstrip(x)) return cids, iters, smfnc, statu end ## Make lookup from all runs function calcCSMOccurancesFolders(folderList::Vector{<:AbstractString}; verboseName::AbstractString="csmVerbose.log" ) # # lookup for histogram on each step per fsm # [cliqId][fsmIterNumber][fsmFunctionName] => (nr. call occurances, list global call sequence position) csmCounter = CSMOccuranceType() # lookup for transition counts per fsm function trxCounter = Dict{Symbol, Dict{Symbol, Int}}() prevFnc = Dict{Int, Symbol}() for rDir in folderList ## load the sequence from each file cids, iters, smfnc, statu = parseCSMVerboseLog(rDir, verboseName=verboseName) # populate histogram for (idx,smfi) in enumerate(smfnc) if !haskey(csmCounter, cids[idx]) csmCounter[cids[idx]] = Dict{Int, Dict{Symbol, Tuple{Int,Vector{Int}}}}() end if !haskey(csmCounter[cids[idx]], iters[idx]) # Tuple{Int,Int[]} == (nr. occurances of call, list global call sequence position) csmCounter[cids[idx]][iters[idx]] = Dict{Symbol, Tuple{Int,Vector{Int}, Vector{String}}}() end easyRef = csmCounter[cids[idx]][iters[idx]] if !haskey(easyRef,smfi) easyRef[smfi] = (0,Int[],String[]) end # add position in call sequence (global per solve) globalSeqIdx = easyRef[smfi][2] push!(globalSeqIdx, idx) statSeq = easyRef[smfi][3] push!(statSeq, statu[idx]) easyRef[smfi] = (easyRef[smfi][1]+1, globalSeqIdx, statSeq) ## also track the transitions if haskey(prevFnc, cids[idx]) if !haskey(trxCounter, prevFnc[cids[idx]]) # add function lookup if not previously seen trxCounter[prevFnc[cids[idx]]] = Dict{Symbol, Int}() end if !haskey(trxCounter[prevFnc[cids[idx]]], smfi) # add previously unseen transition trxCounter[prevFnc[cids[idx]]][smfi] = 0 end # from previous to next function trxCounter[prevFnc[cids[idx]]][smfi] += 1 end # always update prevFnc register prevFnc[cids[idx]] = smfi end end return csmCounter, trxCounter end """ $SIGNATURES Use maximum occurance from `csmCounter::CSMOccuranceType` to summarize many CSM results. Notes - `percentage::Bool=false` shows median global sequence occurance ('m'), or - `percentage::Bool=true` of occurance ('%') """ function calcCSMOccuranceMax( csmCounter::CSMOccuranceType; percentage::Bool=false) # ncsm = length(keys(csmCounter)) maxOccuran = Dict() # max steps for i in 1:ncsm # sequence of functions that occur most often maxOccuran[i] = Vector{Tuple{Symbol, String, String}}() end # pick out the max for each CSM iter for (csmID, csmD) in csmCounter, stp in 1:length(keys(csmD)) maxFnc = :null maxCount = 0 totalCount = 0 for (fnc, cnt) in csmCounter[csmID][stp] totalCount += cnt[1] if maxCount < cnt[1] maxCount = cnt[1] maxFnc = fnc end end # occurance count perc = if percentage "$(round(Int,(maxCount/totalCount)*100))" else # get medial position (proxy to most frequent) "$(round(Int,Statistics.median(csmCounter[csmID][stp][maxFnc][2])))" end # get status allst = csmCounter[csmID][stp][maxFnc][3] qst = unique(allst) mqst = qst .|> y->count(x->x==y, allst) midx = findfirst(x->x==maximum(mqst),mqst) maxStatus = qst[midx] push!(maxOccuran[csmID], (maxFnc, perc, maxStatus) ) # position in vector == stp end maxOccuran end """ $SIGNATURES Print the most likely FSM function at each step per state machine, as swim lanes. Example ```julia csmCo = calcCSMOccurancesFolders(resultFolder[maskTrue]) maxOcc = calcCSMOccuranceMax(csmCo) printCSMOccuranceMax(maxOcc) ``` """ function printCSMOccuranceMax(maxOcc; fid=stdout, percentage::Bool=false ) # ncsm = length(keys(maxOcc)) # print titles titles = Tuple[] for cid in 1:ncsm tpl = ("","","$cid "," ") push!(titles, tpl) end IIF.printHistoryLane(fid, "", titles) print(fid,"----") for i in 1:ncsm print(fid,"+--------------------") end println(fid,"") maxsteps=0 for i in 1:ncsm maxsteps = maxsteps < length(maxOcc[i]) ? length(maxOcc[i]) : maxsteps end for stp in 1:maxsteps TPL = Tuple[] for cid in 1:ncsm tpl = ("",""," "," ") if stp <= length(maxOcc[cid]) fncName = maxOcc[cid][stp][1] # either show percentage or sequence index percOrSeq = "$(maxOcc[cid][stp][2])" percOrSeq *= percentage ? "%" : "m" # get status tpl = ("",percOrSeq,fncName,maxOcc[cid][stp][3]) end push!(TPL, tpl) end IIF.printHistoryLane(fid, stp, TPL) end end """ $SIGNATURES Use `solveTree!`'s` `verbose` output to reconstruct the swim lanes Logical sequence of CSM function calls. Notes - This is a secondary function to primary `printCSMHistoryLogical`. Related printCSMHistoryLogical """ function reconstructCSMHistoryLogical(resultsDir::AbstractString; fid::IO=stdout, verboseName::AbstractString="csmVerbose.log" ) # csmCounter, trxCounter = calcCSMOccurancesFolders([resultsDir], verboseName=verboseName) # print with sequence position maxOcc = calcCSMOccuranceMax(csmCounter, percentage=false) printCSMOccuranceMax(maxOcc, fid=fid) end #
[ 198, 39344, 9429, 11770, 535, 3874, 6030, 198, 39344, 21136, 7902, 44, 13414, 65, 577, 11187, 11, 42302, 7902, 11770, 535, 31741, 37, 727, 364, 11, 42302, 7902, 11770, 535, 3874, 11518, 11, 3601, 7902, 11770, 535, 3874, 11518, 11, 31081, 7902, 44, 18122, 11187, 605, 198, 198, 2, 685, 565, 25011, 7390, 7131, 69, 5796, 29993, 15057, 7131, 69, 5796, 22203, 5376, 60, 5218, 357, 48624, 13, 869, 3051, 1817, 11, 1351, 3298, 869, 8379, 2292, 11, 1351, 286, 3722, 8, 198, 9979, 9429, 11770, 535, 3874, 6030, 796, 360, 713, 90, 5317, 11, 360, 713, 90, 5317, 11, 360, 713, 90, 13940, 23650, 11, 309, 29291, 90, 5317, 11, 20650, 90, 5317, 5512, 20650, 90, 10100, 11709, 42535, 198, 198, 8818, 21136, 7902, 44, 13414, 65, 577, 11187, 7, 43420, 35277, 3712, 23839, 10100, 26, 19011, 577, 5376, 3712, 23839, 10100, 2625, 66, 5796, 13414, 65, 577, 13, 6404, 4943, 198, 220, 1303, 198, 220, 49909, 796, 1280, 7, 22179, 6978, 7, 43420, 35277, 11, 15942, 577, 5376, 828, 366, 81, 4943, 198, 220, 277, 5796, 43, 1127, 796, 1100, 6615, 7, 69, 312, 8, 198, 220, 1969, 7, 69, 312, 8, 628, 220, 1303, 21136, 3951, 656, 24284, 5794, 198, 220, 264, 69, 5796, 43, 796, 6626, 12195, 69, 5796, 43, 1127, 11, 374, 1, 1377, 366, 8, 198, 220, 269, 2340, 796, 6626, 12195, 28202, 5796, 43, 764, 91, 29, 2124, 3784, 15699, 7, 81, 1, 565, 25011, 59, 67, 10, 1600, 2124, 58, 16, 35944, 15699, 11, 374, 1, 565, 25011, 4943, 764, 91, 29, 2124, 3784, 29572, 7, 5317, 11, 87, 58, 437, 12962, 198, 220, 340, 364, 796, 6626, 12195, 28202, 5796, 43, 764, 91, 29, 2124, 3784, 15699, 7, 81, 1, 2676, 28, 59, 67, 10, 1600, 2124, 58, 16, 35944, 15699, 11, 374, 1, 2676, 2625, 8, 764, 91, 29, 2124, 3784, 29572, 7, 5317, 11, 87, 58, 437, 12962, 198, 220, 895, 69, 10782, 796, 264, 69, 5796, 43, 764, 91, 29, 2124, 3784, 35312, 7, 87, 58, 17, 4357, 705, 4032, 38381, 16, 60, 764, 91, 29, 38357, 198, 220, 1185, 84, 796, 264, 69, 5796, 43, 764, 91, 29, 2124, 3784, 35312, 7, 87, 58, 17, 4357, 705, 4032, 38381, 17, 60, 764, 91, 29, 2124, 3784, 75, 36311, 7, 81, 36311, 7, 87, 4008, 628, 220, 1441, 269, 2340, 11, 340, 364, 11, 895, 69, 10782, 11, 1185, 84, 198, 437, 628, 198, 2235, 6889, 35847, 422, 477, 4539, 198, 8818, 42302, 7902, 11770, 535, 31741, 37, 727, 364, 7, 43551, 8053, 3712, 38469, 90, 27, 25, 23839, 10100, 19629, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15942, 577, 5376, 3712, 23839, 10100, 2625, 66, 5796, 13414, 65, 577, 13, 6404, 1, 1267, 198, 220, 1303, 198, 220, 1303, 35847, 329, 1554, 21857, 319, 1123, 2239, 583, 277, 5796, 198, 220, 1303, 685, 565, 25011, 7390, 7131, 69, 5796, 29993, 15057, 7131, 69, 5796, 22203, 5376, 60, 5218, 357, 48624, 13, 869, 3051, 1817, 11, 1351, 3298, 869, 8379, 2292, 8, 198, 220, 269, 5796, 31694, 796, 9429, 11770, 535, 3874, 6030, 3419, 198, 220, 1303, 35847, 329, 6801, 9853, 583, 277, 5796, 2163, 198, 220, 491, 87, 31694, 796, 360, 713, 90, 13940, 23650, 11, 360, 713, 90, 13940, 23650, 11, 2558, 11709, 3419, 628, 220, 8654, 37, 10782, 796, 360, 713, 90, 5317, 11, 38357, 92, 3419, 628, 220, 329, 374, 35277, 287, 9483, 8053, 198, 220, 220, 220, 22492, 3440, 262, 8379, 422, 1123, 2393, 198, 220, 220, 220, 269, 2340, 11, 340, 364, 11, 895, 69, 10782, 11, 1185, 84, 796, 21136, 7902, 44, 13414, 65, 577, 11187, 7, 81, 35277, 11, 15942, 577, 5376, 28, 19011, 577, 5376, 8, 628, 220, 220, 220, 1303, 48040, 1554, 21857, 198, 220, 220, 220, 329, 357, 312, 87, 11, 5796, 12463, 8, 287, 27056, 378, 7, 5796, 69, 10782, 8, 198, 220, 220, 220, 220, 220, 611, 5145, 10134, 2539, 7, 66, 5796, 31694, 11, 269, 2340, 58, 312, 87, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 269, 5796, 31694, 58, 66, 2340, 58, 312, 87, 11907, 796, 360, 713, 90, 5317, 11, 360, 713, 90, 13940, 23650, 11, 309, 29291, 90, 5317, 11, 38469, 90, 5317, 11709, 11709, 3419, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 611, 5145, 10134, 2539, 7, 66, 5796, 31694, 58, 66, 2340, 58, 312, 87, 60, 4357, 340, 364, 58, 312, 87, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 309, 29291, 90, 5317, 11, 5317, 21737, 92, 6624, 357, 48624, 13, 3051, 1817, 286, 869, 11, 1351, 3298, 869, 8379, 2292, 8, 198, 220, 220, 220, 220, 220, 220, 220, 269, 5796, 31694, 58, 66, 2340, 58, 312, 87, 60, 7131, 270, 364, 58, 312, 87, 11907, 796, 360, 713, 90, 13940, 23650, 11, 309, 29291, 90, 5317, 11, 38469, 90, 5317, 5512, 20650, 90, 10100, 42535, 3419, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 2562, 8134, 796, 269, 5796, 31694, 58, 66, 2340, 58, 312, 87, 60, 7131, 270, 364, 58, 312, 87, 11907, 198, 220, 220, 220, 220, 220, 611, 5145, 10134, 2539, 7, 38171, 8134, 11, 5796, 12463, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2562, 8134, 58, 5796, 12463, 60, 796, 357, 15, 11, 5317, 58, 4357, 10100, 58, 12962, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 1303, 751, 2292, 287, 869, 8379, 357, 20541, 583, 8494, 8, 198, 220, 220, 220, 220, 220, 3298, 4653, 80, 7390, 87, 796, 2562, 8134, 58, 5796, 12463, 7131, 17, 60, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 20541, 4653, 80, 7390, 87, 11, 4686, 87, 8, 198, 220, 220, 220, 220, 220, 1185, 4653, 80, 796, 2562, 8134, 58, 5796, 12463, 7131, 18, 60, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 14269, 4653, 80, 11, 1185, 84, 58, 312, 87, 12962, 198, 220, 220, 220, 220, 220, 2562, 8134, 58, 5796, 12463, 60, 796, 357, 38171, 8134, 58, 5796, 12463, 7131, 16, 48688, 16, 11, 3298, 4653, 80, 7390, 87, 11, 1185, 4653, 80, 8, 628, 220, 220, 220, 220, 220, 22492, 635, 2610, 262, 27188, 198, 220, 220, 220, 220, 220, 611, 468, 2539, 7, 47050, 37, 10782, 11, 269, 2340, 58, 312, 87, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 10134, 2539, 7, 2213, 87, 31694, 11, 8654, 37, 10782, 58, 66, 2340, 58, 312, 87, 11907, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 751, 2163, 35847, 611, 407, 4271, 1775, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 491, 87, 31694, 58, 47050, 37, 10782, 58, 66, 2340, 58, 312, 87, 11907, 60, 796, 360, 713, 90, 13940, 23650, 11, 2558, 92, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 10134, 2539, 7, 2213, 87, 31694, 58, 47050, 37, 10782, 58, 66, 2340, 58, 312, 87, 11907, 4357, 895, 12463, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 751, 4271, 29587, 6801, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 491, 87, 31694, 58, 47050, 37, 10782, 58, 66, 2340, 58, 312, 87, 11907, 7131, 5796, 12463, 60, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 422, 2180, 284, 1306, 2163, 198, 220, 220, 220, 220, 220, 220, 220, 491, 87, 31694, 58, 47050, 37, 10782, 58, 66, 2340, 58, 312, 87, 11907, 7131, 5796, 12463, 60, 15853, 352, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 1303, 1464, 4296, 8654, 37, 10782, 7881, 198, 220, 220, 220, 220, 220, 8654, 37, 10782, 58, 66, 2340, 58, 312, 87, 11907, 796, 895, 12463, 198, 220, 220, 220, 886, 198, 220, 886, 628, 220, 1441, 269, 5796, 31694, 11, 491, 87, 31694, 198, 437, 628, 198, 198, 37811, 198, 220, 220, 220, 720, 46224, 47471, 198, 198, 11041, 5415, 3051, 590, 422, 4600, 66, 5796, 31694, 3712, 7902, 11770, 535, 3874, 6030, 63, 284, 35743, 867, 9429, 44, 2482, 13, 198, 198, 16130, 198, 12, 4600, 25067, 496, 3712, 33, 970, 28, 9562, 63, 2523, 14288, 3298, 8379, 3051, 590, 19203, 76, 33809, 393, 220, 198, 220, 532, 4600, 25067, 496, 3712, 33, 970, 28, 7942, 63, 286, 3051, 590, 19203, 4, 11537, 198, 37811, 198, 8818, 42302, 7902, 11770, 535, 3874, 11518, 7, 269, 5796, 31694, 3712, 7902, 11770, 535, 3874, 6030, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5873, 3712, 33, 970, 28, 9562, 8, 198, 220, 1303, 198, 220, 299, 66, 5796, 796, 4129, 7, 13083, 7, 66, 5796, 31694, 4008, 198, 220, 3509, 29223, 42211, 796, 360, 713, 3419, 198, 220, 1303, 3509, 4831, 198, 220, 329, 1312, 287, 352, 25, 10782, 5796, 198, 220, 220, 220, 1303, 8379, 286, 5499, 326, 3051, 749, 1690, 198, 220, 220, 220, 3509, 29223, 42211, 58, 72, 60, 796, 20650, 90, 51, 29291, 90, 13940, 23650, 11, 10903, 11, 10903, 11709, 3419, 220, 198, 220, 886, 628, 220, 1303, 2298, 503, 262, 3509, 329, 1123, 9429, 44, 11629, 198, 220, 329, 357, 66, 5796, 2389, 11, 269, 5796, 35, 8, 287, 269, 5796, 31694, 11, 336, 79, 287, 352, 25, 13664, 7, 13083, 7, 66, 5796, 35, 4008, 198, 220, 220, 220, 3509, 37, 10782, 796, 1058, 8423, 198, 220, 220, 220, 3509, 12332, 796, 657, 198, 220, 220, 220, 2472, 12332, 796, 657, 198, 220, 220, 220, 329, 357, 69, 10782, 11, 269, 429, 8, 287, 269, 5796, 31694, 58, 66, 5796, 2389, 7131, 301, 79, 60, 198, 220, 220, 220, 220, 220, 2472, 12332, 15853, 269, 429, 58, 16, 60, 198, 220, 220, 220, 220, 220, 611, 3509, 12332, 1279, 269, 429, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 12332, 796, 269, 429, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 3509, 37, 10782, 796, 277, 10782, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 3051, 590, 954, 198, 220, 220, 220, 583, 66, 796, 611, 5873, 198, 220, 220, 220, 220, 220, 17971, 7, 744, 7, 5317, 11, 7, 9806, 12332, 14, 23350, 12332, 27493, 3064, 4008, 1, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 1303, 651, 48174, 2292, 357, 36436, 284, 749, 10792, 8, 198, 220, 220, 220, 220, 220, 17971, 7, 744, 7, 5317, 11, 48346, 13, 1150, 666, 7, 66, 5796, 31694, 58, 66, 5796, 2389, 7131, 301, 79, 7131, 9806, 37, 10782, 7131, 17, 60, 4008, 16725, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 651, 3722, 198, 220, 220, 220, 220, 220, 477, 301, 796, 269, 5796, 31694, 58, 66, 5796, 2389, 7131, 301, 79, 7131, 9806, 37, 10782, 7131, 18, 60, 198, 220, 220, 220, 220, 220, 10662, 301, 796, 3748, 7, 439, 301, 8, 198, 220, 220, 220, 220, 220, 285, 80, 301, 796, 10662, 301, 764, 91, 29, 331, 3784, 9127, 7, 87, 3784, 87, 855, 88, 11, 477, 301, 8, 198, 220, 220, 220, 220, 220, 3095, 87, 796, 1064, 11085, 7, 87, 3784, 87, 855, 47033, 7, 76, 80, 301, 828, 76, 80, 301, 8, 198, 220, 220, 220, 3509, 19580, 796, 10662, 301, 58, 13602, 87, 60, 198, 220, 220, 220, 4574, 0, 7, 9806, 29223, 42211, 58, 66, 5796, 2389, 4357, 357, 9806, 37, 10782, 11, 583, 66, 11, 3509, 19580, 8, 1267, 1303, 2292, 287, 15879, 6624, 336, 79, 198, 220, 886, 198, 220, 3509, 29223, 42211, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 720, 46224, 47471, 198, 198, 18557, 262, 749, 1884, 376, 12310, 2163, 379, 1123, 2239, 583, 1181, 4572, 11, 355, 9422, 15296, 13, 198, 198, 16281, 198, 198, 15506, 63, 73, 43640, 198, 66, 5796, 7222, 796, 42302, 7902, 11770, 535, 31741, 37, 727, 364, 7, 20274, 41092, 58, 27932, 17821, 12962, 198, 9806, 29223, 796, 42302, 7902, 11770, 535, 3874, 11518, 7, 66, 5796, 7222, 8, 198, 4798, 7902, 11770, 535, 3874, 11518, 7, 9806, 29223, 8, 198, 15506, 63, 198, 37811, 198, 8818, 3601, 7902, 11770, 535, 3874, 11518, 7, 9806, 29223, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49909, 28, 19282, 448, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5873, 3712, 33, 970, 28, 9562, 1267, 198, 220, 1303, 198, 220, 299, 66, 5796, 796, 4129, 7, 13083, 7, 9806, 29223, 4008, 628, 220, 1303, 3601, 8714, 198, 220, 8714, 796, 309, 29291, 21737, 198, 220, 329, 269, 312, 287, 352, 25, 10782, 5796, 198, 220, 220, 220, 256, 489, 796, 5855, 2430, 2430, 3, 66, 312, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 553, 220, 220, 220, 366, 8, 198, 220, 220, 220, 4574, 0, 7, 83, 30540, 11, 256, 489, 8, 198, 220, 886, 198, 220, 2873, 37, 13, 4798, 18122, 43, 1531, 7, 69, 312, 11, 366, 1600, 8714, 8, 198, 220, 3601, 7, 69, 312, 553, 650, 4943, 198, 220, 329, 1312, 287, 352, 25, 10782, 5796, 198, 220, 220, 220, 3601, 7, 69, 312, 553, 10, 19351, 4943, 198, 220, 886, 198, 220, 44872, 7, 69, 312, 553, 4943, 628, 198, 220, 3509, 20214, 28, 15, 198, 220, 329, 1312, 287, 352, 25, 10782, 5796, 198, 220, 220, 220, 3509, 20214, 796, 3509, 20214, 1279, 4129, 7, 9806, 29223, 58, 72, 12962, 5633, 4129, 7, 9806, 29223, 58, 72, 12962, 1058, 3509, 20214, 198, 220, 886, 628, 220, 329, 336, 79, 287, 352, 25, 9806, 20214, 198, 220, 220, 220, 309, 6489, 796, 309, 29291, 21737, 198, 220, 220, 220, 329, 269, 312, 287, 352, 25, 10782, 5796, 198, 220, 220, 220, 220, 220, 256, 489, 796, 5855, 2430, 2430, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 553, 220, 220, 220, 366, 8, 198, 220, 220, 220, 220, 220, 611, 336, 79, 19841, 4129, 7, 9806, 29223, 58, 66, 312, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 277, 10782, 5376, 796, 3509, 29223, 58, 66, 312, 7131, 301, 79, 7131, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2035, 905, 5873, 393, 8379, 6376, 198, 220, 220, 220, 220, 220, 220, 220, 583, 66, 5574, 4653, 80, 796, 17971, 7, 9806, 29223, 58, 66, 312, 7131, 301, 79, 7131, 17, 12962, 1, 198, 220, 220, 220, 220, 220, 220, 220, 583, 66, 5574, 4653, 80, 1635, 28, 5873, 5633, 36521, 1, 1058, 366, 76, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 651, 3722, 198, 220, 220, 220, 220, 220, 220, 220, 256, 489, 796, 5855, 1600, 525, 66, 5574, 4653, 80, 11, 69, 10782, 5376, 11, 9806, 29223, 58, 66, 312, 7131, 301, 79, 7131, 18, 12962, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 4574, 0, 7, 51, 6489, 11, 256, 489, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2873, 37, 13, 4798, 18122, 43, 1531, 7, 69, 312, 11, 336, 79, 11, 309, 6489, 8, 198, 220, 886, 198, 437, 628, 198, 198, 37811, 198, 220, 220, 220, 720, 46224, 47471, 198, 198, 11041, 4600, 82, 6442, 27660, 0, 63, 6, 82, 63, 4600, 19011, 577, 63, 5072, 284, 31081, 262, 9422, 15296, 5972, 605, 8379, 286, 9429, 44, 2163, 3848, 13, 198, 198, 16130, 198, 12, 770, 318, 257, 9233, 2163, 284, 4165, 4600, 4798, 7902, 44, 18122, 11187, 605, 44646, 198, 198, 9819, 198, 198, 4798, 7902, 44, 18122, 11187, 605, 198, 37811, 198, 8818, 31081, 7902, 44, 18122, 11187, 605, 7, 43420, 35277, 3712, 23839, 10100, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49909, 3712, 9399, 28, 19282, 448, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15942, 577, 5376, 3712, 23839, 10100, 2625, 66, 5796, 13414, 65, 577, 13, 6404, 1, 1267, 198, 220, 1303, 198, 220, 269, 5796, 31694, 11, 491, 87, 31694, 796, 42302, 7902, 11770, 535, 31741, 37, 727, 364, 26933, 43420, 35277, 4357, 15942, 577, 5376, 28, 19011, 577, 5376, 8, 628, 220, 1303, 3601, 351, 8379, 2292, 198, 220, 3509, 29223, 796, 42302, 7902, 11770, 535, 3874, 11518, 7, 66, 5796, 31694, 11, 5873, 28, 9562, 8, 628, 220, 3601, 7902, 11770, 535, 3874, 11518, 7, 9806, 29223, 11, 49909, 28, 69, 312, 8, 198, 437, 628, 628, 628, 198, 2 ]
2.256419
2,921
using AutoTest Package = "BlackBoxOptim" using BlackBoxOptim function run(packagename, srcdir = "src", testdir = "test"; testfileregexp = r"^test_.*\.jl$", srcfileregexp = r"^.*\.jl$") testfiles = AutoTest.findfiles(testdir, testfileregexp; recursive = true) # in AutoTest this is false srcfiles = AutoTest.findfiles(srcdir, srcfileregexp; recursive = true) ts = AutoTest.TestSuite(testfiles, srcfiles, "$packagename test suite") AutoTest.runtestsuite(ts) end if length(ARGS) > 0 && ARGS[1] == "continuous" AutoTest.autorun(Package, "src", "test/autotests") else run(Package, "src", "test/autotests") end
[ 3500, 11160, 14402, 198, 198, 27813, 796, 366, 9915, 14253, 27871, 320, 1, 198, 198, 3500, 2619, 14253, 27871, 320, 198, 198, 8818, 1057, 7, 8002, 11286, 480, 11, 12351, 15908, 796, 366, 10677, 1600, 1332, 15908, 796, 366, 9288, 8172, 198, 220, 220, 220, 1332, 7753, 260, 25636, 79, 796, 374, 1, 61, 9288, 62, 15885, 17405, 20362, 3, 1600, 198, 220, 220, 220, 12351, 7753, 260, 25636, 79, 796, 374, 1, 61, 15885, 17405, 20362, 3, 4943, 628, 220, 220, 220, 1332, 16624, 796, 11160, 14402, 13, 19796, 16624, 7, 9288, 15908, 11, 1332, 7753, 260, 25636, 79, 26, 45115, 796, 2081, 8, 1303, 287, 11160, 14402, 428, 318, 3991, 198, 220, 220, 220, 12351, 16624, 796, 11160, 14402, 13, 19796, 16624, 7, 10677, 15908, 11, 12351, 7753, 260, 25636, 79, 26, 45115, 796, 2081, 8, 628, 220, 220, 220, 40379, 796, 11160, 14402, 13, 14402, 5606, 578, 7, 9288, 16624, 11, 12351, 16624, 11, 17971, 8002, 11286, 480, 1332, 18389, 4943, 628, 220, 220, 220, 11160, 14402, 13, 81, 2797, 395, 2385, 578, 7, 912, 8, 198, 198, 437, 198, 198, 361, 4129, 7, 1503, 14313, 8, 1875, 657, 11405, 5923, 14313, 58, 16, 60, 6624, 366, 18487, 5623, 1, 198, 220, 220, 220, 11160, 14402, 13, 2306, 273, 403, 7, 27813, 11, 366, 10677, 1600, 366, 9288, 14, 2306, 313, 3558, 4943, 198, 17772, 198, 220, 220, 220, 1057, 7, 27813, 11, 366, 10677, 1600, 366, 9288, 14, 2306, 313, 3558, 4943, 198, 437, 198 ]
2.590361
249
using RealInterface using Base.Test import SpecialFunctions, NaNMath for f in RealInterface.UNARY_ARITHMETIC @test isa(eval(Base, f), Function) end for f in RealInterface.BINARY_ARITHMETIC @test isa(eval(Base, f), Function) end for f in RealInterface.UNARY_MATH @test isa(eval(Base, f), Function) end for f in RealInterface.BINARY_MATH @test isa(eval(Base, f), Function) end for f in RealInterface.MISC_FUNCTIONS @test isa(eval(Base, f), Function) end for f in RealInterface.UNARY_PREDICATES @test isa(eval(Base, f), Function) end for f in RealInterface.BINARY_PREDICATES @test isa(eval(Base, f), Function) end for f in RealInterface.UNARY_SPECIAL_MATH @test isa(eval(SpecialFunctions, f), Function) end for f in RealInterface.BINARY_SPECIAL_MATH @test isa(eval(SpecialFunctions, f), Function) end for f in RealInterface.TERNARY_SPECIAL_MATH @test isa(eval(SpecialFunctions, f), Function) end for f in RealInterface.UNARY_NAN_MATH @test isa(eval(NaNMath, f), Function) end for f in RealInterface.BINARY_NAN_MATH @test isa(eval(NaNMath, f), Function) end
[ 3500, 6416, 39317, 198, 3500, 7308, 13, 14402, 198, 11748, 6093, 24629, 2733, 11, 11013, 32755, 776, 198, 198, 1640, 277, 287, 6416, 39317, 13, 4944, 13153, 62, 1503, 10554, 47123, 2149, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 18206, 7, 14881, 11, 277, 828, 15553, 8, 198, 437, 198, 198, 1640, 277, 287, 6416, 39317, 13, 33, 1268, 13153, 62, 1503, 10554, 47123, 2149, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 18206, 7, 14881, 11, 277, 828, 15553, 8, 198, 437, 198, 198, 1640, 277, 287, 6416, 39317, 13, 4944, 13153, 62, 44, 12599, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 18206, 7, 14881, 11, 277, 828, 15553, 8, 198, 437, 198, 198, 1640, 277, 287, 6416, 39317, 13, 33, 1268, 13153, 62, 44, 12599, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 18206, 7, 14881, 11, 277, 828, 15553, 8, 198, 437, 198, 198, 1640, 277, 287, 6416, 39317, 13, 44, 37719, 62, 42296, 4177, 11053, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 18206, 7, 14881, 11, 277, 828, 15553, 8, 198, 437, 198, 198, 1640, 277, 287, 6416, 39317, 13, 4944, 13153, 62, 4805, 1961, 2149, 29462, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 18206, 7, 14881, 11, 277, 828, 15553, 8, 198, 437, 198, 198, 1640, 277, 287, 6416, 39317, 13, 33, 1268, 13153, 62, 4805, 1961, 2149, 29462, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 18206, 7, 14881, 11, 277, 828, 15553, 8, 198, 437, 198, 198, 1640, 277, 287, 6416, 39317, 13, 4944, 13153, 62, 48451, 12576, 62, 44, 12599, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 18206, 7, 13409, 24629, 2733, 11, 277, 828, 15553, 8, 198, 437, 198, 198, 1640, 277, 287, 6416, 39317, 13, 33, 1268, 13153, 62, 48451, 12576, 62, 44, 12599, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 18206, 7, 13409, 24629, 2733, 11, 277, 828, 15553, 8, 198, 437, 198, 198, 1640, 277, 287, 6416, 39317, 13, 31800, 13153, 62, 48451, 12576, 62, 44, 12599, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 18206, 7, 13409, 24629, 2733, 11, 277, 828, 15553, 8, 198, 437, 198, 198, 1640, 277, 287, 6416, 39317, 13, 4944, 13153, 62, 45, 1565, 62, 44, 12599, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 18206, 7, 26705, 32755, 776, 11, 277, 828, 15553, 8, 198, 437, 198, 198, 1640, 277, 287, 6416, 39317, 13, 33, 1268, 13153, 62, 45, 1565, 62, 44, 12599, 198, 220, 220, 220, 2488, 9288, 318, 64, 7, 18206, 7, 26705, 32755, 776, 11, 277, 828, 15553, 8, 198, 437, 198 ]
2.526077
441
module OceanTurbulenceParameterEstimation export OneDimensionalTimeSeries, InverseProblem, FreeParameters, IdentityNormalization, ZScore, forward_map, observation_map, eki, lognormal_with_mean_std, iterate!, EnsembleKalmanInversion, UnscentedKalmanInversion, UnscentedKalmanInversionPostprocess, ConstrainedNormal include("Observations.jl") include("TurbulenceClosureParameters.jl") include("InverseProblems.jl") include("EnsembleKalmanInversions.jl") using .Observations: OneDimensionalTimeSeries, ZScore using .TurbulenceClosureParameters: FreeParameters using .InverseProblems: InverseProblem, forward_map, observation_map using .EnsembleKalmanInversions: iterate!, EnsembleKalmanInversion, UnscentedKalmanInversion, UnscentedKalmanInversionPostprocess, ConstrainedNormal, lognormal_with_mean_std end # module
[ 21412, 10692, 51, 5945, 32401, 36301, 22362, 18991, 198, 198, 39344, 1881, 35, 16198, 7575, 27996, 11, 554, 4399, 40781, 11, 3232, 48944, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 27207, 26447, 1634, 11, 1168, 26595, 11, 2651, 62, 8899, 11, 13432, 62, 8899, 11, 198, 220, 220, 220, 220, 220, 220, 220, 304, 4106, 11, 300, 2360, 6636, 62, 4480, 62, 32604, 62, 19282, 11, 11629, 378, 28265, 2039, 15140, 41428, 805, 818, 9641, 11, 791, 82, 1087, 276, 41428, 805, 818, 9641, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 791, 82, 1087, 276, 41428, 805, 818, 9641, 6307, 14681, 11, 1482, 2536, 1328, 26447, 198, 198, 17256, 7203, 31310, 712, 602, 13, 20362, 4943, 198, 17256, 7203, 51, 5945, 32401, 45398, 48944, 13, 20362, 4943, 198, 17256, 7203, 818, 4399, 2964, 22143, 13, 20362, 4943, 198, 17256, 7203, 4834, 15140, 41428, 805, 818, 47178, 13, 20362, 4943, 198, 198, 3500, 764, 31310, 712, 602, 25, 1881, 35, 16198, 7575, 27996, 11, 1168, 26595, 198, 3500, 764, 51, 5945, 32401, 45398, 48944, 25, 3232, 48944, 198, 3500, 764, 818, 4399, 2964, 22143, 25, 554, 4399, 40781, 11, 2651, 62, 8899, 11, 13432, 62, 8899, 198, 3500, 764, 4834, 15140, 41428, 805, 818, 47178, 25, 11629, 378, 28265, 2039, 15140, 41428, 805, 818, 9641, 11, 791, 82, 1087, 276, 41428, 805, 818, 9641, 11, 220, 198, 220, 220, 220, 220, 220, 220, 791, 82, 1087, 276, 41428, 805, 818, 9641, 6307, 14681, 11, 220, 1482, 2536, 1328, 26447, 11, 300, 2360, 6636, 62, 4480, 62, 32604, 62, 19282, 198, 198, 437, 1303, 8265, 198 ]
3.155556
270
# Raw memory management export Mem, available_memory, total_memory module Mem using ..VectorEngine using ..VectorEngine.VEDA: vedaMemAlloc, vedaMemPtr, vedaMemFree, vedaMemGetInfo, vedaMemAllocHost, vedaMemFreeHost using Printf # # buffers # # a chunk of memory allocated using the VEDA APIs. this memory can reside on the host, on # the VE, or can represent specially-formatted memory (like texture arrays). depending on # all that, the buffer may be `convert`ed to a Ptr, VEPtr, or VEArrayPtr. abstract type AbstractBuffer end Base.convert(T::Type{<:Union{Ptr,VEPtr,VEArrayPtr}}, buf::AbstractBuffer) = throw(ArgumentError("Illegal conversion of a $(typeof(buf)) to a $T")) # ccall integration # # taking the pointer of a buffer means returning the underlying pointer, # and not the pointer of the buffer object itself. Base.unsafe_convert(T::Type{<:Union{Ptr,VEPtr,VEArrayPtr}}, buf::AbstractBuffer) = convert(T, buf) ## host side device buffer """ Mem.DeviceBuffer Host residing structure representing a buffer of device memory. """ mutable struct DeviceBuffer <: AbstractBuffer #vptr::VEDAdeviceptr vptr::VEPtr{Int8} ptr::VEPtr{Int8} bytesize::Int function DeviceBuffer(bsize::Int) bsize == 0 && return new(VE_NULL, VE_NULL, 0) #vp = Ref{VEDAdeviceptr}() vp = Ref{VEPtr{Int8}}(0) p = Ref{VEPtr{Int8}}(0) vedaMemAlloc(pointer_from_objref(vp), bsize) vedaMemPtr(pointer_from_objref(p), vp[]) #VectorEngine.vesync() # is this needed? obj = new(vp[], p[], bsize) finalizer(unsafe_free!, obj) return obj end end function unsafe_free!(buf::DeviceBuffer) if pointer(buf) != VE_NULL vedaMemFree(pointer(buf)) buf.vptr = VE_NULL buf.ptr = VE_NULL end end """ Mem.alloc(DeviceBuffer, bytesize::Integer) Allocate `bytesize` bytes of memory on the VE. """ alloc(::Type{DeviceBuffer}, bytesize::Integer) = DeviceBuffer(bytesize) function free(buf::DeviceBuffer) end Base.pointer(buf::DeviceBuffer) = buf.vptr Base.sizeof(buf::DeviceBuffer) = buf.bytesize Base.show(io::IO, buf::DeviceBuffer) = @printf(io, "DeviceBuffer(%s at %p (%p))", Base.format_bytes(sizeof(buf)), Int(buf.vptr), Int(buf.ptr)) #Base.convert(::Type{VEDAdeviceptr}, buf::DeviceBuffer) = buf.vptr Base.convert(::Type{VEPtr{T}}, buf::DeviceBuffer) where {T} = reinterpret(VEPtr{T}, buf.vptr) ############################################################ ## host buffer """ Mem.HostBuffer Mem.Host A buffer of pinned memory on the CPU, unaccessible to the VE. """ mutable struct HostBuffer <: AbstractBuffer ptr::Ptr{Cvoid} bytesize::Int end Base.pointer(buf::HostBuffer) = buf.ptr Base.sizeof(buf::HostBuffer) = buf.bytesize Base.show(io::IO, buf::HostBuffer) = @printf(io, "HostBuffer(%s at %p)", Base.format_bytes(sizeof(buf)), Int(pointer(buf))) Base.convert(::Type{Ptr{T}}, buf::HostBuffer) where {T} = convert(Ptr{T}, pointer(buf)) function Base.convert(::Type{VEPtr{T}}, buf::HostBuffer) where {T} throw(ArgumentError("cannot take the VE address of a CPU buffer")) end """ Mem.alloc(HostBuffer, bytesize::Integer) Allocate `bytesize` bytes of page-locked memory on the host. This memory is accessible from the CPU, and makes it possible to perform faster memory copies to the VE. """ function alloc(::Type{HostBuffer}, bytesize::Integer) bytesize == 0 && return HostBuffer(C_NULL, 0) ptr_ref = Ref{Ptr{Cvoid}}() vedaMemAllocHost(ptr_ref, bytesize) return HostBuffer(ptr_ref[], bytesize) end function free(buf::HostBuffer) if pointer(buf) != VE_NULL vedaMemFreeHost(buf.ptr) end end ## array buffer mutable struct ArrayBuffer{T,N} <: AbstractBuffer ptr::VEArrayPtr{T} dims::Dims{N} end Base.pointer(buf::ArrayBuffer) = buf.ptr Base.sizeof(buf::ArrayBuffer) = error("Opaque array buffers do not have a definite size") Base.size(buf::ArrayBuffer) = buf.dims Base.length(buf::ArrayBuffer) = prod(buf.dims) Base.ndims(buf::ArrayBuffer{<:Any,N}) where {N} = N Base.show(io::IO, buf::ArrayBuffer{T,1}) where {T} = @printf(io, "%g-element ArrayBuffer{%s,%g}(%p)", length(buf), string(T), 1, Int(pointer(buf))) Base.show(io::IO, buf::ArrayBuffer{T}) where {T} = @printf(io, "%s ArrayBuffer{%s,%g}(%p)", Base.inds2string(size(buf)), string(T), ndims(buf), Int(pointer(buf))) # array buffers are typed, so refuse arbitrary conversions Base.convert(::Type{VEArrayPtr{T}}, buf::ArrayBuffer{T}) where {T} = convert(VEArrayPtr{T}, pointer(buf)) # ... except for VEArrayPtr{Nothing}, which is used to call untyped API functions Base.convert(::Type{VEArrayPtr{Nothing}}, buf::ArrayBuffer) = convert(VEArrayPtr{Nothing}, pointer(buf)) function alloc(::Type{<:ArrayBuffer{T}}, dims::Dims{N}) where {T,N} format = convert(CUarray_format, eltype(T)) if N == 2 width, height = dims depth = 0 @assert 1 <= width "VEDA 2D array (texture) width must be >= 1" # @assert witdh <= CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH @assert 1 <= height "VEDA 2D array (texture) height must be >= 1" # @assert height <= CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT elseif N == 3 width, height, depth = dims @assert 1 <= width "VEDA 3D array (texture) width must be >= 1" # @assert witdh <= CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH @assert 1 <= height "VEDA 3D array (texture) height must be >= 1" # @assert height <= CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT @assert 1 <= depth "VEDA 3D array (texture) depth must be >= 1" # @assert depth <= CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH elseif N == 1 width = dims[1] height = depth = 0 @assert 1 <= width "VEDA 1D array (texture) width must be >= 1" # @assert witdh <= CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH else "VEDA arrays (texture memory) can only have 1, 2 or 3 dimensions" end allocateArray_ref = Ref(CUDA.CUDA_ARRAY3D_DESCRIPTOR( width, # Width::Csize_t height, # Height::Csize_t depth, # Depth::Csize_t format, # Format::CUarray_format UInt32(CUDA.nchans(T)), # NumChannels::UInt32 0)) handle_ref = Ref{CUarray}() vedaArray3DCreate(handle_ref, allocateArray_ref) ptr = reinterpret(VEArrayPtr{T}, handle_ref[]) return ArrayBuffer{T,N}(ptr, dims) end function free(buf::ArrayBuffer) vedaArrayDestroy(buf.ptr) end ## convenience aliases const Device = DeviceBuffer const Host = HostBuffer const Array = ArrayBuffer # # pointers # ## initialization """ Mem.set!(buf::VEPtr, value::Union{Int8,UInt8,Int16,UInt16,Int32,UInt32, Int64,UInt64,Float32,Float64}, len::Integer; async::Bool=false, stream::VEStream) Initialize device memory by copying `val` for `len` times. Executed asynchronously if `async` is true, in which case a valid `stream` is required. """ set! for T in [Int8, UInt8, Int16, UInt16, Int32, UInt32, Int64, UInt64, Float32, Float64] bits = 8*sizeof(T) fn_sync = Symbol("vedaMemsetD$(bits)") fn_async = Symbol("vedaMemsetD$(bits)Async") U = Symbol("UInt$(bits)") @eval function set!(ptr::VEPtr{$T}, value::$T, len::Integer; async::Bool=false, stream::Union{Nothing,VEStream}=nothing) val = typeof(value) == $U ? value : reinterpret($U, value) if async stream===nothing && throw(ArgumentError("Asynchronous memory operations require a stream.")) $(getproperty(VectorEngine.VEDA, fn_async))(ptr, val, len, stream) else stream===nothing || throw(ArgumentError("Synchronous memory operations cannot be issued on a stream.")) $(getproperty(VectorEngine.VEDA, fn_sync))(ptr, val, len) end end end ## copy operations for (f, fa, srcPtrTy, dstPtrTy) in (("vedaMemcpyDtoH", "vedaMemcpyDtoHAsync", VEPtr, Ptr), ("vedaMemcpyHtoD", "vedaMemcpyHtoDAsync", Ptr, VEPtr), ("vedaMemcpyDtoD", "vedaMemcpyDtoDAsync", VEPtr, VEPtr), ) @eval function Base.unsafe_copyto!(dst::$dstPtrTy{T}, src::$srcPtrTy{T}, N::Integer; stream::Union{Nothing,VEStream}=nothing, async::Bool=false) where T if async stream===nothing && throw(ArgumentError("Asynchronous memory operations require a stream.")) $(getproperty(VectorEngine.VEDA, Symbol(fa)))(dst, src, N*sizeof(T), stream) else stream===nothing || throw(ArgumentError("Synchronous memory operations cannot be issued on a stream.")) $(getproperty(VectorEngine.VEDA, Symbol(f)))(dst, src, N*sizeof(T)) end return dst end end function Base.unsafe_copyto!(dst::VEArrayPtr{T}, src::Ptr{T}, N::Integer; stream::Union{Nothing,VEStream}=nothing, async::Bool=false) where T if async stream===nothing && throw(ArgumentError("Asynchronous memory operations require a stream.")) vedaMemcpyHtoDAsync(dst, src, N*sizeof(T), stream) else stream===nothing || throw(ArgumentError("Synchronous memory operations cannot be issued on a stream.")) vedaMemcpyHtoD(dst+doffs-1, src, N*sizeof(T)) end end function Base.unsafe_copyto!(dst::Ptr{T}, src::VEArrayPtr{T}, soffs::Integer, N::Integer; stream::Union{Nothing,VEStream}=nothing, async::Bool=false) where T if async stream===nothing && throw(ArgumentError("Asynchronous memory operations require a stream.")) vedaMemcpyAtoHAsync(dst, src, soffs, N*sizeof(T), stream) else stream===nothing || throw(ArgumentError("Synchronous memory operations cannot be issued on a stream.")) vedaMemcpyAtoH(dst, src, soffs, N*sizeof(T)) end end Base.unsafe_copyto!(dst::VEArrayPtr{T}, doffs::Integer, src::VEPtr{T}, N::Integer) where {T} = vedaMemcpyDtoA(dst, doffs, src, N*sizeof(T)) Base.unsafe_copyto!(dst::VEPtr{T}, src::VEArrayPtr{T}, soffs::Integer, N::Integer) where {T} = vedaMemcpyAtoD(dst, src, soffs, N*sizeof(T)) Base.unsafe_copyto!(dst::VEArrayPtr, src, N::Integer; kwargs...) = Base.unsafe_copyto!(dst, 0, src, N; kwargs...) Base.unsafe_copyto!(dst, src::VEArrayPtr, N::Integer; kwargs...) = Base.unsafe_copyto!(dst, src, 0, N; kwargs...) ## memory info function info() free_ref = Ref{Csize_t}() total_ref = Ref{Csize_t}() vedaMemGetInfo(free_ref, total_ref) return convert(Int, free_ref[]), convert(Int, total_ref[]) end end # module Mem """ available_memory() Returns the available_memory amount of memory (in bytes), available for allocation by the CUDA context. """ available_memory() = Mem.info()[1] """ total_memory() Returns the total amount of memory (in bytes), available for allocation by the CUDA context. """ total_memory() = Mem.info()[2] # memory operations function unsafe_fill!(ptr::Union{Ptr{T},VEPtr{T}}, pattern::Union{Ptr{T},VEPtr{T}}, N::Integer) where T bytes = N*sizeof(T) bytes==0 && return Mem.set!(ptr, pattern, N) end
[ 2, 16089, 4088, 4542, 198, 198, 39344, 4942, 11, 1695, 62, 31673, 11, 2472, 62, 31673, 198, 198, 21412, 4942, 198, 198, 3500, 11485, 38469, 13798, 198, 3500, 11485, 38469, 13798, 13, 53, 1961, 32, 25, 410, 18082, 13579, 3237, 420, 11, 410, 18082, 13579, 46745, 11, 410, 18082, 13579, 11146, 11, 410, 18082, 13579, 3855, 12360, 11, 198, 220, 220, 220, 410, 18082, 13579, 3237, 420, 17932, 11, 410, 18082, 13579, 11146, 17932, 198, 220, 220, 220, 220, 198, 3500, 12578, 69, 198, 198, 2, 198, 2, 39334, 198, 2, 198, 198, 2, 257, 16058, 286, 4088, 19171, 1262, 262, 569, 1961, 32, 23113, 13, 428, 4088, 460, 26412, 319, 262, 2583, 11, 319, 198, 2, 262, 569, 36, 11, 393, 460, 2380, 20905, 12, 687, 16898, 4088, 357, 2339, 11743, 26515, 737, 6906, 319, 198, 2, 477, 326, 11, 262, 11876, 743, 307, 4600, 1102, 1851, 63, 276, 284, 257, 350, 2213, 11, 569, 8905, 2213, 11, 393, 569, 36, 19182, 46745, 13, 198, 198, 397, 8709, 2099, 27741, 28632, 886, 198, 198, 14881, 13, 1102, 1851, 7, 51, 3712, 6030, 90, 27, 25, 38176, 90, 46745, 11, 6089, 46745, 11, 6089, 19182, 46745, 92, 5512, 42684, 3712, 23839, 28632, 8, 796, 198, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 33666, 18011, 11315, 286, 257, 29568, 4906, 1659, 7, 29325, 4008, 284, 257, 720, 51, 48774, 198, 198, 2, 269, 13345, 11812, 198, 2, 198, 2, 2263, 262, 17562, 286, 257, 11876, 1724, 8024, 262, 10238, 17562, 11, 198, 2, 290, 407, 262, 17562, 286, 262, 11876, 2134, 2346, 13, 198, 14881, 13, 13271, 8635, 62, 1102, 1851, 7, 51, 3712, 6030, 90, 27, 25, 38176, 90, 46745, 11, 6089, 46745, 11, 6089, 19182, 46745, 92, 5512, 42684, 3712, 23839, 28632, 8, 796, 198, 220, 220, 220, 10385, 7, 51, 11, 42684, 8, 628, 198, 2235, 2583, 1735, 3335, 11876, 198, 198, 37811, 198, 220, 220, 220, 4942, 13, 24728, 28632, 198, 198, 17932, 35173, 4645, 10200, 257, 11876, 286, 3335, 4088, 13, 198, 37811, 198, 76, 18187, 2878, 16232, 28632, 1279, 25, 27741, 28632, 198, 220, 220, 220, 1303, 85, 20692, 3712, 53, 1961, 2782, 1990, 501, 20692, 198, 220, 220, 220, 410, 20692, 3712, 6089, 46745, 90, 5317, 23, 92, 198, 220, 220, 220, 50116, 3712, 6089, 46745, 90, 5317, 23, 92, 198, 220, 220, 220, 9881, 1096, 3712, 5317, 198, 220, 220, 220, 2163, 16232, 28632, 7, 1443, 1096, 3712, 5317, 8, 198, 220, 220, 220, 220, 220, 220, 220, 275, 7857, 6624, 657, 11405, 1441, 649, 7, 6089, 62, 33991, 11, 569, 36, 62, 33991, 11, 657, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 36133, 796, 6524, 90, 53, 1961, 2782, 1990, 501, 20692, 92, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 410, 79, 796, 6524, 90, 6089, 46745, 90, 5317, 23, 11709, 7, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 279, 796, 6524, 90, 6089, 46745, 90, 5317, 23, 11709, 7, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 410, 18082, 13579, 3237, 420, 7, 29536, 62, 6738, 62, 26801, 5420, 7, 36133, 828, 275, 7857, 8, 198, 220, 220, 220, 220, 220, 220, 220, 410, 18082, 13579, 46745, 7, 29536, 62, 6738, 62, 26801, 5420, 7, 79, 828, 410, 79, 58, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 38469, 13798, 13, 1158, 13361, 3419, 220, 220, 220, 220, 220, 1303, 318, 428, 2622, 30, 198, 220, 220, 220, 220, 220, 220, 220, 26181, 796, 649, 7, 36133, 58, 4357, 279, 58, 4357, 275, 7857, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2457, 7509, 7, 13271, 8635, 62, 5787, 28265, 26181, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 26181, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 21596, 62, 5787, 0, 7, 29325, 3712, 24728, 28632, 8, 198, 220, 220, 220, 611, 17562, 7, 29325, 8, 14512, 569, 36, 62, 33991, 198, 220, 220, 220, 220, 220, 220, 220, 410, 18082, 13579, 11146, 7, 29536, 7, 29325, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 42684, 13, 85, 20692, 796, 569, 36, 62, 33991, 198, 220, 220, 220, 220, 220, 220, 220, 42684, 13, 20692, 796, 569, 36, 62, 33991, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 4942, 13, 32332, 7, 24728, 28632, 11, 9881, 1096, 3712, 46541, 8, 198, 198, 3237, 13369, 4600, 33661, 1096, 63, 9881, 286, 4088, 319, 262, 569, 36, 13, 198, 37811, 198, 32332, 7, 3712, 6030, 90, 24728, 28632, 5512, 9881, 1096, 3712, 46541, 8, 796, 16232, 28632, 7, 33661, 1096, 8, 198, 198, 8818, 1479, 7, 29325, 3712, 24728, 28632, 8, 886, 198, 198, 14881, 13, 29536, 7, 29325, 3712, 24728, 28632, 8, 796, 42684, 13, 85, 20692, 198, 14881, 13, 7857, 1659, 7, 29325, 3712, 24728, 28632, 8, 796, 42684, 13, 33661, 1096, 198, 198, 14881, 13, 12860, 7, 952, 3712, 9399, 11, 42684, 3712, 24728, 28632, 8, 796, 198, 220, 220, 220, 2488, 37435, 7, 952, 11, 366, 24728, 28632, 7, 4, 82, 379, 4064, 79, 37633, 79, 4008, 1600, 7308, 13, 18982, 62, 33661, 7, 7857, 1659, 7, 29325, 36911, 2558, 7, 29325, 13, 85, 20692, 828, 2558, 7, 29325, 13, 20692, 4008, 198, 198, 2, 14881, 13, 1102, 1851, 7, 3712, 6030, 90, 53, 1961, 2782, 1990, 501, 20692, 5512, 42684, 3712, 24728, 28632, 8, 796, 42684, 13, 85, 20692, 198, 14881, 13, 1102, 1851, 7, 3712, 6030, 90, 6089, 46745, 90, 51, 92, 5512, 42684, 3712, 24728, 28632, 8, 810, 1391, 51, 92, 796, 302, 27381, 7, 6089, 46745, 90, 51, 5512, 42684, 13, 85, 20692, 8, 198, 198, 29113, 14468, 7804, 4242, 198, 198, 2235, 2583, 11876, 198, 198, 37811, 198, 220, 220, 220, 4942, 13, 17932, 28632, 198, 220, 220, 220, 4942, 13, 17932, 198, 198, 32, 11876, 286, 25711, 4088, 319, 262, 9135, 11, 555, 33780, 284, 262, 569, 36, 13, 198, 37811, 198, 76, 18187, 2878, 14504, 28632, 1279, 25, 27741, 28632, 198, 220, 220, 220, 50116, 3712, 46745, 90, 34, 19382, 92, 198, 220, 220, 220, 9881, 1096, 3712, 5317, 198, 437, 198, 198, 14881, 13, 29536, 7, 29325, 3712, 17932, 28632, 8, 796, 42684, 13, 20692, 198, 14881, 13, 7857, 1659, 7, 29325, 3712, 17932, 28632, 8, 796, 42684, 13, 33661, 1096, 198, 198, 14881, 13, 12860, 7, 952, 3712, 9399, 11, 42684, 3712, 17932, 28632, 8, 796, 198, 220, 220, 220, 2488, 37435, 7, 952, 11, 366, 17932, 28632, 7, 4, 82, 379, 4064, 79, 42501, 7308, 13, 18982, 62, 33661, 7, 7857, 1659, 7, 29325, 36911, 2558, 7, 29536, 7, 29325, 22305, 198, 198, 14881, 13, 1102, 1851, 7, 3712, 6030, 90, 46745, 90, 51, 92, 5512, 42684, 3712, 17932, 28632, 8, 810, 1391, 51, 92, 796, 198, 220, 220, 220, 10385, 7, 46745, 90, 51, 5512, 17562, 7, 29325, 4008, 198, 198, 8818, 7308, 13, 1102, 1851, 7, 3712, 6030, 90, 6089, 46745, 90, 51, 92, 5512, 42684, 3712, 17932, 28632, 8, 810, 1391, 51, 92, 198, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 66, 34574, 1011, 262, 569, 36, 2209, 286, 257, 9135, 11876, 48774, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 4942, 13, 32332, 7, 17932, 28632, 11, 9881, 1096, 3712, 46541, 8, 198, 198, 3237, 13369, 4600, 33661, 1096, 63, 9881, 286, 2443, 12, 24162, 4088, 319, 262, 2583, 13, 770, 4088, 318, 9857, 422, 198, 1169, 9135, 11, 290, 1838, 340, 1744, 284, 1620, 5443, 4088, 9088, 284, 262, 569, 36, 13, 198, 37811, 198, 8818, 36836, 7, 3712, 6030, 90, 17932, 28632, 5512, 9881, 1096, 3712, 46541, 8, 198, 220, 220, 220, 9881, 1096, 6624, 657, 11405, 1441, 14504, 28632, 7, 34, 62, 33991, 11, 657, 8, 628, 220, 220, 220, 50116, 62, 5420, 796, 6524, 90, 46745, 90, 34, 19382, 11709, 3419, 198, 220, 220, 220, 410, 18082, 13579, 3237, 420, 17932, 7, 20692, 62, 5420, 11, 9881, 1096, 8, 628, 220, 220, 220, 1441, 14504, 28632, 7, 20692, 62, 5420, 58, 4357, 9881, 1096, 8, 198, 437, 198, 198, 8818, 1479, 7, 29325, 3712, 17932, 28632, 8, 198, 220, 220, 220, 611, 17562, 7, 29325, 8, 14512, 569, 36, 62, 33991, 198, 220, 220, 220, 220, 220, 220, 220, 410, 18082, 13579, 11146, 17932, 7, 29325, 13, 20692, 8, 198, 220, 220, 220, 886, 198, 437, 628, 198, 2235, 7177, 11876, 198, 198, 76, 18187, 2878, 15690, 28632, 90, 51, 11, 45, 92, 1279, 25, 27741, 28632, 198, 220, 220, 220, 50116, 3712, 6089, 19182, 46745, 90, 51, 92, 198, 220, 220, 220, 5391, 82, 3712, 35, 12078, 90, 45, 92, 198, 437, 198, 198, 14881, 13, 29536, 7, 29325, 3712, 19182, 28632, 8, 796, 42684, 13, 20692, 198, 14881, 13, 7857, 1659, 7, 29325, 3712, 19182, 28632, 8, 796, 4049, 7203, 46, 8957, 4188, 7177, 39334, 466, 407, 423, 257, 21892, 2546, 4943, 198, 14881, 13, 7857, 7, 29325, 3712, 19182, 28632, 8, 796, 42684, 13, 67, 12078, 198, 14881, 13, 13664, 7, 29325, 3712, 19182, 28632, 8, 796, 40426, 7, 29325, 13, 67, 12078, 8, 198, 14881, 13, 358, 12078, 7, 29325, 3712, 19182, 28632, 90, 27, 25, 7149, 11, 45, 30072, 810, 1391, 45, 92, 796, 399, 198, 198, 14881, 13, 12860, 7, 952, 3712, 9399, 11, 42684, 3712, 19182, 28632, 90, 51, 11, 16, 30072, 810, 1391, 51, 92, 796, 198, 220, 220, 220, 2488, 37435, 7, 952, 11, 36521, 70, 12, 30854, 15690, 28632, 90, 4, 82, 11, 4, 70, 92, 7, 4, 79, 42501, 4129, 7, 29325, 828, 4731, 7, 51, 828, 352, 11, 2558, 7, 29536, 7, 29325, 22305, 198, 14881, 13, 12860, 7, 952, 3712, 9399, 11, 42684, 3712, 19182, 28632, 90, 51, 30072, 810, 1391, 51, 92, 796, 198, 220, 220, 220, 2488, 37435, 7, 952, 11, 36521, 82, 15690, 28632, 90, 4, 82, 11, 4, 70, 92, 7, 4, 79, 42501, 7308, 13, 521, 82, 17, 8841, 7, 7857, 7, 29325, 36911, 4731, 7, 51, 828, 299, 67, 12078, 7, 29325, 828, 2558, 7, 29536, 7, 29325, 22305, 198, 198, 2, 7177, 39334, 389, 25683, 11, 523, 11148, 14977, 32626, 198, 14881, 13, 1102, 1851, 7, 3712, 6030, 90, 6089, 19182, 46745, 90, 51, 92, 5512, 42684, 3712, 19182, 28632, 90, 51, 30072, 810, 1391, 51, 92, 796, 198, 220, 220, 220, 10385, 7, 6089, 19182, 46745, 90, 51, 5512, 17562, 7, 29325, 4008, 198, 2, 2644, 2845, 329, 569, 36, 19182, 46745, 90, 18465, 5512, 543, 318, 973, 284, 869, 1418, 4464, 276, 7824, 5499, 198, 14881, 13, 1102, 1851, 7, 3712, 6030, 90, 6089, 19182, 46745, 90, 18465, 92, 5512, 42684, 3712, 19182, 28632, 8, 220, 796, 198, 220, 220, 220, 10385, 7, 6089, 19182, 46745, 90, 18465, 5512, 17562, 7, 29325, 4008, 198, 198, 8818, 36836, 7, 3712, 6030, 90, 27, 25, 19182, 28632, 90, 51, 92, 5512, 5391, 82, 3712, 35, 12078, 90, 45, 30072, 810, 1391, 51, 11, 45, 92, 198, 220, 220, 220, 5794, 796, 10385, 7, 43633, 18747, 62, 18982, 11, 1288, 4906, 7, 51, 4008, 628, 220, 220, 220, 611, 399, 6624, 362, 198, 220, 220, 220, 220, 220, 220, 220, 9647, 11, 6001, 796, 5391, 82, 198, 220, 220, 220, 220, 220, 220, 220, 6795, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 352, 19841, 9647, 366, 53, 1961, 32, 362, 35, 7177, 357, 41293, 8, 9647, 1276, 307, 18189, 352, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 30493, 20868, 34985, 19841, 29369, 62, 7206, 27389, 62, 1404, 5446, 9865, 37780, 62, 22921, 3955, 5883, 62, 47648, 17, 35, 62, 54, 2389, 4221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 352, 19841, 6001, 366, 53, 1961, 32, 362, 35, 7177, 357, 41293, 8, 6001, 1276, 307, 18189, 352, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 30493, 6001, 19841, 29369, 62, 7206, 27389, 62, 1404, 5446, 9865, 37780, 62, 22921, 3955, 5883, 62, 47648, 17, 35, 62, 13909, 9947, 198, 220, 220, 220, 2073, 361, 399, 6624, 513, 198, 220, 220, 220, 220, 220, 220, 220, 9647, 11, 6001, 11, 6795, 796, 5391, 82, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 352, 19841, 9647, 366, 53, 1961, 32, 513, 35, 7177, 357, 41293, 8, 9647, 1276, 307, 18189, 352, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 30493, 20868, 34985, 19841, 29369, 62, 7206, 27389, 62, 1404, 5446, 9865, 37780, 62, 22921, 3955, 5883, 62, 47648, 18, 35, 62, 54, 2389, 4221, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 352, 19841, 6001, 366, 53, 1961, 32, 513, 35, 7177, 357, 41293, 8, 6001, 1276, 307, 18189, 352, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 30493, 6001, 19841, 29369, 62, 7206, 27389, 62, 1404, 5446, 9865, 37780, 62, 22921, 3955, 5883, 62, 47648, 18, 35, 62, 13909, 9947, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 352, 19841, 6795, 366, 53, 1961, 32, 513, 35, 7177, 357, 41293, 8, 6795, 1276, 307, 18189, 352, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 30493, 6795, 19841, 29369, 62, 7206, 27389, 62, 1404, 5446, 9865, 37780, 62, 22921, 3955, 5883, 62, 47648, 18, 35, 62, 46162, 4221, 198, 220, 220, 220, 2073, 361, 399, 6624, 352, 198, 220, 220, 220, 220, 220, 220, 220, 9647, 796, 5391, 82, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 6001, 796, 6795, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 30493, 352, 19841, 9647, 366, 53, 1961, 32, 352, 35, 7177, 357, 41293, 8, 9647, 1276, 307, 18189, 352, 1, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2488, 30493, 20868, 34985, 19841, 29369, 62, 7206, 27389, 62, 1404, 5446, 9865, 37780, 62, 22921, 3955, 5883, 62, 47648, 16, 35, 62, 54, 2389, 4221, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 366, 53, 1961, 32, 26515, 357, 41293, 4088, 8, 460, 691, 423, 352, 11, 362, 393, 513, 15225, 1, 198, 220, 220, 220, 886, 628, 220, 220, 220, 31935, 19182, 62, 5420, 796, 6524, 7, 43633, 5631, 13, 43633, 5631, 62, 1503, 30631, 18, 35, 62, 30910, 36584, 32961, 7, 198, 220, 220, 220, 220, 220, 220, 220, 9647, 11, 1303, 38807, 3712, 34, 7857, 62, 83, 198, 220, 220, 220, 220, 220, 220, 220, 6001, 11, 1303, 27280, 3712, 34, 7857, 62, 83, 198, 220, 220, 220, 220, 220, 220, 220, 6795, 11, 1303, 36350, 3712, 34, 7857, 62, 83, 198, 220, 220, 220, 220, 220, 220, 220, 5794, 11, 1303, 18980, 3712, 43633, 18747, 62, 18982, 198, 220, 220, 220, 220, 220, 220, 220, 471, 5317, 2624, 7, 43633, 5631, 13, 77, 354, 504, 7, 51, 36911, 1303, 31835, 1925, 8961, 3712, 52, 5317, 2624, 198, 220, 220, 220, 220, 220, 220, 220, 657, 4008, 628, 220, 220, 220, 5412, 62, 5420, 796, 6524, 90, 43633, 18747, 92, 3419, 198, 220, 220, 220, 410, 18082, 19182, 18, 9697, 260, 378, 7, 28144, 62, 5420, 11, 31935, 19182, 62, 5420, 8, 198, 220, 220, 220, 50116, 796, 302, 27381, 7, 6089, 19182, 46745, 90, 51, 5512, 5412, 62, 5420, 58, 12962, 628, 220, 220, 220, 1441, 15690, 28632, 90, 51, 11, 45, 92, 7, 20692, 11, 5391, 82, 8, 198, 437, 198, 198, 8818, 1479, 7, 29325, 3712, 19182, 28632, 8, 198, 220, 220, 220, 410, 18082, 19182, 49174, 7, 29325, 13, 20692, 8, 198, 437, 628, 198, 2235, 15607, 47217, 198, 198, 9979, 16232, 220, 796, 16232, 28632, 198, 9979, 14504, 220, 220, 220, 796, 14504, 28632, 198, 9979, 15690, 220, 220, 796, 15690, 28632, 628, 198, 2, 198, 2, 32007, 198, 2, 198, 198, 2235, 37588, 198, 198, 37811, 198, 220, 220, 220, 4942, 13, 2617, 0, 7, 29325, 3712, 6089, 46745, 11, 1988, 3712, 38176, 90, 5317, 23, 11, 52, 5317, 23, 11, 5317, 1433, 11, 52, 5317, 1433, 11, 5317, 2624, 11, 52, 5317, 2624, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2558, 2414, 11, 52, 5317, 2414, 11, 43879, 2624, 11, 43879, 2414, 5512, 18896, 3712, 46541, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30351, 3712, 33, 970, 28, 9562, 11, 4269, 3712, 6089, 12124, 8, 198, 198, 24243, 1096, 3335, 4088, 416, 23345, 4600, 2100, 63, 329, 4600, 11925, 63, 1661, 13, 8393, 7241, 355, 24871, 3481, 611, 198, 63, 292, 13361, 63, 318, 2081, 11, 287, 543, 1339, 257, 4938, 4600, 5532, 63, 318, 2672, 13, 198, 37811, 198, 2617, 0, 198, 198, 1640, 309, 287, 685, 5317, 23, 11, 471, 5317, 23, 11, 2558, 1433, 11, 471, 5317, 1433, 11, 2558, 2624, 11, 471, 5317, 2624, 11, 2558, 2414, 11, 471, 5317, 2414, 11, 48436, 2624, 11, 48436, 2414, 60, 198, 220, 220, 220, 10340, 796, 807, 9, 7857, 1659, 7, 51, 8, 198, 220, 220, 220, 24714, 62, 27261, 796, 38357, 7203, 1079, 64, 13579, 2617, 35, 3, 7, 9895, 8, 4943, 198, 220, 220, 220, 24714, 62, 292, 13361, 796, 38357, 7203, 1079, 64, 13579, 2617, 35, 3, 7, 9895, 8, 42367, 4943, 198, 220, 220, 220, 471, 796, 38357, 7203, 52, 5317, 3, 7, 9895, 8, 4943, 198, 220, 220, 220, 2488, 18206, 2163, 900, 0, 7, 20692, 3712, 6089, 46745, 90, 3, 51, 5512, 1988, 3712, 3, 51, 11, 18896, 3712, 46541, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30351, 3712, 33, 970, 28, 9562, 11, 4269, 3712, 38176, 90, 18465, 11, 6089, 12124, 92, 28, 22366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1188, 796, 2099, 1659, 7, 8367, 8, 6624, 720, 52, 5633, 1988, 1058, 302, 27381, 16763, 52, 11, 1988, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 30351, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4269, 18604, 22366, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 1722, 31301, 4088, 4560, 2421, 257, 4269, 526, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29568, 1136, 26745, 7, 38469, 13798, 13, 53, 1961, 32, 11, 24714, 62, 292, 13361, 4008, 7, 20692, 11, 1188, 11, 18896, 11, 4269, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4269, 18604, 22366, 8614, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 50, 31301, 4088, 4560, 2314, 307, 4884, 319, 257, 4269, 526, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29568, 1136, 26745, 7, 38469, 13798, 13, 53, 1961, 32, 11, 24714, 62, 27261, 4008, 7, 20692, 11, 1188, 11, 18896, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 628, 198, 2235, 4866, 4560, 198, 198, 1640, 357, 69, 11, 24685, 11, 12351, 46745, 25492, 11, 29636, 46745, 25492, 8, 287, 357, 7203, 1079, 64, 13579, 66, 9078, 35, 1462, 39, 1600, 366, 1079, 64, 13579, 66, 9078, 35, 1462, 39, 42367, 1600, 569, 8905, 2213, 11, 350, 2213, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5855, 1079, 64, 13579, 66, 9078, 39, 1462, 35, 1600, 366, 1079, 64, 13579, 66, 9078, 39, 1462, 35, 42367, 1600, 350, 2213, 11, 220, 220, 569, 8905, 2213, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5855, 1079, 64, 13579, 66, 9078, 35, 1462, 35, 1600, 366, 1079, 64, 13579, 66, 9078, 35, 1462, 35, 42367, 1600, 569, 8905, 2213, 11, 569, 8905, 2213, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 2488, 18206, 2163, 7308, 13, 13271, 8635, 62, 30073, 1462, 0, 7, 67, 301, 3712, 3, 67, 301, 46745, 25492, 90, 51, 5512, 12351, 3712, 3, 10677, 46745, 25492, 90, 51, 5512, 399, 3712, 46541, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4269, 3712, 38176, 90, 18465, 11, 6089, 12124, 92, 28, 22366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30351, 3712, 33, 970, 28, 9562, 8, 810, 309, 198, 220, 220, 220, 220, 220, 220, 220, 611, 30351, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4269, 18604, 22366, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 1722, 31301, 4088, 4560, 2421, 257, 4269, 526, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29568, 1136, 26745, 7, 38469, 13798, 13, 53, 1961, 32, 11, 38357, 7, 13331, 4008, 5769, 67, 301, 11, 12351, 11, 399, 9, 7857, 1659, 7, 51, 828, 4269, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4269, 18604, 22366, 8614, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 50, 31301, 4088, 4560, 2314, 307, 4884, 319, 257, 4269, 526, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29568, 1136, 26745, 7, 38469, 13798, 13, 53, 1961, 32, 11, 38357, 7, 69, 4008, 5769, 67, 301, 11, 12351, 11, 399, 9, 7857, 1659, 7, 51, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 29636, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 7308, 13, 13271, 8635, 62, 30073, 1462, 0, 7, 67, 301, 3712, 6089, 19182, 46745, 90, 51, 5512, 12351, 3712, 46745, 90, 51, 5512, 399, 3712, 46541, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4269, 3712, 38176, 90, 18465, 11, 6089, 12124, 92, 28, 22366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30351, 3712, 33, 970, 28, 9562, 8, 810, 309, 198, 220, 220, 220, 611, 30351, 198, 220, 220, 220, 220, 220, 220, 220, 4269, 18604, 22366, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 1722, 31301, 4088, 4560, 2421, 257, 4269, 526, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 410, 18082, 13579, 66, 9078, 39, 1462, 35, 42367, 7, 67, 301, 11, 12351, 11, 399, 9, 7857, 1659, 7, 51, 828, 4269, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 4269, 18604, 22366, 8614, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 50, 31301, 4088, 4560, 2314, 307, 4884, 319, 257, 4269, 526, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 410, 18082, 13579, 66, 9078, 39, 1462, 35, 7, 67, 301, 10, 67, 8210, 12, 16, 11, 12351, 11, 399, 9, 7857, 1659, 7, 51, 4008, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 7308, 13, 13271, 8635, 62, 30073, 1462, 0, 7, 67, 301, 3712, 46745, 90, 51, 5512, 12351, 3712, 6089, 19182, 46745, 90, 51, 5512, 523, 487, 82, 3712, 46541, 11, 399, 3712, 46541, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4269, 3712, 38176, 90, 18465, 11, 6089, 12124, 92, 28, 22366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30351, 3712, 33, 970, 28, 9562, 8, 810, 309, 198, 220, 220, 220, 611, 30351, 198, 220, 220, 220, 220, 220, 220, 220, 4269, 18604, 22366, 11405, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 1722, 31301, 4088, 4560, 2421, 257, 4269, 526, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 410, 18082, 13579, 66, 9078, 32, 1462, 39, 42367, 7, 67, 301, 11, 12351, 11, 523, 487, 82, 11, 399, 9, 7857, 1659, 7, 51, 828, 4269, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 4269, 18604, 22366, 8614, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 50, 31301, 4088, 4560, 2314, 307, 4884, 319, 257, 4269, 526, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 410, 18082, 13579, 66, 9078, 32, 1462, 39, 7, 67, 301, 11, 12351, 11, 523, 487, 82, 11, 399, 9, 7857, 1659, 7, 51, 4008, 198, 220, 220, 220, 886, 198, 437, 198, 198, 14881, 13, 13271, 8635, 62, 30073, 1462, 0, 7, 67, 301, 3712, 6089, 19182, 46745, 90, 51, 5512, 466, 487, 82, 3712, 46541, 11, 12351, 3712, 6089, 46745, 90, 51, 5512, 399, 3712, 46541, 8, 810, 1391, 51, 92, 796, 198, 220, 220, 220, 410, 18082, 13579, 66, 9078, 35, 1462, 32, 7, 67, 301, 11, 466, 487, 82, 11, 12351, 11, 399, 9, 7857, 1659, 7, 51, 4008, 198, 198, 14881, 13, 13271, 8635, 62, 30073, 1462, 0, 7, 67, 301, 3712, 6089, 46745, 90, 51, 5512, 12351, 3712, 6089, 19182, 46745, 90, 51, 5512, 523, 487, 82, 3712, 46541, 11, 399, 3712, 46541, 8, 810, 1391, 51, 92, 796, 198, 220, 220, 220, 410, 18082, 13579, 66, 9078, 32, 1462, 35, 7, 67, 301, 11, 12351, 11, 523, 487, 82, 11, 399, 9, 7857, 1659, 7, 51, 4008, 198, 198, 14881, 13, 13271, 8635, 62, 30073, 1462, 0, 7, 67, 301, 3712, 6089, 19182, 46745, 11, 12351, 11, 399, 3712, 46541, 26, 479, 86, 22046, 23029, 796, 198, 220, 220, 220, 7308, 13, 13271, 8635, 62, 30073, 1462, 0, 7, 67, 301, 11, 657, 11, 12351, 11, 399, 26, 479, 86, 22046, 23029, 198, 198, 14881, 13, 13271, 8635, 62, 30073, 1462, 0, 7, 67, 301, 11, 12351, 3712, 6089, 19182, 46745, 11, 399, 3712, 46541, 26, 479, 86, 22046, 23029, 796, 198, 220, 220, 220, 7308, 13, 13271, 8635, 62, 30073, 1462, 0, 7, 67, 301, 11, 12351, 11, 657, 11, 399, 26, 479, 86, 22046, 23029, 198, 198, 2235, 4088, 7508, 198, 198, 8818, 7508, 3419, 198, 220, 220, 220, 1479, 62, 5420, 796, 6524, 90, 34, 7857, 62, 83, 92, 3419, 198, 220, 220, 220, 2472, 62, 5420, 796, 6524, 90, 34, 7857, 62, 83, 92, 3419, 198, 220, 220, 220, 410, 18082, 13579, 3855, 12360, 7, 5787, 62, 5420, 11, 2472, 62, 5420, 8, 198, 220, 220, 220, 1441, 10385, 7, 5317, 11, 1479, 62, 5420, 21737, 828, 10385, 7, 5317, 11, 2472, 62, 5420, 58, 12962, 198, 437, 198, 198, 437, 1303, 8265, 4942, 198, 198, 37811, 198, 220, 220, 220, 1695, 62, 31673, 3419, 198, 198, 35561, 262, 1695, 62, 31673, 2033, 286, 4088, 357, 259, 9881, 828, 1695, 329, 20157, 416, 262, 29369, 5631, 4732, 13, 198, 37811, 198, 15182, 62, 31673, 3419, 796, 4942, 13, 10951, 3419, 58, 16, 60, 198, 198, 37811, 198, 220, 220, 220, 2472, 62, 31673, 3419, 198, 198, 35561, 262, 2472, 2033, 286, 4088, 357, 259, 9881, 828, 1695, 329, 20157, 416, 262, 29369, 5631, 4732, 13, 198, 37811, 198, 23350, 62, 31673, 3419, 796, 4942, 13, 10951, 3419, 58, 17, 60, 628, 198, 2, 4088, 4560, 198, 198, 8818, 21596, 62, 20797, 0, 7, 20692, 3712, 38176, 90, 46745, 90, 51, 5512, 6089, 46745, 90, 51, 92, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3912, 3712, 38176, 90, 46745, 90, 51, 5512, 6089, 46745, 90, 51, 92, 5512, 399, 3712, 46541, 8, 810, 309, 198, 220, 220, 220, 9881, 796, 399, 9, 7857, 1659, 7, 51, 8, 198, 220, 220, 220, 9881, 855, 15, 11405, 1441, 198, 220, 220, 220, 4942, 13, 2617, 0, 7, 20692, 11, 3912, 11, 399, 8, 198, 437, 628, 198 ]
2.35802
4,888
import LowRankModels: copy_estimate, copy export copy_estimate, copy function copy_estimate(g::GFRM) return GFRM(g.A,g.losses,g.r,g.k, g.observed_features,g.observed_examples, copy(g.U),copy(g.W)) end
[ 11748, 7754, 27520, 5841, 1424, 25, 4866, 62, 395, 1920, 11, 4866, 198, 198, 39344, 4866, 62, 395, 1920, 11, 4866, 198, 198, 8818, 4866, 62, 395, 1920, 7, 70, 3712, 38, 10913, 44, 8, 198, 220, 1441, 402, 10913, 44, 7, 70, 13, 32, 11, 70, 13, 22462, 274, 11, 70, 13, 81, 11, 70, 13, 74, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 308, 13, 672, 45852, 62, 40890, 11, 70, 13, 672, 45852, 62, 1069, 12629, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4866, 7, 70, 13, 52, 828, 30073, 7, 70, 13, 54, 4008, 198, 437, 198 ]
1.991453
117
n = 9 # rand(1:10) @test matrixdepot("clement", Float64, n) == matrixdepot("clement", n) A = matrixdepot("clement", n) B = matrixdepot("clement", n, 1) @test diag(A+A', 1) == n*ones(n-1) @test issymmetric(Array(B)) θ = matrixdepot("clement", 1) println("'clement' passed test...")
[ 77, 796, 860, 1303, 43720, 7, 16, 25, 940, 8, 198, 31, 9288, 17593, 10378, 313, 7203, 66, 1732, 1600, 48436, 2414, 11, 299, 8, 6624, 17593, 10378, 313, 7203, 66, 1732, 1600, 299, 8, 198, 198, 32, 796, 17593, 10378, 313, 7203, 66, 1732, 1600, 299, 8, 198, 33, 796, 17593, 10378, 313, 7203, 66, 1732, 1600, 299, 11, 352, 8, 198, 198, 31, 9288, 2566, 363, 7, 32, 10, 32, 3256, 352, 8, 6624, 299, 9, 1952, 7, 77, 12, 16, 8, 198, 31, 9288, 1189, 26621, 19482, 7, 19182, 7, 33, 4008, 198, 138, 116, 796, 17593, 10378, 313, 7203, 66, 1732, 1600, 352, 8, 198, 35235, 7203, 6, 66, 1732, 6, 3804, 1332, 9313, 8, 198 ]
2.358333
120
@testset "Global Quantities" begin # Test Residual T = Float64 N = 10 dt = 0.1 p = 3 i = 2 model = UnicycleGame(p=p) probsize = ProblemSize(N,model) x0 = rand(SVector{model.n,T}) opts = Options() Q = [Diagonal(rand(SVector{model.ni[i],T})) for i=1:p] R = [Diagonal(rand(SVector{model.mi[i],T})) for i=1:p] xf = [i*ones(SVector{model.ni[i],T}) for i=1:p] uf = [2i*ones(SVector{model.mi[i],T}) for i=1:p] game_obj = GameObjective(Q,R,xf,uf,N,model) game_con = GameConstraintValues(probsize) prob = GameProblem(N, dt, x0, model, opts, game_obj, game_con) @test typeof(prob) <: GameProblem residual!(prob) ibr_residual!(prob, i) # Test Residual Jacobian residual_jacobian!(prob) ibr_residual_jacobian!(prob, i) # Test scn @test scn(1234.0) == " 1.2e+3" @test scn(-1234.0) == "-1.2e+3" @test scn(-0.1234) == "-1.2e-1" @test scn( 0.1234) == " 1.2e-1" @test scn(0) == " 0.0e+0" @test scn(-0) == " 0.0e+0" @test scn(0, digits=3) == " 0.000e+0" @test scn(1234, digits=3) == " 1.234e+3" @test scn(1234, digits=0) == " 1e+3" @test_throws AssertionError scn(1234, digits=-1) == " 1e+3" end
[ 31, 9288, 2617, 366, 22289, 16972, 871, 1, 2221, 628, 220, 220, 220, 1303, 6208, 1874, 312, 723, 198, 220, 220, 220, 309, 796, 48436, 2414, 198, 220, 220, 220, 399, 796, 838, 198, 220, 220, 220, 288, 83, 796, 657, 13, 16, 198, 220, 220, 220, 279, 796, 513, 198, 220, 220, 220, 1312, 796, 362, 198, 220, 220, 220, 2746, 796, 791, 35298, 8777, 7, 79, 28, 79, 8, 198, 220, 220, 220, 386, 1443, 1096, 796, 20647, 10699, 7, 45, 11, 19849, 8, 198, 220, 220, 220, 2124, 15, 796, 43720, 7, 50, 38469, 90, 19849, 13, 77, 11, 51, 30072, 198, 220, 220, 220, 2172, 82, 796, 18634, 3419, 628, 220, 220, 220, 1195, 796, 685, 18683, 27923, 7, 25192, 7, 50, 38469, 90, 19849, 13, 8461, 58, 72, 4357, 51, 92, 4008, 329, 1312, 28, 16, 25, 79, 60, 198, 220, 220, 220, 371, 796, 685, 18683, 27923, 7, 25192, 7, 50, 38469, 90, 19849, 13, 11632, 58, 72, 4357, 51, 92, 4008, 329, 1312, 28, 16, 25, 79, 60, 198, 220, 220, 220, 2124, 69, 796, 685, 72, 9, 1952, 7, 50, 38469, 90, 19849, 13, 8461, 58, 72, 4357, 51, 30072, 329, 1312, 28, 16, 25, 79, 60, 198, 220, 220, 220, 334, 69, 796, 685, 17, 72, 9, 1952, 7, 50, 38469, 90, 19849, 13, 11632, 58, 72, 4357, 51, 30072, 329, 1312, 28, 16, 25, 79, 60, 198, 220, 220, 220, 983, 62, 26801, 796, 3776, 10267, 425, 7, 48, 11, 49, 11, 26152, 11, 3046, 11, 45, 11, 19849, 8, 628, 220, 220, 220, 983, 62, 1102, 796, 3776, 3103, 2536, 2913, 40161, 7, 1676, 1443, 1096, 8, 198, 220, 220, 220, 1861, 796, 3776, 40781, 7, 45, 11, 288, 83, 11, 2124, 15, 11, 2746, 11, 2172, 82, 11, 983, 62, 26801, 11, 983, 62, 1102, 8, 198, 220, 220, 220, 2488, 9288, 2099, 1659, 7, 1676, 65, 8, 1279, 25, 3776, 40781, 198, 220, 220, 220, 29598, 0, 7, 1676, 65, 8, 198, 220, 220, 220, 220, 2889, 62, 411, 312, 723, 0, 7, 1676, 65, 11, 1312, 8, 628, 220, 220, 220, 1303, 6208, 1874, 312, 723, 12806, 666, 198, 220, 220, 220, 29598, 62, 30482, 672, 666, 0, 7, 1676, 65, 8, 198, 220, 220, 220, 220, 2889, 62, 411, 312, 723, 62, 30482, 672, 666, 0, 7, 1676, 65, 11, 1312, 8, 628, 220, 220, 220, 1303, 6208, 629, 77, 198, 220, 220, 220, 2488, 9288, 629, 77, 7, 1065, 2682, 13, 15, 8, 6624, 366, 352, 13, 17, 68, 10, 18, 1, 198, 220, 220, 220, 2488, 9288, 629, 77, 32590, 1065, 2682, 13, 15, 8, 6624, 27444, 16, 13, 17, 68, 10, 18, 1, 198, 220, 220, 220, 2488, 9288, 629, 77, 32590, 15, 13, 1065, 2682, 8, 6624, 27444, 16, 13, 17, 68, 12, 16, 1, 198, 220, 220, 220, 2488, 9288, 629, 77, 7, 657, 13, 1065, 2682, 8, 6624, 366, 352, 13, 17, 68, 12, 16, 1, 198, 220, 220, 220, 2488, 9288, 629, 77, 7, 15, 8, 6624, 366, 657, 13, 15, 68, 10, 15, 1, 198, 220, 220, 220, 2488, 9288, 629, 77, 32590, 15, 8, 6624, 366, 657, 13, 15, 68, 10, 15, 1, 198, 220, 220, 220, 2488, 9288, 629, 77, 7, 15, 11, 19561, 28, 18, 8, 6624, 366, 657, 13, 830, 68, 10, 15, 1, 198, 220, 220, 220, 2488, 9288, 629, 77, 7, 1065, 2682, 11, 19561, 28, 18, 8, 6624, 366, 352, 13, 24409, 68, 10, 18, 1, 198, 220, 220, 220, 2488, 9288, 629, 77, 7, 1065, 2682, 11, 19561, 28, 15, 8, 6624, 366, 352, 68, 10, 18, 1, 198, 220, 220, 220, 2488, 9288, 62, 400, 8516, 2195, 861, 295, 12331, 629, 77, 7, 1065, 2682, 11, 19561, 10779, 16, 8, 6624, 366, 352, 68, 10, 18, 1, 198, 198, 437, 198 ]
1.897356
643
using SubHunt using Test using Random using POMDPs using POMDPPolicies using POMDPSimulators using DiscreteValueIteration using ParticleFilters using POMDPModelTools using QMDP @testset "VI" begin rng = MersenneTwister(6) pomdp = SubHuntPOMDP() # show(STDOUT, MIME("text/plain"), SubVis(pomdp)) solver = ValueIterationSolver(verbose=true) vipolicy = solve(solver, UnderlyingMDP(pomdp)) # s = rand(rng, initialstate(pomdp)) @show value(vipolicy, s) @show value(vipolicy, SubState(s.own, s.target, s.goal, true)) end @testset "QMDP and PF" begin rng = MersenneTwister(6) pomdp = SubHuntPOMDP() policy = solve(QMDPSolver(verbose=true), pomdp) # policy = RandomPolicy(pomdp, rng=rng) filter = BootstrapFilter(pomdp, 10000, rng) for (s, a, r, sp) in stepthrough(pomdp, policy, filter, "s,a,r,sp", max_steps=200, rng=rng) v = SubVis(pomdp, s=s, a=a, r=r) show(stdout, MIME("text/plain"), v) end end @testset "DPOMDP and PF" begin rng = MersenneTwister(6) dpomdp = DSubHuntPOMDP(SubHuntPOMDP(), 1.0) policy = RandomPolicy(dpomdp, rng=rng) filter = BootstrapFilter(dpomdp, 10000, rng) for (s, a, r, sp) in stepthrough(dpomdp, policy, filter, "s,a,r,sp", max_steps=200, rng=rng) v = SubVis(dpomdp.cp, s=s, a=a, r=r) show(stdout, MIME("text/plain"), v) end end @testset "Visualization" begin rng = MersenneTwister(6) pomdp = SubHuntPOMDP() policy = solve(QMDPSolver(verbose=true), pomdp) # policy = RandomPolicy(pomdp, rng=rng) filter = BootstrapFilter(pomdp, 10000, rng) for step in stepthrough(pomdp, policy, filter, "s,a,r,sp", max_steps=200, rng=rng) show(stdout, MIME("text/plain"), render(pomdp, step)) end end
[ 3500, 3834, 47663, 198, 3500, 6208, 198, 3500, 14534, 198, 3500, 350, 2662, 6322, 82, 198, 3500, 350, 2662, 6322, 47, 4160, 444, 198, 3500, 350, 2662, 35, 3705, 320, 24325, 198, 3500, 8444, 8374, 11395, 29993, 341, 198, 3500, 2142, 1548, 11928, 1010, 198, 3500, 350, 2662, 6322, 17633, 33637, 198, 3500, 1195, 44, 6322, 198, 198, 31, 9288, 2617, 366, 12861, 1, 2221, 220, 198, 220, 220, 220, 374, 782, 796, 337, 364, 29727, 5080, 1694, 7, 21, 8, 198, 220, 220, 220, 279, 296, 26059, 796, 3834, 47663, 47, 2662, 6322, 3419, 198, 220, 220, 220, 1303, 905, 7, 36886, 11, 337, 12789, 7203, 5239, 14, 25638, 12340, 3834, 15854, 7, 79, 296, 26059, 4008, 628, 220, 220, 220, 1540, 332, 796, 11052, 29993, 341, 50, 14375, 7, 19011, 577, 28, 7942, 8, 198, 220, 220, 220, 410, 541, 21424, 796, 8494, 7, 82, 14375, 11, 4698, 3157, 44, 6322, 7, 79, 296, 26059, 4008, 198, 220, 220, 220, 1303, 220, 198, 220, 220, 220, 264, 796, 43720, 7, 81, 782, 11, 4238, 5219, 7, 79, 296, 26059, 4008, 198, 220, 220, 220, 2488, 12860, 1988, 7, 85, 541, 21424, 11, 264, 8, 198, 220, 220, 220, 2488, 12860, 1988, 7, 85, 541, 21424, 11, 3834, 9012, 7, 82, 13, 593, 11, 264, 13, 16793, 11, 264, 13, 35231, 11, 2081, 4008, 198, 437, 198, 198, 31, 9288, 2617, 366, 48, 44, 6322, 290, 28223, 1, 2221, 220, 198, 220, 220, 220, 374, 782, 796, 337, 364, 29727, 5080, 1694, 7, 21, 8, 198, 220, 220, 220, 279, 296, 26059, 796, 3834, 47663, 47, 2662, 6322, 3419, 198, 220, 220, 220, 2450, 796, 8494, 7, 48, 12740, 3705, 14375, 7, 19011, 577, 28, 7942, 828, 279, 296, 26059, 8, 628, 220, 220, 220, 1303, 2450, 796, 14534, 36727, 7, 79, 296, 26059, 11, 374, 782, 28, 81, 782, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 8106, 796, 18892, 26418, 22417, 7, 79, 296, 26059, 11, 33028, 11, 374, 782, 8, 628, 220, 220, 220, 329, 357, 82, 11, 257, 11, 374, 11, 599, 8, 287, 2239, 9579, 7, 79, 296, 26059, 11, 2450, 11, 8106, 11, 366, 82, 11, 64, 11, 81, 11, 2777, 1600, 3509, 62, 20214, 28, 2167, 11, 374, 782, 28, 81, 782, 8, 198, 220, 220, 220, 220, 220, 220, 220, 410, 796, 3834, 15854, 7, 79, 296, 26059, 11, 264, 28, 82, 11, 257, 28, 64, 11, 374, 28, 81, 8, 198, 220, 220, 220, 220, 220, 220, 220, 905, 7, 19282, 448, 11, 337, 12789, 7203, 5239, 14, 25638, 12340, 410, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 31, 9288, 2617, 366, 6322, 2662, 6322, 290, 28223, 1, 2221, 198, 220, 220, 220, 374, 782, 796, 337, 364, 29727, 5080, 1694, 7, 21, 8, 198, 220, 220, 220, 288, 79, 296, 26059, 796, 360, 7004, 47663, 47, 2662, 6322, 7, 7004, 47663, 47, 2662, 6322, 22784, 352, 13, 15, 8, 198, 220, 220, 220, 2450, 796, 14534, 36727, 7, 26059, 296, 26059, 11, 374, 782, 28, 81, 782, 8, 198, 220, 220, 220, 8106, 796, 18892, 26418, 22417, 7, 26059, 296, 26059, 11, 33028, 11, 374, 782, 8, 628, 220, 220, 220, 329, 357, 82, 11, 257, 11, 374, 11, 599, 8, 287, 2239, 9579, 7, 26059, 296, 26059, 11, 2450, 11, 8106, 11, 366, 82, 11, 64, 11, 81, 11, 2777, 1600, 3509, 62, 20214, 28, 2167, 11, 374, 782, 28, 81, 782, 8, 198, 220, 220, 220, 220, 220, 220, 220, 410, 796, 3834, 15854, 7, 26059, 296, 26059, 13, 13155, 11, 264, 28, 82, 11, 257, 28, 64, 11, 374, 28, 81, 8, 198, 220, 220, 220, 220, 220, 220, 220, 905, 7, 19282, 448, 11, 337, 12789, 7203, 5239, 14, 25638, 12340, 410, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 31, 9288, 2617, 366, 36259, 1634, 1, 2221, 198, 220, 220, 220, 374, 782, 796, 337, 364, 29727, 5080, 1694, 7, 21, 8, 198, 220, 220, 220, 279, 296, 26059, 796, 3834, 47663, 47, 2662, 6322, 3419, 198, 220, 220, 220, 2450, 796, 8494, 7, 48, 12740, 3705, 14375, 7, 19011, 577, 28, 7942, 828, 279, 296, 26059, 8, 628, 220, 220, 220, 1303, 2450, 796, 14534, 36727, 7, 79, 296, 26059, 11, 374, 782, 28, 81, 782, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 8106, 796, 18892, 26418, 22417, 7, 79, 296, 26059, 11, 33028, 11, 374, 782, 8, 628, 220, 220, 220, 329, 2239, 287, 2239, 9579, 7, 79, 296, 26059, 11, 2450, 11, 8106, 11, 366, 82, 11, 64, 11, 81, 11, 2777, 1600, 3509, 62, 20214, 28, 2167, 11, 374, 782, 28, 81, 782, 8, 198, 220, 220, 220, 220, 220, 220, 220, 905, 7, 19282, 448, 11, 337, 12789, 7203, 5239, 14, 25638, 12340, 8543, 7, 79, 296, 26059, 11, 2239, 4008, 198, 220, 220, 220, 886, 198, 437, 198 ]
2.178049
820
# InflationTotalCPI - Implementación para obtener la medida estándar de ritmo # inflacionario a través de la variación interanual del IPC struct InflationTotalCPI <: InflationFunction end # Extender el método para obtener el nombre de esta medida measure_name(::InflationTotalCPI) = "Variación interanual IPC" measure_tag(::InflationTotalCPI) = "Total" # Las funciones sobre VarCPIBase deben resumir en variaciones intermensuales # Método para objetos VarCPIBase cuyo índice base es un escalar function (inflfn::InflationTotalCPI)(base::VarCPIBase{T, T}) where {T <: AbstractFloat} base_ipc = capitalize(base.v, base.baseindex) ipc = base_ipc * base.w / base.baseindex varinterm!(ipc, ipc, 100) ipc end # Esta medida sí se comporta diferente de acuerdo a los índices base, por lo que # se define una versión que toma en cuenta los diferentes índices. Si la medida # solamente genera resumen de las variaciones intermensuales, no es necesario. # Método para objetos VarCPIBase cuyos índices base son un vector function (inflfn::InflationTotalCPI)(base::VarCPIBase{T, B}) where {T <: AbstractFloat, B <: AbstractVector{T}} base_ipc = capitalize(base.v, base.baseindex) # Obtener índice base y normalizar a 100 baseindex = base.baseindex' * base.w ipc = 100 * (base_ipc * base.w / baseindex) varinterm!(ipc, ipc, 100) ipc end
[ 2, 554, 33521, 14957, 8697, 40, 532, 48282, 32009, 18840, 31215, 909, 83, 877, 8591, 1117, 3755, 1556, 6557, 358, 283, 390, 374, 270, 5908, 198, 2, 28472, 49443, 4982, 257, 1291, 85, 20954, 390, 8591, 5553, 32009, 18840, 987, 272, 723, 1619, 314, 5662, 198, 198, 7249, 554, 33521, 14957, 8697, 40, 1279, 25, 554, 33521, 22203, 198, 437, 198, 198, 2, 5683, 2194, 1288, 285, 25125, 24313, 31215, 909, 83, 877, 1288, 299, 2381, 260, 390, 1556, 64, 1117, 3755, 198, 1326, 5015, 62, 3672, 7, 3712, 818, 33521, 14957, 8697, 40, 8, 796, 366, 23907, 32009, 18840, 987, 272, 723, 314, 5662, 1, 198, 1326, 5015, 62, 12985, 7, 3712, 818, 33521, 14957, 8697, 40, 8, 796, 366, 14957, 1, 198, 198, 2, 10123, 25439, 295, 274, 523, 4679, 12372, 8697, 9865, 589, 1915, 268, 581, 388, 343, 551, 5553, 49443, 274, 987, 76, 31406, 274, 198, 198, 2, 337, 25125, 24313, 31215, 26181, 316, 418, 12372, 8697, 9865, 589, 269, 4669, 78, 6184, 255, 358, 501, 2779, 1658, 555, 12221, 283, 198, 8818, 357, 10745, 1652, 77, 3712, 818, 33521, 14957, 8697, 40, 5769, 8692, 3712, 19852, 8697, 9865, 589, 90, 51, 11, 309, 30072, 810, 1391, 51, 1279, 25, 27741, 43879, 92, 220, 198, 220, 220, 220, 2779, 62, 541, 66, 796, 35160, 7, 8692, 13, 85, 11, 2779, 13, 8692, 9630, 8, 198, 220, 220, 220, 20966, 66, 796, 2779, 62, 541, 66, 1635, 2779, 13, 86, 1220, 2779, 13, 8692, 9630, 198, 220, 220, 220, 1401, 3849, 76, 0, 7, 541, 66, 11, 20966, 66, 11, 1802, 8, 198, 220, 220, 220, 20966, 66, 198, 437, 198, 198, 2, 10062, 64, 1117, 3755, 264, 8836, 384, 552, 419, 64, 288, 361, 9100, 68, 390, 936, 15573, 4598, 257, 22346, 6184, 255, 358, 1063, 2779, 11, 16964, 2376, 8358, 220, 198, 2, 384, 8160, 555, 64, 1646, 72, 18840, 8358, 284, 2611, 551, 18912, 29188, 22346, 288, 361, 9100, 274, 6184, 255, 358, 1063, 13, 15638, 8591, 1117, 3755, 198, 2, 1540, 3263, 68, 1152, 64, 581, 20080, 390, 39990, 5553, 49443, 274, 987, 76, 31406, 274, 11, 645, 1658, 497, 728, 4982, 13, 198, 2, 337, 25125, 24313, 31215, 26181, 316, 418, 12372, 8697, 9865, 589, 269, 4669, 418, 6184, 255, 358, 1063, 2779, 3367, 555, 15879, 198, 8818, 357, 10745, 1652, 77, 3712, 818, 33521, 14957, 8697, 40, 5769, 8692, 3712, 19852, 8697, 9865, 589, 90, 51, 11, 347, 30072, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 347, 1279, 25, 27741, 38469, 90, 51, 11709, 220, 198, 220, 220, 220, 2779, 62, 541, 66, 796, 35160, 7, 8692, 13, 85, 11, 2779, 13, 8692, 9630, 8, 198, 220, 220, 220, 1303, 1835, 83, 877, 6184, 255, 358, 501, 2779, 331, 3487, 528, 283, 257, 1802, 198, 220, 220, 220, 2779, 9630, 796, 2779, 13, 8692, 9630, 6, 1635, 2779, 13, 86, 198, 220, 220, 220, 20966, 66, 796, 1802, 1635, 357, 8692, 62, 541, 66, 1635, 2779, 13, 86, 1220, 2779, 9630, 8, 198, 220, 220, 220, 1401, 3849, 76, 0, 7, 541, 66, 11, 20966, 66, 11, 1802, 8, 198, 220, 220, 220, 20966, 66, 198, 437, 628 ]
2.598485
528
__precompile__() module BinaryProvider using Compat using Compat.Libdl # Utilities for controlling verbosity include("LoggingUtils.jl") # Include our subprocess running functionality include("OutputCollector.jl") # External utilities such as downloading/decompressing tarballs include("PlatformEngines.jl") # Platform naming include("PlatformNames.jl") # Everything related to file/path management include("Prefix.jl") # Abstraction of "needing" a file, that would trigger an install include("Products.jl") function __init__() global global_prefix # Initialize our global_prefix global_prefix = Prefix(joinpath(dirname(@__FILE__), "../", "global_prefix")) activate(global_prefix) # Find the right download/compression engines for this platform probe_platform_engines!() # If we're on a julia that's too old, then fixup the color mappings if !haskey(Base.text_colors, :default) Base.text_colors[:default] = Base.color_normal end end end # module
[ 834, 3866, 5589, 576, 834, 3419, 198, 21412, 45755, 29495, 198, 198, 3500, 3082, 265, 198, 3500, 3082, 265, 13, 25835, 25404, 198, 198, 2, 41086, 329, 12755, 15942, 16579, 198, 17256, 7203, 11187, 2667, 18274, 4487, 13, 20362, 4943, 198, 2, 40348, 674, 850, 14681, 2491, 11244, 198, 17256, 7203, 26410, 31337, 273, 13, 20362, 4943, 198, 2, 34579, 20081, 884, 355, 22023, 14, 12501, 3361, 11697, 13422, 21591, 198, 17256, 7203, 37148, 7936, 1127, 13, 20362, 4943, 198, 2, 19193, 19264, 198, 17256, 7203, 37148, 36690, 13, 20362, 4943, 198, 2, 11391, 3519, 284, 2393, 14, 6978, 4542, 198, 17256, 7203, 36698, 844, 13, 20362, 4943, 198, 2, 2275, 301, 7861, 286, 366, 710, 8228, 1, 257, 2393, 11, 326, 561, 7616, 281, 2721, 198, 17256, 7203, 48650, 13, 20362, 4943, 198, 198, 8818, 11593, 15003, 834, 3419, 198, 220, 220, 220, 3298, 3298, 62, 40290, 628, 220, 220, 220, 1303, 20768, 1096, 674, 3298, 62, 40290, 198, 220, 220, 220, 3298, 62, 40290, 796, 3771, 13049, 7, 22179, 6978, 7, 15908, 3672, 7, 31, 834, 25664, 834, 828, 366, 40720, 1600, 366, 20541, 62, 40290, 48774, 198, 220, 220, 220, 15155, 7, 20541, 62, 40290, 8, 628, 220, 220, 220, 1303, 9938, 262, 826, 4321, 14, 5589, 2234, 11874, 329, 428, 3859, 198, 220, 220, 220, 12774, 62, 24254, 62, 1516, 1127, 0, 3419, 628, 220, 220, 220, 1303, 1002, 356, 821, 319, 257, 474, 43640, 326, 338, 1165, 1468, 11, 788, 4259, 929, 262, 3124, 285, 39242, 198, 220, 220, 220, 611, 5145, 10134, 2539, 7, 14881, 13, 5239, 62, 4033, 669, 11, 1058, 12286, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7308, 13, 5239, 62, 4033, 669, 58, 25, 12286, 60, 796, 7308, 13, 8043, 62, 11265, 198, 220, 220, 220, 886, 198, 437, 198, 198, 437, 1303, 8265, 198 ]
3.2443
307
using HDF5 HDF5File <: HDF5Object HDF5Object
[ 198, 3500, 5572, 37, 20, 198, 198, 39, 8068, 20, 8979, 1279, 25, 5572, 37, 20, 10267, 198, 198, 39, 8068, 20, 10267, 198 ]
2
24
#TYPES """ AbstractModel abstract type for models """ abstract type AbstractModel end """ AbstractDependenceStructure Types inheriting from abstract type `AbstractDependenceStructure` """ abstract type AbstractDependenceStructure end """ FullIndependence <: AbstractDependenceStructure Type acting as a Flag for Full independent Zig-Zag sampler """ struct FullIndependence <: AbstractDependenceStructure end """ Type acting as a Flag for partial independent Zig-Zag sampler """ struct PartialIndependence <: AbstractDependenceStructure end """ SamplingScheme Abstact type for Sampling scheme """ abstract type SamplingScheme end """ SubSampling <: SamplingScheme If you cannot sample from the inhomogeneous Poisson rate, sample it by subsampling from Poisson rate with higher intensity (bound) and accept reject the event. """ struct SubSampling <: SamplingScheme end """ Regular <: SamplingScheme For linear sdes, where the actual imhogeneous Poisson rate can be sampled directly. """ struct Regular <: SamplingScheme end """ System CHANGE IN TUPLE WITH FREE NUMBER OF PARAMETERS contains all the information needed for the ZigZag sampler ξ::Vector{Float64} := vector for the position of the coefficients θ::Vector{Float64} := vector containing the velocities (need to be changes in float64) ϕ::Vector{Fs} := Faber Schauder functions information (see Fs) τ::Vector{Float64} := vector containing waiting time (could be sorted) L::Int64 := Number of Levels T::Float64 := time length of the bridge b1::Vector{Float64} := free vector needed for linear growth sde b2::Vector{Float64} := free vector needed for linear growth sde tt::Vector{Float64} := free vector needed for linear growth sde """ struct System ξ::Vector{Float64} # θ::Vector{Float64} ϕ::Vector{Fs} τ::Vector{Float64} L::Int64 T::Float64 function System(L::Int64, T::Float64, ξ = fill(0.0, 2<<L - 1), θ = fill(1.0, 2<<L - 1), τ = fill(0.0, 2<<L - 1)) new(ξ, θ, generate(L, T), τ, L, T) end end """ Skeleton container for output zigzag sampler """ struct Skeleton ξ::Vector{Float64} t::Float64 end
[ 2, 9936, 47, 1546, 198, 37811, 198, 220, 220, 220, 27741, 17633, 198, 198, 397, 8709, 2099, 329, 4981, 198, 37811, 198, 397, 8709, 2099, 27741, 17633, 886, 628, 628, 198, 37811, 198, 220, 220, 220, 27741, 35, 15091, 1273, 5620, 198, 198, 31431, 10639, 1780, 422, 12531, 2099, 4600, 23839, 35, 15091, 1273, 5620, 63, 198, 37811, 198, 397, 8709, 2099, 27741, 35, 15091, 1273, 5620, 886, 198, 198, 37811, 198, 220, 220, 220, 6462, 5497, 15091, 1279, 25, 27741, 35, 15091, 1273, 5620, 198, 198, 6030, 7205, 355, 257, 19762, 329, 6462, 4795, 24992, 12, 57, 363, 6072, 20053, 198, 37811, 198, 7249, 6462, 5497, 15091, 1279, 25, 27741, 35, 15091, 1273, 5620, 886, 198, 198, 37811, 198, 198, 6030, 7205, 355, 257, 19762, 329, 13027, 4795, 24992, 12, 57, 363, 6072, 20053, 198, 37811, 198, 7249, 43689, 5497, 15091, 1279, 25, 27741, 35, 15091, 1273, 5620, 886, 198, 198, 37811, 198, 220, 220, 220, 3409, 11347, 27054, 1326, 198, 198, 4826, 301, 529, 2099, 329, 3409, 11347, 7791, 198, 37811, 198, 397, 8709, 2099, 3409, 11347, 27054, 1326, 886, 198, 198, 37811, 198, 220, 220, 220, 3834, 16305, 11347, 1279, 25, 3409, 11347, 27054, 1326, 198, 198, 1532, 345, 2314, 6291, 422, 262, 25783, 296, 32269, 7695, 30927, 2494, 11, 6291, 340, 416, 198, 7266, 37687, 11347, 422, 7695, 30927, 2494, 351, 2440, 12245, 357, 7784, 8, 290, 2453, 4968, 262, 1785, 13, 198, 37811, 198, 7249, 3834, 16305, 11347, 1279, 25, 3409, 11347, 27054, 1326, 886, 198, 198, 37811, 198, 220, 220, 220, 23603, 1279, 25, 3409, 11347, 27054, 1326, 198, 198, 1890, 14174, 264, 8906, 11, 810, 262, 4036, 545, 71, 32269, 7695, 30927, 2494, 460, 307, 35846, 3264, 13, 198, 37811, 198, 7249, 23603, 1279, 25, 3409, 11347, 27054, 1326, 886, 198, 198, 37811, 198, 220, 220, 220, 4482, 198, 198, 3398, 27746, 3268, 309, 8577, 2538, 13315, 17189, 36871, 13246, 3963, 29463, 2390, 2767, 4877, 198, 3642, 1299, 477, 262, 1321, 2622, 329, 262, 24992, 57, 363, 6072, 20053, 198, 220, 220, 220, 7377, 122, 3712, 38469, 90, 43879, 2414, 92, 19039, 15879, 329, 262, 2292, 286, 262, 44036, 198, 220, 220, 220, 7377, 116, 3712, 38469, 90, 43879, 2414, 92, 19039, 15879, 7268, 262, 11555, 420, 871, 357, 31227, 284, 307, 2458, 287, 12178, 2414, 8, 198, 220, 220, 220, 18074, 243, 3712, 38469, 90, 42388, 92, 19039, 14236, 263, 3059, 29233, 5499, 1321, 357, 3826, 376, 82, 8, 198, 220, 220, 220, 46651, 3712, 38469, 90, 43879, 2414, 92, 19039, 15879, 7268, 4953, 640, 357, 24089, 307, 23243, 8, 198, 220, 220, 220, 406, 3712, 5317, 2414, 19039, 7913, 286, 28248, 198, 220, 220, 220, 309, 3712, 43879, 2414, 19039, 640, 4129, 286, 262, 7696, 198, 220, 220, 220, 275, 16, 3712, 38469, 90, 43879, 2414, 92, 19039, 1479, 15879, 2622, 329, 14174, 3349, 264, 2934, 198, 220, 220, 220, 275, 17, 3712, 38469, 90, 43879, 2414, 92, 19039, 1479, 15879, 2622, 329, 14174, 3349, 264, 2934, 198, 220, 220, 220, 256, 83, 3712, 38469, 90, 43879, 2414, 92, 19039, 1479, 15879, 2622, 329, 14174, 3349, 264, 2934, 198, 37811, 198, 7249, 4482, 198, 220, 220, 220, 7377, 122, 3712, 38469, 90, 43879, 2414, 92, 1303, 198, 220, 220, 220, 7377, 116, 3712, 38469, 90, 43879, 2414, 92, 198, 220, 220, 220, 18074, 243, 3712, 38469, 90, 42388, 92, 198, 220, 220, 220, 46651, 3712, 38469, 90, 43879, 2414, 92, 198, 220, 220, 220, 406, 3712, 5317, 2414, 198, 220, 220, 220, 309, 3712, 43879, 2414, 198, 220, 220, 220, 2163, 4482, 7, 43, 3712, 5317, 2414, 11, 309, 3712, 43879, 2414, 11, 7377, 122, 796, 6070, 7, 15, 13, 15, 11, 362, 16791, 43, 532, 352, 828, 7377, 116, 796, 6070, 7, 16, 13, 15, 11, 362, 16791, 43, 532, 352, 828, 46651, 796, 6070, 7, 15, 13, 15, 11, 362, 16791, 43, 532, 352, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 649, 7, 138, 122, 11, 7377, 116, 11, 7716, 7, 43, 11, 309, 828, 46651, 11, 406, 11, 309, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 19460, 10565, 198, 34924, 329, 5072, 1976, 328, 50183, 6072, 20053, 198, 37811, 198, 7249, 19460, 10565, 198, 220, 220, 220, 7377, 122, 3712, 38469, 90, 43879, 2414, 92, 198, 220, 220, 220, 256, 3712, 43879, 2414, 198, 437, 198 ]
3.012363
728
function linsolve_cg( LF::LF3dGrid, b::Array{Float64,1}; x0 = nothing, NiterMax = 1000, TOL=5.e-10, convmsg=true, showprogress=false ) # Npoints = size(b)[1] if x0 == nothing x = zeros(Float64, Npoints) else x = copy(x0) end # r = zeros( Float64, Npoints ) p = zeros( Float64, Npoints ) # L_x = apply_Laplacian( LF, x ) for ip = 1 : Npoints r[ip] = b[ip] - L_x[ip] p[ip] = r[ip] end rsold = dot( r, r ) for iter = 1 : NiterMax # L_x = apply_Laplacian( LF, p ) # α = rsold/dot( p, L_x ) # x[:] = x[:] + α * p[:] # FIXME use x[:] to force x to be copied, not referenced r[:] = r[:] - α * L_x[:] # rsnew = dot( r, r ) # deltars = rsold - rsnew if showprogress @printf("%8d %20.10f\n", iter, sqrt(rsnew)) end # if sqrt(rsnew) < TOL if convmsg @printf("#Convergence achieved in linsolve_cg: %8d iterations.\n", iter) end break end # p = r + (rsnew/rsold) * p # rsold = rsnew end # return x # end
[ 8818, 300, 1040, 6442, 62, 66, 70, 7, 47629, 3712, 43, 37, 18, 67, 41339, 11, 275, 3712, 19182, 90, 43879, 2414, 11, 16, 19629, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 15, 796, 2147, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 399, 2676, 11518, 796, 8576, 11, 309, 3535, 28, 20, 13, 68, 12, 940, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3063, 19662, 28, 7942, 11, 905, 33723, 28, 9562, 1267, 198, 220, 1303, 198, 220, 399, 13033, 796, 2546, 7, 65, 38381, 16, 60, 198, 220, 611, 2124, 15, 6624, 2147, 198, 220, 220, 220, 2124, 796, 1976, 27498, 7, 43879, 2414, 11, 399, 13033, 8, 198, 220, 2073, 198, 220, 220, 220, 2124, 796, 4866, 7, 87, 15, 8, 198, 220, 886, 198, 220, 1303, 198, 220, 374, 796, 1976, 27498, 7, 48436, 2414, 11, 399, 13033, 1267, 198, 220, 279, 796, 1976, 27498, 7, 48436, 2414, 11, 399, 13033, 1267, 198, 220, 1303, 198, 220, 406, 62, 87, 796, 4174, 62, 14772, 489, 330, 666, 7, 47629, 11, 2124, 1267, 198, 220, 329, 20966, 796, 352, 1058, 399, 13033, 198, 220, 220, 220, 374, 58, 541, 60, 796, 275, 58, 541, 60, 532, 406, 62, 87, 58, 541, 60, 198, 220, 220, 220, 279, 58, 541, 60, 796, 374, 58, 541, 60, 198, 220, 886, 628, 220, 374, 24120, 796, 16605, 7, 374, 11, 374, 1267, 198, 220, 329, 11629, 796, 352, 1058, 399, 2676, 11518, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 406, 62, 87, 796, 4174, 62, 14772, 489, 330, 666, 7, 47629, 11, 279, 1267, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 26367, 796, 374, 24120, 14, 26518, 7, 279, 11, 406, 62, 87, 1267, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 2124, 58, 47715, 796, 2124, 58, 47715, 1343, 26367, 1635, 279, 58, 47715, 220, 1303, 44855, 11682, 779, 2124, 58, 47715, 284, 2700, 2124, 284, 307, 18984, 11, 407, 20717, 198, 220, 220, 220, 374, 58, 47715, 796, 374, 58, 47715, 532, 26367, 1635, 406, 62, 87, 58, 47715, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 44608, 3605, 796, 16605, 7, 374, 11, 374, 1267, 198, 220, 220, 220, 1303, 1619, 83, 945, 796, 374, 24120, 532, 44608, 3605, 198, 220, 220, 220, 611, 905, 33723, 198, 220, 220, 220, 220, 220, 2488, 37435, 7203, 4, 23, 67, 4064, 1238, 13, 940, 69, 59, 77, 1600, 11629, 11, 19862, 17034, 7, 3808, 3605, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 611, 19862, 17034, 7, 3808, 3605, 8, 1279, 309, 3535, 198, 220, 220, 220, 220, 220, 611, 3063, 19662, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 37435, 7203, 2, 3103, 332, 12745, 8793, 287, 300, 1040, 6442, 62, 66, 70, 25, 4064, 23, 67, 34820, 13, 59, 77, 1600, 11629, 8, 198, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 279, 796, 374, 1343, 357, 3808, 3605, 14, 81, 24120, 8, 1635, 279, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 374, 24120, 796, 44608, 3605, 198, 220, 886, 198, 220, 1303, 198, 220, 1441, 2124, 198, 220, 1303, 198, 437, 198 ]
1.871237
598
using LowRankModels # test losses in losses.jl srand(1); losses = [ QuadLoss(), QuadLoss(10), L1Loss(), L1Loss(5.2), HuberLoss(), HuberLoss(4), HuberLoss(3.1, crossover=3.2), PeriodicLoss(2*pi), PeriodicLoss(2*pi, 4), PoissonLoss(20), PoissonLoss(22,4.1), OrdinalHingeLoss(1,10), OrdinalHingeLoss(2,7,5), LogisticLoss(), LogisticLoss(0.2), WeightedHingeLoss(), WeightedHingeLoss(11), WeightedHingeLoss(1.5, case_weight_ratio=4.3), MultinomialLoss(4), MultinomialLoss(6, .5), # OrdisticLoss(5), MultinomialOrdinalLoss(3) ] #tests what should be successful constructions # TODO: do some bad constructions and test that they fail with catches bad_losses = [ :(QuadLoss(10,RealDomain)), :(HuberLoss(3.1, 3.2)), :(PeriodicLoss(scale=2*pi)), :(PeriodicLoss(2*pi, scale=4)), :(PeriodicLoss()) ] for expression in bad_losses try eval(expression); println("test FAILED for $expression") catch println("test PASSED for $expression (failed to construct)") end end m,n,k = 1000, length(losses), 5; d = embedding_dim(losses) X_real, Y_real = 2*randn(m,k), 2*randn(k,d); XY_real = X_real*Y_real; # tests default imputations and implicit domains # we can visually inspect the differences between A and A_real to make sure imputation is right A = impute(losses, XY_real) regscale = 1 yregs = Array(Regularizer, length(losses)) for i=1:length(losses) if typeof(losses[i]) == MultinomialOrdinalLoss || typeof(losses[i]) == OrdisticLoss yregs[i] = OrdinalReg(QuadReg(regscale)) else yregs[i] = QuadReg(regscale) end end # tests all the M-estimators with scale=false, offset=false glrm = GLRM(A, losses, QuadReg(regscale), yregs, 5, scale=false, offset=false); # interestingly adding an offset to a model with multidimensional ordinal data causes a segfault # but let's test the offset for everything but ordinals # oops we still get a segfault... # tamecols = [typeof(losses[i]) !== MultinomialOrdinalLoss && # typeof(losses[i]) !== OrdisticLoss # for i=1:length(losses)] # glrm = GLRM(A[:, tamecols], # losses[tamecols], # QuadReg(regscale), # yregs[tamecols], # 5, scale=false, offset=true) # tests eval and grad @time X,Y,ch = fit!(glrm); # tests initialization init_svd!(glrm)
[ 3500, 7754, 27520, 5841, 1424, 198, 198, 2, 1332, 9089, 287, 9089, 13, 20362, 198, 82, 25192, 7, 16, 1776, 198, 198, 22462, 274, 796, 685, 198, 4507, 324, 43, 793, 22784, 198, 4507, 324, 43, 793, 7, 940, 828, 198, 43, 16, 43, 793, 22784, 198, 43, 16, 43, 793, 7, 20, 13, 17, 828, 220, 220, 198, 39, 18478, 43, 793, 22784, 220, 198, 39, 18478, 43, 793, 7, 19, 828, 198, 39, 18478, 43, 793, 7, 18, 13, 16, 11, 27668, 28, 18, 13, 17, 828, 198, 5990, 2101, 291, 43, 793, 7, 17, 9, 14415, 828, 220, 198, 5990, 2101, 291, 43, 793, 7, 17, 9, 14415, 11, 604, 828, 198, 18833, 30927, 43, 793, 7, 1238, 828, 198, 18833, 30927, 43, 793, 7, 1828, 11, 19, 13, 16, 828, 198, 35422, 1292, 39, 11912, 43, 793, 7, 16, 11, 940, 828, 220, 198, 35422, 1292, 39, 11912, 43, 793, 7, 17, 11, 22, 11, 20, 828, 198, 11187, 2569, 43, 793, 22784, 198, 11187, 2569, 43, 793, 7, 15, 13, 17, 828, 198, 25844, 276, 39, 11912, 43, 793, 22784, 198, 25844, 276, 39, 11912, 43, 793, 7, 1157, 828, 198, 25844, 276, 39, 11912, 43, 793, 7, 16, 13, 20, 11, 1339, 62, 6551, 62, 10366, 952, 28, 19, 13, 18, 828, 198, 15205, 259, 49070, 43, 793, 7, 19, 828, 198, 15205, 259, 49070, 43, 793, 7, 21, 11, 764, 20, 828, 198, 2, 14230, 2569, 43, 793, 7, 20, 828, 198, 15205, 259, 49070, 35422, 1292, 43, 793, 7, 18, 8, 198, 60, 1303, 41989, 644, 815, 307, 4388, 5678, 507, 198, 198, 2, 16926, 46, 25, 466, 617, 2089, 5678, 507, 290, 1332, 326, 484, 2038, 351, 17591, 198, 14774, 62, 22462, 274, 796, 685, 198, 37498, 4507, 324, 43, 793, 7, 940, 11, 15633, 43961, 36911, 198, 37498, 39, 18478, 43, 793, 7, 18, 13, 16, 11, 513, 13, 17, 36911, 198, 37498, 5990, 2101, 291, 43, 793, 7, 9888, 28, 17, 9, 14415, 36911, 220, 198, 37498, 5990, 2101, 291, 43, 793, 7, 17, 9, 14415, 11, 5046, 28, 19, 36911, 198, 37498, 5990, 2101, 291, 43, 793, 28955, 198, 60, 198, 1640, 5408, 287, 2089, 62, 22462, 274, 198, 197, 28311, 220, 198, 197, 197, 18206, 7, 38011, 1776, 198, 197, 197, 35235, 7203, 9288, 9677, 4146, 1961, 329, 720, 38011, 4943, 198, 197, 40198, 198, 197, 197, 35235, 7203, 9288, 41752, 1961, 329, 720, 38011, 357, 47904, 284, 5678, 8, 4943, 198, 197, 437, 198, 437, 198, 198, 76, 11, 77, 11, 74, 796, 8576, 11, 4129, 7, 22462, 274, 828, 642, 26, 198, 67, 796, 11525, 12083, 62, 27740, 7, 22462, 274, 8, 198, 55, 62, 5305, 11, 575, 62, 5305, 796, 362, 9, 25192, 77, 7, 76, 11, 74, 828, 362, 9, 25192, 77, 7, 74, 11, 67, 1776, 198, 34278, 62, 5305, 796, 1395, 62, 5305, 9, 56, 62, 5305, 26, 198, 198, 2, 5254, 4277, 848, 32855, 290, 16992, 18209, 198, 2, 356, 460, 22632, 10104, 262, 5400, 1022, 317, 290, 317, 62, 5305, 284, 787, 1654, 848, 7094, 318, 826, 198, 32, 796, 848, 1133, 7, 22462, 274, 11, 41420, 62, 5305, 8, 220, 198, 198, 2301, 9888, 796, 352, 198, 88, 2301, 82, 796, 15690, 7, 40164, 7509, 11, 4129, 7, 22462, 274, 4008, 198, 1640, 1312, 28, 16, 25, 13664, 7, 22462, 274, 8, 198, 197, 361, 2099, 1659, 7, 22462, 274, 58, 72, 12962, 6624, 7854, 259, 49070, 35422, 1292, 43, 793, 8614, 220, 198, 197, 197, 4906, 1659, 7, 22462, 274, 58, 72, 12962, 6624, 14230, 2569, 43, 793, 198, 197, 197, 88, 2301, 82, 58, 72, 60, 796, 14230, 1292, 8081, 7, 4507, 324, 8081, 7, 2301, 9888, 4008, 198, 197, 17772, 198, 197, 197, 88, 2301, 82, 58, 72, 60, 796, 20648, 8081, 7, 2301, 9888, 8, 198, 197, 437, 198, 437, 198, 198, 2, 5254, 477, 262, 337, 12, 395, 320, 2024, 351, 5046, 28, 9562, 11, 11677, 28, 9562, 198, 4743, 26224, 796, 10188, 29138, 7, 32, 11, 9089, 11, 20648, 8081, 7, 2301, 9888, 828, 331, 2301, 82, 11, 642, 11, 5046, 28, 9562, 11, 11677, 28, 9562, 1776, 198, 198, 2, 50226, 4375, 281, 11677, 284, 257, 2746, 351, 1963, 312, 16198, 2760, 1292, 1366, 5640, 257, 384, 70, 69, 1721, 198, 2, 475, 1309, 338, 1332, 262, 11677, 329, 2279, 475, 2760, 6897, 198, 2, 267, 2840, 356, 991, 651, 257, 384, 70, 69, 1721, 986, 198, 2, 37812, 4033, 82, 796, 685, 4906, 1659, 7, 22462, 274, 58, 72, 12962, 5145, 855, 7854, 259, 49070, 35422, 1292, 43, 793, 11405, 198, 2, 220, 197, 197, 197, 4906, 1659, 7, 22462, 274, 58, 72, 12962, 5145, 855, 14230, 2569, 43, 793, 198, 2, 220, 197, 197, 197, 1640, 1312, 28, 16, 25, 13664, 7, 22462, 274, 15437, 198, 2, 1278, 26224, 796, 10188, 29138, 7, 32, 58, 45299, 37812, 4033, 82, 4357, 220, 198, 2, 220, 197, 22462, 274, 58, 83, 480, 4033, 82, 4357, 198, 2, 220, 197, 4507, 324, 8081, 7, 2301, 9888, 828, 220, 198, 2, 220, 197, 88, 2301, 82, 58, 83, 480, 4033, 82, 4357, 198, 2, 220, 197, 20, 11, 5046, 28, 9562, 11, 11677, 28, 7942, 8, 198, 198, 2, 5254, 5418, 290, 3915, 198, 31, 2435, 1395, 11, 56, 11, 354, 796, 4197, 0, 7, 4743, 26224, 1776, 198, 198, 2, 5254, 37588, 198, 15003, 62, 82, 20306, 0, 7, 4743, 26224, 8, 628 ]
2.428101
911
using SerialPorts function _end_of_command(ser) for i in 0:2 write(stdout, 0xff) write(ser, 0xff) end end function _execute_command(ser, cmd) println(cmd) write(ser, cmd) _end_of_command(ser) end function main() ser = SerialPort("COM4", 9600) _execute_command(ser, "page 0") sleep(2) _execute_command(ser, "page 1") sleep(2) _execute_command(ser, "t0.txt=\"Hello\"") close(ser) end main()
[ 3500, 23283, 47, 2096, 198, 198, 8818, 4808, 437, 62, 1659, 62, 21812, 7, 2655, 8, 198, 220, 220, 220, 329, 1312, 287, 657, 25, 17, 198, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 19282, 448, 11, 657, 47596, 8, 198, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 2655, 11, 657, 47596, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 4808, 41049, 62, 21812, 7, 2655, 11, 23991, 8, 198, 220, 220, 220, 44872, 7, 28758, 8, 198, 220, 220, 220, 3551, 7, 2655, 11, 23991, 8, 198, 220, 220, 220, 4808, 437, 62, 1659, 62, 21812, 7, 2655, 8, 198, 437, 198, 198, 8818, 1388, 3419, 198, 220, 220, 220, 1055, 796, 23283, 13924, 7203, 9858, 19, 1600, 860, 8054, 8, 198, 220, 220, 220, 4808, 41049, 62, 21812, 7, 2655, 11, 366, 7700, 657, 4943, 198, 220, 220, 220, 3993, 7, 17, 8, 198, 220, 220, 220, 4808, 41049, 62, 21812, 7, 2655, 11, 366, 7700, 352, 4943, 198, 220, 220, 220, 3993, 7, 17, 8, 198, 220, 220, 220, 4808, 41049, 62, 21812, 7, 2655, 11, 366, 83, 15, 13, 14116, 17553, 15496, 7879, 4943, 198, 220, 220, 220, 1969, 7, 2655, 8, 198, 437, 628, 198, 12417, 3419, 198 ]
2.180952
210
using Distributed using Distributions nb_draws = 100000 function inside_circle(x::Float64, y::Float64) output = 0 if x^2 + y^2 <= 1 output = 1 end return output end function pi_serial(nbPoints::Int64 = 128 * 1000; d=Uniform(-1.0,1.0)) #draw NbPoints from within the square centered in 0 #with side length equal to 2 xDraws = rand(d, nbPoints) yDraws = rand(d, nbPoints) sumInCircle = 0 for (xValue, yValue) in zip(xDraws, yDraws) sumInCircle+=inside_circle(xValue, yValue) end return 4*sumInCircle/nbPoints end pi_approx = pi_serial(nb_draws); println("Approximation for Pi $(pi_approx) with $(nb_draws) random draws") println("True value is $(pi)")
[ 3500, 4307, 6169, 198, 3500, 46567, 507, 198, 198, 46803, 62, 19334, 82, 796, 1802, 830, 198, 198, 8818, 2641, 62, 45597, 7, 87, 3712, 43879, 2414, 11, 331, 3712, 43879, 2414, 8, 198, 220, 220, 220, 5072, 796, 657, 198, 220, 220, 220, 611, 2124, 61, 17, 1343, 331, 61, 17, 19841, 352, 198, 197, 22915, 796, 352, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 5072, 198, 437, 198, 198, 8818, 31028, 62, 46911, 7, 46803, 40710, 3712, 5317, 2414, 796, 13108, 1635, 8576, 26, 288, 28, 3118, 6933, 32590, 16, 13, 15, 11, 16, 13, 15, 4008, 628, 220, 220, 1303, 19334, 399, 65, 40710, 422, 1626, 262, 6616, 19254, 287, 657, 198, 220, 220, 1303, 4480, 1735, 4129, 4961, 284, 362, 198, 220, 220, 2124, 25302, 82, 796, 43720, 7, 67, 11, 299, 65, 40710, 8, 198, 220, 220, 331, 25302, 82, 796, 43720, 7, 67, 11, 299, 65, 40710, 8, 198, 220, 220, 2160, 818, 31560, 293, 796, 657, 628, 220, 220, 329, 357, 87, 11395, 11, 331, 11395, 8, 287, 19974, 7, 87, 25302, 82, 11, 331, 25302, 82, 8, 198, 197, 16345, 818, 31560, 293, 47932, 48787, 62, 45597, 7, 87, 11395, 11, 331, 11395, 8, 198, 220, 220, 886, 628, 220, 220, 1441, 604, 9, 16345, 818, 31560, 293, 14, 46803, 40710, 198, 198, 437, 198, 198, 14415, 62, 1324, 13907, 796, 31028, 62, 46911, 7, 46803, 62, 19334, 82, 1776, 628, 198, 35235, 7203, 4677, 13907, 18991, 329, 13993, 29568, 14415, 62, 1324, 13907, 8, 351, 29568, 46803, 62, 19334, 82, 8, 4738, 14293, 4943, 198, 35235, 7203, 17821, 1988, 318, 29568, 14415, 8, 4943, 628, 198 ]
2.532374
278
#= From "CAV 2020 Tutorial: Probabilistic Programming: A Guide for Verificationists" https://www.youtube.com/watch?v=yz5uUf_03Ik&t=2657s Around @23:30 Summary Statistics parameters mean std naive_se mcse ess rhat ess_per_sec Symbol Float64 Float64 Float64 Float64 Float64 Float64 Float64 pr 0.3290 0.2330 0.0023 0.0036 4184.9815 0.9999 900.7709 p 0.0000 0.0000 0.0000 0.0000 NaN NaN NaN x 14.0153 0.4955 0.0050 0.0062 5962.5178 0.9999 1283.3659 cf ~/webppl/gaussian_mixture_model2.wppl =# using Turing, StatsPlots, DataFrames include("jl_utils.jl") @model function gaussian_mixture_model2(xval=14.5) pr ~ Uniform(0,1) p ~ flip(pr) # x ~ p ? Normal(10.0,1.0) : Normal(14.0,0.5) # x ~ p ? Normal(10.0,1.0) : Normal(14.0,1) # Note: Both these approaches give incorrect solutions # x == 14.5 || begin Turing.@addlogprob! -Inf; return end # true ~ Dirac(x == 14.5) # true ~ Dirac(x == 8.5) # true ~ Dirac(x == 12.5) # This is the way, "observe externally" xval ~ p ? Normal(10.0,1.0) : Normal(14.0,0.5) # Post x_post ~ p ? Normal(10.0,1.0) : Normal(14.0,0.5) end model = gaussian_mixture_model2() # chns = sample(model, Prior(), 10_000) # chns = sample(model, MH(), 100_000) chns = sample(model, PG(5), 10_000) # chns = sample(model, SMC(), 10_000) # chns = sample(model, IS(), 10_000) # chns = sample(model, NUTS(), 10_000) # chns = sample(model, HMC(0.1,5), 10_000) # chns = sample(model, Gibbs(HMC(0.1,5,:pr,:x),PG(5,:p)), 10_000) # chns = sample(model, Gibbs(HMC(0.1,5,:pr,:x),MH(:p)), 10_000) # chns = sample(model, Gibbs(NUTS(1000,0.65,:pr,:x),PG(15,:p)), 10_000) display(chns) # display(plot(chns))
[ 2, 28, 628, 220, 3574, 198, 220, 366, 8141, 53, 12131, 36361, 25, 30873, 14991, 2569, 30297, 25, 317, 10005, 329, 4643, 2649, 1023, 1, 198, 220, 3740, 1378, 2503, 13, 11604, 13, 785, 14, 8340, 30, 85, 28, 45579, 20, 84, 52, 69, 62, 3070, 40, 74, 5, 83, 28, 2075, 3553, 82, 198, 220, 16824, 2488, 1954, 25, 1270, 628, 220, 21293, 14370, 198, 220, 10007, 220, 220, 220, 220, 220, 1612, 220, 220, 220, 220, 220, 220, 14367, 220, 220, 24354, 62, 325, 220, 220, 220, 220, 220, 36650, 325, 220, 220, 220, 220, 220, 220, 220, 220, 3209, 220, 220, 220, 220, 220, 374, 5183, 220, 220, 3209, 62, 525, 62, 2363, 220, 198, 220, 220, 220, 220, 220, 38357, 220, 220, 48436, 2414, 220, 220, 48436, 2414, 220, 220, 220, 48436, 2414, 220, 220, 48436, 2414, 220, 220, 220, 220, 48436, 2414, 220, 220, 48436, 2414, 220, 220, 220, 220, 220, 220, 48436, 2414, 220, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 778, 220, 220, 220, 657, 13, 18, 24369, 220, 220, 220, 657, 13, 1954, 1270, 220, 220, 220, 220, 657, 13, 405, 1954, 220, 220, 220, 657, 13, 405, 2623, 220, 220, 604, 22883, 13, 4089, 1314, 220, 220, 220, 657, 13, 24214, 220, 220, 220, 220, 220, 15897, 13, 22, 31495, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 220, 220, 220, 657, 13, 2388, 220, 220, 220, 657, 13, 2388, 220, 220, 220, 220, 657, 13, 2388, 220, 220, 220, 657, 13, 2388, 220, 220, 220, 220, 220, 220, 220, 220, 11013, 45, 220, 220, 220, 220, 220, 220, 11013, 45, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11013, 45, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 220, 220, 1478, 13, 486, 4310, 220, 220, 220, 657, 13, 2920, 2816, 220, 220, 220, 220, 657, 13, 405, 1120, 220, 220, 220, 657, 13, 405, 5237, 220, 220, 642, 4846, 17, 13, 20, 23188, 220, 220, 220, 657, 13, 24214, 220, 220, 220, 220, 1105, 5999, 13, 2623, 3270, 628, 198, 220, 30218, 47795, 12384, 381, 75, 14, 4908, 31562, 62, 76, 9602, 62, 19849, 17, 13, 86, 381, 75, 198, 198, 46249, 198, 198, 3500, 39141, 11, 20595, 3646, 1747, 11, 6060, 35439, 198, 17256, 7203, 20362, 62, 26791, 13, 20362, 4943, 198, 198, 31, 19849, 2163, 31986, 31562, 62, 76, 9602, 62, 19849, 17, 7, 87, 2100, 28, 1415, 13, 20, 8, 198, 220, 220, 220, 778, 5299, 35712, 7, 15, 11, 16, 8, 198, 220, 220, 220, 279, 5299, 14283, 7, 1050, 8, 628, 220, 220, 220, 1303, 2124, 5299, 279, 5633, 14435, 7, 940, 13, 15, 11, 16, 13, 15, 8, 1058, 14435, 7, 1415, 13, 15, 11, 15, 13, 20, 8, 198, 220, 220, 220, 1303, 2124, 5299, 279, 5633, 14435, 7, 940, 13, 15, 11, 16, 13, 15, 8, 1058, 14435, 7, 1415, 13, 15, 11, 16, 8, 220, 220, 628, 220, 220, 220, 1303, 5740, 25, 5747, 777, 10581, 1577, 11491, 8136, 198, 220, 220, 220, 1303, 2124, 6624, 1478, 13, 20, 8614, 2221, 39141, 13, 31, 2860, 6404, 1676, 65, 0, 532, 18943, 26, 1441, 886, 198, 220, 220, 220, 1303, 2081, 5299, 36202, 330, 7, 87, 6624, 1478, 13, 20, 8, 198, 220, 220, 220, 1303, 2081, 5299, 36202, 330, 7, 87, 6624, 807, 13, 20, 8, 198, 220, 220, 220, 1303, 2081, 5299, 36202, 330, 7, 87, 6624, 1105, 13, 20, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 770, 318, 262, 835, 11, 366, 672, 2655, 303, 45107, 1, 198, 220, 220, 220, 2124, 2100, 5299, 279, 5633, 14435, 7, 940, 13, 15, 11, 16, 13, 15, 8, 1058, 14435, 7, 1415, 13, 15, 11, 15, 13, 20, 8, 628, 220, 220, 220, 1303, 2947, 198, 220, 220, 220, 2124, 62, 7353, 5299, 279, 5633, 14435, 7, 940, 13, 15, 11, 16, 13, 15, 8, 1058, 14435, 7, 1415, 13, 15, 11, 15, 13, 20, 8, 198, 220, 220, 220, 220, 198, 198, 437, 198, 198, 19849, 796, 31986, 31562, 62, 76, 9602, 62, 19849, 17, 3419, 198, 198, 2, 442, 5907, 796, 6291, 7, 19849, 11, 14481, 22784, 838, 62, 830, 8, 198, 2, 442, 5907, 796, 6291, 7, 19849, 11, 20752, 22784, 1802, 62, 830, 8, 198, 1349, 82, 796, 6291, 7, 19849, 11, 23842, 7, 20, 828, 838, 62, 830, 8, 198, 2, 442, 5907, 796, 6291, 7, 19849, 11, 9447, 34, 22784, 838, 62, 830, 8, 198, 2, 442, 5907, 796, 6291, 7, 19849, 11, 3180, 22784, 838, 62, 830, 8, 198, 198, 2, 442, 5907, 796, 6291, 7, 19849, 11, 399, 3843, 50, 22784, 838, 62, 830, 8, 198, 2, 442, 5907, 796, 6291, 7, 19849, 11, 367, 9655, 7, 15, 13, 16, 11, 20, 828, 838, 62, 830, 8, 198, 2, 442, 5907, 796, 6291, 7, 19849, 11, 41071, 7, 39, 9655, 7, 15, 13, 16, 11, 20, 11, 25, 1050, 11, 25, 87, 828, 6968, 7, 20, 11, 25, 79, 36911, 838, 62, 830, 8, 198, 2, 442, 5907, 796, 6291, 7, 19849, 11, 41071, 7, 39, 9655, 7, 15, 13, 16, 11, 20, 11, 25, 1050, 11, 25, 87, 828, 36208, 7, 25, 79, 36911, 838, 62, 830, 8, 198, 2, 442, 5907, 796, 6291, 7, 19849, 11, 41071, 7, 45, 3843, 50, 7, 12825, 11, 15, 13, 2996, 11, 25, 1050, 11, 25, 87, 828, 6968, 7, 1314, 11, 25, 79, 36911, 838, 62, 830, 8, 198, 198, 13812, 7, 1349, 82, 8, 198, 2, 3359, 7, 29487, 7, 1349, 82, 4008, 628 ]
1.992545
939
function main(dataPath) lines = parse(readall(pipeline(`cat $[dataPath]ratings.csv`, `wc -l`))) @time ratings = readdlm(dataPath * "ratings.csv", ',', header=true, dims=(lines, 4)) ratingsHeader = ratings[2] ratings = ratings[1] order = shuffle(collect(1:size(ratings)[1])) ratings = ratings[order, :] trainEnd = Int(floor(size(ratings)[1] * 0.8)) train = ratings[1 : trainEnd, :] crossEnd = Int(floor(size(ratings)[1] * 0.9)) cross = ratings[trainEnd+1 : crossEnd, :] test = ratings[crossEnd+1 : end, :] train = [ratingsHeader; train] cross = [ratingsHeader; cross] test = [ratingsHeader; test] @printf "Finished moving, begin saving\n" writecsv(dataPath * "train.csv", train) writecsv(dataPath * "cross.csv", cross) writecsv(dataPath * "test.csv", test) @printf "Done :)\n" end main("ml-latest-small/fixed/")
[ 8818, 1388, 7, 7890, 15235, 8, 198, 197, 6615, 796, 21136, 7, 961, 439, 7, 79, 541, 4470, 7, 63, 9246, 720, 58, 7890, 15235, 60, 10366, 654, 13, 40664, 47671, 4600, 86, 66, 532, 75, 63, 22305, 198, 197, 31, 2435, 10109, 796, 1100, 25404, 76, 7, 7890, 15235, 1635, 366, 10366, 654, 13, 40664, 1600, 46083, 3256, 13639, 28, 7942, 11, 5391, 82, 16193, 6615, 11, 604, 4008, 198, 197, 10366, 654, 39681, 796, 10109, 58, 17, 60, 198, 197, 10366, 654, 796, 10109, 58, 16, 60, 628, 197, 2875, 796, 36273, 7, 33327, 7, 16, 25, 7857, 7, 10366, 654, 38381, 16, 60, 4008, 198, 197, 10366, 654, 796, 10109, 58, 2875, 11, 1058, 60, 628, 197, 27432, 12915, 796, 2558, 7, 28300, 7, 7857, 7, 10366, 654, 38381, 16, 60, 1635, 657, 13, 23, 4008, 198, 197, 27432, 796, 10109, 58, 16, 1058, 4512, 12915, 11, 1058, 60, 198, 197, 19692, 12915, 796, 2558, 7, 28300, 7, 7857, 7, 10366, 654, 38381, 16, 60, 1635, 657, 13, 24, 4008, 198, 197, 19692, 796, 10109, 58, 27432, 12915, 10, 16, 1058, 3272, 12915, 11, 1058, 60, 198, 197, 9288, 796, 10109, 58, 19692, 12915, 10, 16, 1058, 886, 11, 1058, 60, 628, 197, 27432, 796, 685, 10366, 654, 39681, 26, 4512, 60, 198, 197, 19692, 796, 685, 10366, 654, 39681, 26, 3272, 60, 198, 197, 9288, 796, 685, 10366, 654, 39681, 26, 1332, 60, 628, 197, 31, 37435, 366, 18467, 1348, 3867, 11, 2221, 8914, 59, 77, 1, 628, 197, 13564, 40664, 7, 7890, 15235, 1635, 366, 27432, 13, 40664, 1600, 4512, 8, 198, 197, 13564, 40664, 7, 7890, 15235, 1635, 366, 19692, 13, 40664, 1600, 3272, 8, 198, 197, 13564, 40664, 7, 7890, 15235, 1635, 366, 9288, 13, 40664, 1600, 1332, 8, 628, 197, 31, 37435, 366, 45677, 14373, 59, 77, 1, 198, 437, 198, 198, 12417, 7203, 4029, 12, 42861, 12, 17470, 14, 34021, 14, 4943, 198 ]
2.599379
322
using PyCall function __init__() py""" import os import shutil import re def main(model_path): ''' Convert fitparam/n/*.dat -> out/n/*.npy Parameters ---------- model_path : str Path to your model written in Julia. Usage ----- $ python dat2npy.py $ mv dat2npy/out/ path_to_biomass/ ''' try: import numpy as np except ImportError: print("numpy: Not installed") n_file = [] fitparam_files = os.listdir( os.path.join( model_path, "fitparam", ) ) for file in fitparam_files: if re.match(r"\d", file): n_file.append(int(file)) for nth_paramset in n_file: os.makedirs( os.path.join( model_path, "dat2npy", "out", f"{nth_paramset:d}", ), exist_ok=True, ) nth_fitparam_files = os.listdir( os.path.join( model_path, "fitparam", f"{nth_paramset:d}", ) ) for dat_file in nth_fitparam_files: if os.path.splitext(dat_file)[-1] == ".dat": if "fit" in dat_file: ''' - fit_param%d.dat -> fit_param%d.npy - best_fitness.dat -> best_fitness.npy ''' try: data = np.loadtxt( os.path.join( model_path, "fitparam", f"{nth_paramset:d}", f"{dat_file}", ), dtype="float", ) except ValueError: pass else: ''' - count_num.dat -> count_num.npy - generation.dat -> generation.npy ''' data = np.loadtxt( os.path.join( model_path, "fitparam", f"{nth_paramset:d}", f"{dat_file}", ), dtype="int", ) np.save( os.path.join( model_path, "dat2npy", "out", f"{nth_paramset:d}", dat_file.replace(".dat", ".npy"), ), data, ) if os.path.isfile( os.path.join( model_path, "logs", f"{nth_paramset:d}.log", ) ): shutil.copyfile( os.path.join( model_path, "logs", f"{nth_paramset:d}.log", ), os.path.join( model_path, "dat2npy", "out", f"{nth_paramset:d}", "optimization.log", ), ) """ end param2biomass(model_path::String) = py"main"(model_path)
[ 3500, 9485, 14134, 198, 198, 8818, 11593, 15003, 834, 3419, 198, 220, 220, 220, 12972, 37811, 198, 220, 220, 220, 1330, 28686, 198, 220, 220, 220, 1330, 4423, 346, 198, 220, 220, 220, 1330, 302, 628, 198, 220, 220, 220, 825, 1388, 7, 19849, 62, 6978, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 705, 7061, 38240, 4197, 17143, 14, 77, 15211, 13, 19608, 4613, 503, 14, 77, 15211, 13, 77, 9078, 628, 220, 220, 220, 220, 220, 220, 220, 40117, 198, 220, 220, 220, 220, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 6978, 1058, 965, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10644, 284, 534, 2746, 3194, 287, 22300, 13, 628, 220, 220, 220, 220, 220, 220, 220, 29566, 198, 220, 220, 220, 220, 220, 220, 220, 37404, 198, 220, 220, 220, 220, 220, 220, 220, 720, 21015, 4818, 17, 77, 9078, 13, 9078, 198, 220, 220, 220, 220, 220, 220, 220, 720, 285, 85, 4818, 17, 77, 9078, 14, 448, 14, 3108, 62, 1462, 62, 8482, 296, 562, 14, 628, 220, 220, 220, 220, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1330, 299, 32152, 355, 45941, 198, 220, 220, 220, 220, 220, 220, 220, 2845, 17267, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 77, 32152, 25, 1892, 6589, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 299, 62, 7753, 796, 17635, 198, 220, 220, 220, 220, 220, 220, 220, 4197, 17143, 62, 16624, 796, 28686, 13, 4868, 15908, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 6978, 13, 22179, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 6978, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 11147, 17143, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 329, 2393, 287, 4197, 17143, 62, 16624, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 302, 13, 15699, 7, 81, 1, 59, 67, 1600, 2393, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 62, 7753, 13, 33295, 7, 600, 7, 7753, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 329, 299, 400, 62, 17143, 2617, 287, 299, 62, 7753, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 76, 4335, 17062, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 6978, 13, 22179, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 6978, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 19608, 17, 77, 9078, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 448, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 90, 77, 400, 62, 17143, 2617, 25, 67, 92, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10612, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2152, 62, 482, 28, 17821, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 400, 62, 11147, 17143, 62, 16624, 796, 28686, 13, 4868, 15908, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 6978, 13, 22179, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 6978, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 11147, 17143, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 90, 77, 400, 62, 17143, 2617, 25, 67, 92, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 4818, 62, 7753, 287, 299, 400, 62, 11147, 17143, 62, 16624, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 28686, 13, 6978, 13, 22018, 578, 742, 7, 19608, 62, 7753, 38381, 12, 16, 60, 6624, 27071, 19608, 1298, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 366, 11147, 1, 287, 4818, 62, 7753, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 4197, 62, 17143, 4, 67, 13, 19608, 4613, 4197, 62, 17143, 4, 67, 13, 77, 9078, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 1266, 62, 69, 3659, 13, 19608, 4613, 1266, 62, 69, 3659, 13, 77, 9078, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 45941, 13, 2220, 14116, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 6978, 13, 22179, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 6978, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 11147, 17143, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 90, 77, 400, 62, 17143, 2617, 25, 67, 92, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 90, 19608, 62, 7753, 92, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10612, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 4906, 2625, 22468, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2845, 11052, 12331, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1208, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 954, 62, 22510, 13, 19608, 4613, 954, 62, 22510, 13, 77, 9078, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 5270, 13, 19608, 4613, 5270, 13, 77, 9078, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 45941, 13, 2220, 14116, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 6978, 13, 22179, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 6978, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 11147, 17143, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 90, 77, 400, 62, 17143, 2617, 25, 67, 92, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 90, 19608, 62, 7753, 92, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10612, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 4906, 2625, 600, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 45941, 13, 21928, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 6978, 13, 22179, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 6978, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 19608, 17, 77, 9078, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 448, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 90, 77, 400, 62, 17143, 2617, 25, 67, 92, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4818, 62, 7753, 13, 33491, 7, 1911, 19608, 1600, 27071, 77, 9078, 12340, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10612, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 28686, 13, 6978, 13, 4468, 576, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 6978, 13, 22179, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 6978, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 6404, 82, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 90, 77, 400, 62, 17143, 2617, 25, 67, 27422, 6404, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15179, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4423, 346, 13, 30073, 7753, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 6978, 13, 22179, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 6978, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 6404, 82, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 90, 77, 400, 62, 17143, 2617, 25, 67, 27422, 6404, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10612, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28686, 13, 6978, 13, 22179, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 62, 6978, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 19608, 17, 77, 9078, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 448, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 1, 90, 77, 400, 62, 17143, 2617, 25, 67, 92, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 40085, 1634, 13, 6404, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10612, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 37227, 198, 437, 198, 198, 17143, 17, 8482, 296, 562, 7, 19849, 62, 6978, 3712, 10100, 8, 796, 12972, 1, 12417, 18109, 19849, 62, 6978, 8 ]
1.382191
2,729
using hyporheicBiogeochemistry, DifferentialEquations α = 1.6; τ₋ = 0.01; τ₊ = 1000.0; k = 0.0; V_frac = 1.0 q = qCalc_powerLaw(α, τ₋, τ₊, V_frac) p = (q, α, τ₋, τ₊, k) h(p,t) = [50.0] u0 = [100.0] tspan = (1000.0, 2000.0) f = build_sam_model_dde(E_powerLaw, foc, tspan[1]) j = build_sam_model_dde2(E_powerLaw, foc, tspan[1]) problem = DDEProblem(f, u0, h, tspan, p) problem2 = DDEProblem(j, u0, h, tspan, p) @time sol = solve(problem, MethodOfSteps(RK4())) @time sol2 = solve(problem2, MethodOfSteps(RK4())) using Plots plot(sol) ilt = build_sam_model_lt(E_powerLaw, foc, 1000, 100, 0, p) out = [ilt(t) for t = 800:1200] # ILT method is wierd - may need to tune number of terms and/or use incomplete gamma function in place of quadGK integral
[ 3500, 2537, 1819, 258, 291, 42787, 469, 37074, 11, 20615, 498, 23588, 602, 198, 198, 17394, 796, 352, 13, 21, 26, 46651, 158, 224, 233, 796, 657, 13, 486, 26, 46651, 158, 224, 232, 796, 8576, 13, 15, 26, 479, 796, 657, 13, 15, 26, 569, 62, 31944, 796, 352, 13, 15, 198, 80, 796, 10662, 9771, 66, 62, 6477, 16966, 7, 17394, 11, 46651, 158, 224, 233, 11, 46651, 158, 224, 232, 11, 569, 62, 31944, 8, 198, 79, 796, 357, 80, 11, 26367, 11, 46651, 158, 224, 233, 11, 46651, 158, 224, 232, 11, 479, 8, 198, 198, 71, 7, 79, 11, 83, 8, 796, 685, 1120, 13, 15, 60, 198, 84, 15, 796, 685, 3064, 13, 15, 60, 198, 912, 6839, 796, 357, 12825, 13, 15, 11, 4751, 13, 15, 8, 198, 198, 69, 796, 1382, 62, 37687, 62, 19849, 62, 1860, 68, 7, 36, 62, 6477, 16966, 11, 2133, 11, 256, 12626, 58, 16, 12962, 198, 73, 796, 1382, 62, 37687, 62, 19849, 62, 1860, 68, 17, 7, 36, 62, 6477, 16966, 11, 2133, 11, 256, 12626, 58, 16, 12962, 198, 198, 45573, 796, 360, 7206, 40781, 7, 69, 11, 334, 15, 11, 289, 11, 256, 12626, 11, 279, 8, 198, 45573, 17, 796, 360, 7206, 40781, 7, 73, 11, 334, 15, 11, 289, 11, 256, 12626, 11, 279, 8, 198, 198, 31, 2435, 1540, 796, 8494, 7, 45573, 11, 11789, 5189, 8600, 82, 7, 49, 42, 19, 3419, 4008, 198, 31, 2435, 1540, 17, 796, 8494, 7, 45573, 17, 11, 11789, 5189, 8600, 82, 7, 49, 42, 19, 3419, 4008, 198, 198, 3500, 1345, 1747, 198, 29487, 7, 34453, 8, 198, 198, 2326, 796, 1382, 62, 37687, 62, 19849, 62, 2528, 7, 36, 62, 6477, 16966, 11, 2133, 11, 8576, 11, 1802, 11, 657, 11, 279, 8, 198, 448, 796, 685, 2326, 7, 83, 8, 329, 256, 796, 10460, 25, 27550, 60, 220, 198, 2, 14639, 51, 2446, 318, 266, 959, 67, 532, 743, 761, 284, 14009, 1271, 286, 2846, 290, 14, 273, 779, 17503, 34236, 2163, 287, 1295, 286, 15094, 38, 42, 19287 ]
2.151862
349
using Documenter using AxisIndices using LinearAlgebra using Metadata using Statistics makedocs(; modules=[AxisIndices], format=Documenter.HTML(), pages=[ "index.md", "references.md", ], repo="https://github.com/Tokazama/AxisIndices.jl/blob/{commit}{path}#L{line}", sitename="AxisIndices.jl", authors="Zachary P. Christensen", ) deploydocs( repo = "github.com/Tokazama/AxisIndices.jl.git", )
[ 198, 3500, 16854, 263, 198, 3500, 38349, 5497, 1063, 198, 3500, 44800, 2348, 29230, 198, 3500, 3395, 14706, 198, 3500, 14370, 198, 198, 76, 4335, 420, 82, 7, 26, 198, 220, 220, 220, 13103, 41888, 31554, 271, 5497, 1063, 4357, 198, 220, 220, 220, 5794, 28, 24941, 263, 13, 28656, 22784, 198, 220, 220, 220, 5468, 41888, 198, 220, 220, 220, 220, 220, 220, 220, 366, 9630, 13, 9132, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 5420, 4972, 13, 9132, 1600, 198, 220, 220, 220, 16589, 198, 220, 220, 220, 29924, 2625, 5450, 1378, 12567, 13, 785, 14, 19042, 1031, 1689, 14, 31554, 271, 5497, 1063, 13, 20362, 14, 2436, 672, 14, 90, 41509, 18477, 6978, 92, 2, 43, 90, 1370, 92, 1600, 198, 220, 220, 220, 1650, 12453, 2625, 31554, 271, 5497, 1063, 13, 20362, 1600, 198, 220, 220, 220, 7035, 2625, 57, 620, 560, 350, 13, 49195, 1600, 198, 8, 198, 198, 2934, 1420, 31628, 7, 198, 220, 220, 220, 29924, 796, 366, 12567, 13, 785, 14, 19042, 1031, 1689, 14, 31554, 271, 5497, 1063, 13, 20362, 13, 18300, 1600, 198, 8, 628 ]
2.361702
188
const IntMatrix{w,T} = IntArray{w,T,2} function IntMatrix{w,T}(m::Integer, n::Integer, mmap::Bool=false) where {w,T} return IntArray{w,T}((m, n), mmap) end function IntMatrix{w,T}(mmap::Bool=false) where {w,T} return IntArray{w,T}((0, 0), mmap) end function IntMatrix{w}(matrix::AbstractMatrix{T}) where {w,T} return IntArray{w,T,2}(matrix) end function Base.convert(::Type{IntMatrix{w}}, matrix::AbstractMatrix{T}) where {w,T} return convert(IntArray{w,T,2}, matrix) end
[ 9979, 2558, 46912, 90, 86, 11, 51, 92, 796, 2558, 19182, 90, 86, 11, 51, 11, 17, 92, 198, 198, 8818, 2558, 46912, 90, 86, 11, 51, 92, 7, 76, 3712, 46541, 11, 299, 3712, 46541, 11, 8085, 499, 3712, 33, 970, 28, 9562, 8, 810, 1391, 86, 11, 51, 92, 198, 220, 220, 220, 1441, 2558, 19182, 90, 86, 11, 51, 92, 19510, 76, 11, 299, 828, 8085, 499, 8, 198, 437, 198, 198, 8818, 2558, 46912, 90, 86, 11, 51, 92, 7, 3020, 499, 3712, 33, 970, 28, 9562, 8, 810, 1391, 86, 11, 51, 92, 198, 220, 220, 220, 1441, 2558, 19182, 90, 86, 11, 51, 92, 19510, 15, 11, 657, 828, 8085, 499, 8, 198, 437, 198, 198, 8818, 2558, 46912, 90, 86, 92, 7, 6759, 8609, 3712, 23839, 46912, 90, 51, 30072, 810, 1391, 86, 11, 51, 92, 198, 220, 220, 220, 1441, 2558, 19182, 90, 86, 11, 51, 11, 17, 92, 7, 6759, 8609, 8, 198, 437, 198, 198, 8818, 7308, 13, 1102, 1851, 7, 3712, 6030, 90, 5317, 46912, 90, 86, 92, 5512, 17593, 3712, 23839, 46912, 90, 51, 30072, 810, 1391, 86, 11, 51, 92, 198, 220, 220, 220, 1441, 10385, 7, 5317, 19182, 90, 86, 11, 51, 11, 17, 5512, 17593, 8, 198, 437, 198 ]
2.299065
214
using eFEM, Test
[ 3500, 304, 37, 3620, 11, 6208, 220, 198 ]
2.25
8
@ghdef mutable struct Installation id::Union{Int, Nothing} end namefield(i::Installation) = i.id @api_default function create_access_token(api::GitHubAPI, i::Installation, auth::JWTAuth; headers = Dict(), options...) headers["Accept"] = "application/vnd.github.machine-man-preview+json" payload = gh_post_json(api, "/installations/$(i.id)/access_tokens", auth = auth, headers=headers, options...) OAuth2(payload["token"]) end @api_default function installations(api::GitHubAPI, auth::JWTAuth; headers = Dict(), options...) headers["Accept"] = "application/vnd.github.machine-man-preview+json" results, page_data = gh_get_paged_json(api, "/app/installations", auth = auth, headers=headers, options...) map(Installation, results), page_data end @api_default function repos(api::GitHubAPI, inst::Installation; headers = Dict(), options...) headers["Accept"] = "application/vnd.github.machine-man-preview+json" results, page_data = github_paged_get(api, "/installation/repositories"; headers=headers, options...) mapreduce(x->map(Repo, JSON.parse(HTTP.payload(x, String))["repositories"]), vcat, results; init=Repo[]), page_data end
[ 31, 456, 4299, 4517, 540, 2878, 32588, 198, 220, 220, 220, 4686, 3712, 38176, 90, 5317, 11, 10528, 92, 198, 437, 198, 198, 3672, 3245, 7, 72, 3712, 30838, 8, 796, 1312, 13, 312, 628, 198, 31, 15042, 62, 12286, 2163, 2251, 62, 15526, 62, 30001, 7, 15042, 3712, 38, 270, 16066, 17614, 11, 1312, 3712, 30838, 11, 6284, 3712, 41, 54, 5603, 1071, 26, 24697, 796, 360, 713, 22784, 3689, 23029, 198, 220, 220, 220, 24697, 14692, 38855, 8973, 796, 366, 31438, 14, 85, 358, 13, 12567, 13, 30243, 12, 805, 12, 3866, 1177, 10, 17752, 1, 198, 220, 220, 220, 21437, 796, 24997, 62, 7353, 62, 17752, 7, 15042, 11, 12813, 17350, 602, 32624, 7, 72, 13, 312, 20679, 15526, 62, 83, 482, 641, 1600, 6284, 796, 6284, 11, 198, 220, 220, 220, 220, 220, 220, 220, 24697, 28, 50145, 11, 3689, 23029, 198, 220, 220, 220, 440, 30515, 17, 7, 15577, 2220, 14692, 30001, 8973, 8, 198, 437, 198, 198, 31, 15042, 62, 12286, 2163, 26162, 7, 15042, 3712, 38, 270, 16066, 17614, 11, 6284, 3712, 41, 54, 5603, 1071, 26, 24697, 796, 360, 713, 22784, 3689, 23029, 198, 220, 220, 220, 24697, 14692, 38855, 8973, 796, 366, 31438, 14, 85, 358, 13, 12567, 13, 30243, 12, 805, 12, 3866, 1177, 10, 17752, 1, 198, 220, 220, 220, 2482, 11, 2443, 62, 7890, 796, 24997, 62, 1136, 62, 79, 1886, 62, 17752, 7, 15042, 11, 12813, 1324, 14, 17350, 602, 1600, 6284, 796, 6284, 11, 198, 220, 220, 220, 220, 220, 220, 220, 24697, 28, 50145, 11, 3689, 23029, 198, 220, 220, 220, 3975, 7, 30838, 11, 2482, 828, 2443, 62, 7890, 198, 437, 198, 198, 31, 15042, 62, 12286, 2163, 1128, 418, 7, 15042, 3712, 38, 270, 16066, 17614, 11, 916, 3712, 30838, 26, 24697, 796, 360, 713, 22784, 3689, 23029, 198, 220, 220, 220, 24697, 14692, 38855, 8973, 796, 366, 31438, 14, 85, 358, 13, 12567, 13, 30243, 12, 805, 12, 3866, 1177, 10, 17752, 1, 198, 220, 220, 220, 2482, 11, 2443, 62, 7890, 796, 33084, 62, 79, 1886, 62, 1136, 7, 15042, 11, 12813, 17350, 341, 14, 260, 1930, 270, 1749, 8172, 198, 220, 220, 220, 220, 220, 220, 220, 24697, 28, 50145, 11, 3689, 23029, 198, 220, 220, 220, 3975, 445, 7234, 7, 87, 3784, 8899, 7, 6207, 78, 11, 19449, 13, 29572, 7, 40717, 13, 15577, 2220, 7, 87, 11, 10903, 4008, 14692, 260, 1930, 270, 1749, 8973, 828, 410, 9246, 11, 2482, 26, 2315, 28, 6207, 78, 21737, 828, 2443, 62, 7890, 198, 437, 198 ]
2.818824
425
""" #### function ```get_line_params(xi::Float64, df::DataFrame)``` <br> Description of ```get_line_params``` ----------------------------------------- Returns the parameters a,b of linear approximation y = ax +b. For the segment where the random number ξ falls into. `` """ function get_line_params(xi::Float64, df::DataFrame) row = df[(df.minE .< xi) .& (df.maxE .> xi),:] return (row.a[1], row.b[1]) end """ #### function ```get_line_params(x1::Float64, y1::Float64, x2::Float64, y2::Float64)``` <br> Description of ```get_line_params``` ----------------------------------------- Returns the parameters a,b of linear approximation y = ax +b. `` """ function get_line_params(x1::Float64, y1::Float64, x2::Float64, y2::Float64) a = (y1 - y2) / (x1 - x2) b = y1 - a*x1 return a,b #returns the parameters of line given by y = b + ax end get_line_point(x::Float64,a::Float64,b::Float64) = b + a*x """ #### function ```get_integral_linear(minE::Real, maxE::Real, a::Real, b::Real)``` <br> Description of ```get_integral_linear``` ----------------------------------------- Return the definitive integral of `` \\int_{minE}^{maxE} (a_iE + b_i) dE= \\frac{a_i}{2}(maxE^2 - minE^2) + b(maxE - minE) `` """ function get_integral_linear(minE::Real, maxE::Real, a::Real, b::Real) return 0.5*a * (maxE^2 - minE^2) + b * ( maxE - minE ) end function solvequadratic(a, b, c) d = sqrt(b^2 - 4*a*c) return (-b - d) / (2*a), (-b + d) / (2*a) end function plot_lines(step::Real, df::DataFrame, c::ColorPalette) p::Plots.Plot = plot() cp::Float64 = 1.0 for e1 in 1:step:length(unique(df.E1)) for row in eachrow(df[df.E1 .== unique(df.E1)[e1],:]) xs = row.minE : 1e-3 : row.maxE line2(x) = get_line_point(x, row.a, row.b) plot!(xs, line2.(xs), lw = 2, alpha = 0.3, c = c[ceil(Int,cp)], legend = :false, xlabel = "E2 [MeV]", ylabel ="dGdE", ylims = (minimum(df.minG), 1.1*maximum(df.maxG)), title = "projection of the linear approximations, \n every $step") end if cp < 250.0 cp += step/10.0 end end return p end
[ 37811, 198, 4242, 2163, 7559, 63, 1136, 62, 1370, 62, 37266, 7, 29992, 3712, 43879, 2414, 11, 47764, 3712, 6601, 19778, 8, 15506, 63, 220, 198, 27, 1671, 29, 628, 220, 220, 220, 12489, 286, 7559, 63, 1136, 62, 1370, 62, 37266, 15506, 63, 198, 220, 220, 220, 20368, 45537, 198, 35561, 262, 10007, 257, 11, 65, 286, 14174, 40874, 331, 796, 7877, 1343, 65, 13, 1114, 262, 10618, 810, 262, 4738, 1271, 7377, 122, 8953, 656, 13, 220, 198, 15506, 198, 37811, 198, 8818, 651, 62, 1370, 62, 37266, 7, 29992, 3712, 43879, 2414, 11, 47764, 3712, 6601, 19778, 8, 198, 220, 220, 220, 5752, 796, 47764, 58, 7, 7568, 13, 1084, 36, 764, 27, 2124, 72, 8, 764, 5, 357, 7568, 13, 9806, 36, 764, 29, 2124, 72, 828, 47715, 198, 220, 220, 220, 1441, 357, 808, 13, 64, 58, 16, 4357, 5752, 13, 65, 58, 16, 12962, 198, 437, 628, 198, 37811, 198, 4242, 2163, 7559, 63, 1136, 62, 1370, 62, 37266, 7, 87, 16, 3712, 43879, 2414, 11, 331, 16, 3712, 43879, 2414, 11, 2124, 17, 3712, 43879, 2414, 11, 331, 17, 3712, 43879, 2414, 8, 15506, 63, 220, 198, 27, 1671, 29, 628, 220, 220, 220, 12489, 286, 7559, 63, 1136, 62, 1370, 62, 37266, 15506, 63, 198, 220, 220, 220, 20368, 45537, 198, 35561, 262, 10007, 257, 11, 65, 286, 14174, 40874, 331, 796, 7877, 1343, 65, 13, 220, 198, 15506, 198, 37811, 198, 8818, 651, 62, 1370, 62, 37266, 7, 87, 16, 3712, 43879, 2414, 11, 331, 16, 3712, 43879, 2414, 11, 2124, 17, 3712, 43879, 2414, 11, 331, 17, 3712, 43879, 2414, 8, 220, 198, 220, 220, 220, 257, 796, 357, 88, 16, 532, 331, 17, 8, 1220, 357, 87, 16, 532, 2124, 17, 8, 198, 220, 220, 220, 275, 796, 331, 16, 532, 257, 9, 87, 16, 198, 220, 220, 220, 1441, 257, 11, 65, 1303, 7783, 82, 262, 10007, 286, 1627, 1813, 416, 331, 796, 275, 1343, 7877, 198, 437, 198, 198, 1136, 62, 1370, 62, 4122, 7, 87, 3712, 43879, 2414, 11, 64, 3712, 43879, 2414, 11, 65, 3712, 43879, 2414, 8, 796, 275, 1343, 257, 9, 87, 198, 198, 37811, 198, 4242, 2163, 7559, 63, 1136, 62, 18908, 1373, 62, 29127, 7, 1084, 36, 3712, 15633, 11, 3509, 36, 3712, 15633, 11, 257, 3712, 15633, 11, 275, 3712, 15633, 8, 15506, 63, 220, 198, 27, 1671, 29, 628, 220, 220, 220, 12489, 286, 7559, 63, 1136, 62, 18908, 1373, 62, 29127, 15506, 63, 198, 220, 220, 220, 20368, 45537, 198, 13615, 262, 17347, 19287, 286, 7559, 198, 220, 220, 220, 26867, 600, 23330, 1084, 36, 92, 36796, 9806, 36, 92, 357, 64, 62, 72, 36, 1343, 275, 62, 72, 8, 288, 36, 28, 26867, 31944, 90, 64, 62, 72, 18477, 17, 92, 7, 9806, 36, 61, 17, 532, 949, 36, 61, 17, 8, 1343, 275, 7, 9806, 36, 532, 949, 36, 8, 198, 15506, 198, 37811, 198, 8818, 651, 62, 18908, 1373, 62, 29127, 7, 1084, 36, 3712, 15633, 11, 3509, 36, 3712, 15633, 11, 257, 3712, 15633, 11, 275, 3712, 15633, 8, 220, 220, 220, 220, 198, 220, 220, 220, 1441, 657, 13, 20, 9, 64, 1635, 357, 9806, 36, 61, 17, 532, 949, 36, 61, 17, 8, 1343, 275, 1635, 357, 3509, 36, 532, 949, 36, 1267, 198, 437, 628, 198, 8818, 8494, 421, 41909, 1512, 7, 64, 11, 275, 11, 269, 8, 198, 220, 220, 220, 288, 220, 796, 19862, 17034, 7, 65, 61, 17, 532, 604, 9, 64, 9, 66, 8, 198, 220, 220, 220, 1441, 13841, 65, 532, 288, 8, 1220, 357, 17, 9, 64, 828, 13841, 65, 1343, 288, 8, 1220, 357, 17, 9, 64, 8, 198, 437, 628, 198, 198, 8818, 7110, 62, 6615, 7, 9662, 3712, 15633, 11, 47764, 3712, 6601, 19778, 11, 269, 3712, 10258, 11531, 5857, 8, 198, 220, 220, 220, 279, 3712, 3646, 1747, 13, 43328, 796, 7110, 3419, 198, 220, 220, 220, 31396, 3712, 43879, 2414, 796, 352, 13, 15, 198, 220, 220, 220, 329, 304, 16, 287, 352, 25, 9662, 25, 13664, 7, 34642, 7, 7568, 13, 36, 16, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 329, 5752, 287, 1123, 808, 7, 7568, 58, 7568, 13, 36, 16, 764, 855, 3748, 7, 7568, 13, 36, 16, 38381, 68, 16, 4357, 25, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 82, 796, 5752, 13, 1084, 36, 1058, 352, 68, 12, 18, 1058, 5752, 13, 9806, 36, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1627, 17, 7, 87, 8, 796, 651, 62, 1370, 62, 4122, 7, 87, 11, 5752, 13, 64, 11, 5752, 13, 65, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7110, 0, 7, 34223, 11, 1627, 17, 12195, 34223, 828, 300, 86, 796, 362, 11, 17130, 796, 657, 13, 18, 11, 269, 796, 269, 58, 344, 346, 7, 5317, 11, 13155, 8, 4357, 8177, 796, 1058, 9562, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 18242, 796, 366, 36, 17, 685, 5308, 53, 60, 1600, 331, 18242, 796, 1, 67, 38, 67, 36, 1600, 331, 2475, 82, 796, 357, 39504, 7, 7568, 13, 1084, 38, 828, 352, 13, 16, 9, 47033, 7, 7568, 13, 9806, 38, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3670, 796, 366, 16302, 295, 286, 262, 14174, 5561, 320, 602, 11, 3467, 77, 790, 720, 9662, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 611, 31396, 1279, 8646, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 31396, 15853, 2239, 14, 940, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 279, 198, 437 ]
2.222668
997
module MLStyle export @case, @data, @match, Pattern, Case, Failed, failed, PatternDef, pattern_match, app_pattern_match, (..), enum_next include("utils.jl") include("Err.jl") using MLStyle.Err include("Match.jl") using MLStyle.Match include("ADT.jl") using MLStyle.ADT include("MatchExt.jl") using MLStyle.MatchExt include("Data/Data.jl") using MLStyle.Data end # module
[ 21412, 13981, 774, 293, 198, 198, 39344, 2488, 7442, 11, 2488, 7890, 11, 2488, 15699, 11, 23939, 11, 8913, 11, 22738, 11, 4054, 11, 23939, 7469, 11, 3912, 62, 15699, 11, 598, 62, 33279, 62, 15699, 11, 357, 492, 828, 33829, 62, 19545, 198, 198, 17256, 7203, 26791, 13, 20362, 4943, 198, 198, 17256, 7203, 9139, 81, 13, 20362, 4943, 198, 3500, 13981, 774, 293, 13, 9139, 81, 198, 198, 17256, 7203, 23850, 13, 20362, 4943, 198, 3500, 13981, 774, 293, 13, 23850, 198, 198, 17256, 7203, 2885, 51, 13, 20362, 4943, 198, 3500, 13981, 774, 293, 13, 2885, 51, 198, 198, 17256, 7203, 23850, 11627, 13, 20362, 4943, 198, 3500, 13981, 774, 293, 13, 23850, 11627, 198, 198, 17256, 7203, 6601, 14, 6601, 13, 20362, 4943, 198, 3500, 13981, 774, 293, 13, 6601, 198, 198, 437, 1303, 8265, 198 ]
2.707143
140
using HDF5 using JSON savepath = "SARA/NatCom2020/outer/data/" xrd_file = "Bi2O3_19F44_01_outer_xrd_gradients_input_noise_iSARA.h5" # savefile = "Bi2O3_19F44_01_outer_xrd_gradients_no_input_noise.h5" xrd_f = h5open(savepath * xrd_file, "r") xrd_temperatures = read(xrd_f, "temperatures") xrd_dwelltimes = read(xrd_f, "dwelltimes") xrd_coefficients = read(xrd_f, "coefficients") close(xrd_f) xrd_f = h5open(savepath * "Bi2O3_19F44_01_outer_xrd_data.h5", "r") xrd_positions = read(xrd_f, "positions") close(xrd_f) include("../inner/inner_load_data.jl") path = "/Users/sebastianament/Documents/SEA/XRD Analysis/SARA/Bi2O3_19F44_01/" # path = ".." file = "Bi2O3_19F44_01_inner_loop_data.json" f = JSON.parsefile(path * file) optical_positions, optical_coefficients, rescaling_parameters, optical_temperatures, optical_dwelltimes = load_data(f) using Plots plotly() for i in 1:8 p = 10 match = (T, τ) -> xrd_temperatures[end, i] ≈ T && xrd_dwelltimes[end, i] ≈ τ j = 1 while true if match(optical_temperatures[j]-p, optical_dwelltimes[j]) break end j += 1 end # j = findfirst(match, [optical_temperatures, optical_dwelltimes]) plot(yscale = :log10) # xrd = xrd_coefficients[1, :, i] # opt = optical_coefficients[j][1] # xrd = abs.(diff(xrd)) # opt = abs.(diff(opt)) xrd = sum(abs2, diff(xrd_coefficients[:, :, i], dims = 2), dims = 1) opt = [optical_coefficients[j][k1][k2] for k1 in 1:16, k2 in 1:151] opt = sum(abs2, diff(opt, dims = 2), dims = 1) xrd = vec(xrd) opt = vec(opt) xrd ./= maximum(xrd) opt ./= maximum(opt) xrd_pos = xrd_positions[:, i] opt_pos = optical_positions[j] xrd_pos = xrd_pos[1:end-1] opt_pos = opt_pos[1:end-1] plot!(xrd_pos, xrd, label = "xrd") plot!(opt_pos, opt, label = "opt") gui() end
[ 3500, 5572, 37, 20, 198, 3500, 19449, 198, 21928, 6978, 796, 366, 50, 24401, 14, 47849, 5377, 42334, 14, 39605, 14, 7890, 30487, 198, 87, 4372, 62, 7753, 796, 366, 23286, 17, 46, 18, 62, 1129, 37, 2598, 62, 486, 62, 39605, 62, 87, 4372, 62, 9744, 2334, 62, 15414, 62, 3919, 786, 62, 72, 50, 24401, 13, 71, 20, 1, 198, 198, 2, 3613, 7753, 796, 366, 23286, 17, 46, 18, 62, 1129, 37, 2598, 62, 486, 62, 39605, 62, 87, 4372, 62, 9744, 2334, 62, 3919, 62, 15414, 62, 3919, 786, 13, 71, 20, 1, 198, 87, 4372, 62, 69, 796, 289, 20, 9654, 7, 21928, 6978, 1635, 2124, 4372, 62, 7753, 11, 366, 81, 4943, 198, 87, 4372, 62, 11498, 525, 6691, 796, 1100, 7, 87, 4372, 62, 69, 11, 366, 11498, 525, 6691, 4943, 198, 87, 4372, 62, 67, 4053, 22355, 796, 1100, 7, 87, 4372, 62, 69, 11, 366, 67, 4053, 22355, 4943, 198, 87, 4372, 62, 1073, 41945, 796, 1100, 7, 87, 4372, 62, 69, 11, 366, 1073, 41945, 4943, 198, 19836, 7, 87, 4372, 62, 69, 8, 198, 198, 87, 4372, 62, 69, 796, 289, 20, 9654, 7, 21928, 6978, 1635, 366, 23286, 17, 46, 18, 62, 1129, 37, 2598, 62, 486, 62, 39605, 62, 87, 4372, 62, 7890, 13, 71, 20, 1600, 366, 81, 4943, 198, 87, 4372, 62, 1930, 1756, 796, 1100, 7, 87, 4372, 62, 69, 11, 366, 1930, 1756, 4943, 198, 19836, 7, 87, 4372, 62, 69, 8, 198, 198, 17256, 7203, 40720, 5083, 14, 5083, 62, 2220, 62, 7890, 13, 20362, 4943, 198, 6978, 796, 12813, 14490, 14, 325, 65, 459, 666, 3263, 14, 38354, 14, 46887, 14, 55, 35257, 14691, 14, 50, 24401, 14, 23286, 17, 46, 18, 62, 1129, 37, 2598, 62, 486, 30487, 198, 2, 3108, 796, 366, 492, 1, 198, 7753, 796, 366, 23286, 17, 46, 18, 62, 1129, 37, 2598, 62, 486, 62, 5083, 62, 26268, 62, 7890, 13, 17752, 1, 198, 69, 796, 19449, 13, 29572, 7753, 7, 6978, 1635, 2393, 8, 198, 8738, 605, 62, 1930, 1756, 11, 18480, 62, 1073, 41945, 11, 6811, 4272, 62, 17143, 7307, 11, 18480, 62, 11498, 525, 6691, 11, 18480, 62, 67, 4053, 22355, 796, 3440, 62, 7890, 7, 69, 8, 198, 198, 3500, 1345, 1747, 198, 29487, 306, 3419, 198, 1640, 1312, 287, 352, 25, 23, 198, 220, 220, 220, 279, 796, 838, 198, 220, 220, 220, 2872, 796, 357, 51, 11, 46651, 8, 4613, 2124, 4372, 62, 11498, 525, 6691, 58, 437, 11, 1312, 60, 15139, 230, 309, 11405, 2124, 4372, 62, 67, 4053, 22355, 58, 437, 11, 1312, 60, 15139, 230, 46651, 198, 220, 220, 220, 474, 796, 352, 198, 220, 220, 220, 981, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2872, 7, 8738, 605, 62, 11498, 525, 6691, 58, 73, 45297, 79, 11, 18480, 62, 67, 4053, 22355, 58, 73, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 474, 15853, 352, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 474, 796, 1064, 11085, 7, 15699, 11, 685, 8738, 605, 62, 11498, 525, 6691, 11, 18480, 62, 67, 4053, 22355, 12962, 198, 220, 220, 220, 7110, 7, 28349, 1000, 796, 1058, 6404, 940, 8, 198, 220, 220, 220, 1303, 2124, 4372, 796, 2124, 4372, 62, 1073, 41945, 58, 16, 11, 1058, 11, 1312, 60, 198, 220, 220, 220, 1303, 2172, 796, 18480, 62, 1073, 41945, 58, 73, 7131, 16, 60, 628, 220, 220, 220, 1303, 2124, 4372, 796, 2352, 12195, 26069, 7, 87, 4372, 4008, 198, 220, 220, 220, 1303, 2172, 796, 2352, 12195, 26069, 7, 8738, 4008, 198, 220, 220, 220, 2124, 4372, 796, 2160, 7, 8937, 17, 11, 814, 7, 87, 4372, 62, 1073, 41945, 58, 45299, 1058, 11, 1312, 4357, 5391, 82, 796, 362, 828, 5391, 82, 796, 352, 8, 198, 220, 220, 220, 2172, 796, 685, 8738, 605, 62, 1073, 41945, 58, 73, 7131, 74, 16, 7131, 74, 17, 60, 329, 479, 16, 287, 352, 25, 1433, 11, 479, 17, 287, 352, 25, 24309, 60, 198, 220, 220, 220, 2172, 796, 2160, 7, 8937, 17, 11, 814, 7, 8738, 11, 5391, 82, 796, 362, 828, 5391, 82, 796, 352, 8, 198, 220, 220, 220, 2124, 4372, 796, 43030, 7, 87, 4372, 8, 198, 220, 220, 220, 2172, 796, 43030, 7, 8738, 8, 198, 220, 220, 220, 2124, 4372, 24457, 28, 5415, 7, 87, 4372, 8, 198, 220, 220, 220, 2172, 24457, 28, 5415, 7, 8738, 8, 198, 220, 220, 220, 2124, 4372, 62, 1930, 796, 2124, 4372, 62, 1930, 1756, 58, 45299, 1312, 60, 198, 220, 220, 220, 2172, 62, 1930, 796, 18480, 62, 1930, 1756, 58, 73, 60, 198, 220, 220, 220, 2124, 4372, 62, 1930, 796, 2124, 4372, 62, 1930, 58, 16, 25, 437, 12, 16, 60, 198, 220, 220, 220, 2172, 62, 1930, 796, 2172, 62, 1930, 58, 16, 25, 437, 12, 16, 60, 198, 220, 220, 220, 7110, 0, 7, 87, 4372, 62, 1930, 11, 2124, 4372, 11, 6167, 796, 366, 87, 4372, 4943, 198, 220, 220, 220, 7110, 0, 7, 8738, 62, 1930, 11, 2172, 11, 6167, 796, 366, 8738, 4943, 198, 220, 220, 220, 11774, 3419, 198, 437, 198 ]
2.093785
885
using Test using LinearAlgebraicRepresentation Lar = LinearAlgebraicRepresentation using ViewerGL GL = ViewerGL @testset "GLShader.jl" begin # function GLShader(vertex, fragment) @testset "GLShader" begin @test @test @test @test end # function releaseGpuResources(shader::GLShader) @testset "releaseGpuResources" begin @test @test @test @test end # function createShader(type,source) @testset "createShader" begin @test @test @test @test end # function enableProgram(shader) @testset "enableProgram" begin @test @test @test @test end # function disableProgram(shader) @testset "disableProgram" begin @test @test @test @test end end
[ 3500, 6208, 198, 3500, 44800, 2348, 29230, 291, 40171, 341, 198, 43, 283, 796, 44800, 2348, 29230, 291, 40171, 341, 198, 3500, 3582, 263, 8763, 198, 8763, 796, 3582, 263, 8763, 198, 198, 31, 9288, 2617, 366, 8763, 2484, 5067, 13, 20362, 1, 2221, 628, 220, 220, 1303, 2163, 10188, 2484, 5067, 7, 332, 16886, 11, 24225, 8, 198, 220, 220, 2488, 9288, 2617, 366, 8763, 2484, 5067, 1, 2221, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 886, 628, 220, 220, 1303, 2163, 2650, 38, 19944, 33236, 7, 1477, 5067, 3712, 8763, 2484, 5067, 8, 198, 220, 220, 2488, 9288, 2617, 366, 20979, 38, 19944, 33236, 1, 2221, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 886, 628, 220, 220, 1303, 2163, 2251, 2484, 5067, 7, 4906, 11, 10459, 8, 198, 220, 220, 2488, 9288, 2617, 366, 17953, 2484, 5067, 1, 2221, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 886, 628, 220, 220, 1303, 2163, 7139, 15167, 7, 1477, 5067, 8, 198, 220, 220, 2488, 9288, 2617, 366, 21633, 15167, 1, 2221, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 886, 628, 220, 220, 1303, 2163, 15560, 15167, 7, 1477, 5067, 8, 198, 220, 220, 2488, 9288, 2617, 366, 40223, 15167, 1, 2221, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 220, 220, 220, 2488, 9288, 198, 220, 220, 886, 198, 198, 437, 198 ]
2.27762
353
using SatelliteToolbox """ T = disturbance(sun_vecs, air_density, current_qua) 擾乱によるトルクの計算 # Arguments - `sun_vecs`: 太陽方向ベクトル@SEOF - `air_density`:大気密度 - `sat_velocity`:衛星速度ベクトル@seof - `current_qua`: 現在の姿勢クォータニオン # Returns - `T`: 擾乱によるトルクの合計 """ function disturbance(sun_vecs, air_density, sat_velocity, current_qua) sun_vecs = [0.05350930426409988, -0.8245359539307662, -0.5632736590971152] air_density = 1.8883960963389464e-12 sat_velocity = [norm([2825.0313914335334, -4280.551397611556, -5681.579003761858]), 0., 0.] current_qua = SatelliteToolbox.Quaternion(cos(π/4), sin(π/4), 0, 0) #Ts = sun_pressure(sun_vecs, current_qua) #Ta = air_pressure(air_density, sat_velocity, current_qua) #println(Ts) #println(Ta) T = 0#Ts #+ Ta return T end """ T = sun_pressure(sun_vecs, current_qua, sat_size, cm) 太陽輻射圧の計算 # Arguments - `sun_vecs`: 太陽方向ベクトル@SEOF - `current_qua`: 現在の姿勢クォータニオン - `sat_size` : 衛星の形状(x, y, z)方向長さ[x,y,z][m] - `cm` : 衛星体心から見た重心の位置ベクトル [x,y,z][m] # Returns - `T`: 太陽輻射圧によるトルク """ function sun_pressure(sun_vecs, current_qua, sat_size, cm) Fe = 1353. #太陽定数 [W/m2] c = 299792458 # 光速 [m/s] ρs = 0.6 #鏡面反射割合 ρd = 0.3 #散乱反射割合 ρa = 0.1 #吸収割合 T = [0., 0., 0.] #太陽方向ベクトルのBody座標系変換 sunvecs_scsfqua = current_qua \ sun_vecs * current_qua #println(sunvecs_scsfqua) sunvecs_scsf = [sunvecs_scsfqua.q1, sunvecs_scsfqua.q2, sunvecs_scsfqua.q3] if norm(sunvecs_scsf) == 0 return T else sunvecs_scsf_unit = sunvecs_scsf / norm(sunvecs_scsf) #x面に働く力 if sunvecs_scsf[1] >= 0 n = [1., 0., 0.] r = [sat_size[1]/2, 0., 0.] - cm else n = [-1., 0., 0.] r = [-sat_size[1]/2, 0., 0.] - cm end A = sat_size[2]*sat_size[3] P = Fe/c F = - P*A*dot(n,sunvecs_scsf_unit)* ((ρa+ρd)*sunvecs_scsf_unit + (2*dot(sunvecs_scsf_unit, n)ρs+2/3*ρd)*n) T = T + cross(r,F) # y面に働く力 if sunvecs_scsf[2] >= 0 n = [0., 1., 0.] r = [ 0., sat_size[2]/2, 0.] - cm else n = [0., -1., 0.] r = [0., -sat_size[2]/2, 0.] - cm end A = sat_size[1]*sat_size[3] F = - P*A*dot(n,sunvecs_scsf_unit)* ((ρa+ρd)*sunvecs_scsf_unit + (2*dot(sunvecs_scsf_unit, n)ρs+2/3*ρd)*n) T = T + cross(r,F) # z面に働く力 if sunvecs_scsf[3] >= 0 n = [0., 0., 1.] r = [0., 0., sat_size[3]/2] - cm else n = [0., 0., -1.] r = [0., 0., -sat_size[3]/2] - cm end A = sat_size[1]*sat_size[2] F = - P*A*dot(n,sunvecs_scsf_unit)* ((ρa+ρd)*sunvecs_scsf_unit + (2*dot(sunvecs_scsf_unit, n)ρs+2/3*ρd)*n) T = T + cross(r,F) return T end end """ T = air_pressure(density, current_qua) 空力トルクの計算 # Arguments - `density`: 大気密度 - `vel_seof`:衛星の速度ベクトル@SEOF - `current_qua`: 現在の姿勢クォータニオン - `sat_size` : 衛星の形状(x, y, z)方向長さ[x,y,z][m] - `cm` : 衛星体心から見た重心の位置ベクトル [x,y,z][m] - `Cd` : 抗力係数(宇宙空間では通常2~3) # Returns - `T`: 空力トルク """ function air_pressure(density, vel_seof, current_qua, sat_size, cm, Cd) # 速度ベクトルのBody座標系への変換 vel_scsfqua = current_qua \ vel_seof * current_qua vel_scsf = [vel_scsfqua.q1, vel_scsfqua.q2, vel_scsfqua.q3] T = [0., 0., 0.] #x面に働く力 if vel_scsf[1] >= 0 n = [1., 0., 0.] r = [sat_size[1]/2, 0., 0.] - cm else n = [-1., 0., 0.] r = [-sat_size[1]/2, 0., 0.] - cm end A = sat_size[2]*sat_size[3] F = -1/2 *Cd * density * dot(n, vel_scsf) * vel_scsf * A dT = cross(r, F) T = T + dT # y面に働く力 if vel_scsf[2] >= 0 n = [0., 1., 0.] r = [ 0., sat_size[2]/2, 0.] - cm else n = [0., -1., 0.] r = [0., -sat_size[2]/2, 0.] - cm end A = sat_size[1]*sat_size[3] F = -1/2 *Cd * density * dot(n, vel_scsf) * vel_scsf * A dT = cross(r, F) T = T + dT # z面に働く力 if vel_scsf[3] >= 0 n = [0., 0., 1.] r = [0., 0., sat_size[3]/2] - cm else n = [0., 0., 1.] r = [0., 0., -sat_size[1]/2] - cm end A = sat_size[1]*sat_size[2] F = -1/2 *Cd * density * dot(n, vel_scsf) * vel_scsf * A dT = cross(r, F) T = T + dT return T end ## 以下,修正前の擾乱計算関数 #= """ T = sun_pressure(sun_vecs, current_qua) 太陽輻射圧の計算 # Arguments - `sun_vecs`: 太陽方向ベクトル@SEOF - `current_qua`: 現在の姿勢クォータニオン # Returns - `T`: 太陽輻射圧によるトルク """ function sun_pressure(sun_vecs, current_qua) sat_size = [0.1 , 0.1 , 0.1] #衛星各辺長さ [x,y,z][m] cm = [0.005, 0.005, 0.005] #衛星重心のずれ [x,y,z][m] I = 1353. #太陽定数 [W/m2] c = 299792458 # 光速 [m/s] ρs = 0.6 #鏡面反射割合 ρd = 0.3 #散乱反射割合 ρa = 0.1 #吸収割合 T = [0., 0., 0.] if sun_vecs == [0., 0., 0.] return T else #太陽方向ベクトルのBody座標系変換 sunvecs_scsfqua = current_qua \ sun_vecs * current_qua #println(sunvecs_scsfqua) sunvecs_scsf = [sunvecs_scsfqua.q1, sunvecs_scsfqua.q2, sunvecs_scsfqua.q3] #x面に働く力 if sunvecs_scsf[1] >= 0 n = [1., 0., 0.] cf = [sat_size[1]/2, 0., 0.] else n = [-1., 0., 0.] cf = [-sat_size[1]/2, 0., 0.] end S = -sunvecs_scsf / norm(sunvecs_scsf) A = sat_size[2]*sat_size[3] P = I/c F =P*A*dot(n,S)*((ρa+ρd)*S+(2*ρs+2/3*ρd)*n) r = cf - cm T = T + cross(r,F) # y面に働く力 if sunvecs_scsf[2] >= 0 n = [0., 1., 0.] cf = [ 0., sat_size[2]/2, 0.] else n = [0., -1., 0.] cf = [0., -sat_size[2]/2, 0.] end S = -sunvecs_scsf / norm(sunvecs_scsf) A = sat_size[1]*sat_size[3] P = I/c F = P*A*dot(n,S)*((ρa+ρd)*S+(2*ρs+2/3*ρd)*n) r = cf - cm T = T + cross(r,F) # z面に働く力 if sunvecs_scsf[3] >= 0 n = [0., 0., 1.] cf = [0., 0., sat_size[3]/2] else n = [0., 0., 1.] cf = [0., 0., -sat_size[1]/2] end S = -sunvecs_scsf / norm(sunvecs_scsf) A = sat_size[1]*sat_size[2] P = I/c F = P*A*dot(n,S)*((ρa+ρd)*S+(2*ρs+2/3*ρd)*n) r = cf - cm T = T + cross(r,F) return T end end """ T = air_pressure(density, current_qua) 空力トルクの計算 # Arguments - `density`: 大気密度 - `vel_seof`:衛星の速度ベクトル@SEOF - `current_qua`: 現在の姿勢クォータニオン # Returns - `T`: 空力トルク """ function air_pressure(density, vel_seof, current_qua) sat_size = [0.1 , 0.1 , 0.1] #衛星各辺長さ [x,y,z][m] cm = [0.005, 0.005, 0.005] #衛星重心のずれ [x,y,z][m] Cd = 1.12 #抗力係数(各面を正方形と近似) # 速度ベクトルのBody座標系への変換 vel_scsfqua = current_qua \ vel_seof * current_qua vel_scsf = [vel_scsfqua.q1, vel_scsfqua.q2, vel_scsfqua.q3] T = [0., 0., 0.] #x面に働く力 if vel_scsf[1] >= 0 n = [1., 0., 0.] cf = [sat_size[1]/2, 0., 0.] else n = [-1., 0., 0.] cf = [-sat_size[1]/2, 0., 0.] end A = sat_size[2]*sat_size[3] ξ = norm(cm) v_perp = dot(vel_scsf, -n) / norm(vel_scsf) * norm(vel_scsf) F = 1/2 * density * v_perp^2 * A * Cd * (-n) dT = cross(cf-cm, F) T = T + dT # y面に働く力 if vel_scsf[2] >= 0 n = [0., 1., 0.] cf = [ 0., sat_size[2]/2, 0.] else n = [0., -1., 0.] cf = [0., -sat_size[2]/2, 0.] end A = sat_size[1]*sat_size[3] v_perp = dot(vel_scsf, -n) / norm(vel_scsf) * norm(vel_scsf) F = 1/2 * density * v_perp^2 * A * Cd * (-n) dT = cross(cf-cm, F) T = T + dT # z面に働く力 if vel_scsf[3] >= 0 n = [0., 0., 1.] cf = [0., 0., sat_size[3]/2] else n = [0., 0., 1.] cf = [0., 0., -sat_size[1]/2] end A = sat_size[1]*sat_size[2] v_perp = dot(vel_scsf, -n) / norm(vel_scsf) * norm(vel_scsf) F = 1/2 * density * v_perp^2 * A * Cd * (-n) dT = cross(cf-cm, F) T = T + dT return T end =#
[ 3500, 33530, 25391, 3524, 198, 198, 37811, 198, 51, 796, 30497, 7, 19155, 62, 303, 6359, 11, 1633, 62, 43337, 11, 1459, 62, 39566, 8, 198, 198, 162, 241, 122, 20046, 109, 28618, 1792, 230, 25748, 13298, 9202, 14099, 5641, 164, 101, 230, 163, 106, 245, 198, 198, 2, 20559, 2886, 198, 12, 4600, 19155, 62, 303, 6359, 63, 25, 36469, 103, 165, 50159, 43095, 28938, 239, 35604, 14099, 13298, 9202, 31, 50, 4720, 37, 198, 12, 4600, 958, 62, 43337, 63, 171, 120, 248, 32014, 36365, 245, 43380, 228, 41753, 99, 198, 12, 4600, 49720, 62, 626, 11683, 63, 25, 26193, 249, 23626, 253, 34460, 253, 41753, 99, 35604, 14099, 13298, 9202, 31, 325, 1659, 198, 12, 4600, 14421, 62, 39566, 63, 25, 13328, 237, 122, 28839, 101, 15474, 100, 123, 47947, 95, 14099, 37662, 6312, 23376, 30165, 20513, 6527, 198, 198, 2, 16409, 198, 12, 4600, 51, 63, 25, 10545, 241, 122, 20046, 109, 28618, 1792, 230, 25748, 13298, 9202, 14099, 15474, 238, 42062, 101, 230, 198, 198, 37811, 198, 8818, 30497, 7, 19155, 62, 303, 6359, 11, 1633, 62, 43337, 11, 3332, 62, 626, 11683, 11, 1459, 62, 39566, 8, 198, 220, 220, 220, 4252, 62, 303, 6359, 796, 685, 15, 13, 2713, 14877, 24, 21288, 2075, 1821, 2079, 3459, 11, 532, 15, 13, 23, 22995, 2327, 3865, 2670, 22996, 39380, 11, 532, 15, 13, 3980, 34159, 2623, 3270, 2931, 22, 1157, 4309, 60, 198, 220, 220, 220, 1633, 62, 43337, 796, 352, 13, 28011, 2670, 1899, 4846, 2091, 4531, 44578, 68, 12, 1065, 198, 220, 220, 220, 3332, 62, 626, 11683, 796, 685, 27237, 26933, 2078, 1495, 13, 3070, 20219, 1415, 27326, 31380, 11, 532, 3682, 1795, 13, 2816, 20219, 4304, 1157, 37864, 11, 532, 20, 48564, 13, 3553, 12865, 32128, 1507, 3365, 46570, 657, 1539, 657, 8183, 198, 220, 220, 220, 1459, 62, 39566, 796, 33530, 25391, 3524, 13, 4507, 9205, 295, 7, 6966, 7, 46582, 14, 19, 828, 7813, 7, 46582, 14, 19, 828, 657, 11, 657, 8, 198, 220, 220, 220, 1303, 33758, 796, 4252, 62, 36151, 7, 19155, 62, 303, 6359, 11, 1459, 62, 39566, 8, 198, 220, 220, 220, 1303, 38586, 796, 1633, 62, 36151, 7, 958, 62, 43337, 11, 3332, 62, 626, 11683, 11, 1459, 62, 39566, 8, 198, 220, 220, 220, 1303, 35235, 7, 33758, 8, 198, 220, 220, 220, 1303, 35235, 7, 38586, 8, 198, 220, 220, 220, 309, 796, 657, 2, 33758, 1303, 10, 11940, 198, 220, 220, 220, 1441, 309, 198, 437, 628, 198, 198, 37811, 198, 51, 796, 4252, 62, 36151, 7, 19155, 62, 303, 6359, 11, 1459, 62, 39566, 11, 3332, 62, 7857, 11, 12067, 8, 198, 198, 13783, 103, 165, 50159, 164, 120, 119, 22887, 226, 28839, 100, 5641, 164, 101, 230, 163, 106, 245, 198, 198, 2, 20559, 2886, 198, 12, 4600, 19155, 62, 303, 6359, 63, 25, 36469, 103, 165, 50159, 43095, 28938, 239, 35604, 14099, 13298, 9202, 31, 50, 4720, 37, 198, 12, 4600, 14421, 62, 39566, 63, 25, 13328, 237, 122, 28839, 101, 15474, 100, 123, 47947, 95, 14099, 37662, 6312, 23376, 30165, 20513, 6527, 198, 12, 4600, 49720, 62, 7857, 63, 1058, 5525, 94, 249, 23626, 253, 15474, 121, 95, 163, 232, 114, 171, 120, 230, 87, 11, 331, 11, 1976, 171, 120, 231, 43095, 28938, 239, 165, 243, 115, 43357, 58, 87, 11, 88, 11, 89, 7131, 76, 60, 198, 12, 4600, 11215, 63, 1058, 5525, 94, 249, 23626, 253, 19526, 241, 33232, 225, 27370, 36853, 17358, 233, 25224, 34932, 235, 33232, 225, 5641, 19526, 235, 163, 121, 106, 35604, 14099, 13298, 9202, 220, 220, 685, 87, 11, 88, 11, 89, 7131, 76, 60, 198, 198, 2, 16409, 198, 12, 4600, 51, 63, 25, 36469, 103, 165, 50159, 164, 120, 119, 22887, 226, 28839, 100, 28618, 1792, 230, 25748, 13298, 9202, 14099, 198, 37811, 198, 8818, 4252, 62, 36151, 7, 19155, 62, 303, 6359, 11, 1459, 62, 39566, 11, 3332, 62, 7857, 11, 12067, 8, 198, 220, 220, 220, 5452, 796, 1511, 4310, 13, 1303, 13783, 103, 165, 50159, 22522, 248, 46763, 108, 685, 54, 14, 76, 17, 60, 198, 220, 220, 220, 269, 796, 31011, 3720, 1731, 3365, 1303, 10263, 227, 231, 34460, 253, 685, 76, 14, 82, 60, 198, 220, 220, 220, 18074, 223, 82, 796, 657, 13, 21, 1303, 165, 237, 94, 165, 251, 95, 20998, 235, 22887, 226, 30298, 110, 28938, 230, 198, 220, 220, 220, 18074, 223, 67, 796, 657, 13, 18, 1303, 46763, 96, 20046, 109, 20998, 235, 22887, 226, 30298, 110, 28938, 230, 198, 220, 220, 220, 18074, 223, 64, 796, 657, 13, 16, 1303, 28938, 116, 20998, 236, 30298, 110, 28938, 230, 628, 220, 220, 220, 309, 796, 685, 15, 1539, 657, 1539, 657, 8183, 628, 198, 220, 220, 220, 1303, 13783, 103, 165, 50159, 43095, 28938, 239, 35604, 14099, 13298, 9202, 5641, 25842, 41753, 100, 162, 101, 247, 163, 111, 119, 13783, 231, 162, 237, 249, 198, 220, 220, 220, 4252, 303, 6359, 62, 1416, 28202, 39566, 796, 1459, 62, 39566, 3467, 4252, 62, 303, 6359, 1635, 1459, 62, 39566, 198, 220, 220, 220, 1303, 35235, 7, 19155, 303, 6359, 62, 1416, 28202, 39566, 8, 198, 220, 220, 220, 4252, 303, 6359, 62, 1416, 28202, 796, 685, 19155, 303, 6359, 62, 1416, 28202, 39566, 13, 80, 16, 11, 4252, 303, 6359, 62, 1416, 28202, 39566, 13, 80, 17, 11, 4252, 303, 6359, 62, 1416, 28202, 39566, 13, 80, 18, 60, 198, 220, 220, 220, 611, 2593, 7, 19155, 303, 6359, 62, 1416, 28202, 8, 6624, 657, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 309, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 4252, 303, 6359, 62, 1416, 28202, 62, 20850, 796, 4252, 303, 6359, 62, 1416, 28202, 1220, 2593, 7, 19155, 303, 6359, 62, 1416, 28202, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 87, 165, 251, 95, 28618, 161, 225, 235, 31917, 27950, 249, 198, 220, 220, 220, 220, 220, 220, 220, 611, 4252, 303, 6359, 62, 1416, 28202, 58, 16, 60, 18189, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 16, 1539, 657, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 796, 685, 49720, 62, 7857, 58, 16, 60, 14, 17, 11, 657, 1539, 657, 8183, 532, 12067, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 796, 25915, 16, 1539, 657, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 796, 25915, 49720, 62, 7857, 58, 16, 60, 14, 17, 11, 657, 1539, 657, 8183, 532, 12067, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 317, 796, 3332, 62, 7857, 58, 17, 60, 9, 49720, 62, 7857, 58, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 350, 796, 5452, 14, 66, 628, 220, 220, 220, 220, 220, 220, 220, 376, 796, 532, 350, 9, 32, 9, 26518, 7, 77, 11, 19155, 303, 6359, 62, 1416, 28202, 62, 20850, 27493, 14808, 33643, 64, 10, 33643, 67, 27493, 19155, 303, 6359, 62, 1416, 28202, 62, 20850, 1343, 357, 17, 9, 26518, 7, 19155, 303, 6359, 62, 1416, 28202, 62, 20850, 11, 299, 8, 33643, 82, 10, 17, 14, 18, 9, 33643, 67, 27493, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 309, 796, 309, 1343, 3272, 7, 81, 11, 37, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 331, 165, 251, 95, 28618, 161, 225, 235, 31917, 27950, 249, 198, 220, 220, 220, 220, 220, 220, 220, 611, 4252, 303, 6359, 62, 1416, 28202, 58, 17, 60, 18189, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 352, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 796, 685, 657, 1539, 3332, 62, 7857, 58, 17, 60, 14, 17, 11, 657, 8183, 532, 12067, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 532, 16, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 796, 685, 15, 1539, 532, 49720, 62, 7857, 58, 17, 60, 14, 17, 11, 657, 8183, 532, 12067, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 317, 796, 3332, 62, 7857, 58, 16, 60, 9, 49720, 62, 7857, 58, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 376, 796, 532, 350, 9, 32, 9, 26518, 7, 77, 11, 19155, 303, 6359, 62, 1416, 28202, 62, 20850, 27493, 14808, 33643, 64, 10, 33643, 67, 27493, 19155, 303, 6359, 62, 1416, 28202, 62, 20850, 1343, 357, 17, 9, 26518, 7, 19155, 303, 6359, 62, 1416, 28202, 62, 20850, 11, 299, 8, 33643, 82, 10, 17, 14, 18, 9, 33643, 67, 27493, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 309, 796, 309, 1343, 3272, 7, 81, 11, 37, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1976, 165, 251, 95, 28618, 161, 225, 235, 31917, 27950, 249, 198, 220, 220, 220, 220, 220, 220, 220, 611, 4252, 303, 6359, 62, 1416, 28202, 58, 18, 60, 18189, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 657, 1539, 352, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 796, 685, 15, 1539, 657, 1539, 3332, 62, 7857, 58, 18, 60, 14, 17, 60, 532, 12067, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 657, 1539, 532, 16, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 796, 685, 15, 1539, 657, 1539, 532, 49720, 62, 7857, 58, 18, 60, 14, 17, 60, 532, 12067, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 317, 796, 3332, 62, 7857, 58, 16, 60, 9, 49720, 62, 7857, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 376, 796, 532, 350, 9, 32, 9, 26518, 7, 77, 11, 19155, 303, 6359, 62, 1416, 28202, 62, 20850, 27493, 14808, 33643, 64, 10, 33643, 67, 27493, 19155, 303, 6359, 62, 1416, 28202, 62, 20850, 1343, 357, 17, 9, 26518, 7, 19155, 303, 6359, 62, 1416, 28202, 62, 20850, 11, 299, 8, 33643, 82, 10, 17, 14, 18, 9, 33643, 67, 27493, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 309, 796, 309, 1343, 3272, 7, 81, 11, 37, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 309, 198, 220, 220, 220, 886, 198, 437, 628, 628, 198, 37811, 198, 51, 796, 1633, 62, 36151, 7, 43337, 11, 1459, 62, 39566, 8, 198, 198, 163, 102, 118, 27950, 249, 13298, 9202, 14099, 5641, 164, 101, 230, 163, 106, 245, 198, 198, 2, 20559, 2886, 198, 12, 4600, 43337, 63, 25, 36469, 100, 36365, 245, 43380, 228, 41753, 99, 198, 12, 4600, 626, 62, 325, 1659, 63, 171, 120, 248, 26193, 249, 23626, 253, 33426, 222, 253, 41753, 99, 35604, 14099, 13298, 9202, 171, 120, 254, 50, 4720, 37, 198, 12, 4600, 14421, 62, 39566, 63, 25, 13328, 237, 122, 28839, 101, 15474, 100, 123, 47947, 95, 14099, 37662, 6312, 23376, 30165, 20513, 6527, 198, 12, 4600, 49720, 62, 7857, 63, 1058, 5525, 94, 249, 23626, 253, 15474, 121, 95, 163, 232, 114, 171, 120, 230, 87, 11, 331, 11, 1976, 171, 120, 231, 43095, 28938, 239, 165, 243, 115, 43357, 58, 87, 11, 88, 11, 89, 7131, 76, 60, 198, 12, 4600, 11215, 63, 1058, 5525, 94, 249, 23626, 253, 19526, 241, 33232, 225, 27370, 36853, 17358, 233, 25224, 34932, 235, 33232, 225, 5641, 19526, 235, 163, 121, 106, 35604, 14099, 13298, 9202, 220, 220, 685, 87, 11, 88, 11, 89, 7131, 76, 60, 198, 12, 4600, 34, 67, 63, 1058, 10545, 232, 245, 27950, 249, 46479, 224, 46763, 108, 171, 120, 230, 22522, 229, 22522, 247, 163, 102, 118, 38461, 241, 30640, 31676, 34460, 248, 30585, 116, 17, 93, 18, 171, 120, 231, 198, 198, 2, 16409, 198, 12, 4600, 51, 63, 25, 13328, 102, 118, 27950, 249, 13298, 9202, 14099, 198, 37811, 198, 8818, 1633, 62, 36151, 7, 43337, 11, 11555, 62, 325, 1659, 11, 1459, 62, 39566, 11, 3332, 62, 7857, 11, 12067, 11, 327, 67, 8, 198, 220, 220, 220, 1303, 16268, 222, 253, 41753, 99, 35604, 14099, 13298, 9202, 5641, 25842, 41753, 100, 162, 101, 247, 163, 111, 119, 2515, 116, 5641, 13783, 231, 162, 237, 249, 198, 220, 220, 220, 11555, 62, 1416, 28202, 39566, 796, 1459, 62, 39566, 3467, 11555, 62, 325, 1659, 1635, 1459, 62, 39566, 198, 220, 220, 220, 11555, 62, 1416, 28202, 796, 685, 626, 62, 1416, 28202, 39566, 13, 80, 16, 11, 11555, 62, 1416, 28202, 39566, 13, 80, 17, 11, 11555, 62, 1416, 28202, 39566, 13, 80, 18, 60, 628, 198, 220, 220, 220, 309, 796, 685, 15, 1539, 657, 1539, 657, 8183, 628, 220, 220, 220, 1303, 87, 165, 251, 95, 28618, 161, 225, 235, 31917, 27950, 249, 198, 220, 220, 220, 611, 11555, 62, 1416, 28202, 58, 16, 60, 18189, 657, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 16, 1539, 657, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 685, 49720, 62, 7857, 58, 16, 60, 14, 17, 11, 657, 1539, 657, 8183, 532, 12067, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 25915, 16, 1539, 657, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 25915, 49720, 62, 7857, 58, 16, 60, 14, 17, 11, 657, 1539, 657, 8183, 532, 12067, 198, 220, 220, 220, 886, 198, 220, 220, 220, 317, 796, 3332, 62, 7857, 58, 17, 60, 9, 49720, 62, 7857, 58, 18, 60, 198, 220, 220, 220, 220, 628, 220, 220, 220, 376, 796, 532, 16, 14, 17, 1635, 34, 67, 1635, 12109, 1635, 16605, 7, 77, 11, 11555, 62, 1416, 28202, 8, 1635, 11555, 62, 1416, 28202, 1635, 317, 198, 220, 220, 220, 288, 51, 796, 3272, 7, 81, 11, 376, 8, 198, 220, 220, 220, 309, 796, 309, 1343, 288, 51, 628, 220, 220, 220, 1303, 331, 165, 251, 95, 28618, 161, 225, 235, 31917, 27950, 249, 198, 220, 220, 220, 611, 11555, 62, 1416, 28202, 58, 17, 60, 18189, 657, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 352, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 685, 657, 1539, 3332, 62, 7857, 58, 17, 60, 14, 17, 11, 657, 8183, 532, 12067, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 532, 16, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 685, 15, 1539, 532, 49720, 62, 7857, 58, 17, 60, 14, 17, 11, 657, 8183, 532, 12067, 198, 220, 220, 220, 886, 198, 220, 220, 220, 317, 796, 3332, 62, 7857, 58, 16, 60, 9, 49720, 62, 7857, 58, 18, 60, 628, 220, 220, 220, 376, 796, 532, 16, 14, 17, 1635, 34, 67, 1635, 12109, 1635, 16605, 7, 77, 11, 11555, 62, 1416, 28202, 8, 1635, 11555, 62, 1416, 28202, 1635, 317, 198, 220, 220, 220, 288, 51, 796, 3272, 7, 81, 11, 376, 8, 198, 220, 220, 220, 309, 796, 309, 1343, 288, 51, 628, 220, 220, 220, 1303, 1976, 165, 251, 95, 28618, 161, 225, 235, 31917, 27950, 249, 198, 220, 220, 220, 611, 11555, 62, 1416, 28202, 58, 18, 60, 18189, 657, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 657, 1539, 352, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 685, 15, 1539, 657, 1539, 3332, 62, 7857, 58, 18, 60, 14, 17, 60, 532, 12067, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 657, 1539, 352, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 685, 15, 1539, 657, 1539, 532, 49720, 62, 7857, 58, 16, 60, 14, 17, 60, 532, 12067, 198, 220, 220, 220, 886, 198, 220, 220, 220, 317, 796, 3332, 62, 7857, 58, 16, 60, 9, 49720, 62, 7857, 58, 17, 60, 198, 220, 220, 220, 220, 198, 220, 220, 220, 376, 796, 532, 16, 14, 17, 1635, 34, 67, 1635, 12109, 1635, 16605, 7, 77, 11, 11555, 62, 1416, 28202, 8, 1635, 11555, 62, 1416, 28202, 1635, 317, 198, 220, 220, 220, 288, 51, 796, 3272, 7, 81, 11, 376, 8, 198, 220, 220, 220, 309, 796, 309, 1343, 288, 51, 628, 198, 220, 220, 220, 1441, 309, 198, 220, 220, 220, 220, 198, 437, 198, 198, 2235, 220, 20015, 98, 10310, 233, 171, 120, 234, 46479, 106, 29826, 96, 30298, 235, 27032, 241, 122, 20046, 109, 164, 101, 230, 163, 106, 245, 38461, 95, 46763, 108, 198, 2, 28, 198, 37811, 198, 51, 796, 4252, 62, 36151, 7, 19155, 62, 303, 6359, 11, 1459, 62, 39566, 8, 198, 198, 13783, 103, 165, 50159, 164, 120, 119, 22887, 226, 28839, 100, 5641, 164, 101, 230, 163, 106, 245, 198, 198, 2, 20559, 2886, 198, 12, 4600, 19155, 62, 303, 6359, 63, 25, 36469, 103, 165, 50159, 43095, 28938, 239, 35604, 14099, 13298, 9202, 31, 50, 4720, 37, 198, 12, 4600, 14421, 62, 39566, 63, 25, 13328, 237, 122, 28839, 101, 15474, 100, 123, 47947, 95, 14099, 37662, 6312, 23376, 30165, 20513, 6527, 198, 198, 2, 16409, 198, 12, 4600, 51, 63, 25, 36469, 103, 165, 50159, 164, 120, 119, 22887, 226, 28839, 100, 28618, 1792, 230, 25748, 13298, 9202, 14099, 198, 37811, 198, 8818, 4252, 62, 36151, 7, 19155, 62, 303, 6359, 11, 1459, 62, 39566, 8, 198, 220, 220, 220, 3332, 62, 7857, 796, 685, 15, 13, 16, 837, 657, 13, 16, 837, 657, 13, 16, 60, 1303, 26193, 249, 23626, 253, 28938, 226, 164, 122, 118, 165, 243, 115, 43357, 685, 87, 11, 88, 11, 89, 7131, 76, 60, 198, 220, 220, 220, 12067, 796, 685, 15, 13, 22544, 11, 657, 13, 22544, 11, 657, 13, 22544, 60, 1303, 26193, 249, 23626, 253, 34932, 235, 33232, 225, 5641, 2515, 248, 39258, 685, 87, 11, 88, 11, 89, 7131, 76, 60, 198, 220, 220, 220, 314, 796, 1511, 4310, 13, 1303, 13783, 103, 165, 50159, 22522, 248, 46763, 108, 685, 54, 14, 76, 17, 60, 198, 220, 220, 220, 269, 796, 31011, 3720, 1731, 3365, 1303, 10263, 227, 231, 34460, 253, 685, 76, 14, 82, 60, 198, 220, 220, 220, 18074, 223, 82, 796, 657, 13, 21, 1303, 165, 237, 94, 165, 251, 95, 20998, 235, 22887, 226, 30298, 110, 28938, 230, 198, 220, 220, 220, 18074, 223, 67, 796, 657, 13, 18, 1303, 46763, 96, 20046, 109, 20998, 235, 22887, 226, 30298, 110, 28938, 230, 198, 220, 220, 220, 18074, 223, 64, 796, 657, 13, 16, 1303, 28938, 116, 20998, 236, 30298, 110, 28938, 230, 198, 220, 220, 220, 309, 796, 685, 15, 1539, 657, 1539, 657, 8183, 628, 220, 220, 220, 611, 4252, 62, 303, 6359, 6624, 685, 15, 1539, 657, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 309, 198, 220, 220, 220, 2073, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 13783, 103, 165, 50159, 43095, 28938, 239, 35604, 14099, 13298, 9202, 5641, 25842, 41753, 100, 162, 101, 247, 163, 111, 119, 13783, 231, 162, 237, 249, 198, 220, 220, 220, 220, 220, 220, 220, 4252, 303, 6359, 62, 1416, 28202, 39566, 796, 1459, 62, 39566, 3467, 4252, 62, 303, 6359, 1635, 1459, 62, 39566, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 35235, 7, 19155, 303, 6359, 62, 1416, 28202, 39566, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4252, 303, 6359, 62, 1416, 28202, 796, 685, 19155, 303, 6359, 62, 1416, 28202, 39566, 13, 80, 16, 11, 4252, 303, 6359, 62, 1416, 28202, 39566, 13, 80, 17, 11, 4252, 303, 6359, 62, 1416, 28202, 39566, 13, 80, 18, 60, 628, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 87, 165, 251, 95, 28618, 161, 225, 235, 31917, 27950, 249, 198, 220, 220, 220, 220, 220, 220, 220, 611, 4252, 303, 6359, 62, 1416, 28202, 58, 16, 60, 18189, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 16, 1539, 657, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30218, 796, 685, 49720, 62, 7857, 58, 16, 60, 14, 17, 11, 657, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 796, 25915, 16, 1539, 657, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30218, 796, 25915, 49720, 62, 7857, 58, 16, 60, 14, 17, 11, 657, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 311, 796, 532, 19155, 303, 6359, 62, 1416, 28202, 1220, 2593, 7, 19155, 303, 6359, 62, 1416, 28202, 8, 198, 220, 220, 220, 220, 220, 220, 220, 317, 796, 3332, 62, 7857, 58, 17, 60, 9, 49720, 62, 7857, 58, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 350, 796, 314, 14, 66, 628, 220, 220, 220, 220, 220, 220, 220, 376, 796, 47, 9, 32, 9, 26518, 7, 77, 11, 50, 27493, 19510, 33643, 64, 10, 33643, 67, 27493, 50, 33747, 17, 9, 33643, 82, 10, 17, 14, 18, 9, 33643, 67, 27493, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 30218, 532, 12067, 628, 220, 220, 220, 220, 220, 220, 220, 309, 796, 309, 1343, 3272, 7, 81, 11, 37, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 331, 165, 251, 95, 28618, 161, 225, 235, 31917, 27950, 249, 198, 220, 220, 220, 220, 220, 220, 220, 611, 4252, 303, 6359, 62, 1416, 28202, 58, 17, 60, 18189, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 352, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30218, 796, 685, 657, 1539, 3332, 62, 7857, 58, 17, 60, 14, 17, 11, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 532, 16, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30218, 796, 685, 15, 1539, 532, 49720, 62, 7857, 58, 17, 60, 14, 17, 11, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 311, 796, 532, 19155, 303, 6359, 62, 1416, 28202, 1220, 2593, 7, 19155, 303, 6359, 62, 1416, 28202, 8, 198, 220, 220, 220, 220, 220, 220, 220, 317, 796, 3332, 62, 7857, 58, 16, 60, 9, 49720, 62, 7857, 58, 18, 60, 198, 220, 220, 220, 220, 220, 220, 220, 350, 796, 314, 14, 66, 628, 220, 220, 220, 220, 220, 220, 220, 376, 796, 350, 9, 32, 9, 26518, 7, 77, 11, 50, 27493, 19510, 33643, 64, 10, 33643, 67, 27493, 50, 33747, 17, 9, 33643, 82, 10, 17, 14, 18, 9, 33643, 67, 27493, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 30218, 532, 12067, 628, 220, 220, 220, 220, 220, 220, 220, 309, 796, 309, 1343, 3272, 7, 81, 11, 37, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1976, 165, 251, 95, 28618, 161, 225, 235, 31917, 27950, 249, 198, 220, 220, 220, 220, 220, 220, 220, 611, 4252, 303, 6359, 62, 1416, 28202, 58, 18, 60, 18189, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 657, 1539, 352, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30218, 796, 685, 15, 1539, 657, 1539, 3332, 62, 7857, 58, 18, 60, 14, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 657, 1539, 352, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30218, 796, 685, 15, 1539, 657, 1539, 532, 49720, 62, 7857, 58, 16, 60, 14, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 311, 796, 532, 19155, 303, 6359, 62, 1416, 28202, 1220, 2593, 7, 19155, 303, 6359, 62, 1416, 28202, 8, 198, 220, 220, 220, 220, 220, 220, 220, 317, 796, 3332, 62, 7857, 58, 16, 60, 9, 49720, 62, 7857, 58, 17, 60, 198, 220, 220, 220, 220, 220, 220, 220, 350, 796, 314, 14, 66, 628, 220, 220, 220, 220, 220, 220, 220, 376, 796, 350, 9, 32, 9, 26518, 7, 77, 11, 50, 27493, 19510, 33643, 64, 10, 33643, 67, 27493, 50, 33747, 17, 9, 33643, 82, 10, 17, 14, 18, 9, 33643, 67, 27493, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 374, 796, 30218, 532, 12067, 628, 220, 220, 220, 220, 220, 220, 220, 309, 796, 309, 1343, 3272, 7, 81, 11, 37, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1441, 309, 628, 220, 220, 220, 886, 198, 198, 437, 198, 198, 37811, 198, 51, 796, 1633, 62, 36151, 7, 43337, 11, 1459, 62, 39566, 8, 198, 198, 163, 102, 118, 27950, 249, 13298, 9202, 14099, 5641, 164, 101, 230, 163, 106, 245, 198, 198, 2, 20559, 2886, 198, 12, 4600, 43337, 63, 25, 36469, 100, 36365, 245, 43380, 228, 41753, 99, 198, 12, 4600, 626, 62, 325, 1659, 63, 171, 120, 248, 26193, 249, 23626, 253, 33426, 222, 253, 41753, 99, 35604, 14099, 13298, 9202, 171, 120, 254, 50, 4720, 37, 198, 12, 4600, 14421, 62, 39566, 63, 25, 13328, 237, 122, 28839, 101, 15474, 100, 123, 47947, 95, 14099, 37662, 6312, 23376, 30165, 20513, 6527, 198, 198, 2, 16409, 198, 12, 4600, 51, 63, 25, 13328, 102, 118, 27950, 249, 13298, 9202, 14099, 198, 37811, 198, 8818, 1633, 62, 36151, 7, 43337, 11, 11555, 62, 325, 1659, 11, 1459, 62, 39566, 8, 198, 220, 220, 220, 3332, 62, 7857, 796, 685, 15, 13, 16, 837, 657, 13, 16, 837, 657, 13, 16, 60, 1303, 26193, 249, 23626, 253, 28938, 226, 164, 122, 118, 165, 243, 115, 43357, 685, 87, 11, 88, 11, 89, 7131, 76, 60, 198, 220, 220, 220, 12067, 796, 685, 15, 13, 22544, 11, 657, 13, 22544, 11, 657, 13, 22544, 60, 1303, 26193, 249, 23626, 253, 34932, 235, 33232, 225, 5641, 2515, 248, 39258, 685, 87, 11, 88, 11, 89, 7131, 76, 60, 198, 220, 220, 220, 327, 67, 796, 352, 13, 1065, 1303, 162, 232, 245, 27950, 249, 46479, 224, 46763, 108, 171, 120, 230, 28938, 226, 165, 251, 95, 31758, 29826, 96, 43095, 37605, 95, 30201, 32573, 239, 27670, 120, 171, 120, 231, 628, 220, 220, 220, 1303, 16268, 222, 253, 41753, 99, 35604, 14099, 13298, 9202, 5641, 25842, 41753, 100, 162, 101, 247, 163, 111, 119, 2515, 116, 5641, 13783, 231, 162, 237, 249, 198, 220, 220, 220, 11555, 62, 1416, 28202, 39566, 796, 1459, 62, 39566, 3467, 11555, 62, 325, 1659, 1635, 1459, 62, 39566, 198, 220, 220, 220, 11555, 62, 1416, 28202, 796, 685, 626, 62, 1416, 28202, 39566, 13, 80, 16, 11, 11555, 62, 1416, 28202, 39566, 13, 80, 17, 11, 11555, 62, 1416, 28202, 39566, 13, 80, 18, 60, 628, 198, 220, 220, 220, 309, 796, 685, 15, 1539, 657, 1539, 657, 8183, 628, 220, 220, 220, 1303, 87, 165, 251, 95, 28618, 161, 225, 235, 31917, 27950, 249, 198, 220, 220, 220, 611, 11555, 62, 1416, 28202, 58, 16, 60, 18189, 657, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 16, 1539, 657, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 796, 685, 49720, 62, 7857, 58, 16, 60, 14, 17, 11, 657, 1539, 657, 8183, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 25915, 16, 1539, 657, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 796, 25915, 49720, 62, 7857, 58, 16, 60, 14, 17, 11, 657, 1539, 657, 8183, 198, 220, 220, 220, 886, 198, 220, 220, 220, 317, 796, 3332, 62, 7857, 58, 17, 60, 9, 49720, 62, 7857, 58, 18, 60, 198, 220, 220, 220, 7377, 122, 796, 2593, 7, 11215, 8, 628, 220, 220, 220, 220, 198, 220, 220, 220, 410, 62, 525, 79, 796, 16605, 7, 626, 62, 1416, 28202, 11, 532, 77, 8, 1220, 2593, 7, 626, 62, 1416, 28202, 8, 1635, 2593, 7, 626, 62, 1416, 28202, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 376, 796, 352, 14, 17, 1635, 12109, 1635, 410, 62, 525, 79, 61, 17, 1635, 317, 1635, 327, 67, 1635, 13841, 77, 8, 198, 220, 220, 220, 288, 51, 796, 3272, 7, 12993, 12, 11215, 11, 376, 8, 198, 220, 220, 220, 309, 796, 309, 1343, 288, 51, 628, 220, 220, 220, 1303, 331, 165, 251, 95, 28618, 161, 225, 235, 31917, 27950, 249, 198, 220, 220, 220, 611, 11555, 62, 1416, 28202, 58, 17, 60, 18189, 657, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 352, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 796, 685, 657, 1539, 3332, 62, 7857, 58, 17, 60, 14, 17, 11, 657, 8183, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 532, 16, 1539, 657, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 796, 685, 15, 1539, 532, 49720, 62, 7857, 58, 17, 60, 14, 17, 11, 657, 8183, 198, 220, 220, 220, 886, 198, 220, 220, 220, 317, 796, 3332, 62, 7857, 58, 16, 60, 9, 49720, 62, 7857, 58, 18, 60, 628, 220, 220, 220, 410, 62, 525, 79, 796, 16605, 7, 626, 62, 1416, 28202, 11, 532, 77, 8, 1220, 2593, 7, 626, 62, 1416, 28202, 8, 1635, 2593, 7, 626, 62, 1416, 28202, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 376, 796, 352, 14, 17, 1635, 12109, 1635, 410, 62, 525, 79, 61, 17, 1635, 317, 1635, 327, 67, 1635, 13841, 77, 8, 198, 220, 220, 220, 288, 51, 796, 3272, 7, 12993, 12, 11215, 11, 376, 8, 198, 220, 220, 220, 309, 796, 309, 1343, 288, 51, 628, 220, 220, 220, 1303, 1976, 165, 251, 95, 28618, 161, 225, 235, 31917, 27950, 249, 198, 220, 220, 220, 611, 11555, 62, 1416, 28202, 58, 18, 60, 18189, 657, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 657, 1539, 352, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 796, 685, 15, 1539, 657, 1539, 3332, 62, 7857, 58, 18, 60, 14, 17, 60, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 299, 796, 685, 15, 1539, 657, 1539, 352, 8183, 198, 220, 220, 220, 220, 220, 220, 220, 30218, 796, 685, 15, 1539, 657, 1539, 532, 49720, 62, 7857, 58, 16, 60, 14, 17, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 317, 796, 3332, 62, 7857, 58, 16, 60, 9, 49720, 62, 7857, 58, 17, 60, 628, 220, 220, 220, 410, 62, 525, 79, 796, 16605, 7, 626, 62, 1416, 28202, 11, 532, 77, 8, 1220, 2593, 7, 626, 62, 1416, 28202, 8, 1635, 2593, 7, 626, 62, 1416, 28202, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 376, 796, 352, 14, 17, 1635, 12109, 1635, 410, 62, 525, 79, 61, 17, 1635, 317, 1635, 327, 67, 1635, 13841, 77, 8, 198, 220, 220, 220, 288, 51, 796, 3272, 7, 12993, 12, 11215, 11, 376, 8, 198, 220, 220, 220, 309, 796, 309, 1343, 288, 51, 628, 198, 220, 220, 220, 1441, 309, 198, 220, 220, 220, 220, 198, 437, 198, 46249 ]
1.489472
5,414
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # formats: ipynb,jl:hydrogen # text_representation: # extension: .jl # format_name: hydrogen # format_version: '1.3' # jupytext_version: 1.10.3 # kernelspec: # display_name: Julia 1.6.4 # language: julia # name: julia-1.6 # --- # %% using Distributions using Plots using Optim traceon = Optim.Options( store_trace = true, extended_trace = true ) # model Distributions.TDist(μ, ρ, ν) = LocationScale(μ, ρ, TDist(ν)) # test data X = [-0.01, 0.01, 1.0] # Warning: Very Slow! lower = [-0.1, -15.0, -2.5] upper = [ 0.4, 10.0, 8.0] @show lower upper r = @time optimize(x -> -loglikelihood(TDist(x[1], 10^x[2], 10^x[3]), X), lower, upper, [0.33, 0.0, 0.27], Fminbox(LBFGS()), traceon) # %% function plot_trace(r) x = r.initial_x c = hcat(x, (t.metadata["x"] for t in r.trace)...) l = -minimum(r) m = r.minimizer t = "initial = $x\nfinal = $(round.(m; digits=3))\nfinal loglikelihood = $(round(l; digits=3))" plot(; legend=:topleft) scatter3d!([x[1]], [x[2]], [x[3]]; label="initial", c=:blue, ms=3) plot!(c[1,:], c[2,:], c[3,:]; label="path", c=:darkcyan) scatter3d!([m[1]], [m[2]], [m[3]]; label="final", c=:yellow, ms=3) plot!(; xlabel="μ", ylabel="log₁₀ρ", zlabel="log₁₀ν") title!(t; titlefontsize=10) end plot_trace(r) plot!(; fmt=:png) # %% function f(μ, log10ν, X) log10rhos = range(-15, 10; length=200) -maximum(loglikelihood(TDist(μ, 10^log10ρ, 10^log10ν), X) for log10ρ in log10rhos) end function plot_trace2d(r) x = r.initial_x c = hcat(x, (t.metadata["x"] for t in r.trace)...) l = -minimum(r) m = r.minimizer t = "initial = $x\nfinal = $(round.(m; digits=3))\nfinal loglikelihood = $(round(l; digits=3))" mus = range(-0.1, 0.4; length=200) log10nus = range(-2.5, 8.0; length=200) z = f.(mus', log10nus, Ref(X)) plot(; legend=:topleft, colorbar=false) plot!(; xlim=extrema(mus), ylim=extrema(log10nus)) heatmap!(mus, log10nus, z; clim=(-1, 5), c=reverse(cgrad(:CMRmap))) scatter!([x[1]], [x[3]]; label="initial", ms=4, c=:blue) plot!(c[1,:], c[3,:]; label="path", c=:cyan, lw=1.5) scatter!([m[1]], [m[3]]; label="final", ms=4, c=:yellow) plot!(; xlabel="μ", ylabel="log₁₀ν") title!(t; titlefontsize=10) end plot_trace2d(r) plot!(; fmt=:png) # %%
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 11420, 198, 2, 474, 929, 88, 353, 25, 198, 2, 220, 220, 474, 929, 88, 5239, 25, 198, 2, 220, 220, 220, 220, 17519, 25, 20966, 2047, 65, 11, 20362, 25, 15511, 8648, 198, 2, 220, 220, 220, 220, 2420, 62, 15603, 341, 25, 198, 2, 220, 220, 220, 220, 220, 220, 7552, 25, 764, 20362, 198, 2, 220, 220, 220, 220, 220, 220, 5794, 62, 3672, 25, 17669, 198, 2, 220, 220, 220, 220, 220, 220, 5794, 62, 9641, 25, 705, 16, 13, 18, 6, 198, 2, 220, 220, 220, 220, 220, 220, 474, 929, 88, 5239, 62, 9641, 25, 352, 13, 940, 13, 18, 198, 2, 220, 220, 50207, 43106, 25, 198, 2, 220, 220, 220, 220, 3359, 62, 3672, 25, 22300, 352, 13, 21, 13, 19, 198, 2, 220, 220, 220, 220, 3303, 25, 474, 43640, 198, 2, 220, 220, 220, 220, 1438, 25, 474, 43640, 12, 16, 13, 21, 198, 2, 11420, 198, 198, 2, 43313, 198, 3500, 46567, 507, 198, 3500, 1345, 1747, 198, 3500, 30011, 198, 198, 40546, 261, 796, 30011, 13, 29046, 7, 198, 220, 220, 220, 3650, 62, 40546, 796, 2081, 11, 198, 220, 220, 220, 7083, 62, 40546, 796, 2081, 198, 8, 198, 198, 2, 2746, 198, 20344, 2455, 507, 13, 51, 20344, 7, 34703, 11, 18074, 223, 11, 7377, 121, 8, 796, 13397, 29990, 7, 34703, 11, 18074, 223, 11, 13320, 396, 7, 26180, 4008, 198, 198, 2, 1332, 1366, 198, 55, 796, 25915, 15, 13, 486, 11, 657, 13, 486, 11, 352, 13, 15, 60, 198, 198, 2, 15932, 25, 9576, 19054, 0, 198, 21037, 796, 25915, 15, 13, 16, 11, 532, 1314, 13, 15, 11, 532, 17, 13, 20, 60, 198, 45828, 796, 685, 657, 13, 19, 11, 220, 838, 13, 15, 11, 220, 807, 13, 15, 60, 198, 31, 12860, 2793, 6727, 198, 81, 796, 2488, 2435, 27183, 7, 87, 4613, 532, 6404, 2339, 11935, 7, 51, 20344, 7, 87, 58, 16, 4357, 838, 61, 87, 58, 17, 4357, 838, 61, 87, 58, 18, 46570, 1395, 828, 2793, 11, 6727, 11, 685, 15, 13, 2091, 11, 657, 13, 15, 11, 657, 13, 1983, 4357, 376, 1084, 3524, 7, 43, 29499, 14313, 3419, 828, 12854, 261, 8, 198, 198, 2, 43313, 198, 8818, 7110, 62, 40546, 7, 81, 8, 198, 220, 220, 220, 2124, 796, 374, 13, 36733, 62, 87, 198, 220, 220, 220, 269, 796, 289, 9246, 7, 87, 11, 357, 83, 13, 38993, 14692, 87, 8973, 329, 256, 287, 374, 13, 40546, 8, 23029, 198, 220, 220, 220, 300, 796, 532, 39504, 7, 81, 8, 198, 220, 220, 220, 285, 796, 374, 13, 1084, 320, 7509, 198, 220, 220, 220, 256, 796, 366, 36733, 796, 720, 87, 59, 77, 20311, 796, 29568, 744, 12195, 76, 26, 19561, 28, 18, 4008, 59, 77, 20311, 2604, 2339, 11935, 796, 29568, 744, 7, 75, 26, 19561, 28, 18, 4008, 1, 628, 220, 220, 220, 7110, 7, 26, 8177, 28, 25, 83, 643, 701, 8, 198, 220, 220, 220, 41058, 18, 67, 0, 26933, 87, 58, 16, 60, 4357, 685, 87, 58, 17, 60, 4357, 685, 87, 58, 18, 60, 11208, 6167, 2625, 36733, 1600, 269, 28, 25, 17585, 11, 13845, 28, 18, 8, 198, 220, 220, 220, 7110, 0, 7, 66, 58, 16, 11, 25, 4357, 269, 58, 17, 11, 25, 4357, 269, 58, 18, 11, 25, 11208, 6167, 2625, 6978, 1600, 269, 28, 25, 21953, 948, 272, 8, 198, 220, 220, 220, 41058, 18, 67, 0, 26933, 76, 58, 16, 60, 4357, 685, 76, 58, 17, 60, 4357, 685, 76, 58, 18, 60, 11208, 6167, 2625, 20311, 1600, 269, 28, 25, 36022, 11, 13845, 28, 18, 8, 198, 220, 220, 220, 7110, 0, 7, 26, 2124, 18242, 2625, 34703, 1600, 331, 18242, 2625, 6404, 158, 224, 223, 158, 224, 222, 33643, 1600, 1976, 18242, 2625, 6404, 158, 224, 223, 158, 224, 222, 26180, 4943, 198, 220, 220, 220, 3670, 0, 7, 83, 26, 3670, 10331, 7857, 28, 940, 8, 198, 437, 198, 198, 29487, 62, 40546, 7, 81, 8, 198, 29487, 0, 7, 26, 46996, 28, 25, 11134, 8, 198, 198, 2, 43313, 198, 8818, 277, 7, 34703, 11, 2604, 940, 26180, 11, 1395, 8, 198, 220, 220, 220, 2604, 940, 17179, 418, 796, 2837, 32590, 1314, 11, 838, 26, 4129, 28, 2167, 8, 198, 220, 220, 220, 532, 47033, 7, 6404, 2339, 11935, 7, 51, 20344, 7, 34703, 11, 838, 61, 6404, 940, 33643, 11, 838, 61, 6404, 940, 26180, 828, 1395, 8, 329, 2604, 940, 33643, 287, 2604, 940, 17179, 418, 8, 198, 437, 198, 198, 8818, 7110, 62, 40546, 17, 67, 7, 81, 8, 198, 220, 220, 220, 2124, 796, 374, 13, 36733, 62, 87, 198, 220, 220, 220, 269, 796, 289, 9246, 7, 87, 11, 357, 83, 13, 38993, 14692, 87, 8973, 329, 256, 287, 374, 13, 40546, 8, 23029, 198, 220, 220, 220, 300, 796, 532, 39504, 7, 81, 8, 198, 220, 220, 220, 285, 796, 374, 13, 1084, 320, 7509, 198, 220, 220, 220, 256, 796, 366, 36733, 796, 720, 87, 59, 77, 20311, 796, 29568, 744, 12195, 76, 26, 19561, 28, 18, 4008, 59, 77, 20311, 2604, 2339, 11935, 796, 29568, 744, 7, 75, 26, 19561, 28, 18, 4008, 1, 628, 220, 220, 220, 1928, 796, 2837, 32590, 15, 13, 16, 11, 657, 13, 19, 26, 4129, 28, 2167, 8, 198, 220, 220, 220, 2604, 940, 77, 385, 796, 2837, 32590, 17, 13, 20, 11, 807, 13, 15, 26, 4129, 28, 2167, 8, 198, 220, 220, 220, 1976, 796, 277, 12195, 14664, 3256, 2604, 940, 77, 385, 11, 6524, 7, 55, 4008, 628, 220, 220, 220, 7110, 7, 26, 8177, 28, 25, 83, 643, 701, 11, 3124, 5657, 28, 9562, 8, 198, 220, 220, 220, 7110, 0, 7, 26, 2124, 2475, 28, 2302, 260, 2611, 7, 14664, 828, 331, 2475, 28, 2302, 260, 2611, 7, 6404, 940, 77, 385, 4008, 198, 220, 220, 220, 4894, 8899, 0, 7, 14664, 11, 2604, 940, 77, 385, 11, 1976, 26, 5424, 16193, 12, 16, 11, 642, 828, 269, 28, 50188, 7, 66, 9744, 7, 25, 34, 13599, 8899, 22305, 198, 220, 220, 220, 41058, 0, 26933, 87, 58, 16, 60, 4357, 685, 87, 58, 18, 60, 11208, 6167, 2625, 36733, 1600, 13845, 28, 19, 11, 269, 28, 25, 17585, 8, 198, 220, 220, 220, 7110, 0, 7, 66, 58, 16, 11, 25, 4357, 269, 58, 18, 11, 25, 11208, 6167, 2625, 6978, 1600, 269, 28, 25, 948, 272, 11, 300, 86, 28, 16, 13, 20, 8, 198, 220, 220, 220, 41058, 0, 26933, 76, 58, 16, 60, 4357, 685, 76, 58, 18, 60, 11208, 6167, 2625, 20311, 1600, 13845, 28, 19, 11, 269, 28, 25, 36022, 8, 198, 220, 220, 220, 7110, 0, 7, 26, 2124, 18242, 2625, 34703, 1600, 331, 18242, 2625, 6404, 158, 224, 223, 158, 224, 222, 26180, 4943, 198, 220, 220, 220, 3670, 0, 7, 83, 26, 3670, 10331, 7857, 28, 940, 8, 198, 437, 198, 198, 29487, 62, 40546, 17, 67, 7, 81, 8, 198, 29487, 0, 7, 26, 46996, 28, 25, 11134, 8, 198, 198, 2, 43313, 198 ]
2.000837
1,195
# Use baremodule to shave off a few KB from the serialized `.ji` file baremodule czmq_jll using Base using Base: UUID import JLLWrappers JLLWrappers.@generate_main_file_header("czmq") JLLWrappers.@generate_main_file("czmq", UUID("bada3277-1da5-58a9-94c6-da212cd39369")) end # module czmq_jll
[ 2, 5765, 6247, 21412, 284, 34494, 572, 257, 1178, 14204, 422, 262, 11389, 1143, 4600, 13, 7285, 63, 2393, 198, 49382, 21412, 24785, 76, 80, 62, 73, 297, 198, 3500, 7308, 198, 3500, 7308, 25, 471, 27586, 198, 11748, 449, 3069, 36918, 11799, 198, 198, 41, 3069, 36918, 11799, 13, 31, 8612, 378, 62, 12417, 62, 7753, 62, 25677, 7203, 26691, 76, 80, 4943, 198, 41, 3069, 36918, 11799, 13, 31, 8612, 378, 62, 12417, 62, 7753, 7203, 26691, 76, 80, 1600, 471, 27586, 7203, 65, 4763, 18, 27019, 12, 16, 6814, 20, 12, 3365, 64, 24, 12, 5824, 66, 21, 12, 6814, 21777, 10210, 2670, 30803, 48774, 198, 437, 220, 1303, 8265, 24785, 76, 80, 62, 73, 297, 198 ]
2.45
120
""" Bridges `CP.GlobalCardinality` to `CP.Count`. """ struct GlobalCardinalityFixedOpen2CountBridge{T} <: MOIBC.AbstractBridge cons_count::Vector{MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, CP.Count{MOI.EqualTo{T}}}} end function MOIBC.bridge_constraint( ::Type{GlobalCardinalityFixedOpen2CountBridge{T}}, model, f::MOI.VectorOfVariables, s::CP.GlobalCardinality{CP.FIXED_COUNTED_VALUES, CP.OPEN_COUNTED_VALUES, T}, ) where {T} return MOIBC.bridge_constraint( GlobalCardinalityFixedOpen2CountBridge{T}, model, MOI.VectorAffineFunction{T}(f), s, ) end function MOIBC.bridge_constraint( ::Type{GlobalCardinalityFixedOpen2CountBridge{T}}, model, f::MOI.VectorAffineFunction{T}, s::CP.GlobalCardinality{CP.FIXED_COUNTED_VALUES, CP.OPEN_COUNTED_VALUES, T}, ) where {T} f_scalars = MOIU.scalarize(f) f_array = f_scalars[1:s.dimension] cons_count = MOI.ConstraintIndex{MOI.VectorAffineFunction{T}, CP.Count{MOI.EqualTo{T}}}[ MOI.add_constraint( model, MOIU.vectorize( MOI.ScalarAffineFunction{T}[ f_scalars[s.dimension + i], f_array..., ] ), CP.Count(s.dimension, MOI.EqualTo(s.values[i])) ) for i in 1:length(s.values) ] return GlobalCardinalityFixedOpen2CountBridge(cons_count) end function MOI.supports_constraint( ::Type{GlobalCardinalityFixedOpen2CountBridge{T}}, ::Union{Type{MOI.VectorOfVariables}, Type{MOI.VectorAffineFunction{T}}}, ::Type{CP.GlobalCardinality{CP.FIXED_COUNTED_VALUES, CP.OPEN_COUNTED_VALUES, T}}, ) where {T} return true end function MOIB.added_constrained_variable_types(::Type{GlobalCardinalityFixedOpen2CountBridge{T}}) where {T} return Tuple{Type}[] end function MOIB.added_constraint_types(::Type{GlobalCardinalityFixedOpen2CountBridge{T}}) where {T} return [ (MOI.VectorAffineFunction{T}, CP.Count{MOI.EqualTo{T}}), ] end function MOI.get( b::GlobalCardinalityFixedOpen2CountBridge{T}, ::MOI.NumberOfConstraints{ MOI.VectorAffineFunction{T}, CP.Count{MOI.EqualTo{T}}, }, ) where {T} return length(b.cons_count) end function MOI.get( b::GlobalCardinalityFixedOpen2CountBridge{T}, ::MOI.ListOfConstraintIndices{ MOI.VectorAffineFunction{T}, CP.Count{MOI.EqualTo{T}}, }, ) where {T} return copy(b.cons_count) end
[ 37811, 198, 33, 32124, 4600, 8697, 13, 22289, 16962, 1292, 414, 63, 284, 4600, 8697, 13, 12332, 44646, 198, 37811, 198, 7249, 8060, 16962, 1292, 414, 13715, 11505, 17, 12332, 37385, 90, 51, 92, 1279, 25, 13070, 40, 2749, 13, 23839, 37385, 198, 220, 220, 220, 762, 62, 9127, 3712, 38469, 90, 11770, 40, 13, 3103, 2536, 2913, 15732, 90, 11770, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 16932, 13, 12332, 90, 11770, 40, 13, 36, 13255, 2514, 90, 51, 11709, 11709, 198, 437, 198, 198, 8818, 13070, 40, 2749, 13, 9458, 62, 1102, 2536, 2913, 7, 198, 220, 220, 220, 7904, 6030, 90, 22289, 16962, 1292, 414, 13715, 11505, 17, 12332, 37385, 90, 51, 92, 5512, 198, 220, 220, 220, 2746, 11, 198, 220, 220, 220, 277, 3712, 11770, 40, 13, 38469, 5189, 23907, 2977, 11, 198, 220, 220, 220, 264, 3712, 8697, 13, 22289, 16962, 1292, 414, 90, 8697, 13, 47084, 1961, 62, 34, 28270, 1961, 62, 23428, 35409, 11, 16932, 13, 3185, 1677, 62, 34, 28270, 1961, 62, 23428, 35409, 11, 309, 5512, 198, 8, 810, 1391, 51, 92, 198, 220, 220, 220, 1441, 13070, 40, 2749, 13, 9458, 62, 1102, 2536, 2913, 7, 198, 220, 220, 220, 220, 220, 220, 220, 8060, 16962, 1292, 414, 13715, 11505, 17, 12332, 37385, 90, 51, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 2746, 11, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 38469, 35191, 500, 22203, 90, 51, 92, 7, 69, 828, 198, 220, 220, 220, 220, 220, 220, 220, 264, 11, 198, 220, 220, 220, 1267, 198, 437, 198, 198, 8818, 13070, 40, 2749, 13, 9458, 62, 1102, 2536, 2913, 7, 198, 220, 220, 220, 7904, 6030, 90, 22289, 16962, 1292, 414, 13715, 11505, 17, 12332, 37385, 90, 51, 92, 5512, 198, 220, 220, 220, 2746, 11, 198, 220, 220, 220, 277, 3712, 11770, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 198, 220, 220, 220, 264, 3712, 8697, 13, 22289, 16962, 1292, 414, 90, 8697, 13, 47084, 1961, 62, 34, 28270, 1961, 62, 23428, 35409, 11, 16932, 13, 3185, 1677, 62, 34, 28270, 1961, 62, 23428, 35409, 11, 309, 5512, 198, 8, 810, 1391, 51, 92, 198, 220, 220, 220, 277, 62, 1416, 282, 945, 796, 13070, 44958, 13, 1416, 282, 283, 1096, 7, 69, 8, 198, 220, 220, 220, 277, 62, 18747, 796, 277, 62, 1416, 282, 945, 58, 16, 25, 82, 13, 46156, 60, 628, 220, 220, 220, 762, 62, 9127, 796, 13070, 40, 13, 3103, 2536, 2913, 15732, 90, 11770, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 16932, 13, 12332, 90, 11770, 40, 13, 36, 13255, 2514, 90, 51, 42535, 58, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 2860, 62, 1102, 2536, 2913, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2746, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13070, 44958, 13, 31364, 1096, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 3351, 282, 283, 35191, 500, 22203, 90, 51, 92, 58, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 62, 1416, 282, 945, 58, 82, 13, 46156, 1343, 1312, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 277, 62, 18747, 986, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2361, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10612, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16932, 13, 12332, 7, 82, 13, 46156, 11, 13070, 40, 13, 36, 13255, 2514, 7, 82, 13, 27160, 58, 72, 60, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 13664, 7, 82, 13, 27160, 8, 198, 220, 220, 220, 2361, 628, 220, 220, 220, 1441, 8060, 16962, 1292, 414, 13715, 11505, 17, 12332, 37385, 7, 5936, 62, 9127, 8, 198, 437, 198, 198, 8818, 13070, 40, 13, 18608, 2096, 62, 1102, 2536, 2913, 7, 198, 220, 220, 220, 7904, 6030, 90, 22289, 16962, 1292, 414, 13715, 11505, 17, 12332, 37385, 90, 51, 92, 5512, 198, 220, 220, 220, 7904, 38176, 90, 6030, 90, 11770, 40, 13, 38469, 5189, 23907, 2977, 5512, 5994, 90, 11770, 40, 13, 38469, 35191, 500, 22203, 90, 51, 11709, 5512, 198, 220, 220, 220, 7904, 6030, 90, 8697, 13, 22289, 16962, 1292, 414, 90, 8697, 13, 47084, 1961, 62, 34, 28270, 1961, 62, 23428, 35409, 11, 16932, 13, 3185, 1677, 62, 34, 28270, 1961, 62, 23428, 35409, 11, 309, 92, 5512, 198, 8, 810, 1391, 51, 92, 198, 220, 220, 220, 1441, 2081, 198, 437, 198, 198, 8818, 13070, 9865, 13, 29373, 62, 1102, 2536, 1328, 62, 45286, 62, 19199, 7, 3712, 6030, 90, 22289, 16962, 1292, 414, 13715, 11505, 17, 12332, 37385, 90, 51, 11709, 8, 810, 1391, 51, 92, 198, 220, 220, 220, 1441, 309, 29291, 90, 6030, 92, 21737, 198, 437, 198, 198, 8818, 13070, 9865, 13, 29373, 62, 1102, 2536, 2913, 62, 19199, 7, 3712, 6030, 90, 22289, 16962, 1292, 414, 13715, 11505, 17, 12332, 37385, 90, 51, 11709, 8, 810, 1391, 51, 92, 198, 220, 220, 220, 1441, 685, 198, 220, 220, 220, 220, 220, 220, 220, 357, 11770, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 16932, 13, 12332, 90, 11770, 40, 13, 36, 13255, 2514, 90, 51, 11709, 828, 198, 220, 220, 220, 2361, 198, 437, 198, 198, 8818, 13070, 40, 13, 1136, 7, 198, 220, 220, 220, 275, 3712, 22289, 16962, 1292, 414, 13715, 11505, 17, 12332, 37385, 90, 51, 5512, 198, 220, 220, 220, 7904, 11770, 40, 13, 15057, 5189, 3103, 2536, 6003, 90, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 16932, 13, 12332, 90, 11770, 40, 13, 36, 13255, 2514, 90, 51, 92, 5512, 198, 220, 220, 220, 8964, 198, 8, 810, 1391, 51, 92, 198, 220, 220, 220, 1441, 4129, 7, 65, 13, 5936, 62, 9127, 8, 198, 437, 198, 198, 8818, 13070, 40, 13, 1136, 7, 198, 220, 220, 220, 275, 3712, 22289, 16962, 1292, 414, 13715, 11505, 17, 12332, 37385, 90, 51, 5512, 198, 220, 220, 220, 7904, 11770, 40, 13, 8053, 5189, 3103, 2536, 2913, 5497, 1063, 90, 198, 220, 220, 220, 220, 220, 220, 220, 13070, 40, 13, 38469, 35191, 500, 22203, 90, 51, 5512, 16932, 13, 12332, 90, 11770, 40, 13, 36, 13255, 2514, 90, 51, 92, 5512, 198, 220, 220, 220, 8964, 198, 8, 810, 1391, 51, 92, 198, 220, 220, 220, 1441, 4866, 7, 65, 13, 5936, 62, 9127, 8, 198, 437, 198 ]
2.158813
1,146
module LevenshteinToolkit # ---------------------------------------- # EXPORTED INTERFACE # ---------------------------------------- export distance_matrix export distance_row export dfa export nfa export check export draw include("matrix.jl") include("row.jl") include("automata.jl") end
[ 21412, 1004, 574, 1477, 22006, 25391, 15813, 198, 198, 2, 20368, 982, 198, 2, 7788, 15490, 1961, 23255, 49836, 198, 2, 20368, 982, 198, 198, 39344, 5253, 62, 6759, 8609, 198, 39344, 5253, 62, 808, 198, 198, 39344, 288, 13331, 198, 39344, 299, 13331, 198, 198, 39344, 2198, 198, 39344, 3197, 198, 198, 17256, 7203, 6759, 8609, 13, 20362, 4943, 198, 17256, 7203, 808, 13, 20362, 4943, 198, 17256, 7203, 2306, 296, 1045, 13, 20362, 4943, 198, 198, 437, 198 ]
3.6875
80
""" ```math \\tilde X = \\hat X_{t+1|t} = A\\hat X_{t|t} ``` """ function KalmanFilter(M::LGSSM, y) RR = M.R * M.R' SS = M.S * M.S' ydim, qdim = size(M.B) xdim, pdim = size(M.R) n = size(y, 1) ϵ = zeros(ydim, 1, n) Γ = zeros(ydim, ydim, n) Γ⁻¹ = zeros(ydim, ydim, n) K = zeros(xdim, ydim, n) # Kalman filter gain H = zeros(xdim, ydim, n) # Kalman prediction gain Λ = zeros(xdim, xdim, n) Xp = zeros(xdim, 1, n) Σp = zeros(xdim, xdim, n) Xf = zeros(xdim, 1, n) Σf = zeros(xdim, xdim, n) ℓ = 0.0 for t in 1:n # Prediction if t == 1 Xp[:,:,t] = 0.0 Σp[:,:,t] = M.Σᵥ else Xp[:,:,t] = M.A * Xf[:,:,t-1] Σp[:,:,t] = M.A * Σf[:,:,t-1] * M.A' + RR end # Correction ϵ[:,:,t] = y[t] - M.B * Xp[:,:,t] Γ[:,:,t] = M.B*Σp[:,:,t]*M.B' + SS Γ⁻¹[:,:,t] = inv(Γ[:,:,t]) K[:,:,t] = Σp[:,:,t]*M.B'*Γ⁻¹[:,:,t] H[:,:,t] = M.A*K[:,:,t] Λ[:,:,t] = M.A - H[:,:,t]*M.B Xf[:,:,t] = Xp[:,:,t] + K[:,:,t]*ϵ[:,:,t] Σf[:,:,t] = Σp[:,:,t] - K[:,:,t]*M.B*Σp[:,:,t] ℓ += logdet(Γ[:,:,t]) + ϵ[:,:,t]'*Γ⁻¹[:,:,t]*ϵ[:,:,t] end return Dict(:Xp => Xp, :Xf => Xf, :Σp => Σp, :Σf => Σf, :ϵ => ϵ, :Γ => Γ, :Γ⁻¹ => Γ⁻¹, :K => K, :H => H, :Λ => Λ, :ℓ => -ℓ/2) end """ Disturbanve Smoother Algorithm 5.2.15 Cappe 2005 """ function DisturbanceSmoother(M::LGSSM, y) n = size(y, 1) pdim = size(M.B, 2) qdim = size(y, 2) RR = M.R*M.R' p = zeros(pdim, 1, n-1) C = zeros(pdim, pdim, n-1) U = zeros(pdim, pdim, n-1) Ξ = zeros(pdim, pdim, n-1) Xs = zeros(pdim, 1, n) Σs = zeros(pdim, pdim, n) KF = KalmanFilter(M, y) # Smoothed disturbances for t in n-1:-1:1 if t == n-1 p[:,:,t] = M.B'*KF[:Γ⁻¹][:,:,n]*KF[:ϵ][:,:,n] C[:,:,t] = M.B'*KF[:Γ⁻¹][:,:,n]*M.B else p[:,:,t] = M.B'*KF[:Γ⁻¹][:,:,t+1]*KF[:ϵ][:,:,t+1] + KF[:Λ][:,:,t+1]'*p[:,:,t+1] C[:,:,t] = M.B'*KF[:Γ⁻¹][:,:,t+1]*M.B + KF[:Λ][:,:,t+1]'*C[:,:,t+1]*KF[:Λ][:,:,t+1] end U[:,:,t] = M.R'*p[:,:,t] Ξ[:,:,t] = I - M.R'*C[:,:,t]*M.R end # Smoothed states Xs[:,:,1] = M.Σᵥ*(M.B'*KF[:Γ⁻¹][:,:,1]*KF[:ϵ][:,:,1] + KF[:Λ][:,:,1]*p[:,:,1]) Σs[:,:,1] = M.Σᵥ - M.Σᵥ*(M.B'*KF[:Γ⁻¹][:,:,1]*M.B + KF[:Λ][:,:,1]'*C[:,:,1]*KF[:Λ][:,:,1])*M.Σᵥ for t in 1:n-1 Xs[:,:,t+1] = M.A*Xs[:,:,t] + M.R*U[:,:,t] Σs[:,:,t+1] = M.A*Σs[:,:,t]*M.A' + M.R*Ξ[:,:,t]*M.R' - M.A*KF[:Σp][:,:,t]*KF[:Λ][:,:,t]'*C[:,:,t]*RR - RR*C[:,:,t]*KF[:Λ][:,:,t]*KF[:Σp][:,:,t]*M.A' end return Dict(:Xp => KF[:Xp], :Xf => KF[:Xf], :Xs => Xs, :Σp => KF[:Σp], :Σf => KF[:Σf], :Σs => Σs, :ϵ => KF[:ϵ], :Γ => KF[:Γ], :Γ⁻¹ => KF[:Γ⁻¹], :K => KF[:K], :H => KF[:H], :Λ => KF[:Λ], :p => p, :C => C, :U => U, :Ξ => Ξ, :ℓ => KF[:ℓ]) end """ Backward Information Recursion Proposition 5.2.21 Cappe (2005) """ function BackwardInformationRecursion(M::LGSSM, y) n = size(y, 1) pdim = size(M.B, 2) qdim = size(y, 2) RR = M.R*M.R' SS = M.S*M.S' SS⁻¹ = inv(SS) κ = zeros(pdim, 1, n) κ̃ = zeros(pdim, 1, n) Π = zeros(pdim, pdim, n) Π̃ = zeros(pdim, pdim, n) Xs = zeros(pdim, 1, n) Σs = zeros(pdim, pdim, n) KF = KalmanFilter(M, y) for t in n-1:-1:1 κ̃[:,:,t+1] = M.B'*SS⁻¹*y[t+1] + κ[:,:,t+1] Π̃[:,:,t+1] = M.B'*SS⁻¹*M.B + Π[:,:,t+1] V = inv(I + Π̃[:,:,t+1]*RR) κ[:,:,t] = M.A'V*κ̃[:,:,t+1] Π[:,:,t] = M.A'V*Π̃[:,:,t+1]*M.A end Dict(:Xp => KF[:Xp], :Xf => KF[:Xf], :Σp => KF[:Σp], :Σf => KF[:Σf], :κ => κ, :Π => Π) end """ Forward-backward smoother Algorithm 5.2.22 Cappe (2005) """ function ForwardBackwardSmoother(M::LGSSM, y) n = size(y, 1) pdim = size(M.B, 2) qdim = size(y, 2) RR = M.R*M.R' SS = M.S*M.S' SS⁻¹ = inv(SS) κ = zeros(pdim, 1, n) κ̃ = zeros(pdim, 1, n) Π = zeros(pdim, pdim, n) Π̃ = zeros(pdim, pdim, n) Xs = zeros(pdim, 1, n) Σs = zeros(pdim, pdim, n) KF = KalmanFilter(M, y) W = inv(I + Π[:,:,n]*KF[:Σf][:,:,n]) Xs[:,:,n] = KF[:Xf][:,:,n] + KF[:Σf][:,:,n]*W*(κ[:,:,n] - Π[:,:,n]*KF[:Xf][:,:,n]) Σs[:,:,n] = KF[:Σf][:,:,n] - KF[:Σf][:,:,n]*W*Π[:,:,n]*KF[:Σf][:,:,n] for t in n-1:-1:1 κ̃[:,:,t+1] = M.B'*SS⁻¹*y[t+1] + κ[:,:,t+1] Π̃[:,:,t+1] = M.B'*SS⁻¹*M.B + Π[:,:,t+1] V = inv(I + Π̃[:,:,t+1]*RR) κ[:,:,t] = M.A'V*κ̃[:,:,t+1] Π[:,:,t] = M.A'V*Π̃[:,:,t+1]*M.A W = inv(I + Π[:,:,t]*KF[:Σf][:,:,t]) Xs[:,:,t] = KF[:Xf][:,:,t] + KF[:Σf][:,:,t]*W*(κ[:,:,t] - Π[:,:,t]*KF[:Xf][:,:,t]) Σs[:,:,t] = KF[:Σf][:,:,t] - KF[:Σf][:,:,t]*W*Π[:,:,t]*KF[:Σf][:,:,t] end Dict(:Xp => KF[:Xp], :Xf => KF[:Xf], :Xs => Xs, :Σp => KF[:Σp], :Σf => KF[:Σf], :Σs => Σs, :κ => κ, :Π => Π) end """ Backward Information Recursion Algorithm 6.1.2 Cappe (2005) """ function BackwardMarkovianStateSampling(M::LGSSM, y, N::Int) n = size(y, 1) KF = KalmanFilter(M, y) pdim = size(M.B, 2) qdim = size(y, 2) X = zeros(pdim, n, N) X[:,1,:] = rand(MvNormal(reshape(KF[:Xf][:,:,1],1), KF[:Σf][:,:,1]), N) for t in 2:n X[:,t,:] = rand(MvNormal(reshape(KF[:Xf][:,:,t],1), KF[:Σf][:,:,t]), N) end return X end """ Sampling with Dual Smoothing Algorithm 6.1.3 Cappe (2005) """ function SamplingWithDualSmoothing(M::LGSSM, y) n = size(y, 1) pdim = size(M.B, 2) qdim = size(y, 2) XY′ = Generate(M, n) KF = DisturbanceSmoother(M, y) KF′ = DisturbanceSmoother(M, XY′[:Y]) return KF[:Xf] + XY′[:X] - KF′[:Xf] end
[ 37811, 198, 198, 15506, 63, 11018, 198, 6852, 83, 44725, 1395, 796, 26867, 5183, 1395, 23330, 83, 10, 16, 91, 83, 92, 796, 317, 6852, 5183, 1395, 23330, 83, 91, 83, 92, 198, 15506, 63, 198, 37811, 198, 8818, 12612, 805, 22417, 7, 44, 3712, 41257, 5432, 44, 11, 331, 8, 198, 220, 220, 220, 26067, 796, 337, 13, 49, 1635, 337, 13, 49, 6, 198, 220, 220, 220, 6723, 796, 337, 13, 50, 1635, 337, 13, 50, 6, 198, 220, 220, 220, 331, 27740, 11, 10662, 27740, 796, 2546, 7, 44, 13, 33, 8, 198, 220, 220, 220, 2124, 27740, 11, 279, 27740, 796, 2546, 7, 44, 13, 49, 8, 198, 220, 220, 220, 299, 796, 2546, 7, 88, 11, 352, 8, 628, 220, 220, 220, 18074, 113, 796, 1976, 27498, 7, 5173, 320, 11, 352, 11, 299, 8, 198, 220, 220, 220, 7377, 241, 796, 1976, 27498, 7, 5173, 320, 11, 331, 27740, 11, 299, 8, 198, 220, 220, 220, 7377, 241, 46256, 119, 126, 117, 796, 1976, 27498, 7, 5173, 320, 11, 331, 27740, 11, 299, 8, 198, 220, 220, 220, 509, 796, 1976, 27498, 7, 24954, 320, 11, 331, 27740, 11, 299, 8, 1303, 12612, 805, 8106, 4461, 198, 220, 220, 220, 367, 796, 1976, 27498, 7, 24954, 320, 11, 331, 27740, 11, 299, 8, 1303, 12612, 805, 17724, 4461, 198, 220, 220, 220, 7377, 249, 796, 1976, 27498, 7, 24954, 320, 11, 2124, 27740, 11, 299, 8, 628, 220, 220, 220, 1395, 79, 796, 1976, 27498, 7, 24954, 320, 11, 352, 11, 299, 8, 198, 220, 220, 220, 7377, 96, 79, 796, 1976, 27498, 7, 24954, 320, 11, 2124, 27740, 11, 299, 8, 198, 220, 220, 220, 1395, 69, 796, 1976, 27498, 7, 24954, 320, 11, 352, 11, 299, 8, 198, 220, 220, 220, 7377, 96, 69, 796, 1976, 27498, 7, 24954, 320, 11, 2124, 27740, 11, 299, 8, 628, 220, 220, 220, 2343, 226, 241, 796, 657, 13, 15, 628, 220, 220, 220, 329, 256, 287, 352, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 46690, 198, 220, 220, 220, 220, 220, 220, 220, 611, 256, 6624, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1395, 79, 58, 45299, 45299, 83, 60, 796, 657, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 96, 79, 58, 45299, 45299, 83, 60, 796, 337, 13, 138, 96, 39611, 98, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1395, 79, 58, 45299, 45299, 83, 60, 796, 337, 13, 32, 1635, 1395, 69, 58, 45299, 45299, 83, 12, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 96, 79, 58, 45299, 45299, 83, 60, 796, 337, 13, 32, 1635, 7377, 96, 69, 58, 45299, 45299, 83, 12, 16, 60, 1635, 337, 13, 32, 6, 1343, 26067, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 35074, 198, 220, 220, 220, 220, 220, 220, 220, 18074, 113, 58, 45299, 45299, 83, 60, 796, 331, 58, 83, 60, 532, 337, 13, 33, 1635, 1395, 79, 58, 45299, 45299, 83, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 241, 58, 45299, 45299, 83, 60, 796, 337, 13, 33, 9, 138, 96, 79, 58, 45299, 45299, 83, 60, 9, 44, 13, 33, 6, 1343, 6723, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 241, 46256, 119, 126, 117, 58, 45299, 45299, 83, 60, 796, 800, 7, 138, 241, 58, 45299, 45299, 83, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 509, 58, 45299, 45299, 83, 60, 796, 7377, 96, 79, 58, 45299, 45299, 83, 60, 9, 44, 13, 33, 6, 9, 138, 241, 46256, 119, 126, 117, 58, 45299, 45299, 83, 60, 198, 220, 220, 220, 220, 220, 220, 220, 367, 58, 45299, 45299, 83, 60, 796, 337, 13, 32, 9, 42, 58, 45299, 45299, 83, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 249, 58, 45299, 45299, 83, 60, 796, 337, 13, 32, 532, 367, 58, 45299, 45299, 83, 60, 9, 44, 13, 33, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 69, 58, 45299, 45299, 83, 60, 796, 1395, 79, 58, 45299, 45299, 83, 60, 1343, 509, 58, 45299, 45299, 83, 60, 9, 139, 113, 58, 45299, 45299, 83, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 96, 69, 58, 45299, 45299, 83, 60, 796, 7377, 96, 79, 58, 45299, 45299, 83, 60, 532, 509, 58, 45299, 45299, 83, 60, 9, 44, 13, 33, 9, 138, 96, 79, 58, 45299, 45299, 83, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2343, 226, 241, 15853, 2604, 15255, 7, 138, 241, 58, 45299, 45299, 83, 12962, 1343, 18074, 113, 58, 45299, 45299, 83, 49946, 9, 138, 241, 46256, 119, 126, 117, 58, 45299, 45299, 83, 60, 9, 139, 113, 58, 45299, 45299, 83, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 360, 713, 7, 25, 55, 79, 5218, 1395, 79, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 55, 69, 5218, 1395, 69, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 96, 79, 5218, 7377, 96, 79, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 96, 69, 5218, 7377, 96, 69, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 139, 113, 5218, 18074, 113, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 241, 5218, 7377, 241, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 241, 46256, 119, 126, 117, 5218, 7377, 241, 46256, 119, 126, 117, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 42, 5218, 509, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 39, 5218, 367, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 249, 5218, 7377, 249, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 158, 226, 241, 5218, 532, 158, 226, 241, 14, 17, 8, 198, 437, 628, 198, 37811, 628, 220, 220, 220, 4307, 32679, 303, 2439, 31724, 628, 220, 220, 220, 978, 42289, 642, 13, 17, 13, 1314, 327, 1324, 68, 5075, 198, 37811, 198, 8818, 4307, 5945, 590, 50, 5908, 847, 7, 44, 3712, 41257, 5432, 44, 11, 331, 8, 198, 220, 220, 220, 299, 796, 2546, 7, 88, 11, 352, 8, 198, 220, 220, 220, 279, 27740, 796, 2546, 7, 44, 13, 33, 11, 362, 8, 198, 220, 220, 220, 10662, 27740, 796, 2546, 7, 88, 11, 362, 8, 198, 220, 220, 220, 26067, 796, 337, 13, 49, 9, 44, 13, 49, 6, 628, 220, 220, 220, 279, 796, 1976, 27498, 7, 79, 27740, 11, 352, 11, 299, 12, 16, 8, 198, 220, 220, 220, 327, 796, 1976, 27498, 7, 79, 27740, 11, 279, 27740, 11, 299, 12, 16, 8, 198, 220, 220, 220, 471, 796, 1976, 27498, 7, 79, 27740, 11, 279, 27740, 11, 299, 12, 16, 8, 198, 220, 220, 220, 7377, 252, 796, 1976, 27498, 7, 79, 27740, 11, 279, 27740, 11, 299, 12, 16, 8, 628, 220, 220, 220, 1395, 82, 796, 1976, 27498, 7, 79, 27740, 11, 352, 11, 299, 8, 198, 220, 220, 220, 7377, 96, 82, 796, 1976, 27498, 7, 79, 27740, 11, 279, 27740, 11, 299, 8, 628, 220, 220, 220, 509, 37, 796, 12612, 805, 22417, 7, 44, 11, 331, 8, 628, 220, 220, 220, 1303, 2439, 1025, 704, 38622, 198, 220, 220, 220, 329, 256, 287, 299, 12, 16, 21912, 16, 25, 16, 198, 220, 220, 220, 220, 220, 220, 220, 611, 256, 6624, 299, 12, 16, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 58, 45299, 45299, 83, 60, 796, 337, 13, 33, 6, 9, 42, 37, 58, 25, 138, 241, 46256, 119, 126, 117, 7131, 45299, 45299, 77, 60, 9, 42, 37, 58, 25, 139, 113, 7131, 45299, 45299, 77, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 58, 45299, 45299, 83, 60, 796, 337, 13, 33, 6, 9, 42, 37, 58, 25, 138, 241, 46256, 119, 126, 117, 7131, 45299, 45299, 77, 60, 9, 44, 13, 33, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 279, 58, 45299, 45299, 83, 60, 796, 337, 13, 33, 6, 9, 42, 37, 58, 25, 138, 241, 46256, 119, 126, 117, 7131, 45299, 45299, 83, 10, 16, 60, 9, 42, 37, 58, 25, 139, 113, 7131, 45299, 45299, 83, 10, 16, 60, 1343, 509, 37, 58, 25, 138, 249, 7131, 45299, 45299, 83, 10, 16, 49946, 9, 79, 58, 45299, 45299, 83, 10, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 327, 58, 45299, 45299, 83, 60, 796, 337, 13, 33, 6, 9, 42, 37, 58, 25, 138, 241, 46256, 119, 126, 117, 7131, 45299, 45299, 83, 10, 16, 60, 9, 44, 13, 33, 1343, 509, 37, 58, 25, 138, 249, 7131, 45299, 45299, 83, 10, 16, 49946, 9, 34, 58, 45299, 45299, 83, 10, 16, 60, 9, 42, 37, 58, 25, 138, 249, 7131, 45299, 45299, 83, 10, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 471, 58, 45299, 45299, 83, 60, 796, 337, 13, 49, 6, 9, 79, 58, 45299, 45299, 83, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 252, 58, 45299, 45299, 83, 60, 796, 314, 532, 337, 13, 49, 6, 9, 34, 58, 45299, 45299, 83, 60, 9, 44, 13, 49, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 2439, 1025, 704, 2585, 198, 220, 220, 220, 1395, 82, 58, 45299, 45299, 16, 60, 796, 337, 13, 138, 96, 39611, 98, 9, 7, 44, 13, 33, 6, 9, 42, 37, 58, 25, 138, 241, 46256, 119, 126, 117, 7131, 45299, 45299, 16, 60, 9, 42, 37, 58, 25, 139, 113, 7131, 45299, 45299, 16, 60, 1343, 509, 37, 58, 25, 138, 249, 7131, 45299, 45299, 16, 60, 9, 79, 58, 45299, 45299, 16, 12962, 198, 220, 220, 220, 7377, 96, 82, 58, 45299, 45299, 16, 60, 796, 337, 13, 138, 96, 39611, 98, 532, 337, 13, 138, 96, 39611, 98, 9, 7, 44, 13, 33, 6, 9, 42, 37, 58, 25, 138, 241, 46256, 119, 126, 117, 7131, 45299, 45299, 16, 60, 9, 44, 13, 33, 1343, 509, 37, 58, 25, 138, 249, 7131, 45299, 45299, 16, 49946, 9, 34, 58, 45299, 45299, 16, 60, 9, 42, 37, 58, 25, 138, 249, 7131, 45299, 45299, 16, 12962, 9, 44, 13, 138, 96, 39611, 98, 198, 220, 220, 220, 329, 256, 287, 352, 25, 77, 12, 16, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 82, 58, 45299, 45299, 83, 10, 16, 60, 796, 337, 13, 32, 9, 55, 82, 58, 45299, 45299, 83, 60, 1343, 337, 13, 49, 9, 52, 58, 45299, 45299, 83, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 96, 82, 58, 45299, 45299, 83, 10, 16, 60, 796, 337, 13, 32, 9, 138, 96, 82, 58, 45299, 45299, 83, 60, 9, 44, 13, 32, 6, 1343, 337, 13, 49, 9, 138, 252, 58, 45299, 45299, 83, 60, 9, 44, 13, 49, 6, 532, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 337, 13, 32, 9, 42, 37, 58, 25, 138, 96, 79, 7131, 45299, 45299, 83, 60, 9, 42, 37, 58, 25, 138, 249, 7131, 45299, 45299, 83, 49946, 9, 34, 58, 45299, 45299, 83, 60, 9, 21095, 532, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26067, 9, 34, 58, 45299, 45299, 83, 60, 9, 42, 37, 58, 25, 138, 249, 7131, 45299, 45299, 83, 60, 9, 42, 37, 58, 25, 138, 96, 79, 7131, 45299, 45299, 83, 60, 9, 44, 13, 32, 6, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 360, 713, 7, 25, 55, 79, 5218, 509, 37, 58, 25, 55, 79, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 55, 69, 5218, 509, 37, 58, 25, 55, 69, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 55, 82, 5218, 1395, 82, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 96, 79, 5218, 509, 37, 58, 25, 138, 96, 79, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 96, 69, 5218, 509, 37, 58, 25, 138, 96, 69, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 96, 82, 5218, 7377, 96, 82, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 139, 113, 5218, 509, 37, 58, 25, 139, 113, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 241, 5218, 509, 37, 58, 25, 138, 241, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 241, 46256, 119, 126, 117, 5218, 509, 37, 58, 25, 138, 241, 46256, 119, 126, 117, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 42, 5218, 509, 37, 58, 25, 42, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 39, 5218, 509, 37, 58, 25, 39, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 249, 5218, 509, 37, 58, 25, 138, 249, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 79, 5218, 279, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 34, 5218, 327, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 52, 5218, 471, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 252, 5218, 7377, 252, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 158, 226, 241, 5218, 509, 37, 58, 25, 158, 226, 241, 12962, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 5157, 904, 6188, 3311, 24197, 628, 220, 220, 220, 44056, 642, 13, 17, 13, 2481, 327, 1324, 68, 357, 14315, 8, 198, 37811, 198, 8818, 5157, 904, 21918, 6690, 24197, 7, 44, 3712, 41257, 5432, 44, 11, 331, 8, 198, 220, 220, 220, 299, 796, 2546, 7, 88, 11, 352, 8, 198, 220, 220, 220, 279, 27740, 796, 2546, 7, 44, 13, 33, 11, 362, 8, 198, 220, 220, 220, 10662, 27740, 796, 2546, 7, 88, 11, 362, 8, 198, 220, 220, 220, 26067, 796, 337, 13, 49, 9, 44, 13, 49, 6, 198, 220, 220, 220, 6723, 796, 337, 13, 50, 9, 44, 13, 50, 6, 198, 220, 220, 220, 6723, 46256, 119, 126, 117, 796, 800, 7, 5432, 8, 628, 220, 220, 220, 7377, 118, 796, 1976, 27498, 7, 79, 27740, 11, 352, 11, 299, 8, 198, 220, 220, 220, 7377, 118, 136, 225, 796, 1976, 27498, 7, 79, 27740, 11, 352, 11, 299, 8, 198, 220, 220, 220, 7377, 254, 796, 1976, 27498, 7, 79, 27740, 11, 279, 27740, 11, 299, 8, 198, 220, 220, 220, 7377, 254, 136, 225, 796, 1976, 27498, 7, 79, 27740, 11, 279, 27740, 11, 299, 8, 628, 220, 220, 220, 1395, 82, 796, 1976, 27498, 7, 79, 27740, 11, 352, 11, 299, 8, 198, 220, 220, 220, 7377, 96, 82, 796, 1976, 27498, 7, 79, 27740, 11, 279, 27740, 11, 299, 8, 628, 220, 220, 220, 509, 37, 796, 12612, 805, 22417, 7, 44, 11, 331, 8, 628, 220, 220, 220, 329, 256, 287, 299, 12, 16, 21912, 16, 25, 16, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 118, 136, 225, 58, 45299, 45299, 83, 10, 16, 60, 796, 337, 13, 33, 6, 9, 5432, 46256, 119, 126, 117, 9, 88, 58, 83, 10, 16, 60, 1343, 7377, 118, 58, 45299, 45299, 83, 10, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 254, 136, 225, 58, 45299, 45299, 83, 10, 16, 60, 796, 337, 13, 33, 6, 9, 5432, 46256, 119, 126, 117, 9, 44, 13, 33, 1343, 7377, 254, 58, 45299, 45299, 83, 10, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 569, 796, 800, 7, 40, 1343, 7377, 254, 136, 225, 58, 45299, 45299, 83, 10, 16, 60, 9, 21095, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 118, 58, 45299, 45299, 83, 60, 796, 337, 13, 32, 6, 53, 9, 43000, 136, 225, 58, 45299, 45299, 83, 10, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 254, 58, 45299, 45299, 83, 60, 796, 337, 13, 32, 6, 53, 9, 138, 254, 136, 225, 58, 45299, 45299, 83, 10, 16, 60, 9, 44, 13, 32, 198, 220, 220, 220, 886, 198, 220, 220, 220, 360, 713, 7, 25, 55, 79, 5218, 509, 37, 58, 25, 55, 79, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 55, 69, 5218, 509, 37, 58, 25, 55, 69, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 96, 79, 5218, 509, 37, 58, 25, 138, 96, 79, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 96, 69, 5218, 509, 37, 58, 25, 138, 96, 69, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 43000, 5218, 7377, 118, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 254, 5218, 7377, 254, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 19530, 12, 1891, 904, 32686, 628, 220, 220, 220, 978, 42289, 642, 13, 17, 13, 1828, 327, 1324, 68, 357, 14315, 8, 198, 37811, 198, 8818, 19530, 7282, 904, 50, 5908, 847, 7, 44, 3712, 41257, 5432, 44, 11, 331, 8, 198, 220, 220, 220, 299, 796, 2546, 7, 88, 11, 352, 8, 198, 220, 220, 220, 279, 27740, 796, 2546, 7, 44, 13, 33, 11, 362, 8, 198, 220, 220, 220, 10662, 27740, 796, 2546, 7, 88, 11, 362, 8, 198, 220, 220, 220, 26067, 796, 337, 13, 49, 9, 44, 13, 49, 6, 198, 220, 220, 220, 6723, 796, 337, 13, 50, 9, 44, 13, 50, 6, 198, 220, 220, 220, 6723, 46256, 119, 126, 117, 796, 800, 7, 5432, 8, 628, 220, 220, 220, 7377, 118, 796, 1976, 27498, 7, 79, 27740, 11, 352, 11, 299, 8, 198, 220, 220, 220, 7377, 118, 136, 225, 796, 1976, 27498, 7, 79, 27740, 11, 352, 11, 299, 8, 198, 220, 220, 220, 7377, 254, 796, 1976, 27498, 7, 79, 27740, 11, 279, 27740, 11, 299, 8, 198, 220, 220, 220, 7377, 254, 136, 225, 796, 1976, 27498, 7, 79, 27740, 11, 279, 27740, 11, 299, 8, 628, 220, 220, 220, 1395, 82, 796, 1976, 27498, 7, 79, 27740, 11, 352, 11, 299, 8, 198, 220, 220, 220, 7377, 96, 82, 796, 1976, 27498, 7, 79, 27740, 11, 279, 27740, 11, 299, 8, 628, 220, 220, 220, 509, 37, 796, 12612, 805, 22417, 7, 44, 11, 331, 8, 628, 220, 220, 220, 370, 796, 800, 7, 40, 1343, 7377, 254, 58, 45299, 45299, 77, 60, 9, 42, 37, 58, 25, 138, 96, 69, 7131, 45299, 45299, 77, 12962, 198, 220, 220, 220, 1395, 82, 58, 45299, 45299, 77, 60, 796, 509, 37, 58, 25, 55, 69, 7131, 45299, 45299, 77, 60, 1343, 509, 37, 58, 25, 138, 96, 69, 7131, 45299, 45299, 77, 60, 9, 54, 9, 7, 43000, 58, 45299, 45299, 77, 60, 532, 7377, 254, 58, 45299, 45299, 77, 60, 9, 42, 37, 58, 25, 55, 69, 7131, 45299, 45299, 77, 12962, 198, 220, 220, 220, 7377, 96, 82, 58, 45299, 45299, 77, 60, 796, 509, 37, 58, 25, 138, 96, 69, 7131, 45299, 45299, 77, 60, 532, 509, 37, 58, 25, 138, 96, 69, 7131, 45299, 45299, 77, 60, 9, 54, 9, 138, 254, 58, 45299, 45299, 77, 60, 9, 42, 37, 58, 25, 138, 96, 69, 7131, 45299, 45299, 77, 60, 628, 220, 220, 220, 329, 256, 287, 299, 12, 16, 21912, 16, 25, 16, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 118, 136, 225, 58, 45299, 45299, 83, 10, 16, 60, 796, 337, 13, 33, 6, 9, 5432, 46256, 119, 126, 117, 9, 88, 58, 83, 10, 16, 60, 1343, 7377, 118, 58, 45299, 45299, 83, 10, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 254, 136, 225, 58, 45299, 45299, 83, 10, 16, 60, 796, 337, 13, 33, 6, 9, 5432, 46256, 119, 126, 117, 9, 44, 13, 33, 1343, 7377, 254, 58, 45299, 45299, 83, 10, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 569, 796, 800, 7, 40, 1343, 7377, 254, 136, 225, 58, 45299, 45299, 83, 10, 16, 60, 9, 21095, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 118, 58, 45299, 45299, 83, 60, 796, 337, 13, 32, 6, 53, 9, 43000, 136, 225, 58, 45299, 45299, 83, 10, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 254, 58, 45299, 45299, 83, 60, 796, 337, 13, 32, 6, 53, 9, 138, 254, 136, 225, 58, 45299, 45299, 83, 10, 16, 60, 9, 44, 13, 32, 198, 220, 220, 220, 220, 220, 220, 220, 370, 796, 800, 7, 40, 1343, 7377, 254, 58, 45299, 45299, 83, 60, 9, 42, 37, 58, 25, 138, 96, 69, 7131, 45299, 45299, 83, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 82, 58, 45299, 45299, 83, 60, 796, 509, 37, 58, 25, 55, 69, 7131, 45299, 45299, 83, 60, 1343, 509, 37, 58, 25, 138, 96, 69, 7131, 45299, 45299, 83, 60, 9, 54, 9, 7, 43000, 58, 45299, 45299, 83, 60, 532, 7377, 254, 58, 45299, 45299, 83, 60, 9, 42, 37, 58, 25, 55, 69, 7131, 45299, 45299, 83, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 96, 82, 58, 45299, 45299, 83, 60, 796, 509, 37, 58, 25, 138, 96, 69, 7131, 45299, 45299, 83, 60, 532, 509, 37, 58, 25, 138, 96, 69, 7131, 45299, 45299, 83, 60, 9, 54, 9, 138, 254, 58, 45299, 45299, 83, 60, 9, 42, 37, 58, 25, 138, 96, 69, 7131, 45299, 45299, 83, 60, 198, 220, 220, 220, 886, 198, 220, 220, 220, 360, 713, 7, 25, 55, 79, 5218, 509, 37, 58, 25, 55, 79, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 55, 69, 5218, 509, 37, 58, 25, 55, 69, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 55, 82, 5218, 1395, 82, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 96, 79, 5218, 509, 37, 58, 25, 138, 96, 79, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 96, 69, 5218, 509, 37, 58, 25, 138, 96, 69, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 96, 82, 5218, 7377, 96, 82, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 43000, 5218, 7377, 118, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 138, 254, 5218, 7377, 254, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 5157, 904, 6188, 3311, 24197, 628, 220, 220, 220, 978, 42289, 718, 13, 16, 13, 17, 327, 1324, 68, 357, 14315, 8, 198, 37811, 198, 8818, 5157, 904, 9704, 709, 666, 9012, 16305, 11347, 7, 44, 3712, 41257, 5432, 44, 11, 331, 11, 399, 3712, 5317, 8, 198, 220, 220, 220, 299, 796, 2546, 7, 88, 11, 352, 8, 198, 220, 220, 220, 509, 37, 796, 12612, 805, 22417, 7, 44, 11, 331, 8, 198, 220, 220, 220, 279, 27740, 796, 2546, 7, 44, 13, 33, 11, 362, 8, 198, 220, 220, 220, 10662, 27740, 796, 2546, 7, 88, 11, 362, 8, 628, 220, 220, 220, 1395, 796, 1976, 27498, 7, 79, 27740, 11, 299, 11, 399, 8, 198, 220, 220, 220, 1395, 58, 45299, 16, 11, 47715, 796, 43720, 7, 44, 85, 26447, 7, 3447, 1758, 7, 42, 37, 58, 25, 55, 69, 7131, 45299, 45299, 16, 4357, 16, 828, 509, 37, 58, 25, 138, 96, 69, 7131, 45299, 45299, 16, 46570, 399, 8, 198, 220, 220, 220, 329, 256, 287, 362, 25, 77, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 58, 45299, 83, 11, 47715, 796, 43720, 7, 44, 85, 26447, 7, 3447, 1758, 7, 42, 37, 58, 25, 55, 69, 7131, 45299, 45299, 83, 4357, 16, 828, 509, 37, 58, 25, 138, 96, 69, 7131, 45299, 45299, 83, 46570, 399, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 1395, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 3409, 11347, 351, 20446, 2439, 1025, 722, 628, 220, 220, 220, 978, 42289, 718, 13, 16, 13, 18, 327, 1324, 68, 357, 14315, 8, 198, 37811, 198, 8818, 3409, 11347, 3152, 36248, 7556, 1025, 722, 7, 44, 3712, 41257, 5432, 44, 11, 331, 8, 198, 220, 220, 220, 299, 796, 2546, 7, 88, 11, 352, 8, 198, 220, 220, 220, 279, 27740, 796, 2546, 7, 44, 13, 33, 11, 362, 8, 198, 220, 220, 220, 10662, 27740, 796, 2546, 7, 88, 11, 362, 8, 628, 220, 220, 220, 41420, 17478, 796, 2980, 378, 7, 44, 11, 299, 8, 198, 220, 220, 220, 509, 37, 796, 4307, 5945, 590, 50, 5908, 847, 7, 44, 11, 331, 8, 198, 220, 220, 220, 509, 37, 17478, 796, 4307, 5945, 590, 50, 5908, 847, 7, 44, 11, 41420, 17478, 58, 25, 56, 12962, 198, 220, 220, 220, 1441, 509, 37, 58, 25, 55, 69, 60, 1343, 41420, 17478, 58, 25, 55, 60, 532, 509, 37, 17478, 58, 25, 55, 69, 60, 198, 437, 198 ]
1.401053
4,558
module MCMC Base.warn("MCMC.jl has moved to Lora.jl. Development in Lora.jl will continue. MCMC.jl is a placeholder for the future merge of various independent MCMC implementations in Julia, including Lora.jl.") end
[ 21412, 13122, 9655, 198, 198, 14881, 13, 40539, 7203, 9655, 9655, 13, 20362, 468, 3888, 284, 406, 5799, 13, 20362, 13, 7712, 287, 406, 5799, 13, 20362, 481, 2555, 13, 13122, 9655, 13, 20362, 318, 257, 46076, 329, 262, 2003, 20121, 286, 2972, 4795, 13122, 9655, 25504, 287, 22300, 11, 1390, 406, 5799, 13, 20362, 19570, 198, 198, 437, 198 ]
3.633333
60
using BoardGames struct RandomStrategy <: Strategy end function BoardGames.getmove(board, s::RandomStrategy) rand(getmoves(board)) end
[ 3500, 5926, 24474, 198, 198, 7249, 14534, 13290, 4338, 1279, 25, 20561, 886, 198, 198, 8818, 5926, 24474, 13, 1136, 21084, 7, 3526, 11, 264, 3712, 29531, 13290, 4338, 8, 198, 220, 220, 220, 43720, 7, 1136, 76, 5241, 7, 3526, 4008, 198, 437, 198 ]
3.133333
45
# This file is a part of JuliaFEM. # License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md # # Generating local matrices for problems using JuliaFEM # Plane stress Quad4 element with linear material model: # In JuliaFEM the plane stress element can be defined using Quad4 element which # has four nodes. First we need to define geometry. Geometry is defined with # node number and coordinates into a dictionary. X = Dict(1 => [0.0, 0.0], 2 => [2.0, 0.0], 3 => [2.0, 2.0], 4 => [0.0, 2.0]) # Element is created using Element(element_type, connectivity) -function. Here # we create a Quad4 element which is connected to nodes 1-4. element = Element(Quad4, [1, 2, 3, 4]) # Element properties are defined using update!(element, field, value) -function. # To create stiffness matrix we need to define geometry, Young's modulus and # Poisson's ratio. update!(element, "geometry", X) update!(element, "youngs modulus", 288.0) update!(element, "poissons ratio", 1/3) # Then we have to create a problem using # Problem(problem_type, name, number_of_dofs_per_node) -function. Problem type # in this case is Elasticity and number of dofs per node is two in 2D problem. # In the problem.properties.formulation we must define whether we are using # :plane_stress or :plane_strain formulation. problem = Problem(Elasticity, "example elasticity problem", 2) problem.properties.formulation = :plane_stress # Elements need to added to the problem using add_elements!(problem, element) # -function. add_elements!(problem, [element]) # Normally next thing to do after defining problems would be running the analysis # but now we are only interested in stiffness matrix. We have to assemble the # matrix using assemble!(problem, time) -function. assemble!(problem, 0.0) # Now we have the stiffness matrix in problem.assembly.K you may type it to # console and see that it is in sparse matrix form. We can write it as normal # matrix with full() -function. K = full(problem.assembly.K) display(K) # This is not necessary but we can round it with round() -function. K = round(K,2) display(K)
[ 2, 770, 2393, 318, 257, 636, 286, 22300, 37, 3620, 13, 198, 2, 13789, 318, 17168, 25, 766, 3740, 1378, 12567, 13, 785, 14, 16980, 544, 37, 3620, 14, 16980, 544, 37, 3620, 13, 20362, 14, 2436, 672, 14, 9866, 14, 43, 2149, 24290, 13, 9132, 198, 198, 2, 1303, 2980, 803, 1957, 2603, 45977, 329, 2761, 198, 198, 3500, 22300, 37, 3620, 198, 198, 2, 36829, 5503, 20648, 19, 5002, 351, 14174, 2587, 2746, 25, 198, 198, 2, 554, 22300, 37, 3620, 262, 6614, 5503, 5002, 460, 307, 5447, 1262, 20648, 19, 5002, 543, 198, 2, 468, 1440, 13760, 13, 3274, 356, 761, 284, 8160, 22939, 13, 2269, 15748, 318, 5447, 351, 198, 2, 10139, 1271, 290, 22715, 656, 257, 22155, 13, 198, 198, 55, 796, 360, 713, 7, 16, 5218, 685, 15, 13, 15, 11, 657, 13, 15, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 362, 5218, 685, 17, 13, 15, 11, 657, 13, 15, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 513, 5218, 685, 17, 13, 15, 11, 362, 13, 15, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 604, 5218, 685, 15, 13, 15, 11, 362, 13, 15, 12962, 198, 198, 2, 11703, 318, 2727, 1262, 11703, 7, 30854, 62, 4906, 11, 19843, 8, 532, 8818, 13, 3423, 198, 2, 356, 2251, 257, 20648, 19, 5002, 543, 318, 5884, 284, 13760, 352, 12, 19, 13, 198, 198, 30854, 796, 11703, 7, 4507, 324, 19, 11, 685, 16, 11, 362, 11, 513, 11, 604, 12962, 198, 198, 2, 11703, 6608, 389, 5447, 1262, 4296, 0, 7, 30854, 11, 2214, 11, 1988, 8, 532, 8818, 13, 198, 2, 1675, 2251, 49586, 17593, 356, 761, 284, 8160, 22939, 11, 6960, 338, 953, 23515, 290, 198, 2, 7695, 30927, 338, 8064, 13, 198, 198, 19119, 0, 7, 30854, 11, 366, 469, 15748, 1600, 1395, 8, 198, 19119, 0, 7, 30854, 11, 366, 35465, 82, 953, 23515, 1600, 35419, 13, 15, 8, 198, 19119, 0, 7, 30854, 11, 366, 7501, 747, 684, 8064, 1600, 352, 14, 18, 8, 198, 198, 2, 3244, 356, 423, 284, 2251, 257, 1917, 1262, 198, 2, 20647, 7, 45573, 62, 4906, 11, 1438, 11, 1271, 62, 1659, 62, 67, 1659, 82, 62, 525, 62, 17440, 8, 532, 8818, 13, 20647, 2099, 198, 2, 287, 428, 1339, 318, 48567, 414, 290, 1271, 286, 466, 9501, 583, 10139, 318, 734, 287, 362, 35, 1917, 13, 198, 2, 554, 262, 1917, 13, 48310, 13, 687, 1741, 356, 1276, 8160, 1771, 356, 389, 1262, 198, 2, 1058, 14382, 62, 41494, 393, 1058, 14382, 62, 2536, 391, 31760, 13, 198, 198, 45573, 796, 20647, 7, 9527, 3477, 414, 11, 366, 20688, 27468, 414, 1917, 1600, 362, 8, 198, 45573, 13, 48310, 13, 687, 1741, 796, 1058, 14382, 62, 41494, 198, 198, 2, 26632, 761, 284, 2087, 284, 262, 1917, 1262, 751, 62, 68, 3639, 0, 7, 45573, 11, 5002, 8, 198, 2, 532, 8818, 13, 198, 198, 2860, 62, 68, 3639, 0, 7, 45573, 11, 685, 30854, 12962, 198, 198, 2, 29282, 1306, 1517, 284, 466, 706, 16215, 2761, 561, 307, 2491, 262, 3781, 198, 2, 475, 783, 356, 389, 691, 4609, 287, 49586, 17593, 13, 775, 423, 284, 25432, 262, 198, 2, 17593, 1262, 25432, 0, 7, 45573, 11, 640, 8, 532, 8818, 13, 198, 198, 292, 15140, 0, 7, 45573, 11, 657, 13, 15, 8, 198, 198, 2, 2735, 356, 423, 262, 49586, 17593, 287, 1917, 13, 41873, 13, 42, 345, 743, 2099, 340, 284, 198, 2, 8624, 290, 766, 326, 340, 318, 287, 29877, 17593, 1296, 13, 775, 460, 3551, 340, 355, 3487, 198, 2, 17593, 351, 1336, 3419, 532, 8818, 13, 198, 198, 42, 796, 1336, 7, 45573, 13, 41873, 13, 42, 8, 198, 13812, 7, 42, 8, 198, 198, 2, 770, 318, 407, 3306, 475, 356, 460, 2835, 340, 351, 2835, 3419, 532, 8818, 13, 198, 198, 42, 796, 2835, 7, 42, 11, 17, 8, 198, 13812, 7, 42, 8, 198 ]
3.235294
663
export RecipeInflation, filter_state!, vortexassim struct RecipeInflation <: InflationType "Parameters" p::Array{Float64,1} end # Filtering function to bound the strength of the vortices and sources function filter_state!(x, config::VortexConfig) @inbounds for j=1:config.Nv # Ensure that vortices stay above the x axis x[3*j-1] = clamp(x[3*j-1], 1e-2, Inf) # Ensure that the circulation remains positive x[3*j] = clamp(x[3*j], 0.0, Inf) end return x end # This function apply additive inflation to the state components only, # not the measurements, X is an Array{Float64,2} or a view of it function (ϵ::RecipeInflation)(X, Ny, Nx, config::VortexConfig) ϵX, ϵΓ = ϵ.p Nv = config.Nv @assert Nx == 3*Nv for col in eachcol(X) if config.Nv > 0 for i in 1:Nv col[Ny + 3*(i-1) + 1: Ny + 3*(i-1) + 2] .+= ϵX*randn(2) col[Ny + 3*i] += ϵΓ*randn() end end end end function (ϵ::RecipeInflation)(x::AbstractVector{Float64}, config::VortexConfig) ϵX, ϵΓ = ϵ.p Nv = config.Nv Nx = size(x, 1) @assert Nx == 3*Nv for i=1:Nv x[3*(i-1) + 1:3*(i-1) + 2] .+= ϵX*randn(2) x[3*(i-1) + 3] += ϵΓ*randn() end end # Create a function to perform the sequential assimilation for any sequential filter SeqFilter function vortexassim(algo::SeqFilter, X, tspan::Tuple{S,S}, config::VortexConfig, data::SyntheticData; withfreestream::Bool = false, P::Parallel = serial) where {S<:Real} # Define the additive Inflation ϵX = config.ϵX ϵΓ = config.ϵΓ β = config.β ϵY = config.ϵY Ny = size(config.ss,1) ϵx = RecipeInflation([ϵX; ϵΓ]) ϵmul = MultiplicativeInflation(β) # Set different times Δtobs = algo.Δtobs Δtdyn = algo.Δtdyn t0, tf = tspan step = ceil(Int, Δtobs/Δtdyn) n0 = ceil(Int64, t0/Δtobs) + 1 J = (tf-t0)/Δtobs Acycle = n0:n0+J-1 # Array dimensions Nypx, Ne = size(X) Nx = Nypx - Ny ystar = zeros(Ny) cachevels = allocate_velocity(state_to_lagrange(X[Ny+1:Ny+Nx,1], config)) h(x, t) = measure_state(x, t, config; withfreestream = withfreestream) press_itp = CubicSplineInterpolation((LinRange(real(config.ss[1]), real(config.ss[end]), length(config.ss)), t0:data.Δt:tf), data.yt, extrapolation_bc = Line()) yt(t) = press_itp(real.(config.ss), t) Xf = Array{Float64,2}[] push!(Xf, copy(state(X, Ny, Nx))) Xa = Array{Float64,2}[] push!(Xa, copy(state(X, Ny, Nx))) # Run particle filter @showprogress for i=1:length(Acycle) # Forecast step @inbounds for j=1:step tj = t0+(i-1)*Δtobs+(j-1)*Δtdyn X, _ = vortex(X, tj, Ny, Nx, cachevels, config, withfreestream = withfreestream) end push!(Xf, deepcopy(state(X, Ny, Nx))) # Get real measurement ystar .= yt(t0+i*Δtobs) # Perform state inflation ϵmul(X, Ny+1, Ny+Nx) ϵx(X, Ny, Nx, config) # Filter state if algo.isfiltered == true @inbounds for i=1:Ne x = view(X, Ny+1:Ny+Nx, i) x .= filter_state!(x, config) end end observe(h, X, t0+i*Δtobs, Ny, Nx; P = P) ϵ = algo.ϵy.σ*randn(Ny, Ne) .+ algo.ϵy.m Xpert = (1/sqrt(Ne-1))*(X[Ny+1:Ny+Nx,:] .- mean(X[Ny+1:Ny+Nx,:]; dims = 2)[:,1]) HXpert = (1/sqrt(Ne-1))*(X[1:Ny,:] .- mean(X[1:Ny,:]; dims = 2)[:,1]) ϵpert = (1/sqrt(Ne-1))*(ϵ .- mean(ϵ; dims = 2)[:,1]) # Kenkf = Xpert*HXpert'*inv(HXpert*HXpert'+ϵpert*ϵpert') b = (HXpert*HXpert' + ϵpert*ϵpert')\(ystar .- (X[1:Ny,:] + ϵ)) view(X,Ny+1:Ny+Nx,:) .+= (Xpert*HXpert')*b # @show cumsum(svd((Xpert*HXpert')*inv((HXpert*HXpert' + ϵpert*ϵpert'))).S)./sum(svd((Xpert*HXpert')*inv((HXpert*HXpert' + ϵpert*ϵpert'))).S) # X = algo(X, ystar, t0+i*Δtobs) # Filter state if algo.isfiltered == true @inbounds for i=1:Ne x = view(X, Ny+1:Ny+Nx, i) x .= filter_state!(x, config) end end push!(Xa, deepcopy(state(X, Ny, Nx))) end return Xf, Xa end
[ 39344, 26694, 818, 33521, 11, 8106, 62, 5219, 28265, 42726, 562, 320, 198, 198, 7249, 26694, 818, 33521, 1279, 25, 554, 33521, 6030, 198, 220, 220, 220, 366, 48944, 1, 198, 220, 220, 220, 279, 3712, 19182, 90, 43879, 2414, 11, 16, 92, 198, 437, 198, 198, 2, 7066, 20212, 2163, 284, 5421, 262, 4202, 286, 262, 410, 419, 1063, 290, 4237, 198, 8818, 8106, 62, 5219, 0, 7, 87, 11, 4566, 3712, 53, 26158, 16934, 8, 198, 197, 31, 259, 65, 3733, 329, 474, 28, 16, 25, 11250, 13, 45, 85, 198, 197, 197, 2, 48987, 326, 410, 419, 1063, 2652, 2029, 262, 2124, 16488, 198, 197, 197, 87, 58, 18, 9, 73, 12, 16, 60, 796, 29405, 7, 87, 58, 18, 9, 73, 12, 16, 4357, 352, 68, 12, 17, 11, 4806, 8, 198, 197, 197, 2, 48987, 326, 262, 19133, 3793, 3967, 198, 220, 220, 220, 220, 197, 87, 58, 18, 9, 73, 60, 796, 29405, 7, 87, 58, 18, 9, 73, 4357, 657, 13, 15, 11, 4806, 8, 198, 197, 437, 198, 220, 220, 220, 1441, 2124, 198, 437, 198, 198, 2, 770, 2163, 4174, 38298, 10610, 284, 262, 1181, 6805, 691, 11, 198, 2, 407, 262, 13871, 11, 1395, 318, 281, 15690, 90, 43879, 2414, 11, 17, 92, 393, 257, 1570, 286, 340, 198, 8818, 357, 139, 113, 3712, 37523, 818, 33521, 5769, 55, 11, 17735, 11, 399, 87, 11, 4566, 3712, 53, 26158, 16934, 8, 198, 197, 139, 113, 55, 11, 18074, 113, 138, 241, 796, 18074, 113, 13, 79, 198, 197, 45, 85, 796, 4566, 13, 45, 85, 198, 197, 31, 30493, 399, 87, 6624, 513, 9, 45, 85, 198, 197, 1640, 951, 287, 1123, 4033, 7, 55, 8, 198, 197, 197, 361, 4566, 13, 45, 85, 1875, 657, 198, 197, 197, 197, 1640, 1312, 287, 352, 25, 45, 85, 198, 197, 197, 197, 197, 4033, 58, 45, 88, 1343, 513, 9, 7, 72, 12, 16, 8, 1343, 352, 25, 17735, 1343, 513, 9, 7, 72, 12, 16, 8, 1343, 362, 60, 764, 47932, 18074, 113, 55, 9, 25192, 77, 7, 17, 8, 198, 197, 197, 197, 197, 4033, 58, 45, 88, 1343, 513, 9, 72, 60, 15853, 18074, 113, 138, 241, 9, 25192, 77, 3419, 198, 197, 197, 197, 437, 198, 197, 197, 437, 198, 197, 437, 198, 437, 198, 198, 8818, 357, 139, 113, 3712, 37523, 818, 33521, 5769, 87, 3712, 23839, 38469, 90, 43879, 2414, 5512, 4566, 3712, 53, 26158, 16934, 8, 198, 197, 139, 113, 55, 11, 18074, 113, 138, 241, 796, 18074, 113, 13, 79, 198, 197, 45, 85, 796, 4566, 13, 45, 85, 198, 197, 45, 87, 796, 2546, 7, 87, 11, 352, 8, 628, 197, 31, 30493, 399, 87, 6624, 513, 9, 45, 85, 198, 197, 1640, 1312, 28, 16, 25, 45, 85, 198, 197, 197, 87, 58, 18, 9, 7, 72, 12, 16, 8, 1343, 352, 25, 18, 9, 7, 72, 12, 16, 8, 1343, 362, 60, 764, 47932, 18074, 113, 55, 9, 25192, 77, 7, 17, 8, 198, 197, 197, 87, 58, 18, 9, 7, 72, 12, 16, 8, 1343, 513, 60, 15853, 18074, 113, 138, 241, 9, 25192, 77, 3419, 198, 197, 437, 198, 437, 198, 198, 2, 13610, 257, 2163, 284, 1620, 262, 35582, 840, 42963, 329, 597, 35582, 8106, 1001, 80, 22417, 198, 8818, 42726, 562, 320, 7, 282, 2188, 3712, 4653, 80, 22417, 11, 1395, 11, 256, 12626, 3712, 51, 29291, 90, 50, 11, 50, 5512, 4566, 3712, 53, 26158, 16934, 11, 1366, 3712, 13940, 429, 6587, 6601, 26, 351, 19503, 395, 1476, 3712, 33, 970, 796, 3991, 11, 350, 3712, 10044, 29363, 796, 11389, 8, 810, 1391, 50, 27, 25, 15633, 92, 628, 197, 2, 2896, 500, 262, 38298, 554, 33521, 198, 197, 139, 113, 55, 796, 4566, 13, 139, 113, 55, 198, 197, 139, 113, 138, 241, 796, 4566, 13, 139, 113, 138, 241, 198, 197, 26638, 796, 4566, 13, 26638, 198, 197, 139, 113, 56, 796, 4566, 13, 139, 113, 56, 628, 197, 45, 88, 796, 2546, 7, 11250, 13, 824, 11, 16, 8, 628, 197, 139, 113, 87, 796, 26694, 818, 33521, 26933, 139, 113, 55, 26, 18074, 113, 138, 241, 12962, 198, 197, 139, 113, 76, 377, 796, 15237, 489, 43058, 818, 33521, 7, 26638, 8, 198, 197, 2, 5345, 1180, 1661, 198, 197, 138, 242, 83, 8158, 796, 435, 2188, 13, 138, 242, 83, 8158, 198, 197, 138, 242, 8671, 2047, 796, 435, 2188, 13, 138, 242, 8671, 2047, 198, 197, 83, 15, 11, 48700, 796, 256, 12626, 198, 197, 9662, 796, 2906, 346, 7, 5317, 11, 37455, 83, 8158, 14, 138, 242, 8671, 2047, 8, 628, 197, 77, 15, 796, 2906, 346, 7, 5317, 2414, 11, 256, 15, 14, 138, 242, 83, 8158, 8, 1343, 352, 198, 197, 41, 796, 357, 27110, 12, 83, 15, 20679, 138, 242, 83, 8158, 198, 197, 32, 13696, 796, 299, 15, 25, 77, 15, 10, 41, 12, 16, 628, 197, 2, 15690, 15225, 198, 197, 45, 4464, 87, 11, 3169, 796, 2546, 7, 55, 8, 198, 197, 45, 87, 796, 399, 4464, 87, 532, 17735, 198, 197, 88, 7364, 796, 1976, 27498, 7, 45, 88, 8, 628, 197, 23870, 626, 82, 796, 31935, 62, 626, 11683, 7, 5219, 62, 1462, 62, 30909, 9521, 7, 55, 58, 45, 88, 10, 16, 25, 45, 88, 10, 45, 87, 11, 16, 4357, 4566, 4008, 628, 197, 71, 7, 87, 11, 256, 8, 796, 3953, 62, 5219, 7, 87, 11, 256, 11, 4566, 26, 351, 19503, 395, 1476, 796, 351, 19503, 395, 1476, 8, 198, 197, 8439, 62, 270, 79, 796, 7070, 291, 26568, 500, 9492, 16104, 341, 19510, 14993, 17257, 7, 5305, 7, 11250, 13, 824, 58, 16, 46570, 1103, 7, 11250, 13, 824, 58, 437, 46570, 4129, 7, 11250, 13, 824, 36911, 198, 197, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 15, 25, 7890, 13, 138, 242, 83, 25, 27110, 828, 1366, 13, 20760, 11, 36804, 21417, 62, 15630, 796, 220, 6910, 28955, 628, 197, 20760, 7, 83, 8, 796, 1803, 62, 270, 79, 7, 5305, 12195, 11250, 13, 824, 828, 256, 8, 198, 197, 55, 69, 796, 15690, 90, 43879, 2414, 11, 17, 92, 21737, 198, 197, 14689, 0, 7, 55, 69, 11, 4866, 7, 5219, 7, 55, 11, 17735, 11, 399, 87, 22305, 628, 197, 55, 64, 796, 15690, 90, 43879, 2414, 11, 17, 92, 21737, 198, 197, 14689, 0, 7, 55, 64, 11, 4866, 7, 5219, 7, 55, 11, 17735, 11, 399, 87, 22305, 628, 197, 2, 5660, 18758, 8106, 198, 197, 31, 12860, 33723, 329, 1312, 28, 16, 25, 13664, 7, 32, 13696, 8, 198, 197, 220, 220, 1303, 4558, 2701, 2239, 198, 197, 220, 220, 2488, 259, 65, 3733, 329, 474, 28, 16, 25, 9662, 198, 197, 197, 220, 220, 256, 73, 796, 256, 15, 33747, 72, 12, 16, 27493, 138, 242, 83, 8158, 33747, 73, 12, 16, 27493, 138, 242, 8671, 2047, 198, 197, 197, 220, 220, 1395, 11, 4808, 796, 42726, 7, 55, 11, 256, 73, 11, 17735, 11, 399, 87, 11, 12940, 626, 82, 11, 4566, 11, 351, 19503, 395, 1476, 796, 351, 19503, 395, 1476, 8, 198, 197, 220, 220, 886, 628, 197, 220, 220, 4574, 0, 7, 55, 69, 11, 2769, 30073, 7, 5219, 7, 55, 11, 17735, 11, 399, 87, 22305, 628, 197, 220, 220, 1303, 3497, 1103, 15558, 198, 197, 220, 220, 331, 7364, 764, 28, 331, 83, 7, 83, 15, 10, 72, 9, 138, 242, 83, 8158, 8, 628, 197, 220, 220, 1303, 35006, 1181, 10610, 198, 197, 220, 220, 18074, 113, 76, 377, 7, 55, 11, 17735, 10, 16, 11, 17735, 10, 45, 87, 8, 198, 197, 220, 220, 18074, 113, 87, 7, 55, 11, 17735, 11, 399, 87, 11, 4566, 8, 628, 197, 220, 220, 1303, 25853, 1181, 198, 197, 220, 220, 611, 435, 2188, 13, 4468, 346, 4400, 6624, 2081, 198, 197, 197, 220, 220, 2488, 259, 65, 3733, 329, 1312, 28, 16, 25, 8199, 198, 197, 197, 197, 220, 220, 2124, 796, 1570, 7, 55, 11, 17735, 10, 16, 25, 45, 88, 10, 45, 87, 11, 1312, 8, 198, 197, 197, 197, 220, 220, 2124, 764, 28, 8106, 62, 5219, 0, 7, 87, 11, 4566, 8, 198, 197, 197, 220, 220, 886, 198, 197, 220, 220, 886, 628, 197, 220, 220, 12414, 7, 71, 11, 1395, 11, 256, 15, 10, 72, 9, 138, 242, 83, 8158, 11, 17735, 11, 399, 87, 26, 350, 796, 350, 8, 628, 197, 220, 220, 18074, 113, 796, 435, 2188, 13, 139, 113, 88, 13, 38392, 9, 25192, 77, 7, 45, 88, 11, 3169, 8, 764, 10, 435, 2188, 13, 139, 113, 88, 13, 76, 628, 197, 220, 220, 1395, 11766, 796, 357, 16, 14, 31166, 17034, 7, 8199, 12, 16, 4008, 9, 7, 55, 58, 45, 88, 10, 16, 25, 45, 88, 10, 45, 87, 11, 47715, 764, 12, 1612, 7, 55, 58, 45, 88, 10, 16, 25, 45, 88, 10, 45, 87, 11, 25, 11208, 5391, 82, 796, 362, 38381, 45299, 16, 12962, 198, 197, 220, 220, 367, 55, 11766, 796, 357, 16, 14, 31166, 17034, 7, 8199, 12, 16, 4008, 9, 7, 55, 58, 16, 25, 45, 88, 11, 47715, 764, 12, 1612, 7, 55, 58, 16, 25, 45, 88, 11, 25, 11208, 5391, 82, 796, 362, 38381, 45299, 16, 12962, 198, 197, 220, 220, 18074, 113, 11766, 796, 357, 16, 14, 31166, 17034, 7, 8199, 12, 16, 4008, 9, 7, 139, 113, 764, 12, 1612, 7, 139, 113, 26, 5391, 82, 796, 362, 38381, 45299, 16, 12962, 198, 197, 220, 220, 1303, 7148, 74, 69, 796, 1395, 11766, 9, 39, 55, 11766, 6, 9, 16340, 7, 39, 55, 11766, 9, 39, 55, 11766, 6, 10, 139, 113, 11766, 9, 139, 113, 11766, 11537, 628, 197, 220, 220, 275, 796, 357, 39, 55, 11766, 9, 39, 55, 11766, 6, 1343, 18074, 113, 11766, 9, 139, 113, 11766, 11537, 59, 7, 88, 7364, 764, 12, 357, 55, 58, 16, 25, 45, 88, 11, 47715, 1343, 18074, 113, 4008, 198, 197, 220, 220, 1570, 7, 55, 11, 45, 88, 10, 16, 25, 45, 88, 10, 45, 87, 11, 25, 8, 764, 47932, 357, 55, 11766, 9, 39, 55, 11766, 11537, 9, 65, 628, 197, 220, 220, 1303, 2488, 12860, 269, 5700, 388, 7, 82, 20306, 19510, 55, 11766, 9, 39, 55, 11766, 11537, 9, 16340, 19510, 39, 55, 11766, 9, 39, 55, 11766, 6, 1343, 18074, 113, 11766, 9, 139, 113, 11766, 6, 4008, 737, 50, 737, 14, 16345, 7, 82, 20306, 19510, 55, 11766, 9, 39, 55, 11766, 11537, 9, 16340, 19510, 39, 55, 11766, 9, 39, 55, 11766, 6, 1343, 18074, 113, 11766, 9, 139, 113, 11766, 6, 4008, 737, 50, 8, 628, 197, 220, 220, 1303, 1395, 796, 435, 2188, 7, 55, 11, 331, 7364, 11, 256, 15, 10, 72, 9, 138, 242, 83, 8158, 8, 628, 197, 220, 220, 1303, 25853, 1181, 198, 197, 220, 220, 611, 435, 2188, 13, 4468, 346, 4400, 6624, 2081, 198, 197, 197, 220, 220, 2488, 259, 65, 3733, 329, 1312, 28, 16, 25, 8199, 198, 197, 197, 197, 220, 220, 2124, 796, 1570, 7, 55, 11, 17735, 10, 16, 25, 45, 88, 10, 45, 87, 11, 1312, 8, 198, 197, 197, 197, 220, 220, 2124, 764, 28, 8106, 62, 5219, 0, 7, 87, 11, 4566, 8, 198, 197, 197, 220, 220, 886, 198, 197, 220, 220, 886, 628, 197, 220, 220, 4574, 0, 7, 55, 64, 11, 2769, 30073, 7, 5219, 7, 55, 11, 17735, 11, 399, 87, 22305, 198, 197, 437, 628, 197, 7783, 1395, 69, 11, 1395, 64, 198, 437, 198 ]
1.974425
1,955
using Revise using ADCME using PyCall using LinearAlgebra using PyPlot using SparseArrays using Random # Random.seed!(233) # TODO: specify your input parameters A = sprand(10,5,0.3) f = rand(10) sol = A\f u = constant(A)\f sess = Session() init(sess) @show run(sess, u)-sol # error() # TODO: change your test parameter to `m` # gradient check -- v function scalar_function(m) return sum((constant(A)\m)^2) B = SparseTensor(ii, jj, m, size(A)...) return sum((B\Array([f f]'))^2) end ii, jj, vv = find(constant(A)) # TODO: change `m_` and `v_` to appropriate values # m_ = constant(rand(length(vv))) # v_ = rand(length(vv)) m_ = constant(rand(5,10)) v_ = rand(5,10) y_ = scalar_function(m_) dy_ = gradients(y_, m_) ms_ = Array{Any}(undef, 5) ys_ = Array{Any}(undef, 5) s_ = Array{Any}(undef, 5) w_ = Array{Any}(undef, 5) gs_ = @. 1 / 10^(1:5) for i = 1:5 g_ = gs_[i] ms_[i] = m_ + g_*v_ ys_[i] = scalar_function(ms_[i]) s_[i] = ys_[i] - y_ w_[i] = s_[i] - g_*sum(v_.*dy_) end sess = Session() init(sess) sval_ = run(sess, s_) wval_ = run(sess, w_) close("all") loglog(gs_, abs.(sval_), "*-", label="finite difference") loglog(gs_, abs.(wval_), "+-", label="automatic differentiation") loglog(gs_, gs_.^2 * 0.5*abs(wval_[1])/gs_[1]^2, "--",label="\$\\mathcal{O}(\\gamma^2)\$") loglog(gs_, gs_ * 0.5*abs(sval_[1])/gs_[1], "--",label="\$\\mathcal{O}(\\gamma)\$") plt.gca().invert_xaxis() legend() xlabel("\$\\gamma\$") ylabel("Error")
[ 3500, 5416, 786, 198, 198, 3500, 49169, 11682, 198, 3500, 9485, 14134, 198, 3500, 44800, 2348, 29230, 198, 3500, 9485, 43328, 198, 3500, 1338, 17208, 3163, 20477, 198, 3500, 14534, 198, 2, 14534, 13, 28826, 0, 7, 25429, 8, 628, 198, 2, 16926, 46, 25, 11986, 534, 5128, 10007, 198, 32, 796, 7500, 392, 7, 940, 11, 20, 11, 15, 13, 18, 8, 198, 69, 796, 43720, 7, 940, 8, 198, 34453, 796, 317, 59, 69, 198, 84, 796, 6937, 7, 32, 19415, 69, 198, 198, 82, 408, 796, 23575, 3419, 198, 15003, 7, 82, 408, 8, 198, 31, 12860, 1057, 7, 82, 408, 11, 334, 13219, 34453, 198, 2, 4049, 3419, 628, 198, 2, 16926, 46, 25, 1487, 534, 1332, 11507, 284, 4600, 76, 63, 198, 2, 31312, 2198, 1377, 410, 198, 8818, 16578, 283, 62, 8818, 7, 76, 8, 198, 220, 220, 220, 1441, 2160, 19510, 9979, 415, 7, 32, 19415, 76, 8, 61, 17, 8, 198, 220, 220, 220, 347, 796, 1338, 17208, 51, 22854, 7, 4178, 11, 474, 73, 11, 285, 11, 2546, 7, 32, 8, 23029, 198, 220, 220, 220, 1441, 2160, 19510, 33, 59, 19182, 26933, 69, 277, 49946, 4008, 61, 17, 8, 198, 437, 198, 198, 4178, 11, 474, 73, 11, 410, 85, 796, 1064, 7, 9979, 415, 7, 32, 4008, 198, 198, 2, 16926, 46, 25, 1487, 4600, 76, 62, 63, 290, 4600, 85, 62, 63, 284, 5035, 3815, 198, 2, 285, 62, 796, 6937, 7, 25192, 7, 13664, 7, 25093, 22305, 198, 2, 410, 62, 796, 43720, 7, 13664, 7, 25093, 4008, 198, 76, 62, 796, 6937, 7, 25192, 7, 20, 11, 940, 4008, 198, 85, 62, 796, 43720, 7, 20, 11, 940, 8, 198, 88, 62, 796, 16578, 283, 62, 8818, 7, 76, 62, 8, 198, 9892, 62, 796, 3915, 2334, 7, 88, 62, 11, 285, 62, 8, 198, 907, 62, 796, 15690, 90, 7149, 92, 7, 917, 891, 11, 642, 8, 198, 893, 62, 796, 15690, 90, 7149, 92, 7, 917, 891, 11, 642, 8, 198, 82, 62, 796, 15690, 90, 7149, 92, 7, 917, 891, 11, 642, 8, 198, 86, 62, 796, 15690, 90, 7149, 92, 7, 917, 891, 11, 642, 8, 198, 14542, 62, 796, 220, 2488, 13, 352, 1220, 838, 61, 7, 16, 25, 20, 8, 198, 198, 1640, 1312, 796, 352, 25, 20, 198, 220, 220, 220, 308, 62, 796, 308, 82, 62, 58, 72, 60, 198, 220, 220, 220, 13845, 62, 58, 72, 60, 796, 285, 62, 1343, 308, 62, 9, 85, 62, 198, 220, 220, 220, 331, 82, 62, 58, 72, 60, 796, 16578, 283, 62, 8818, 7, 907, 62, 58, 72, 12962, 198, 220, 220, 220, 264, 62, 58, 72, 60, 796, 331, 82, 62, 58, 72, 60, 532, 331, 62, 198, 220, 220, 220, 266, 62, 58, 72, 60, 796, 264, 62, 58, 72, 60, 532, 308, 62, 9, 16345, 7, 85, 62, 15885, 9892, 62, 8, 198, 437, 198, 198, 82, 408, 796, 23575, 3419, 198, 15003, 7, 82, 408, 8, 198, 82, 2100, 62, 796, 1057, 7, 82, 408, 11, 264, 62, 8, 198, 86, 2100, 62, 796, 1057, 7, 82, 408, 11, 266, 62, 8, 198, 19836, 7203, 439, 4943, 198, 6404, 6404, 7, 14542, 62, 11, 2352, 12195, 82, 2100, 62, 828, 366, 9, 12, 1600, 6167, 2625, 69, 9504, 3580, 4943, 198, 6404, 6404, 7, 14542, 62, 11, 2352, 12195, 86, 2100, 62, 828, 43825, 12, 1600, 6167, 2625, 37800, 32488, 4943, 198, 6404, 6404, 7, 14542, 62, 11, 308, 82, 44807, 61, 17, 1635, 657, 13, 20, 9, 8937, 7, 86, 2100, 62, 58, 16, 12962, 14, 14542, 62, 58, 16, 60, 61, 17, 11, 366, 438, 1600, 18242, 2625, 59, 3, 6852, 11018, 9948, 90, 46, 92, 7, 6852, 28483, 2611, 61, 17, 19415, 3, 4943, 198, 6404, 6404, 7, 14542, 62, 11, 308, 82, 62, 1635, 657, 13, 20, 9, 8937, 7, 82, 2100, 62, 58, 16, 12962, 14, 14542, 62, 58, 16, 4357, 366, 438, 1600, 18242, 2625, 59, 3, 6852, 11018, 9948, 90, 46, 92, 7, 6852, 28483, 2611, 19415, 3, 4943, 198, 198, 489, 83, 13, 70, 6888, 22446, 259, 1851, 62, 87, 22704, 3419, 198, 1455, 437, 3419, 198, 87, 18242, 7203, 59, 3, 6852, 28483, 2611, 59, 3, 4943, 198, 2645, 9608, 7203, 12331, 4943, 198 ]
2.052925
718
# SPDX-License-Identifier: X11 # 2020-11-14 using Random function geninput(bound::Integer, fn::AbstractString) X = collect(-bound:bound) Y = collect(-bound:bound) n = 2bound + 1 println("Shuffling...") shuffle!(X) shuffle!(Y) println("Printing to $fn...") open(fn, "w") do f for i ∈ 1:n println(f, join([string(i, base=16), string(X[i]), string(Y[i])], " ")) end end end
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 1395, 1157, 198, 2, 12131, 12, 1157, 12, 1415, 198, 198, 3500, 14534, 198, 198, 8818, 2429, 15414, 7, 7784, 3712, 46541, 11, 24714, 3712, 23839, 10100, 8, 198, 220, 1395, 796, 2824, 32590, 7784, 25, 7784, 8, 198, 220, 575, 796, 2824, 32590, 7784, 25, 7784, 8, 198, 220, 299, 796, 362, 7784, 1343, 352, 628, 220, 44872, 7203, 2484, 1648, 1359, 9313, 8, 628, 220, 36273, 0, 7, 55, 8, 198, 220, 36273, 0, 7, 56, 8, 628, 220, 44872, 7203, 18557, 278, 284, 720, 22184, 9313, 8, 198, 220, 1280, 7, 22184, 11, 366, 86, 4943, 466, 277, 198, 220, 220, 220, 329, 1312, 18872, 230, 352, 25, 77, 198, 220, 220, 220, 220, 220, 44872, 7, 69, 11, 4654, 26933, 8841, 7, 72, 11, 2779, 28, 1433, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4731, 7, 55, 58, 72, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4731, 7, 56, 58, 72, 12962, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 366, 4008, 198, 220, 220, 220, 886, 198, 220, 886, 198, 437, 198 ]
2.016949
236
module PackageName # Write your package code here. print("Hello Julia, Git and Kraken!") end
[ 21412, 15717, 5376, 198, 198, 2, 19430, 534, 5301, 2438, 994, 13, 198, 198, 4798, 7203, 15496, 22300, 11, 15151, 290, 43392, 2474, 8, 198, 198, 437, 198 ]
3.428571
28
using CairoMakie using ElectronDisplay using FFTW using LinearAlgebra using Scapin.Elasticity using Scapin.Bri17 const T = Float64 const d = 2 C = Hooke{d,T}(1.0, 0.3) α = (0.25, 0.25) # Fraction of the domained that is polarized N_coarse = (4, 4) r_max = 9 N_fine = (2^r_max) .* N_coarse results = Dict() for r ∈ 0:r_max N = (2^r) .* N_coarse 𝒩 = CartesianIndices(N) h = 1.0 ./ N Γ̂ = DiscreteGreenOperatorBri17{d,T}(C, N, h) τ = zeros(T, 3, N...) τ[3, fill(1:2^r, d)...] .= 1 τ̂ = fft(τ, 2:(d+1)) ε̂ = Array{eltype(τ̂)}(undef, size(τ̂)...) for n ∈ 𝒩 apply!(view(ε̂, :, n), Γ̂, n, τ̂[:, n]) end ε = real.(ifft(ε̂, 2:(d+1))) ε_fine = zeros(T, 3, N_fine...) s = 2^(r_max - r) for n ∈ map(Tuple, 𝒩) n₁ = CartesianIndex(s .* (n .- 1) .+ 1) n₂ = CartesianIndex(s .* n) ε_fine[:, n₁:n₂] .= ε[:, n...] end # fig, ax, hm = heatmap(ε_fine[3, :, :]) # save("eps_xy-$(N[1])x$(N[2]).png", fig) results[r] = ε_fine end x = Array{T}(undef, r_max) y = Array{T}(undef, r_max) for r ∈ 0:(r_max-1) ε₁ = results[r] ε₂ = results[r_max] x[r+1] = 2^r * N_coarse[1] y[r+1] = norm(ε₂-ε₁) end C = x[end] * y[end] fig = scatter(x, y, axis = (xscale=log10, yscale = log10)) lines!(x, C ./ x) #save("convergence.png", fig) electrondisplay(fig)
[ 3500, 23732, 44, 461, 494, 198, 3500, 5903, 1313, 23114, 198, 3500, 376, 9792, 54, 198, 3500, 44800, 2348, 29230, 198, 3500, 1446, 499, 259, 13, 9527, 3477, 414, 198, 3500, 1446, 499, 259, 13, 33, 380, 1558, 198, 198, 9979, 309, 796, 48436, 2414, 198, 9979, 288, 796, 362, 198, 198, 34, 796, 9544, 2088, 90, 67, 11, 51, 92, 7, 16, 13, 15, 11, 657, 13, 18, 8, 198, 17394, 796, 357, 15, 13, 1495, 11, 657, 13, 1495, 8, 1303, 376, 7861, 286, 262, 2401, 1328, 326, 318, 46469, 198, 45, 62, 1073, 17208, 796, 357, 19, 11, 604, 8, 198, 81, 62, 9806, 796, 860, 198, 45, 62, 38125, 796, 357, 17, 61, 81, 62, 9806, 8, 764, 9, 399, 62, 1073, 17208, 198, 198, 43420, 796, 360, 713, 3419, 198, 198, 1640, 374, 18872, 230, 657, 25, 81, 62, 9806, 198, 220, 220, 220, 399, 796, 357, 17, 61, 81, 8, 764, 9, 399, 62, 1073, 17208, 198, 220, 220, 220, 220, 47728, 240, 102, 796, 13690, 35610, 5497, 1063, 7, 45, 8, 198, 220, 220, 220, 289, 796, 352, 13, 15, 24457, 399, 198, 220, 220, 220, 7377, 241, 136, 224, 796, 8444, 8374, 13719, 18843, 1352, 33, 380, 1558, 90, 67, 11, 51, 92, 7, 34, 11, 399, 11, 289, 8, 628, 220, 220, 220, 46651, 796, 1976, 27498, 7, 51, 11, 513, 11, 399, 23029, 198, 220, 220, 220, 46651, 58, 18, 11, 6070, 7, 16, 25, 17, 61, 81, 11, 288, 8, 22345, 764, 28, 352, 198, 220, 220, 220, 46651, 136, 224, 796, 277, 701, 7, 32830, 11, 362, 37498, 67, 10, 16, 4008, 198, 220, 220, 220, 7377, 113, 136, 224, 796, 15690, 90, 417, 4906, 7, 32830, 136, 224, 38165, 7, 917, 891, 11, 2546, 7, 32830, 136, 224, 8, 23029, 628, 220, 220, 220, 329, 299, 18872, 230, 220, 47728, 240, 102, 198, 220, 220, 220, 220, 220, 220, 220, 4174, 0, 7, 1177, 7, 30950, 136, 224, 11, 1058, 11, 299, 828, 7377, 241, 136, 224, 11, 299, 11, 46651, 136, 224, 58, 45299, 299, 12962, 198, 220, 220, 220, 886, 628, 220, 220, 220, 7377, 113, 796, 1103, 12195, 361, 701, 7, 30950, 136, 224, 11, 362, 37498, 67, 10, 16, 22305, 628, 220, 220, 220, 7377, 113, 62, 38125, 796, 1976, 27498, 7, 51, 11, 513, 11, 399, 62, 38125, 23029, 198, 220, 220, 220, 264, 796, 362, 61, 7, 81, 62, 9806, 532, 374, 8, 198, 220, 220, 220, 329, 299, 18872, 230, 3975, 7, 51, 29291, 11, 220, 47728, 240, 102, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 158, 224, 223, 796, 13690, 35610, 15732, 7, 82, 764, 9, 357, 77, 764, 12, 352, 8, 764, 10, 352, 8, 198, 220, 220, 220, 220, 220, 220, 220, 299, 158, 224, 224, 796, 13690, 35610, 15732, 7, 82, 764, 9, 299, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 113, 62, 38125, 58, 45299, 299, 158, 224, 223, 25, 77, 158, 224, 224, 60, 764, 28, 7377, 113, 58, 45299, 299, 22345, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 2336, 11, 7877, 11, 289, 76, 796, 4894, 8899, 7, 30950, 62, 38125, 58, 18, 11, 1058, 11, 1058, 12962, 198, 220, 220, 220, 1303, 3613, 7203, 25386, 62, 5431, 22799, 7, 45, 58, 16, 12962, 87, 3, 7, 45, 58, 17, 35944, 11134, 1600, 2336, 8, 198, 220, 220, 220, 2482, 58, 81, 60, 796, 7377, 113, 62, 38125, 198, 437, 198, 198, 87, 796, 15690, 90, 51, 92, 7, 917, 891, 11, 374, 62, 9806, 8, 198, 88, 796, 15690, 90, 51, 92, 7, 917, 891, 11, 374, 62, 9806, 8, 198, 1640, 374, 18872, 230, 657, 37498, 81, 62, 9806, 12, 16, 8, 198, 220, 220, 220, 7377, 113, 158, 224, 223, 796, 2482, 58, 81, 60, 198, 220, 220, 220, 7377, 113, 158, 224, 224, 796, 2482, 58, 81, 62, 9806, 60, 198, 220, 220, 220, 2124, 58, 81, 10, 16, 60, 796, 362, 61, 81, 1635, 399, 62, 1073, 17208, 58, 16, 60, 198, 220, 220, 220, 331, 58, 81, 10, 16, 60, 796, 2593, 7, 30950, 158, 224, 224, 12, 30950, 158, 224, 223, 8, 198, 437, 198, 198, 34, 796, 2124, 58, 437, 60, 1635, 331, 58, 437, 60, 198, 5647, 796, 41058, 7, 87, 11, 331, 11, 220, 16488, 796, 357, 87, 9888, 28, 6404, 940, 11, 331, 9888, 796, 2604, 940, 4008, 198, 6615, 0, 7, 87, 11, 327, 24457, 2124, 8, 198, 2, 21928, 7203, 1102, 332, 12745, 13, 11134, 1600, 2336, 8, 198, 9509, 81, 623, 271, 1759, 7, 5647, 8, 198 ]
1.736165
777
module TestTools using Test using Mimi import Mimi: getproperty, reset_compdefs reset_compdefs() #utils: prettify @test Mimi.prettify("camelCaseBasic") == Mimi.prettify(:camelCaseBasic) == "Camel Case Basic" @test Mimi.prettify("camelWithAOneLetterWord") == Mimi.prettify(:camelWithAOneLetterWord) == "Camel With A One Letter Word" @test Mimi.prettify("snake_case_basic") == Mimi.prettify(:snake_case_basic) == "Snake Case Basic" @test Mimi.prettify("_snake__case__weird_") == Mimi.prettify(:_snake__case__weird_) == "Snake Case Weird" #utils: interpolate stepsize = 2 # N.B. ERROR: cannot assign variable Base.step from module Main final = 10 # N.B. ERROR: cannot assign variable Base.last from module Main ts = 10 @test Mimi.interpolate(collect(0:stepsize:final), ts) == collect(0:stepsize/ts:final) @defcomp Foo begin input = Parameter() intermed = Variable(index=[time]) function run_timestep(p, v, d, t) v.intermed[t] = p.input end end @defcomp Bar begin intermed = Parameter(index=[time]) output = Variable(index=[time]) function run_timestep(p, v, d, t) v.output[t] = p.intermed[t] end end m = Model() set_dimension!(m, :time, 2) foo = add_comp!(m, Foo) bar = add_comp!(m, Bar) foo[:input] = 3.14 bar[:intermed] = foo[:intermed] run(m) end #module
[ 21412, 6208, 33637, 198, 198, 3500, 6208, 198, 3500, 337, 25236, 198, 198, 11748, 337, 25236, 25, 198, 220, 220, 220, 651, 26745, 11, 13259, 62, 5589, 4299, 82, 198, 198, 42503, 62, 5589, 4299, 82, 3419, 198, 198, 2, 26791, 25, 46442, 1958, 198, 31, 9288, 337, 25236, 13, 3866, 926, 1958, 7203, 66, 17983, 20448, 26416, 4943, 6624, 337, 25236, 13, 3866, 926, 1958, 7, 25, 66, 17983, 20448, 26416, 8, 6624, 366, 34, 17983, 8913, 14392, 1, 198, 31, 9288, 337, 25236, 13, 3866, 926, 1958, 7203, 66, 17983, 3152, 32, 3198, 45708, 26449, 4943, 6624, 337, 25236, 13, 3866, 926, 1958, 7, 25, 66, 17983, 3152, 32, 3198, 45708, 26449, 8, 6624, 366, 34, 17983, 2080, 317, 1881, 18121, 9678, 1, 198, 31, 9288, 337, 25236, 13, 3866, 926, 1958, 7203, 16184, 539, 62, 7442, 62, 35487, 4943, 6624, 337, 25236, 13, 3866, 926, 1958, 7, 25, 16184, 539, 62, 7442, 62, 35487, 8, 6624, 366, 49795, 8913, 14392, 1, 198, 31, 9288, 337, 25236, 13, 3866, 926, 1958, 7203, 62, 16184, 539, 834, 7442, 834, 732, 1447, 62, 4943, 6624, 337, 25236, 13, 3866, 926, 1958, 7, 25, 62, 16184, 539, 834, 7442, 834, 732, 1447, 62, 8, 6624, 366, 49795, 8913, 34097, 1, 198, 198, 2, 26791, 25, 39555, 378, 198, 9662, 7857, 796, 362, 220, 220, 220, 220, 220, 220, 1303, 399, 13, 33, 13, 33854, 25, 2314, 8333, 7885, 7308, 13, 9662, 422, 8265, 8774, 198, 20311, 796, 838, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 399, 13, 33, 13, 33854, 25, 2314, 8333, 7885, 7308, 13, 12957, 422, 8265, 8774, 198, 912, 796, 838, 198, 31, 9288, 337, 25236, 13, 3849, 16104, 378, 7, 33327, 7, 15, 25, 9662, 7857, 25, 20311, 828, 40379, 8, 6624, 2824, 7, 15, 25, 9662, 7857, 14, 912, 25, 20311, 8, 198, 198, 31, 4299, 5589, 36080, 2221, 198, 220, 220, 220, 5128, 796, 25139, 2357, 3419, 198, 220, 220, 220, 987, 1150, 796, 35748, 7, 9630, 41888, 2435, 12962, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2163, 1057, 62, 16514, 395, 538, 7, 79, 11, 410, 11, 288, 11, 256, 8, 198, 220, 220, 220, 220, 220, 220, 220, 410, 13, 3849, 1150, 58, 83, 60, 796, 279, 13, 15414, 198, 220, 220, 220, 886, 198, 437, 198, 198, 31, 4299, 5589, 2409, 2221, 198, 220, 220, 220, 987, 1150, 796, 25139, 2357, 7, 9630, 41888, 2435, 12962, 198, 220, 220, 220, 5072, 796, 35748, 7, 9630, 41888, 2435, 12962, 198, 220, 220, 220, 220, 198, 220, 220, 220, 2163, 1057, 62, 16514, 395, 538, 7, 79, 11, 410, 11, 288, 11, 256, 8, 198, 220, 220, 220, 220, 220, 220, 220, 410, 13, 22915, 58, 83, 60, 796, 279, 13, 3849, 1150, 58, 83, 60, 198, 220, 220, 220, 886, 198, 437, 198, 198, 76, 796, 9104, 3419, 198, 2617, 62, 46156, 0, 7, 76, 11, 1058, 2435, 11, 362, 8, 198, 21943, 796, 751, 62, 5589, 0, 7, 76, 11, 36080, 8, 198, 5657, 796, 751, 62, 5589, 0, 7, 76, 11, 2409, 8, 198, 198, 21943, 58, 25, 15414, 60, 796, 513, 13, 1415, 198, 5657, 58, 25, 3849, 1150, 60, 796, 22944, 58, 25, 3849, 1150, 60, 198, 198, 5143, 7, 76, 8, 198, 198, 437, 1303, 21412 ]
2.429348
552
SubWorker{T,A,PT} = RemoteChannel{Channel{Vector{SubProblem{T,A,PT}}}} ScenarioProblemChannel{S} = RemoteChannel{Channel{ScenarioProblems{S}}} Work = RemoteChannel{Channel{Int}} Progress{T <: AbstractFloat} = Tuple{Int,Int,SubproblemSolution{T}} ProgressQueue{T <: AbstractFloat} = RemoteChannel{Channel{Progress{T}}} function initialize_subproblems!(ph::AbstractProgressiveHedging, subworkers::Vector{SubWorker{T,A,PT}}, scenarioproblems::DistributedScenarioProblems, penaltyterm::AbstractPenaltyterm) where {T <: AbstractFloat, A <: AbstractVector, PT <: AbstractPenaltyterm} # Create subproblems on worker processes @sync begin for w in workers() subworkers[w-1] = RemoteChannel(() -> Channel{Vector{SubProblem{T,A,PT}}}(1), w) prev = map(2:(w-1)) do p scenarioproblems.scenario_distribution[p-1] end start_id = isempty(prev) ? 0 : sum(prev) @async remotecall_fetch(initialize_subworker!, w, subworkers[w-1], scenarioproblems[w-1], penaltyterm, start_id) end end return nothing end function update_dual_gap!(ph::AbstractProgressiveHedging, subworkers::Vector{<:SubWorker{T}}) where T <: AbstractFloat # Update δ₂ partial_δs = Vector{Float64}(undef, nworkers()) @sync begin for (i,w) in enumerate(workers()) @async partial_δs[i] = remotecall_fetch( w, subworkers[w-1], ph.ξ) do sw, ξ subproblems = fetch(sw) return mapreduce(+, subproblems, init = zero(T)) do subproblem π = subproblem.probability x = subproblem.x π * norm(x - ph.ξ, 2) ^ 2 end end end end ph.data.δ₂ = sum(partial_δs) return nothing end function initialize_subworker!(subworker::SubWorker{T,A,PT}, scenarioproblems::ScenarioProblemChannel, penaltyterm::AbstractPenaltyterm, start_id::Integer) where {T <: AbstractFloat, A <: AbstractArray, PT <: AbstractPenaltyterm} sp = fetch(scenarioproblems) subproblems = Vector{SubProblem{T,A,PT}}(undef, num_subproblems(sp)) for i = 1:num_subproblems(sp) subproblems[i] = SubProblem( subproblem(sp, i), start_id + i, T(probability(sp, i)), copy(penaltyterm)) end put!(subworker, subproblems) return nothing end function restore_subproblems!(subworkers::Vector{<:SubWorker}) @sync begin for w in workers() @async remotecall_fetch(w, subworkers[w-1]) do sw for subproblem in fetch(sw) restore_subproblem!(subproblem) end end end end return nothing end function resolve_subproblems!(subworker::SubWorker{T,A,PT}, ξ::AbstractVector, r::AbstractFloat) where {T <: AbstractFloat, A <: AbstractArray, PT <: AbstractPenaltyterm} subproblems::Vector{SubProblem{T,A,PT}} = fetch(subworker) Qs = Vector{SubproblemSolution{T}}(undef, length(subproblems)) # Reformulate and solve sub problems for (i,subproblem) in enumerate(subproblems) reformulate_subproblem!(subproblem, ξ, r) Qs[i] = subproblem(ξ) end # Return current objective value return sum(Qs) end function collect_primals(subworker::SubWorker{T,A,PT}, n::Integer) where {T <: AbstractFloat, A <: AbstractArray, PT <: AbstractPenaltyterm} subproblems::Vector{SubProblem{T,A,PT}} = fetch(subworker) return mapreduce(+, subproblems, init = zeros(T, n)) do subproblem π = subproblem.probability x = subproblem.x π * x end end function calculate_objective_value(subworkers::Vector{<:SubWorker{T}}) where T <: AbstractFloat partial_objectives = Vector{Float64}(undef, nworkers()) @sync begin for (i, w) in enumerate(workers()) @async partial_objectives[i] = remotecall_fetch(w, subworkers[w-1]) do sw return mapreduce(+, fetch(sw), init = zero(T)) do subproblem _objective_value(subproblem) end end end end return sum(partial_objectives) end function work_on_subproblems!(subworker::SubWorker{T,A,PT}, work::Work, finalize::Work, progress::ProgressQueue{T}, x̄::RemoteRunningAverage{A}, δ::RemoteRunningAverage{T}, iterates::RemoteIterates{A}, r::IteratedValue{T}) where {T <: AbstractFloat, A <: AbstractArray, PT <: AbstractPenaltyterm} subproblems::Vector{SubProblem{T,A,PT}} = fetch(subworker) if isempty(subproblems) # Workers has nothing do to, return. return nothing end x̄ = fetch(x̄) δ = fetch(δ) quit = false while true t::Int = try if isready(finalize) quit = true take!(finalize) else wait(work) take!(work) end catch err if err isa InvalidStateException # Master closed the work/finalize channel. Worker finished return nothing end end t == -1 && continue ξ::A = fetch(iterates, t) if t > 1 update_subproblems!(subproblems, ξ, fetch(r,t-1)) end for (i,subproblem) in enumerate(subproblems) !quit && subtract!(δ, i) !quit && subtract!(x̄, i) x = subproblem.x π = subproblem.probability !quit && add!(δ, i, norm(x - ξ, 2) ^ 2, π) reformulate_subproblem!(subproblem, ξ, fetch(r, t)) Q::SubproblemSolution{T} = subproblem(ξ) !quit && add!(x̄, i, π) !quit && put!(progress, (t, subproblem.id, Q)) end if quit # Worker finished return nothing end end end
[ 7004, 12468, 263, 90, 51, 11, 32, 11, 11571, 92, 796, 21520, 29239, 90, 29239, 90, 38469, 90, 7004, 40781, 90, 51, 11, 32, 11, 11571, 11709, 11709, 198, 3351, 39055, 40781, 29239, 90, 50, 92, 796, 21520, 29239, 90, 29239, 90, 3351, 39055, 2964, 22143, 90, 50, 42535, 198, 12468, 796, 21520, 29239, 90, 29239, 90, 5317, 11709, 198, 32577, 90, 51, 1279, 25, 27741, 43879, 92, 796, 309, 29291, 90, 5317, 11, 5317, 11, 7004, 45573, 46344, 90, 51, 11709, 198, 32577, 34991, 90, 51, 1279, 25, 27741, 43879, 92, 796, 21520, 29239, 90, 29239, 90, 32577, 90, 51, 42535, 198, 198, 8818, 41216, 62, 7266, 1676, 22143, 0, 7, 746, 3712, 23839, 2964, 19741, 39, 276, 2667, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 850, 22896, 3712, 38469, 90, 7004, 12468, 263, 90, 51, 11, 32, 11, 11571, 92, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4408, 2743, 404, 305, 22143, 3712, 20344, 6169, 3351, 39055, 2964, 22143, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7389, 4354, 3712, 23839, 25553, 6017, 4354, 8, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 1279, 25, 27741, 38469, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19310, 1279, 25, 27741, 25553, 6017, 4354, 92, 198, 220, 220, 220, 1303, 13610, 850, 1676, 22143, 319, 8383, 7767, 198, 220, 220, 220, 2488, 27261, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 329, 266, 287, 3259, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 850, 22896, 58, 86, 12, 16, 60, 796, 21520, 29239, 7, 3419, 4613, 11102, 90, 38469, 90, 7004, 40781, 90, 51, 11, 32, 11, 11571, 42535, 7, 16, 828, 266, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 8654, 796, 3975, 7, 17, 37498, 86, 12, 16, 4008, 466, 279, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4408, 2743, 404, 305, 22143, 13, 1416, 39055, 62, 17080, 3890, 58, 79, 12, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 923, 62, 312, 796, 318, 28920, 7, 47050, 8, 5633, 657, 1058, 2160, 7, 47050, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 292, 13361, 816, 313, 721, 439, 62, 69, 7569, 7, 36733, 1096, 62, 7266, 28816, 28265, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 266, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 850, 22896, 58, 86, 12, 16, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4408, 2743, 404, 305, 22143, 58, 86, 12, 16, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7389, 4354, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 923, 62, 312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 4296, 62, 646, 282, 62, 43554, 0, 7, 746, 3712, 23839, 2964, 19741, 39, 276, 2667, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 850, 22896, 3712, 38469, 90, 27, 25, 7004, 12468, 263, 90, 51, 11709, 8, 810, 309, 1279, 25, 27741, 43879, 198, 220, 220, 220, 1303, 10133, 7377, 112, 158, 224, 224, 198, 220, 220, 220, 13027, 62, 138, 112, 82, 796, 20650, 90, 43879, 2414, 92, 7, 917, 891, 11, 299, 22896, 28955, 198, 220, 220, 220, 2488, 27261, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 72, 11, 86, 8, 287, 27056, 378, 7, 22896, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 292, 13361, 13027, 62, 138, 112, 82, 58, 72, 60, 796, 816, 313, 721, 439, 62, 69, 7569, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 266, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 850, 22896, 58, 86, 12, 16, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 872, 13, 138, 122, 8, 466, 1509, 11, 7377, 122, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 850, 1676, 22143, 796, 21207, 7, 2032, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 3975, 445, 7234, 7, 28200, 850, 1676, 22143, 11, 2315, 796, 6632, 7, 51, 4008, 466, 850, 45573, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18074, 222, 796, 850, 45573, 13, 1676, 65, 1799, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 850, 45573, 13, 87, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18074, 222, 1635, 2593, 7, 87, 532, 872, 13, 138, 122, 11, 362, 8, 10563, 362, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 872, 13, 7890, 13, 138, 112, 158, 224, 224, 796, 2160, 7, 47172, 62, 138, 112, 82, 8, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 41216, 62, 7266, 28816, 0, 7, 7266, 28816, 3712, 7004, 12468, 263, 90, 51, 11, 32, 11, 11571, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4408, 2743, 404, 305, 22143, 3712, 3351, 39055, 40781, 29239, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7389, 4354, 3712, 23839, 25553, 6017, 4354, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 923, 62, 312, 3712, 46541, 8, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 1279, 25, 27741, 19182, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19310, 1279, 25, 27741, 25553, 6017, 4354, 92, 198, 220, 220, 220, 599, 796, 21207, 7, 1416, 268, 2743, 404, 305, 22143, 8, 198, 220, 220, 220, 850, 1676, 22143, 796, 20650, 90, 7004, 40781, 90, 51, 11, 32, 11, 11571, 11709, 7, 917, 891, 11, 997, 62, 7266, 1676, 22143, 7, 2777, 4008, 198, 220, 220, 220, 329, 1312, 796, 352, 25, 22510, 62, 7266, 1676, 22143, 7, 2777, 8, 198, 220, 220, 220, 220, 220, 220, 220, 850, 1676, 22143, 58, 72, 60, 796, 3834, 40781, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 850, 45573, 7, 2777, 11, 1312, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 923, 62, 312, 1343, 1312, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 309, 7, 1676, 65, 1799, 7, 2777, 11, 1312, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4866, 7, 3617, 6017, 4354, 4008, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1234, 0, 7, 7266, 28816, 11, 850, 1676, 22143, 8, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 11169, 62, 7266, 1676, 22143, 0, 7, 7266, 22896, 3712, 38469, 90, 27, 25, 7004, 12468, 263, 30072, 198, 220, 220, 220, 2488, 27261, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 329, 266, 287, 3259, 3419, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 292, 13361, 816, 313, 721, 439, 62, 69, 7569, 7, 86, 11, 850, 22896, 58, 86, 12, 16, 12962, 466, 1509, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 850, 45573, 287, 21207, 7, 2032, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11169, 62, 7266, 45573, 0, 7, 7266, 45573, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 10568, 62, 7266, 1676, 22143, 0, 7, 7266, 28816, 3712, 7004, 12468, 263, 90, 51, 11, 32, 11, 11571, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 122, 3712, 23839, 38469, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 3712, 23839, 43879, 8, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 1279, 25, 27741, 19182, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19310, 1279, 25, 27741, 25553, 6017, 4354, 92, 198, 220, 220, 220, 850, 1676, 22143, 3712, 38469, 90, 7004, 40781, 90, 51, 11, 32, 11, 11571, 11709, 796, 21207, 7, 7266, 28816, 8, 198, 220, 220, 220, 1195, 82, 796, 20650, 90, 7004, 45573, 46344, 90, 51, 11709, 7, 917, 891, 11, 4129, 7, 7266, 1676, 22143, 4008, 198, 220, 220, 220, 1303, 17893, 5039, 290, 8494, 850, 2761, 198, 220, 220, 220, 329, 357, 72, 11, 7266, 45573, 8, 287, 27056, 378, 7, 7266, 1676, 22143, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4975, 5039, 62, 7266, 45573, 0, 7, 7266, 45573, 11, 7377, 122, 11, 374, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1195, 82, 58, 72, 60, 796, 850, 45573, 7, 138, 122, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 8229, 1459, 9432, 1988, 198, 220, 220, 220, 1441, 2160, 7, 48, 82, 8, 198, 437, 198, 198, 8818, 2824, 62, 19795, 874, 7, 7266, 28816, 3712, 7004, 12468, 263, 90, 51, 11, 32, 11, 11571, 5512, 299, 3712, 46541, 8, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 1279, 25, 27741, 19182, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19310, 1279, 25, 27741, 25553, 6017, 4354, 92, 198, 220, 220, 220, 850, 1676, 22143, 3712, 38469, 90, 7004, 40781, 90, 51, 11, 32, 11, 11571, 11709, 796, 21207, 7, 7266, 28816, 8, 198, 220, 220, 220, 1441, 3975, 445, 7234, 7, 28200, 850, 1676, 22143, 11, 2315, 796, 1976, 27498, 7, 51, 11, 299, 4008, 466, 850, 45573, 198, 220, 220, 220, 220, 220, 220, 220, 18074, 222, 796, 850, 45573, 13, 1676, 65, 1799, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 850, 45573, 13, 87, 198, 220, 220, 220, 220, 220, 220, 220, 18074, 222, 1635, 2124, 198, 220, 220, 220, 886, 198, 437, 198, 198, 8818, 15284, 62, 15252, 425, 62, 8367, 7, 7266, 22896, 3712, 38469, 90, 27, 25, 7004, 12468, 263, 90, 51, 11709, 8, 810, 309, 1279, 25, 27741, 43879, 198, 220, 220, 220, 13027, 62, 15252, 1083, 796, 20650, 90, 43879, 2414, 92, 7, 917, 891, 11, 299, 22896, 28955, 198, 220, 220, 220, 2488, 27261, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 72, 11, 266, 8, 287, 27056, 378, 7, 22896, 28955, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 292, 13361, 13027, 62, 15252, 1083, 58, 72, 60, 796, 816, 313, 721, 439, 62, 69, 7569, 7, 86, 11, 850, 22896, 58, 86, 12, 16, 12962, 466, 1509, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 3975, 445, 7234, 7, 28200, 21207, 7, 2032, 828, 2315, 796, 6632, 7, 51, 4008, 466, 850, 45573, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 15252, 425, 62, 8367, 7, 7266, 45573, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2160, 7, 47172, 62, 15252, 1083, 8, 198, 437, 198, 198, 8818, 670, 62, 261, 62, 7266, 1676, 22143, 0, 7, 7266, 28816, 3712, 7004, 12468, 263, 90, 51, 11, 32, 11, 11571, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 670, 3712, 12468, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2457, 1096, 3712, 12468, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4371, 3712, 32577, 34991, 90, 51, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 136, 226, 3712, 36510, 28768, 26287, 90, 32, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 3712, 36510, 28768, 26287, 90, 51, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11629, 689, 3712, 36510, 29993, 689, 90, 32, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 374, 3712, 29993, 515, 11395, 90, 51, 30072, 810, 1391, 51, 1279, 25, 27741, 43879, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 317, 1279, 25, 27741, 19182, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19310, 1279, 25, 27741, 25553, 6017, 4354, 92, 198, 220, 220, 220, 850, 1676, 22143, 3712, 38469, 90, 7004, 40781, 90, 51, 11, 32, 11, 11571, 11709, 796, 21207, 7, 7266, 28816, 8, 198, 220, 220, 220, 611, 318, 28920, 7, 7266, 1676, 22143, 8, 198, 220, 220, 220, 220, 220, 220, 1303, 16847, 468, 2147, 466, 284, 11, 1441, 13, 198, 220, 220, 220, 220, 220, 220, 1441, 2147, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2124, 136, 226, 796, 21207, 7, 87, 136, 226, 8, 198, 220, 220, 220, 7377, 112, 796, 21207, 7, 138, 112, 8, 198, 220, 220, 220, 11238, 796, 3991, 198, 220, 220, 220, 981, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 256, 3712, 5317, 796, 1949, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 318, 1493, 7, 20311, 1096, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11238, 796, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1011, 0, 7, 20311, 1096, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4043, 7, 1818, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1011, 0, 7, 1818, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 4929, 11454, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 11454, 318, 64, 17665, 9012, 16922, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5599, 4838, 262, 670, 14, 20311, 1096, 6518, 13, 35412, 5201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 256, 6624, 532, 16, 11405, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 122, 3712, 32, 796, 21207, 7, 2676, 689, 11, 256, 8, 198, 220, 220, 220, 220, 220, 220, 220, 611, 256, 1875, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4296, 62, 7266, 1676, 22143, 0, 7, 7266, 1676, 22143, 11, 7377, 122, 11, 21207, 7, 81, 11, 83, 12, 16, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 329, 357, 72, 11, 7266, 45573, 8, 287, 27056, 378, 7, 7266, 1676, 22143, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5145, 47391, 11405, 34128, 0, 7, 138, 112, 11, 1312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5145, 47391, 11405, 34128, 0, 7, 87, 136, 226, 11, 1312, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 850, 45573, 13, 87, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 18074, 222, 796, 850, 45573, 13, 1676, 65, 1799, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5145, 47391, 11405, 751, 0, 7, 138, 112, 11, 1312, 11, 2593, 7, 87, 532, 7377, 122, 11, 362, 8, 10563, 362, 11, 18074, 222, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4975, 5039, 62, 7266, 45573, 0, 7, 7266, 45573, 11, 7377, 122, 11, 21207, 7, 81, 11, 256, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1195, 3712, 7004, 45573, 46344, 90, 51, 92, 796, 850, 45573, 7, 138, 122, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5145, 47391, 11405, 751, 0, 7, 87, 136, 226, 11, 1312, 11, 18074, 222, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5145, 47391, 11405, 1234, 0, 7, 33723, 11, 357, 83, 11, 850, 45573, 13, 312, 11, 1195, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 611, 11238, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 35412, 5201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1441, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198 ]
1.76566
4,071
# tests for the synchronous task runner import Arbiter.Sync: run_tasks import Arbiter.ArbiterTasks: ArbiterTask import Arbiter.ArbiterGraphs: NodeSet, ImmutableNodeSet facts("empty") do # solve no tasks results = run_tasks(()) @fact results.completed --> ImmutableNodeSet() @fact results.failed --> ImmutableNodeSet() end facts("no dependencies") do # run dependency-less tasks executed_tasks = NodeSet() """ Make a task """ function make_task(name, dependencies=(); succeed=true) ArbiterTask(name, () -> (push!(executed_tasks, name); succeed), dependencies) end results = run_tasks( ( make_task(:foo), make_task(:bar), make_task(:baz), make_task(:fail; succeed=false) ) ) @fact executed_tasks --> NodeSet((:foo, :bar, :baz, :fail)) @fact results.completed --> ImmutableNodeSet((:foo, :bar, :baz)) @fact results.failed --> ImmutableNodeSet((:fail,)) end
[ 2, 5254, 329, 262, 18305, 516, 4876, 17490, 198, 11748, 33619, 263, 13, 28985, 25, 1057, 62, 83, 6791, 198, 11748, 33619, 263, 13, 3163, 2545, 263, 51, 6791, 25, 33619, 263, 25714, 198, 11748, 33619, 263, 13, 3163, 2545, 263, 37065, 82, 25, 19081, 7248, 11, 9543, 18187, 19667, 7248, 198, 198, 37473, 7203, 28920, 4943, 466, 198, 220, 220, 220, 1303, 8494, 645, 8861, 628, 220, 220, 220, 2482, 796, 1057, 62, 83, 6791, 7, 28955, 628, 220, 220, 220, 2488, 22584, 2482, 13, 785, 16838, 14610, 9543, 18187, 19667, 7248, 3419, 198, 220, 220, 220, 2488, 22584, 2482, 13, 47904, 14610, 9543, 18187, 19667, 7248, 3419, 198, 437, 198, 198, 37473, 7203, 3919, 20086, 4943, 466, 198, 220, 220, 220, 1303, 1057, 20203, 12, 1203, 8861, 628, 220, 220, 220, 10945, 62, 83, 6791, 796, 19081, 7248, 3419, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 6889, 257, 4876, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2163, 787, 62, 35943, 7, 3672, 11, 20086, 28, 9783, 6758, 28, 7942, 8, 198, 220, 220, 220, 220, 220, 220, 220, 33619, 263, 25714, 7, 3672, 11, 7499, 4613, 357, 14689, 0, 7, 18558, 7241, 62, 83, 6791, 11, 1438, 1776, 6758, 828, 20086, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 2482, 796, 1057, 62, 83, 6791, 7, 198, 220, 220, 220, 220, 220, 220, 220, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 787, 62, 35943, 7, 25, 21943, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 787, 62, 35943, 7, 25, 5657, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 787, 62, 35943, 7, 25, 65, 1031, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 787, 62, 35943, 7, 25, 32165, 26, 6758, 28, 9562, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 1267, 628, 220, 220, 220, 2488, 22584, 10945, 62, 83, 6791, 14610, 19081, 7248, 19510, 25, 21943, 11, 1058, 5657, 11, 1058, 65, 1031, 11, 1058, 32165, 4008, 198, 220, 220, 220, 2488, 22584, 2482, 13, 785, 16838, 14610, 9543, 18187, 19667, 7248, 19510, 25, 21943, 11, 1058, 5657, 11, 1058, 65, 1031, 4008, 198, 220, 220, 220, 2488, 22584, 2482, 13, 47904, 14610, 9543, 18187, 19667, 7248, 19510, 25, 32165, 11, 4008, 198, 437, 198 ]
2.476427
403
# Julia wrapper for header: /usr/local/include/sodium.h # Automatically generated using Clang.jl wrap_c, version 0.0.0 @c Int32 sodium_init () libsodium @c Int32 crypto_auth_hmacsha512256 (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_auth_hmacsha512256_verify (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c size_t crypto_auth_bytes () libsodium @c size_t crypto_auth_keybytes () libsodium @c Ptr{Uint8} crypto_auth_primitive () libsodium @c Int32 crypto_auth (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_auth_verify (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_auth_hmacsha256 (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_auth_hmacsha256_verify (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_box_curve25519xsalsa20poly1305 (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_box_curve25519xsalsa20poly1305_open (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_box_curve25519xsalsa20poly1305_keypair (Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_box_curve25519xsalsa20poly1305_beforenm (Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_box_curve25519xsalsa20poly1305_afternm (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_box_curve25519xsalsa20poly1305_open_afternm (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c size_t crypto_box_publickeybytes () libsodium @c size_t crypto_box_secretkeybytes () libsodium @c size_t crypto_box_beforenmbytes () libsodium @c size_t crypto_box_noncebytes () libsodium @c size_t crypto_box_zerobytes () libsodium @c size_t crypto_box_boxzerobytes () libsodium @c size_t crypto_box_macbytes () libsodium @c Ptr{Uint8} crypto_box_primitive () libsodium @c Int32 crypto_box_keypair (Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_box_beforenm (Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_box_afternm (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_box_open_afternm (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_box (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_box_open (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_core_hsalsa20 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_core_salsa20 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_core_salsa2012 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_core_salsa208 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_generichash_blake2b (Ptr{Uint8}, size_t, Ptr{Uint8}, Uint64, Ptr{Uint8}, size_t) libsodium @c Int32 crypto_generichash_blake2b_init (Ptr{crypto_generichash_blake2b_state}, Ptr{Uint8}, size_t, size_t) libsodium @c Int32 crypto_generichash_blake2b_update (Ptr{crypto_generichash_blake2b_state}, Ptr{Uint8}, Uint64) libsodium @c Int32 crypto_generichash_blake2b_final (Ptr{crypto_generichash_blake2b_state}, Ptr{Uint8}, size_t) libsodium @c size_t crypto_generichash_bytes_min () libsodium @c size_t crypto_generichash_bytes_max () libsodium @c size_t crypto_generichash_keybytes_min () libsodium @c size_t crypto_generichash_keybytes_max () libsodium @c size_t crypto_generichash_blockbytes () libsodium @c Ptr{Uint8} crypto_generichash_primitive () libsodium @c Int32 crypto_generichash (Ptr{Uint8}, size_t, Ptr{Uint8}, Uint64, Ptr{Uint8}, size_t) libsodium @c Int32 crypto_generichash_init (Ptr{crypto_generichash_blake2b_state}, Ptr{Uint8}, size_t, size_t) libsodium @c Int32 crypto_generichash_update (Ptr{crypto_generichash_blake2b_state}, Ptr{Uint8}, Uint64) libsodium @c Int32 crypto_generichash_final (Ptr{crypto_generichash_blake2b_state}, Ptr{Uint8}, size_t) libsodium @c Int32 crypto_hash_sha512 (Ptr{Uint8}, Ptr{Uint8}, Uint64) libsodium @c Int32 crypto_hash (Ptr{Uint8}, Ptr{Uint8}, Uint64) libsodium @c Int32 crypto_hash_sha256 (Ptr{Uint8}, Ptr{Uint8}, Uint64) libsodium @c Int32 crypto_hashblocks_sha256 (Ptr{Uint8}, Ptr{Uint8}, Uint64) libsodium @c Int32 crypto_hashblocks_sha512 (Ptr{Uint8}, Ptr{Uint8}, Uint64) libsodium @c Ptr{Uint8} crypto_onetimeauth_poly1305_ref_implementation_name () libsodium @c Int32 crypto_onetimeauth_poly1305_set_implementation (Ptr{crypto_onetimeauth_poly1305_implementation},) libsodium @c Ptr{crypto_onetimeauth_poly1305_implementation} crypto_onetimeauth_pick_best_implementation () libsodium @c Int32 crypto_onetimeauth_poly1305 (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_onetimeauth_poly1305_verify (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c size_t crypto_onetimeauth_bytes () libsodium @c size_t crypto_onetimeauth_keybytes () libsodium @c Ptr{Uint8} crypto_onetimeauth_primitive () libsodium @c Int32 crypto_onetimeauth (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_onetimeauth_verify (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_scalarmult_curve25519 (Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_scalarmult_curve25519_base (Ptr{Uint8}, Ptr{Uint8}) libsodium @c size_t crypto_scalarmult_bytes () libsodium @c size_t crypto_scalarmult_scalarbytes () libsodium @c Ptr{Uint8} crypto_scalarmult_primitive () libsodium @c Int32 crypto_scalarmult_base (Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_scalarmult (Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_secretbox_xsalsa20poly1305 (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_secretbox_xsalsa20poly1305_open (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c size_t crypto_secretbox_keybytes () libsodium @c size_t crypto_secretbox_noncebytes () libsodium @c size_t crypto_secretbox_zerobytes () libsodium @c size_t crypto_secretbox_boxzerobytes () libsodium @c Ptr{Uint8} crypto_secretbox_primitive () libsodium @c Int32 crypto_secretbox (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_secretbox_open (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_shorthash_siphash24 (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c size_t crypto_shorthash_bytes () libsodium @c size_t crypto_shorthash_keybytes () libsodium @c Ptr{Uint8} crypto_shorthash_primitive () libsodium @c Int32 crypto_shorthash (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_sign_ed25519 (Ptr{Uint8}, Ptr{Uint64}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_sign_ed25519_open (Ptr{Uint8}, Ptr{Uint64}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_sign_ed25519_keypair (Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_sign_ed25519_seed_keypair (Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}) libsodium @c size_t crypto_sign_bytes () libsodium @c size_t crypto_sign_publickeybytes () libsodium @c size_t crypto_sign_secretkeybytes () libsodium @c Ptr{Uint8} crypto_sign_primitive () libsodium @c Int32 crypto_sign_seed_keypair (Ptr{Uint8}, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_sign_keypair (Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_sign (Ptr{Uint8}, Ptr{Uint64}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_sign_open (Ptr{Uint8}, Ptr{Uint64}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_sign_edwards25519sha512batch (Ptr{Uint8}, Ptr{Uint64}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_sign_edwards25519sha512batch_open (Ptr{Uint8}, Ptr{Uint64}, Ptr{Uint8}, Uint64, Ptr{Uint8}) libsodium @c Int32 crypto_sign_edwards25519sha512batch_keypair (Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_xsalsa20 (Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_xsalsa20_xor (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_xsalsa20_beforenm (Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_xsalsa20_afternm (Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_xsalsa20_xor_afternm (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c size_t crypto_stream_keybytes () libsodium @c size_t crypto_stream_noncebytes () libsodium @c Ptr{Uint8} crypto_stream_primitive () libsodium @c Int32 crypto_stream (Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_xor (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_aes128ctr (Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_aes128ctr_xor (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_aes128ctr_beforenm (Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_aes128ctr_afternm (Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_aes128ctr_xor_afternm (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa20 (Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa20_xor (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa20_beforenm (Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa20_afternm (Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa20_xor_afternm (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa2012 (Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa2012_xor (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa2012_beforenm (Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa2012_afternm (Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa2012_xor_afternm (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa208 (Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa208_xor (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa208_beforenm (Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa208_afternm (Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_stream_salsa208_xor_afternm (Ptr{Uint8}, Ptr{Uint8}, Uint64, Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_verify_16 (Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 crypto_verify_32 (Ptr{Uint8}, Ptr{Uint8}) libsodium @c Int32 randombytes_set_implementation (Ptr{randombytes_implementation},) libsodium @c None randombytes (Ptr{Uint8}, Uint64) libsodium @c Ptr{Uint8} randombytes_implementation_name () libsodium @c uint32_t randombytes_random () libsodium @c None randombytes_stir () libsodium @c uint32_t randombytes_uniform (uint32_t,) libsodium @c None randombytes_buf (Ptr{Void}, size_t) libsodium @c Int32 randombytes_close () libsodium @c Ptr{Uint8} randombytes_salsa20_implementation_name () libsodium @c uint32_t randombytes_salsa20_random () libsodium @c None randombytes_salsa20_random_stir () libsodium @c uint32_t randombytes_salsa20_random_uniform (uint32_t,) libsodium @c None randombytes_salsa20_random_buf (Ptr{Void}, size_t) libsodium @c Int32 randombytes_salsa20_random_close () libsodium @c Ptr{Uint8} randombytes_sysrandom_implementation_name () libsodium @c uint32_t randombytes_sysrandom () libsodium @c None randombytes_sysrandom_stir () libsodium @c uint32_t randombytes_sysrandom_uniform (uint32_t,) libsodium @c None randombytes_sysrandom_buf (Ptr{Void}, size_t) libsodium @c Int32 randombytes_sysrandom_close () libsodium @c Ptr{Uint8} _sodium_alignedcalloc (Ptr{Ptr{Uint8}}, size_t) libsodium @c None sodium_memzero (Ptr{Void}, size_t) libsodium @c Int32 sodium_memcmp (Ptr{Void}, Ptr{Void}, size_t) libsodium @c Ptr{Uint8} sodium_version_string () libsodium @c Int32 sodium_library_version_major () libsodium @c Int32 sodium_library_version_minor () libsodium
[ 2, 22300, 29908, 329, 13639, 25, 1220, 14629, 14, 12001, 14, 17256, 14, 82, 12664, 13, 71, 198, 2, 17406, 4142, 7560, 1262, 1012, 648, 13, 20362, 14441, 62, 66, 11, 2196, 657, 13, 15, 13, 15, 198, 198, 31, 66, 2558, 2624, 21072, 62, 15003, 7499, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 18439, 62, 71, 20285, 26270, 25836, 11645, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 18439, 62, 71, 20285, 26270, 25836, 11645, 62, 332, 1958, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 18439, 62, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 18439, 62, 2539, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 21473, 62, 18439, 62, 19795, 1800, 7499, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 18439, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 18439, 62, 332, 1958, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 18439, 62, 71, 20285, 26270, 11645, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 18439, 62, 71, 20285, 26270, 11645, 62, 332, 1958, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 3524, 62, 22019, 303, 13381, 1129, 34223, 32058, 1238, 35428, 12952, 20, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 3524, 62, 22019, 303, 13381, 1129, 34223, 32058, 1238, 35428, 12952, 20, 62, 9654, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 3524, 62, 22019, 303, 13381, 1129, 34223, 32058, 1238, 35428, 12952, 20, 62, 2539, 24874, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 3524, 62, 22019, 303, 13381, 1129, 34223, 32058, 1238, 35428, 12952, 20, 62, 19052, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 3524, 62, 22019, 303, 13381, 1129, 34223, 32058, 1238, 35428, 12952, 20, 62, 8499, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 3524, 62, 22019, 303, 13381, 1129, 34223, 32058, 1238, 35428, 12952, 20, 62, 9654, 62, 8499, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 3524, 62, 11377, 2539, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 3524, 62, 21078, 2539, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 3524, 62, 19052, 21533, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 3524, 62, 13159, 344, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 3524, 62, 9107, 26730, 4879, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 3524, 62, 3524, 9107, 26730, 4879, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 3524, 62, 20285, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 21473, 62, 3524, 62, 19795, 1800, 7499, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 3524, 62, 2539, 24874, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 3524, 62, 19052, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 3524, 62, 8499, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 3524, 62, 9654, 62, 8499, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 3524, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 3524, 62, 9654, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 7295, 62, 11994, 32058, 1238, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 7295, 62, 82, 32058, 1238, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 7295, 62, 82, 32058, 6999, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 7295, 62, 82, 32058, 21315, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 8612, 488, 1077, 62, 2436, 539, 17, 65, 357, 46745, 90, 52, 600, 23, 5512, 2546, 62, 83, 11, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 2546, 62, 83, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 8612, 488, 1077, 62, 2436, 539, 17, 65, 62, 15003, 357, 46745, 90, 29609, 78, 62, 8612, 488, 1077, 62, 2436, 539, 17, 65, 62, 5219, 5512, 350, 2213, 90, 52, 600, 23, 5512, 2546, 62, 83, 11, 2546, 62, 83, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 8612, 488, 1077, 62, 2436, 539, 17, 65, 62, 19119, 357, 46745, 90, 29609, 78, 62, 8612, 488, 1077, 62, 2436, 539, 17, 65, 62, 5219, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 8612, 488, 1077, 62, 2436, 539, 17, 65, 62, 20311, 357, 46745, 90, 29609, 78, 62, 8612, 488, 1077, 62, 2436, 539, 17, 65, 62, 5219, 5512, 350, 2213, 90, 52, 600, 23, 5512, 2546, 62, 83, 8, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 8612, 488, 1077, 62, 33661, 62, 1084, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 8612, 488, 1077, 62, 33661, 62, 9806, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 8612, 488, 1077, 62, 2539, 33661, 62, 1084, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 8612, 488, 1077, 62, 2539, 33661, 62, 9806, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 8612, 488, 1077, 62, 9967, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 21473, 62, 8612, 488, 1077, 62, 19795, 1800, 7499, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 8612, 488, 1077, 357, 46745, 90, 52, 600, 23, 5512, 2546, 62, 83, 11, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 2546, 62, 83, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 8612, 488, 1077, 62, 15003, 357, 46745, 90, 29609, 78, 62, 8612, 488, 1077, 62, 2436, 539, 17, 65, 62, 5219, 5512, 350, 2213, 90, 52, 600, 23, 5512, 2546, 62, 83, 11, 2546, 62, 83, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 8612, 488, 1077, 62, 19119, 357, 46745, 90, 29609, 78, 62, 8612, 488, 1077, 62, 2436, 539, 17, 65, 62, 5219, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 8612, 488, 1077, 62, 20311, 357, 46745, 90, 29609, 78, 62, 8612, 488, 1077, 62, 2436, 539, 17, 65, 62, 5219, 5512, 350, 2213, 90, 52, 600, 23, 5512, 2546, 62, 83, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 17831, 62, 26270, 25836, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 17831, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 17831, 62, 26270, 11645, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 17831, 27372, 62, 26270, 11645, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 17831, 27372, 62, 26270, 25836, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 8, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 21473, 62, 261, 8079, 18439, 62, 35428, 12952, 20, 62, 5420, 62, 320, 32851, 62, 3672, 7499, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 261, 8079, 18439, 62, 35428, 12952, 20, 62, 2617, 62, 320, 32851, 357, 46745, 90, 29609, 78, 62, 261, 8079, 18439, 62, 35428, 12952, 20, 62, 320, 32851, 5512, 8, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 29609, 78, 62, 261, 8079, 18439, 62, 35428, 12952, 20, 62, 320, 32851, 92, 21473, 62, 261, 8079, 18439, 62, 27729, 62, 13466, 62, 320, 32851, 7499, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 261, 8079, 18439, 62, 35428, 12952, 20, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 261, 8079, 18439, 62, 35428, 12952, 20, 62, 332, 1958, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 261, 8079, 18439, 62, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 261, 8079, 18439, 62, 2539, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 21473, 62, 261, 8079, 18439, 62, 19795, 1800, 7499, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 261, 8079, 18439, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 261, 8079, 18439, 62, 332, 1958, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 1416, 282, 1670, 586, 62, 22019, 303, 13381, 1129, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 1416, 282, 1670, 586, 62, 22019, 303, 13381, 1129, 62, 8692, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 1416, 282, 1670, 586, 62, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 1416, 282, 1670, 586, 62, 1416, 282, 283, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 21473, 62, 1416, 282, 1670, 586, 62, 19795, 1800, 7499, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 1416, 282, 1670, 586, 62, 8692, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 1416, 282, 1670, 586, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 21078, 3524, 62, 34223, 32058, 1238, 35428, 12952, 20, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 21078, 3524, 62, 34223, 32058, 1238, 35428, 12952, 20, 62, 9654, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 21078, 3524, 62, 2539, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 21078, 3524, 62, 13159, 344, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 21078, 3524, 62, 9107, 26730, 4879, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 21078, 3524, 62, 3524, 9107, 26730, 4879, 7499, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 21473, 62, 21078, 3524, 62, 19795, 1800, 7499, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 21078, 3524, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 21078, 3524, 62, 9654, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 1477, 1506, 1077, 62, 82, 13323, 1077, 1731, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 1477, 1506, 1077, 62, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 1477, 1506, 1077, 62, 2539, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 21473, 62, 1477, 1506, 1077, 62, 19795, 1800, 7499, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 1477, 1506, 1077, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 12683, 62, 276, 13381, 1129, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 2414, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 12683, 62, 276, 13381, 1129, 62, 9654, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 2414, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 12683, 62, 276, 13381, 1129, 62, 2539, 24874, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 12683, 62, 276, 13381, 1129, 62, 28826, 62, 2539, 24874, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 12683, 62, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 12683, 62, 11377, 2539, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 12683, 62, 21078, 2539, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 21473, 62, 12683, 62, 19795, 1800, 7499, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 12683, 62, 28826, 62, 2539, 24874, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 12683, 62, 2539, 24874, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 12683, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 2414, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 12683, 62, 9654, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 2414, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 12683, 62, 276, 2017, 13381, 1129, 26270, 25836, 43501, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 2414, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 12683, 62, 276, 2017, 13381, 1129, 26270, 25836, 43501, 62, 9654, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 2414, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 12683, 62, 276, 2017, 13381, 1129, 26270, 25836, 43501, 62, 2539, 24874, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 34223, 32058, 1238, 357, 46745, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 34223, 32058, 1238, 62, 87, 273, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 34223, 32058, 1238, 62, 19052, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 34223, 32058, 1238, 62, 8499, 21533, 357, 46745, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 34223, 32058, 1238, 62, 87, 273, 62, 8499, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 5532, 62, 2539, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 2546, 62, 83, 21473, 62, 5532, 62, 13159, 344, 33661, 7499, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 21473, 62, 5532, 62, 19795, 1800, 7499, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 357, 46745, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 87, 273, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 64, 274, 12762, 24087, 357, 46745, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 64, 274, 12762, 24087, 62, 87, 273, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 64, 274, 12762, 24087, 62, 19052, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 64, 274, 12762, 24087, 62, 8499, 21533, 357, 46745, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 64, 274, 12762, 24087, 62, 87, 273, 62, 8499, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 1238, 357, 46745, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 1238, 62, 87, 273, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 1238, 62, 19052, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 1238, 62, 8499, 21533, 357, 46745, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 1238, 62, 87, 273, 62, 8499, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 6999, 357, 46745, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 6999, 62, 87, 273, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 6999, 62, 19052, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 6999, 62, 8499, 21533, 357, 46745, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 6999, 62, 87, 273, 62, 8499, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 21315, 357, 46745, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 21315, 62, 87, 273, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 21315, 62, 19052, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 21315, 62, 8499, 21533, 357, 46745, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 5532, 62, 82, 32058, 21315, 62, 87, 273, 62, 8499, 21533, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 5512, 471, 600, 2414, 11, 350, 2213, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 332, 1958, 62, 1433, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21473, 62, 332, 1958, 62, 2624, 357, 46745, 90, 52, 600, 23, 5512, 350, 2213, 90, 52, 600, 23, 30072, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 4738, 33661, 62, 2617, 62, 320, 32851, 357, 46745, 90, 25120, 33661, 62, 320, 32851, 5512, 8, 9195, 82, 12664, 198, 31, 66, 6045, 4738, 33661, 357, 46745, 90, 52, 600, 23, 5512, 471, 600, 2414, 8, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 4738, 33661, 62, 320, 32851, 62, 3672, 7499, 9195, 82, 12664, 198, 31, 66, 20398, 2624, 62, 83, 4738, 33661, 62, 25120, 7499, 9195, 82, 12664, 198, 31, 66, 6045, 4738, 33661, 62, 301, 343, 7499, 9195, 82, 12664, 198, 31, 66, 20398, 2624, 62, 83, 4738, 33661, 62, 403, 6933, 357, 28611, 2624, 62, 83, 35751, 9195, 82, 12664, 198, 31, 66, 6045, 4738, 33661, 62, 29325, 357, 46745, 90, 53, 1868, 5512, 2546, 62, 83, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 4738, 33661, 62, 19836, 7499, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 4738, 33661, 62, 82, 32058, 1238, 62, 320, 32851, 62, 3672, 7499, 9195, 82, 12664, 198, 31, 66, 20398, 2624, 62, 83, 4738, 33661, 62, 82, 32058, 1238, 62, 25120, 7499, 9195, 82, 12664, 198, 31, 66, 6045, 4738, 33661, 62, 82, 32058, 1238, 62, 25120, 62, 301, 343, 7499, 9195, 82, 12664, 198, 31, 66, 20398, 2624, 62, 83, 4738, 33661, 62, 82, 32058, 1238, 62, 25120, 62, 403, 6933, 357, 28611, 2624, 62, 83, 35751, 9195, 82, 12664, 198, 31, 66, 6045, 4738, 33661, 62, 82, 32058, 1238, 62, 25120, 62, 29325, 357, 46745, 90, 53, 1868, 5512, 2546, 62, 83, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 4738, 33661, 62, 82, 32058, 1238, 62, 25120, 62, 19836, 7499, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 4738, 33661, 62, 17597, 25120, 62, 320, 32851, 62, 3672, 7499, 9195, 82, 12664, 198, 31, 66, 20398, 2624, 62, 83, 4738, 33661, 62, 17597, 25120, 7499, 9195, 82, 12664, 198, 31, 66, 6045, 4738, 33661, 62, 17597, 25120, 62, 301, 343, 7499, 9195, 82, 12664, 198, 31, 66, 20398, 2624, 62, 83, 4738, 33661, 62, 17597, 25120, 62, 403, 6933, 357, 28611, 2624, 62, 83, 35751, 9195, 82, 12664, 198, 31, 66, 6045, 4738, 33661, 62, 17597, 25120, 62, 29325, 357, 46745, 90, 53, 1868, 5512, 2546, 62, 83, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 4738, 33661, 62, 17597, 25120, 62, 19836, 7499, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 4808, 82, 12664, 62, 41634, 13345, 420, 357, 46745, 90, 46745, 90, 52, 600, 23, 92, 5512, 2546, 62, 83, 8, 9195, 82, 12664, 198, 31, 66, 6045, 21072, 62, 11883, 22570, 357, 46745, 90, 53, 1868, 5512, 2546, 62, 83, 8, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21072, 62, 11883, 48991, 357, 46745, 90, 53, 1868, 5512, 350, 2213, 90, 53, 1868, 5512, 2546, 62, 83, 8, 9195, 82, 12664, 198, 31, 66, 350, 2213, 90, 52, 600, 23, 92, 21072, 62, 9641, 62, 8841, 7499, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21072, 62, 32016, 62, 9641, 62, 22478, 7499, 9195, 82, 12664, 198, 31, 66, 2558, 2624, 21072, 62, 32016, 62, 9641, 62, 1084, 273, 7499, 9195, 82, 12664, 628 ]
2.318304
5,212
#! format: off using PowerSystems using PowerSimulations using PowerSystemCaseBuilder using Cbc #solver solver = optimizer_with_attributes(Cbc.Optimizer, "logLevel" => 1, "ratioGap" => 0.5) sys = build_system(PSITestSystems, "test_RTS_GMLC_sys") for line in get_components(Line, sys) if (get_base_voltage(get_from(get_arc(line))) >= 230.0) && (get_base_voltage(get_to(get_arc(line))) >= 230.0) #if get_area(get_from(get_arc(line))) != get_area(get_to(get_arc(line))) @info "Changing $(get_name(line)) to MonitoredLine" convert_component!(MonitoredLine, line, sys) end end template = template_unit_commitment(transmission = PTDFPowerModel) set_device_model!(template, MonitoredLine, StaticBranch) set_device_model!(template, Line, StaticBranchUnbounded) uc_prob = OperationsProblem(template, sys, horizon = 24, optimizer = solver) build!(uc_prob, output_dir = mktempdir()) solve!(uc_prob) # This file was generated using Literate.jl, https://github.com/fredrikekre/Literate.jl
[ 2, 0, 5794, 25, 572, 198, 198, 3500, 4333, 11964, 82, 198, 3500, 4333, 8890, 5768, 198, 3500, 4333, 11964, 20448, 32875, 198, 198, 3500, 327, 15630, 1303, 82, 14375, 198, 82, 14375, 796, 6436, 7509, 62, 4480, 62, 1078, 7657, 7, 34, 15630, 13, 27871, 320, 7509, 11, 366, 6404, 4971, 1, 5218, 352, 11, 366, 10366, 952, 38, 499, 1, 5218, 657, 13, 20, 8, 198, 198, 17597, 796, 1382, 62, 10057, 7, 3705, 2043, 395, 11964, 82, 11, 366, 9288, 62, 49, 4694, 62, 15548, 5639, 62, 17597, 4943, 198, 198, 1640, 1627, 287, 651, 62, 5589, 3906, 7, 13949, 11, 25064, 8, 198, 220, 220, 220, 611, 357, 1136, 62, 8692, 62, 37764, 496, 7, 1136, 62, 6738, 7, 1136, 62, 5605, 7, 1370, 22305, 18189, 18395, 13, 15, 8, 11405, 198, 220, 220, 220, 220, 220, 220, 357, 1136, 62, 8692, 62, 37764, 496, 7, 1136, 62, 1462, 7, 1136, 62, 5605, 7, 1370, 22305, 18189, 18395, 13, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 361, 651, 62, 20337, 7, 1136, 62, 6738, 7, 1136, 62, 5605, 7, 1370, 22305, 14512, 651, 62, 20337, 7, 1136, 62, 1462, 7, 1136, 62, 5605, 7, 1370, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 366, 48333, 29568, 1136, 62, 3672, 7, 1370, 4008, 284, 2892, 20026, 13949, 1, 198, 220, 220, 220, 220, 220, 220, 220, 10385, 62, 42895, 0, 7, 9069, 20026, 13949, 11, 1627, 11, 25064, 8, 198, 220, 220, 220, 886, 198, 437, 198, 198, 28243, 796, 11055, 62, 20850, 62, 41509, 434, 7, 7645, 3411, 796, 19310, 35, 5837, 789, 17633, 8, 198, 198, 2617, 62, 25202, 62, 19849, 0, 7, 28243, 11, 2892, 20026, 13949, 11, 36125, 33, 25642, 8, 198, 198, 2617, 62, 25202, 62, 19849, 0, 7, 28243, 11, 6910, 11, 36125, 33, 25642, 3118, 65, 6302, 8, 198, 198, 1229, 62, 1676, 65, 796, 16205, 40781, 7, 28243, 11, 25064, 11, 17810, 796, 1987, 11, 6436, 7509, 796, 1540, 332, 8, 198, 11249, 0, 7, 1229, 62, 1676, 65, 11, 5072, 62, 15908, 796, 33480, 29510, 15908, 28955, 198, 198, 82, 6442, 0, 7, 1229, 62, 1676, 65, 8, 198, 198, 2, 770, 2393, 373, 7560, 1262, 17667, 378, 13, 20362, 11, 3740, 1378, 12567, 13, 785, 14, 39193, 8760, 74, 260, 14, 43460, 378, 13, 20362, 198 ]
2.588384
396
module HypergraphsEpidemics using CSV using DataFrames using Query using Tables using Dates using DataStructures using Distributions using SimpleHypergraphs using Statistics using Combinatorics using Pipe: @pipe using Random using JSON using JSON3 using Serialization export Person export Household export Company export Contact_simulation_options export generate_dataset export start_simulation include("common/Constants.jl") include("common/EventWriter.jl") include("common/utils.jl") include("common/structs.jl") include("RoutineAutomaton.jl") include("DatasetGeneration.jl") include("Simulation.jl") include("../deps/HGEpidemics/src/HGEpidemics.jl") using .HGEpidemics end
[ 21412, 15079, 34960, 82, 13807, 28913, 873, 198, 198, 3500, 44189, 198, 3500, 6060, 35439, 198, 3500, 43301, 198, 3500, 33220, 198, 3500, 44712, 198, 3500, 6060, 44909, 942, 198, 3500, 46567, 507, 198, 3500, 17427, 38197, 34960, 82, 198, 3500, 14370, 198, 3500, 955, 8800, 1352, 873, 198, 3500, 36039, 25, 2488, 34360, 198, 3500, 14534, 198, 3500, 19449, 198, 3500, 19449, 18, 198, 3500, 23283, 1634, 198, 198, 39344, 7755, 198, 39344, 37306, 198, 39344, 5834, 198, 39344, 14039, 62, 14323, 1741, 62, 25811, 198, 198, 39344, 7716, 62, 19608, 292, 316, 198, 39344, 923, 62, 14323, 1741, 198, 198, 17256, 7203, 11321, 14, 34184, 1187, 13, 20362, 4943, 198, 17256, 7203, 11321, 14, 9237, 34379, 13, 20362, 4943, 198, 17256, 7203, 11321, 14, 26791, 13, 20362, 4943, 198, 17256, 7203, 11321, 14, 7249, 82, 13, 20362, 4943, 198, 17256, 7203, 49, 28399, 38062, 13951, 13, 20362, 4943, 198, 17256, 7203, 27354, 292, 316, 8645, 341, 13, 20362, 4943, 198, 17256, 7203, 8890, 1741, 13, 20362, 4943, 198, 198, 17256, 7203, 40720, 10378, 82, 14, 39, 8264, 79, 28913, 873, 14, 10677, 14, 39, 8264, 79, 28913, 873, 13, 20362, 4943, 198, 198, 3500, 764, 39, 8264, 79, 28913, 873, 198, 198, 437 ]
3.331707
205
using Test # test the seg error functions using EMIRT using EMIRT.Evaluate @testset "test evaluate" begin # get test data aff = EMIRT.IOs.imread(joinpath(dirname(@__FILE__),"../assets/aff.h5")) lbl = EMIRT.IOs.imread(joinpath(dirname(@__FILE__),"../assets/lbl.h5")) lbl = Array{UInt32,3}(lbl) # compare python code and julia seg = EMIRT.AffinityMaps.aff2seg(aff) judec = evaluate(seg, lbl) @show judec # dict of evaluation curve @time ecd = evaluate(lbl,lbl) @show ecd @test abs(ecd[:rf]-1) < 0.01 seg = Array{UInt32,3}(reshape(range(1,length=length(lbl)), size(lbl))) @time ecd = evaluate(seg,lbl) @show ecd @test abs(ecd[:rf]-0) < 0.01 end # end of test set
[ 3500, 6208, 198, 2, 1332, 262, 384, 70, 4049, 5499, 198, 3500, 17228, 48771, 198, 3500, 17228, 48771, 13, 36, 2100, 4985, 198, 198, 31, 9288, 2617, 366, 9288, 13446, 1, 2221, 220, 198, 198, 2, 651, 1332, 1366, 198, 2001, 796, 17228, 48771, 13, 9399, 82, 13, 320, 961, 7, 22179, 6978, 7, 15908, 3672, 7, 31, 834, 25664, 834, 27267, 40720, 19668, 14, 2001, 13, 71, 20, 48774, 198, 75, 2436, 796, 17228, 48771, 13, 9399, 82, 13, 320, 961, 7, 22179, 6978, 7, 15908, 3672, 7, 31, 834, 25664, 834, 27267, 40720, 19668, 14, 75, 2436, 13, 71, 20, 48774, 198, 198, 75, 2436, 796, 15690, 90, 52, 5317, 2624, 11, 18, 92, 7, 75, 2436, 8, 198, 198, 2, 8996, 21015, 2438, 290, 474, 43640, 198, 325, 70, 796, 17228, 48771, 13, 35191, 6269, 47010, 13, 2001, 17, 325, 70, 7, 2001, 8, 198, 10456, 721, 796, 13446, 7, 325, 70, 11, 300, 2436, 8, 198, 31, 12860, 2553, 721, 198, 198, 2, 8633, 286, 12660, 12133, 198, 31, 2435, 9940, 67, 796, 13446, 7, 75, 2436, 11, 75, 2436, 8, 198, 31, 12860, 9940, 67, 198, 31, 9288, 2352, 7, 21142, 58, 25, 41871, 45297, 16, 8, 1279, 657, 13, 486, 198, 198, 325, 70, 796, 15690, 90, 52, 5317, 2624, 11, 18, 92, 7, 3447, 1758, 7, 9521, 7, 16, 11, 13664, 28, 13664, 7, 75, 2436, 36911, 2546, 7, 75, 2436, 22305, 198, 31, 2435, 9940, 67, 796, 13446, 7, 325, 70, 11, 75, 2436, 8, 198, 31, 12860, 9940, 67, 198, 31, 9288, 2352, 7, 21142, 58, 25, 41871, 45297, 15, 8, 1279, 657, 13, 486, 198, 198, 437, 1303, 886, 286, 1332, 900, 198 ]
2.360424
283
""" gen_ref_dirs(dimension, n_paritions) Generates Das and Dennis's structured reference points. `dimension` could be the number of objective functions in multi-objective functions. """ function gen_ref_dirs(dimension, n_paritions) return gen_weights(dimension, n_paritions) end function gen_weights(a, b) nobj = a; H = b; a = zeros(nobj); d = H; w = []; produce_weight!(a, 1, d, H, nobj, w) return Array.(w) end function produce_weight!(a, i, d, H, nobj, w) for k=0:d if i<nobj a[i] = k; d2 = d - k; produce_weight!(a, i+1, d2, H, nobj, w); else a[i] = d; push!(w, a/H) break; end end end """ ideal(points) Computes the ideal point from a provided array of `Vector`s or a population or row vectors in a `Matrix`. """ function ideal(points::Array{Vector{T}}) where T <: Real isempty(points) && isempty(points[1]) && return zeros(0) ideal = points[1] for point in points ideal = min.(ideal, point) end return ideal end """ nadir(points) Computes the nadir point from a provided array of `Vector`s or a population or row vectors in a `Matrix`. """ function nadir(points::Array{Vector{T}}) where T <: Real isempty(points) && isempty(points[1]) && return zeros(0) nadir = points[1] for point in points nadir = max.(nadir, point) end return nadir end function ideal(population::Array{xFgh_indiv}) mask = sum_violations.(population) .== 0 ideal(fval.(population[mask])) end ideal(A::Matrix) = ideal([A[i,:] for i in 1:size(A,1)]) function nadir(population::Array{xFgh_indiv}) mask = sum_violations.(population) .== 0 nadir(fval.(population[mask])) end nadir(A::Matrix) = nadir([A[i,:] for i in 1:size(A,1)])
[ 37811, 198, 220, 220, 220, 2429, 62, 5420, 62, 15908, 82, 7, 46156, 11, 299, 62, 1845, 1756, 8, 198, 8645, 689, 29533, 290, 16902, 338, 20793, 4941, 2173, 13, 4600, 46156, 63, 714, 307, 198, 1169, 1271, 286, 9432, 5499, 287, 5021, 12, 15252, 425, 5499, 13, 198, 37811, 198, 8818, 2429, 62, 5420, 62, 15908, 82, 7, 46156, 11, 299, 62, 1845, 1756, 8, 198, 220, 220, 220, 1441, 220, 2429, 62, 43775, 7, 46156, 11, 299, 62, 1845, 1756, 8, 198, 437, 198, 198, 8818, 2429, 62, 43775, 7, 64, 11, 275, 8, 198, 220, 220, 220, 31801, 73, 796, 257, 26, 198, 220, 220, 220, 367, 220, 220, 220, 796, 275, 26, 198, 220, 220, 220, 257, 220, 220, 220, 796, 1976, 27498, 7, 77, 26801, 1776, 198, 220, 220, 220, 288, 220, 220, 220, 796, 367, 26, 198, 220, 220, 220, 266, 220, 220, 220, 796, 25787, 198, 220, 220, 220, 4439, 62, 6551, 0, 7, 64, 11, 352, 11, 288, 11, 367, 11, 31801, 73, 11, 266, 8, 198, 220, 220, 220, 1441, 15690, 12195, 86, 8, 198, 437, 198, 198, 8818, 220, 4439, 62, 6551, 0, 7, 64, 11, 1312, 11, 288, 11, 367, 11, 31801, 73, 11, 266, 8, 198, 220, 220, 220, 329, 479, 28, 15, 25, 67, 198, 220, 220, 220, 220, 220, 220, 220, 611, 1312, 27, 77, 26801, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 58, 72, 60, 796, 479, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 288, 17, 220, 220, 796, 288, 532, 479, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4439, 62, 6551, 0, 7, 64, 11, 1312, 10, 16, 11, 288, 17, 11, 367, 11, 31801, 73, 11, 266, 1776, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 257, 58, 72, 60, 796, 288, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4574, 0, 7, 86, 11, 257, 14, 39, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 26, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 7306, 7, 13033, 8, 198, 198, 7293, 1769, 262, 7306, 966, 422, 257, 2810, 7177, 286, 4600, 38469, 63, 82, 393, 257, 3265, 393, 5752, 30104, 198, 259, 257, 4600, 46912, 44646, 198, 37811, 198, 8818, 7306, 7, 13033, 3712, 19182, 90, 38469, 90, 51, 11709, 8, 810, 309, 1279, 25, 6416, 220, 628, 220, 220, 220, 318, 28920, 7, 13033, 8, 11405, 318, 28920, 7, 13033, 58, 16, 12962, 11405, 1441, 1976, 27498, 7, 15, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 7306, 796, 2173, 58, 16, 60, 628, 220, 220, 220, 329, 966, 287, 2173, 198, 220, 220, 220, 220, 220, 220, 220, 7306, 796, 949, 12195, 485, 282, 11, 966, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 7306, 198, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 299, 324, 343, 7, 13033, 8, 198, 198, 7293, 1769, 262, 299, 324, 343, 966, 422, 257, 2810, 7177, 286, 4600, 38469, 63, 82, 393, 257, 3265, 393, 5752, 30104, 198, 259, 257, 4600, 46912, 44646, 198, 37811, 198, 8818, 299, 324, 343, 7, 13033, 3712, 19182, 90, 38469, 90, 51, 11709, 8, 220, 810, 309, 1279, 25, 6416, 198, 220, 198, 220, 220, 220, 318, 28920, 7, 13033, 8, 11405, 318, 28920, 7, 13033, 58, 16, 12962, 11405, 1441, 1976, 27498, 7, 15, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 299, 324, 343, 796, 2173, 58, 16, 60, 628, 220, 220, 220, 329, 966, 287, 2173, 198, 220, 220, 220, 220, 220, 220, 220, 299, 324, 343, 796, 3509, 12195, 77, 324, 343, 11, 966, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 299, 324, 343, 198, 437, 628, 198, 8818, 7306, 7, 39748, 3712, 19182, 90, 87, 37, 456, 62, 521, 452, 30072, 198, 220, 220, 220, 9335, 796, 2160, 62, 17069, 602, 12195, 39748, 8, 764, 855, 657, 628, 220, 220, 220, 7306, 7, 69, 2100, 12195, 39748, 58, 27932, 60, 4008, 198, 437, 198, 485, 282, 7, 32, 3712, 46912, 8, 796, 7306, 26933, 32, 58, 72, 11, 47715, 220, 329, 1312, 287, 352, 25, 7857, 7, 32, 11, 16, 8, 12962, 198, 198, 8818, 299, 324, 343, 7, 39748, 3712, 19182, 90, 87, 37, 456, 62, 521, 452, 30072, 198, 220, 220, 220, 9335, 796, 2160, 62, 17069, 602, 12195, 39748, 8, 764, 855, 657, 628, 220, 220, 220, 299, 324, 343, 7, 69, 2100, 12195, 39748, 58, 27932, 60, 4008, 198, 437, 198, 198, 77, 324, 343, 7, 32, 3712, 46912, 8, 796, 299, 324, 343, 26933, 32, 58, 72, 11, 47715, 220, 329, 1312, 287, 352, 25, 7857, 7, 32, 11, 16, 8, 12962, 198 ]
2.244311
835
using Test, TestPackage3 @static if VERSION > v"1.3" @test hello3("Julia") == "Hello, Julia" elseif VERSION > v"1.2" @test domath3(2.0) ≈ 7.0 else multiply3(2.0) == 8.0 end
[ 3500, 6208, 11, 6208, 27813, 18, 628, 198, 31, 12708, 611, 44156, 2849, 1875, 410, 1, 16, 13, 18, 1, 198, 220, 2488, 9288, 23748, 18, 7203, 16980, 544, 4943, 6624, 366, 15496, 11, 22300, 1, 198, 17772, 361, 44156, 2849, 1875, 410, 1, 16, 13, 17, 1, 198, 220, 2488, 9288, 2401, 776, 18, 7, 17, 13, 15, 8, 15139, 230, 767, 13, 15, 198, 17772, 198, 220, 29162, 18, 7, 17, 13, 15, 8, 6624, 807, 13, 15, 198, 437, 198 ]
2.180723
83
# Some methods for validated integration of ODEs const _DEF_MINABSTOL = 1.0e-50 """ remainder_taylorstep!(f!, t, x, dx, xI, dxI, δI, δt, params) Returns a remainder for the integration step for the dependent variables (`x`) checking that the solution satisfies the criteria for existence and uniqueness. """ function remainder_taylorstep!(f!::Function, t::Taylor1{T}, x::Vector{Taylor1{TaylorN{T}}}, dx::Vector{Taylor1{TaylorN{T}}}, xI::Vector{Taylor1{Interval{T}}}, dxI::Vector{Taylor1{Interval{T}}}, δI::IntervalBox{N,T}, δt::Interval{T}, params) where {N,T} orderT = get_order(dx[1]) aux = δt^(orderT+1) Δx = IntervalBox([xI[i][orderT+1] for i in eachindex(xI)]) * aux Δdx = IntervalBox([dxI[i][orderT+1] for i in eachindex(xI)]) * aux Δ0 = IntervalBox([dx[i][orderT](δI) for i in eachindex(x)]) * aux / (orderT+1) Δ = Δ0 + Δdx * δt Δxold = Δx # Checking existence and uniqueness iscontractive(Δ, Δx) && return (true, Δx, t[0]) # If the check didn't work, compute new remainders. A new Δx is proposed, # and the corresponding Δdx is computed xxI = Array{Taylor1{TaylorN{Interval{T}}}}(undef, N) dxxI = Array{Taylor1{TaylorN{Interval{T}}}}(undef, N) vv = Array{Interval{T}}(undef, N) for its = 1:50 # Remainder of Picard iteration Δ = picard_remainder!(f!, t, x, dx, xxI, dxxI, δI, δt, Δx, Δ0, params) # Checking existence and uniqueness iscontractive(Δ, Δx) && return (true, Δx, t[0]) # iscontractive(Δ, Δx) && return _contract_iteration!(f!, t, x, dx, xxI, dxxI, δI, δt, Δx, Δdx, Δ0, params) # Expand Δx in the directions needed Δxold = Δx if Δ ⊆ Δx @inbounds for ind in 1:N # Widen the directions where ⊂ does not hold vv[ind] = Δx[ind] if Δ[ind] == Δx[ind] vv[ind] = widen.(Δ[ind]) end end Δx = IntervalBox(vv) continue end Δx = Δ end return (false, Δx) end """ iscontractive(Δ, Δx) Checks if `Δ .⊂ Δx` is satisfied. If ``Δ ⊆ Δx` is satisfied, it returns `true` if all cases where `==` holds corresponds to the zero `Interval`. """ function iscontractive(Δ::Interval{T}, Δx::Interval{T}) where{T} (Δ ⊂ Δx || Δ == Δx == zero_interval(T)) && return true return false end function iscontractive(Δ::IntervalBox{N,T}, Δx::IntervalBox{N,T}) where{N,T} @inbounds for ind in 1:N iscontractive(Δ[ind], Δx[ind]) || return false end return true end """ picard_remainder!(f!, t, x, dx, xxI, dxxI, δI, δt, Δx, Δ0, params) Return the remainder of Picard operator """ function picard_remainder!(f!::Function, t::Taylor1{T}, x::Vector{Taylor1{TaylorN{T}}}, dx::Vector{Taylor1{TaylorN{T}}}, xxI::Vector{Taylor1{TaylorN{Interval{T}}}}, dxxI::Vector{Taylor1{TaylorN{Interval{T}}}}, δI::IntervalBox{N,T}, δt::Interval{T}, Δx::IntervalBox{N,T}, Δ0::IntervalBox{N,T}, params) where {N,T} # Extend `x` and `dx` to have interval coefficients zI = zero_interval(T) @. begin xxI = x + Δx dxxI = dx + zI end # Compute `dxxI` from the equations of motion f!(dxxI, xxI, params, t) # Picard iteration, considering only the bound of `f` and the last coeff of f Δdx = IntervalBox( evaluate.( (dxxI - dx)(δt), (δI,) ) ) Δ = Δ0 + Δdx * δt return Δ end # # Picard iterations to contract further Δx, once Δ ⊂ Δx holds # # **Currently not used** # function _contract_iteration!(f!::Function, t::Taylor1{T}, # x::Vector{Taylor1{TaylorN{T}}}, dx::Vector{Taylor1{TaylorN{T}}}, # xxI::Vector{Taylor1{TaylorN{Interval{T}}}}, dxxI::Vector{Taylor1{TaylorN{Interval{T}}}}, # δI::IntervalBox{N,T}, δt::Interval{T}, # Δx::IntervalBox{N,T}, Δdx::IntervalBox{N,T}, Δ0::IntervalBox{N,T}, params) where {N,T} # # # Some abbreviations # Δ = Δ0 + Δdx * δt # Δxold = Δx # # # Picard contractions # for its = 1:10 # # Remainder of Picard iteration # Δ = picard_remainder!(f!, t, x, dx, xxI, dxxI, δI, δt, Δx, Δ0, params) # # # If contraction doesn't hold, return old bound # iscontractive(Δ, Δx) || return Δxold # # # Contract estimate # Δxold = Δx # Δx = Δ # end # # return Δxold # end """ absorb_remainder(a::TaylorModelN) Returns a TaylorModelN, equivalent to `a`, such that the remainder is mostly absorbed in the constant and linear coefficients. The linear shift assumes that `a` is normalized to the `IntervalBox(-1..1, Val(N))`. Ref: Xin Chen, Erika Abraham, and Sriram Sankaranarayanan, "Taylor Model Flowpipe Construction for Non-linear Hybrid Systems", in Real Time Systems Symposium (RTSS), pp. 183-192 (2012), IEEE Press. """ function absorb_remainder(a::TaylorModelN{N,T,T}) where {N,T} Δ = remainder(a) orderQ = get_order(a) δ = symmetric_box(N, T) aux = diam(Δ)/(2N) rem = zero_interval(T) # Linear shift lin_shift = mid(Δ) + sum((aux*TaylorN(i, order=orderQ) for i in 1:N)) bpol = a.pol + lin_shift # Compute the new remainder aI = a(δ) bI = bpol(δ) if bI ⊆ aI rem = Interval(aI.lo-bI.lo, aI.hi-bI.hi) elseif aI ⊆ bI rem = Interval(bI.lo-aI.lo, bI.hi-aI.hi) else r_lo = aI.lo-bI.lo r_hi = aI.hi-bI.hi if r_lo > 0 rem = Interval(-r_lo, r_hi) else rem = Interval( r_lo, -r_hi) end end return TaylorModelN(bpol, rem, a.x0, a.dom) end # Postverify and define Taylor models to be returned function scalepostverify_sw!(xTMN::Vector{TaylorModelN{N,T,T}}, X::Vector{TaylorN{T}}) where {N,T} postverify = true x0 = xTMN[1].x0 B = domain(xTMN[1]) zI = zero_interval(T)#zero(B[1]) @inbounds for i in eachindex(xTMN) pol = polynomial(xTMN[i]) ppol = fp_rpa(TaylorModelN(pol(X), zI, x0, B )) postverify = postverify && (xTMN[i](B) ⊆ ppol(B)) xTMN[i] = copy(ppol) end @assert postverify """ Failed to post-verify shrink-wrapping: X = $(linear_polynomial(X)) xTMN = $(xTMN) """ return postverify end """ shrink_wrapping!(xTMN::TaylorModelN) Returns a modified inplace `xTMN`, which has absorbed the remainder by the modified shrink-wrapping method of Florian Bünger. The domain of `xTMN` is the normalized interval box `[-1,1]^N`. Ref: Florian B\"unger, Shrink wrapping for Taylor models revisited, Numer Algor 78:1001–1017 (2018), https://doi.org/10.1007/s11075-017-0410-1 """ function shrink_wrapping!(xTMN::Vector{TaylorModelN{N,T,T}}) where {N,T} # Original domain of TaylorModelN should be the symmetric normalized box B = symmetric_box(N, T) @assert all(domain.(xTMN) .== (B,)) zI = zero_interval(T) x0 = zero_box(N, T) @assert all(expansion_point.(xTMN) .== (x0,)) # Vector of independent TaylorN variables order = get_order(xTMN[1]) X = [TaylorN(T, i, order=order) for i in 1:N] # Remainder of original TaylorModelN and componentwise mag rem = remainder.(xTMN) r = mag.(rem) qB = r .* B one_r = ones(eltype(r), N) # Shift to remove constant term xTN0 = constant_term.(xTMN) xTNcent = polynomial.(xTMN) .- xTN0 xTNcent_lin = linear_polynomial(xTNcent) # Step 4 of Bünger algorithm: Jacobian (at zero) and its inverse jac = TaylorSeries.jacobian(xTNcent_lin) # If the conditional number is too large (inverse of jac is ill defined), # don't change xTMN cond(jac) > 1.0e4 && return one_r # Inverse of the Jacobian invjac = inv(jac) # Componentwise bound r̃ = mag.(invjac * qB) # qB <-- r .* B qB´ = r̃ .* B @assert invjac * qB ⊆ qB´ # Step 6 of Bünger algorithm: compute g g = invjac*xTNcent .- X # g = invjac*(xTNcent .- xTNcent_lin) # ... and its jacobian matrix (full dependence!) jacmatrix_g = TaylorSeries.jacobian(g, X) # Alternative to Step 7: Check the validity of Eq 16 (or 17) for Lemma 2 # of Bünger's paper, for s=0, and s very small. If it satisfies it, # postverify and return. Otherwise, use Bünger's step 7. q = 1.0 .+ r̃ s = zero(q) @. q = 1.0 + r̃ + s jaq_q1 = jacmatrix_g * (q .- 1.0) eq16 = all(mag.(evaluate.(jaq_q1, (q .* B,))) .≤ s) if eq16 postverify = scalepostverify_sw!(xTMN, q .* X) postverify && return q end s .= eps.(q) @. q = 1.0 + r̃ + s jaq_q1 = jacmatrix_g * (q .- 1.0) eq16 = all(mag.(evaluate.(jaq_q1, (q .* B,))) .≤ s) if eq16 postverify = scalepostverify_sw!(xTMN, q .* X) postverify && return q end # Step 7 of Bünger algorithm: estimate of `q` # Some constants/parameters q_tol = 1.0e-12 q = 1.0 .+ r̃ ff = 65/64 q_max = ff .* q s = zero(q) q_old = similar(q) q_1 = similar(q) jaq_q1 .= jacmatrix_g * r̃ iter_max = 100 improve = true iter = 0 while improve && iter < iter_max qB .= q .* B q_1 .= q .- 1.0 q_old .= q mul!(jaq_q1, jacmatrix_g, q_1) eq16 = all(evaluate.(jaq_q1, (qB,)) .≤ s) eq16 && break @inbounds for i in eachindex(xTMN) s[i] = mag( jaq_q1[i](qB) ) q[i] = 1.0 + r̃[i] + s[i] # If q is too large, return xTMN unchanged q[i] > q_max[i] && return -one_r end improve = any( ((q .- q_old)./q) .> q_tol ) iter += 1 end # (improve || q == one_r) && return one_r # Compute final q and rescale X @. q = 1.0 + r̃ + ff * s @. X = q * X # Postverify postverify = scalepostverify_sw!(xTMN, X) return q end """ validated-step! """ function validated_step!(f!, t::Taylor1{T}, x::Vector{Taylor1{TaylorN{T}}}, dx::Vector{Taylor1{TaylorN{T}}}, xaux::Vector{Taylor1{TaylorN{T}}}, tI::Taylor1{T}, xI::Vector{Taylor1{Interval{T}}}, dxI::Vector{Taylor1{Interval{T}}}, xauxI::Vector{Taylor1{Interval{T}}}, t0::T, tmax::T, sign_tstep::Int, xTMN::Vector{TaylorModelN{N,T,T}}, xv::Vector{IntervalBox{N,T}}, rem::Vector{Interval{T}}, zbox::IntervalBox{N,T}, symIbox::IntervalBox{N,T}, nsteps::Int, orderT::Int, abstol::T, params, parse_eqs::Bool, adaptive::Bool, minabstol::T, absorb::Bool, check_property::Function=(t, x)->true) where {N,T} # One step integration (non-validated) # TaylorIntegration.__jetcoeffs!(Val(parse_eqs), f!, t, x, dx, xaux, params) # δt = TaylorIntegration.stepsize(x, abstol) δt = TaylorIntegration.taylorstep!(f!, t, x, dx, xaux, abstol, params, parse_eqs) f!(dx, x, params, t) # Update `dx[:][orderT]` # One step integration for the initial box # TaylorIntegration.__jetcoeffs!(Val(parse_eqs), f!, tI, xI, dxI, xauxI, params) # δtI = TaylorIntegration.stepsize(xI, abstol) δtI = TaylorIntegration.taylorstep!(f!, tI, xI, dxI, xauxI, abstol, params, parse_eqs) f!(dxI, xI, params, tI) # Update `dxI[:][orderT+1]` # Step size δt = min(δt, sign_tstep*(tmax-t0)) δt = sign_tstep * δt # Test if `check_property` is satisfied; if not, half the integration time. # If after 25 checks `check_property` is not satisfied, throw an error. nsteps += 1 issatisfied = false rem_old = copy(rem) local _success, _t0 reduced_abstol = abstol bool_red = true while bool_red # Validate the solution: remainder consistent with Schauder thm δtI = sign_tstep * Interval(0, sign_tstep*δt) (_success, Δ) = remainder_taylorstep!(f!, t, x, dx, xI, dxI, symIbox, δtI, params) # Shrink stepsize δt if adaptive is true and _success is false if !_success if adaptive bool_red = reduced_abstol > minabstol if bool_red reduced_abstol = reduced_abstol/10 δt = δt * 0.1^(1/orderT) continue else @warn("Minimum absolute tolerance reached: ", t[0], δt, reduced_abstol, Δ) end else @warn("It cannot prove existence and unicity of the solution: ", t[0], δt, Δ) end end # Remainder rem .= rem_old .+ Δ # Create TaylorModelN to store remainders and evaluation @inbounds begin for i in eachindex(x) xTMN[i] = fp_rpa( TaylorModelN(x[i](δtI), rem[i], zbox, symIbox) ) # If remainder is still too big, do it again j = 0 while absorb && (j < 10) && (mag(rem[i]) > 1.0e-10) t[0] == 0 && println("absorb_remainder ") j += 1 xTMN[i] = absorb_remainder(xTMN[i]) rem[i] = remainder(xTMN[i]) end end xv[nsteps] = evaluate(xTMN, symIbox) # IntervalBox issatisfied = check_property(t0+δt, xv[nsteps]) if !issatisfied # δt = δt/2 bool_red = reduced_abstol > minabstol @info("issatisfied: ", bool_red, δt) if bool_red reduced_abstol = reduced_abstol / 10 δt = δt * 0.1^(1/orderT) continue else @warn("Minimum absolute tolerance reached (issatisfied): ", t[0], δt, reduced_abstol, Δ) end end end # @inbounds break end if !issatisfied && !adaptive @warn(""" Something went wrong: """, issatisfied, adaptive, bool_red, reduced_abstol, t0, δt, Δ, nsteps, xv[nsteps], check_property(t0+δt, xv[nsteps]) ) end return (_success, δt, reduced_abstol) end """ initialize!(X0::IntervalBox{N, T}, orderQ, orderT, x, dx, xTMN, xI, dxI, rem, xTM1v) where {N, T} Initialize the auxiliary integration variables and normalize the given interval box to the domain `[-1, 1]^n`. """ function initialize!(X0::IntervalBox{N,T}, orderQ, orderT, x, dx, xTMN, xI, dxI, rem, xTM1v) where {N,T} @assert N == get_numvars() # center of the box and vector of widths q0 = mid.(X0) δq0 = X0 .- q0 # normalized domain zI = zero_interval(T) zB = zero_box(N, T) S = symmetric_box(N, T) qaux = normalize_taylor.(q0 .+ TaylorN.(1:N, order=orderQ), (δq0,), true) @. begin x = Taylor1(qaux, orderT) dx = x xTMN = TaylorModelN(qaux, zI, (zB,), (S,)) xI = Taylor1(X0, orderT+1) dxI = xI rem = zI xTM1v[:, 1] = TaylorModel1(deepcopy(x), zI, zI, zI) end return nothing end function initialize!(X0::IntervalBox{N,T}, orderQ, orderT, x, dx, xTMN, rem, xTM1v) where {N,T} @assert N == get_numvars() q0 = mid.(X0) δq0 = X0 .- q0 zI = zero_interval(T) zB = zero_box(N, T) S = symmetric_box(N, T) qaux = normalize_taylor.(q0 .+ TaylorN.(1:N, order=orderQ), (δq0,), true) @. begin x = Taylor1(qaux, orderT) dx = x xTMN = TaylorModelN(qaux, zI, (zB,), (S,)) rem = zI xTM1v[:, 1] = TaylorModel1(deepcopy(x), zI, zI, zI) end return nothing end """ initialize!(X0::Vector{TaylorModel1{TaylorN{T}, T}}, orderQ, orderT, x, dx, xTMN, xI, dxI, rem, xTM1v) where {T} Initialize the auxiliary integration variables assuming that the given vector of taylor models `X0` is normalized to the domain `[-1, 1]^n` in space. """ function initialize!(X0::Vector{TaylorModel1{TaylorN{T},T}}, orderQ, orderT, x, dx, xTMN, xI, dxI, rem, xTM1v) where {T} # nomalized domain N = get_numvars() zI = zero_interval(T) zB = zero_box(N, T) S = symmetric_box(N, T) qaux = constant_term.(polynomial.(X0)) x0t = expansion_point(X0[1]) domt = domain(X0[1]) @. begin x = Taylor1(qaux, orderT) dx = x xTMN = TaylorModelN(qaux, zI, (zB,), (S,)) # we assume that qaux is normalized to S=[-1, 1]^N xI = Taylor1(evaluate(qaux, (S,)), orderT+1) dxI = xI # remainder rem = remainder(X0) # output vector xTM1v[:, 1] = TaylorModel1(deepcopy(x), rem, x0t, domt) end return nothing end function initialize!(X0::Vector{TaylorModel1{TaylorN{T},T}}, orderQ, orderT, x, dx, xTMN, rem, xTM1v) where {T} # nomalized domain N = get_numvars() zI = zero_interval(T) zB = zero_box(N, T) S = symmetric_box(N, T) qaux = constant_term.(polynomial.(X0)) x0t = expansion_point(X0[1]) domt = domain(X0[1]) @. begin x = Taylor1(qaux, orderT) dx = x xTMN = TaylorModelN(qaux, zI, (zB,), (S,)) # remainder rem = remainder(X0) # output vector xTM1v[:, 1] = TaylorModel1(deepcopy(x), rem, x0t, domt) end return nothing end function validated_integ(f!, X0, t0::T, tmax::T, orderQ::Int, orderT::Int, abstol::T, params=nothing; maxsteps::Int=2000, parse_eqs::Bool=true, adaptive::Bool=true, minabstol::T=T(_DEF_MINABSTOL), absorb::Bool=false, check_property::Function=(t, x)->true) where {T<:Real} # Set proper parameters for jet transport N = get_numvars() dof = N # Some variables zt = zero(t0) zI = zero_interval(T) zB = zero_box(N, T) S = symmetric_box(N, T) t = t0 + Taylor1(orderT) tI = t0 + Taylor1(orderT+1) # Allocation of vectors # Output tv = Array{T}(undef, maxsteps+1) xv = Array{IntervalBox{N,T}}(undef, maxsteps+1) xTM1v = Array{TaylorModel1{TaylorN{T},T}}(undef, dof, maxsteps+1) rem = Array{Interval{T}}(undef, dof) # Internals: jet transport integration x = Array{Taylor1{TaylorN{T}}}(undef, dof) dx = Array{Taylor1{TaylorN{T}}}(undef, dof) xaux = Array{Taylor1{TaylorN{T}}}(undef, dof) xTMN = Array{TaylorModelN{N,T,T}}(undef, dof) # Internals: Taylor1{Interval{T}} integration xI = Array{Taylor1{Interval{T}}}(undef, dof) dxI = Array{Taylor1{Interval{T}}}(undef, dof) xauxI = Array{Taylor1{Interval{T}}}(undef, dof) # Set initial conditions initialize!(X0, orderQ, orderT, x, dx, xTMN, xI, dxI, rem, xTM1v) sign_tstep = copysign(1, tmax-t0) # Output vectors @inbounds tv[1] = t0 @inbounds xv[1] = evaluate(xTMN, S) # Determine if specialized jetcoeffs! method exists (built by @taylorize) parse_eqs = TaylorIntegration._determine_parsing!(parse_eqs, f!, t, x, dx, params) local _success # if true, the validation step succeeded setformat(:full) red_abstol = abstol # Integration nsteps = 1 while sign_tstep*t0 < sign_tstep*tmax # Validated step of the integration (_success, δt, red_abstol) = validated_step!(f!, t, x, dx, xaux, tI, xI, dxI, xauxI, t0, tmax, sign_tstep, xTMN, xv, rem, zB, S, nsteps, orderT, red_abstol, params, parse_eqs, adaptive, minabstol, absorb, check_property) δtI = sign_tstep * Interval(zt, sign_tstep*δt) # New initial conditions and time, and output vectors nsteps += 1 @inbounds tv[nsteps] = t0 t0 += δt @inbounds t[0] = t0 @inbounds tI[0] = t0 @. begin xTM1v[:, nsteps] = TaylorModel1(x, rem, zI, δtI) # deepcopy? x = Taylor1(evaluate(x, δt), orderT) # dx = Taylor1(zero(constant_term(x)), orderT) xI = Taylor1(evaluate(xTMN, (S,)), orderT+1) # dxI = xI end # Try to increase `red_abstol` if `adaptive` is true if adaptive red_abstol = min(abstol, 10*red_abstol) end # If the integration step is unsuccessfull, break with a warning; note that the # last integration step (which was not successfull) is returned if !_success @warn(""" Exiting due to unsuccessfull step """, _success, t0) break end if nsteps > maxsteps @warn(""" Maximum number of integration steps reached; exiting. """) break end end return view(tv,1:nsteps), view(xv,1:nsteps), view(xTM1v, :, 1:nsteps) end """ picard(dx, x0, box) Computes the picard (integral) operator for the initial condition `x0`. `dx` must be the rhs of the differential equation. """ function _picard(dx, x0, box) ∫f = integrate(dx, 0., box) pol = ∫f.pol + x0.pol Δk = ∫f.rem return pol, Δk end _picard_rem(dx, box) = remainder(integrate(dx, box)) """ picard_iteration(f!, dx, xTM1K, params, t, x0, box, ::Val{true}) Computes the picard (integral) operator for the set of equations `f!` and the initial condition`x0`. The Val parameter enables the selection of the desired method. This one returns the remainder of the resulting Taylor Model with the remainder of the initial condition included. """ function picard_iteration(f!, dx, xTM1K, params, t, x0, box, ::Val{true}) f!(dx, xTM1K, params, t) return @. _picard_rem(dx, (box,)) + remainder(x0) end """ picard_iteration(f!, dx, xTM1K, params, t, x0, box) Computes the picard (integral) operator for the set of equations `f!` and the initial condition`x0`. This method returns the remainder of the resulting Taylor Model without the remainder of the initial condition. """ function picard_iteration(f!, dx, xTM1K, params, t, x0, box) f!(dx, xTM1K, params, t) return _picard_rem.(dx, (box,)) end """ _validate_step(xTM1K, f!, dx, x0, params, t, box, dof; ε=1e-10, maxsteps=20, extrasteps=50) Validate the Taylor Model solution for the current integration time step. This function implements the epsilon inflation algorithm proposed by Bünger with some custom adaptations. Ref: Florian B\"unger, A Taylor model toolbox for solving ODEs implemented in MATLAB/INTLAB, J. Comput. Appl. Math. 368, 112511, https://doi.org/10.1016/j.cam.2019.112511 """ function _validate_step!(xTM1K, f!, dx, x0, params, x, t, box, dof, rem, abstol, δt, sign_tstep, E, E′, polv, low_ratiov, hi_ratiov, adaptive::Bool, minabstol; ε=1e-10, δ=1e-6, validatesteps=20, extrasteps=50) # T = eltype(box[1]) zI = zero_interval(T) domT = sign_tstep * Interval{T}(0, sign_tstep*δt) orderT = get_order(t) @. begin polv = deepcopy.(x) xTM1K = TaylorModel1(polv, zI, zI, domT) # xTM1K = TaylorModel1(polv, rem, zI, domT) E = remainder(xTM1K) # E = remainder(x0) end εi = (1 - ε) .. (1 + ε) δi = -δ .. δ _success = false reduced_abstol = abstol # Try to prove existence and uniqueness up to numchecks, including reducing the # time step bool_red = true # for nchecks = 1:numchecks while bool_red # Try to prove existence and uniqueness up to validatesteps nsteps = 0 E′ .= picard_iteration(f!, dx, xTM1K, params, t, x0, box, Val(true)) # 0-th iteration @. xTM1K = TaylorModel1(polv, E′, zI, domT) while nsteps < validatesteps E′ .= picard_iteration(f!, dx, xTM1K, params, t, x0, box) all(iscontractive.(E′, E)) && break # Only inflates the required component @inbounds for i in eachindex(dx) if !iscontractive(E′[i], E[i]) E[i] = E′[i] * εi + δi end xTM1K[i] = TaylorModel1(polv[i], E[i], zI, domT) end nsteps += 1 end _success = all(iscontractive.(E′, E)) _success && break # Shrink stepsize `δt` if `adaptive` is `true` and `_success` is false, # up to some minimum if !_success if adaptive bool_red = reduced_abstol > minabstol if bool_red reduced_abstol = reduced_abstol/10 δt = δt * 0.1^(1/orderT) domT = sign_tstep * Interval{T}(0, sign_tstep*δt) @. begin xTM1K = TaylorModel1(polv, zI, zI, domT) # xTM1K = TaylorModel1(polv, rem, zI, domT) E = remainder(xTM1K) # E = remainder(x0) end else @warn("Minimum absolute tolerance reached: ", t[0], E′, E, _success, all(iscontractive.(E′, E)), reduced_abstol) end else @warn("""It cannot prove existence and unicity of the solution: t0 = $(t[0]) δt = $(δt) Δx = $(E) """) break end end end if !all(iscontractive.(E′, E)) @warn("Maximum number of validate steps reached.", t[0], E′, E, _success, all(iscontractive.(E′, E))) return (_success, δt, reduced_abstol) end # @. begin # low_ratiov = inf(E′) / inf(E) # hi_ratiov = sup(E′) / sup(E) # end # # Contract further the remainders if the last contraction improves more than 5% # for ind = 1:extrasteps # minimum(low_ratiov) > 0.90 && minimum(hi_ratiov) > 0.90 && break # E .= remainder.(xTM1K) # E′ .= picard_iteration(f!, dx, xTM1K, params, t, x0, box) # @. begin # xTM1K = TaylorModel1(polv, E′, zI, dom) # low_ratiov = inf(E′) / inf(E) # hi_ratiov = sup(E′) / sup(E) # end # # @show(ind, E, E′, all(iscontractive.(E′, E)), low_ratiov) # end return (_success, δt, reduced_abstol) end function validated_integ2(f!, X0, t0::T, tf::T, orderQ::Int, orderT::Int, abstol::T, params=nothing; parse_eqs=true, maxsteps::Int=2000, absorb::Bool=false, adaptive::Bool=true, minabstol=T(_DEF_MINABSTOL), validatesteps::Int=30, ε::T=1e-10, δ::T=1e-6, absorb_steps::Int=3) where {T <: Real} N = get_numvars() dof = N zt = zero(t0) zI = zero_interval(T) zB = zero_box(N, T) S = symmetric_box(N, T) t = t0 + Taylor1(orderT) tv = Array{T}(undef, maxsteps+1) xv = Array{IntervalBox{N,T}}(undef, maxsteps+1) xTM1v = Array{TaylorModel1{TaylorN{T},T}}(undef, dof, maxsteps+1) x = Array{Taylor1{TaylorN{T}}}(undef, dof) dx = Array{Taylor1{TaylorN{T}}}(undef, dof) xaux = Array{Taylor1{TaylorN{T}}}(undef, dof) xTMN = Array{TaylorModelN{N,T,T}}(undef, dof) dxTM1 = Array{TaylorModel1{TaylorN{T},T}}(undef, dof) xTM1 = Array{TaylorModel1{TaylorN{T},T}}(undef, dof) low_ratiov = Array{T}(undef, dof) hi_ratiov = Array{T}(undef, dof) rem = Array{Interval{T}}(undef, dof) E = Array{Interval{T}}(undef, dof) E′ = Array{Interval{T}}(undef, dof) # Set initial conditions initialize!(X0, orderQ, orderT, x, dx, xTMN, rem, xTM1v) @inbounds for i in eachindex(x) xTM1[i] = TaylorModel1(deepcopy(x[i]), zI, zI, zI) end polv = polynomial.(xTM1) fill!(E, zI) fill!(E′, zI) sign_tstep = copysign(1, tf - t0) nsteps = 1 @inbounds tv[1] = t0 @inbounds xv[1] = evaluate(xTMN, S) parse_eqs = TaylorIntegration._determine_parsing!(parse_eqs, f!, t, x, dx, params) red_abstol = abstol setformat(:full) while t0 * sign_tstep < tf * sign_tstep δt = TaylorIntegration.taylorstep!(f!, t, x, dx, xaux, abstol, params, parse_eqs) f!(dx, x, params, t) δt = min(δt, sign_tstep*(tf-t0)) δt = sign_tstep * δt # Reuse previous TaylorModel1 to save some allocations (_success, δt, red_abstol) = _validate_step!(xTM1, f!, dxTM1, xTMN, params, x, t, S, dof, rem, red_abstol, δt, sign_tstep, E, E′, polv, low_ratiov, hi_ratiov, adaptive, minabstol, ε=ε, δ=δ, validatesteps=validatesteps) domt = sign_tstep * Interval(zt, sign_tstep*δt) # δtI = (δt .. δt) ∩ domt # assure it is inside the domain in t nsteps += 1 @inbounds tv[nsteps] = t0 t0 += δt @inbounds t[0] = t0 # Flowpipe @. begin rem = remainder(xTM1) xTMN = fp_rpa(TaylorModelN(copy(evaluate(xTM1, domt)), rem, (zB,), (S,))) end xv[nsteps] = evaluate(xTMN, S) # New initial condition @inbounds for i in eachindex(x) aux_pol = evaluate(xTM1[i], δt) #δtI # rem[i] = remainder(xTM1[i]) xTMN[i] = fp_rpa(TaylorModelN(deepcopy(aux_pol), rem[i], zB, S)) # xTMN[i] = fp_rpa(TaylorModelN(deepcopy(aux_pol), 0 .. 0, zB, S)) # Absorb remainder j = 0 while absorb && (j < absorb_steps) && (mag(rem[i]) > 1.0e-10) t[0] == 0 && println("absorb_remainder ") j += 1 xTMN[i] = absorb_remainder(xTMN[i]) rem[i] = remainder(xTMN[i]) end x[i] = Taylor1(polynomial(xTMN[i]), orderT) xTM1v[i, nsteps] = xTM1[i] end # Try to increase `red_abstol` if `adaptive` is true if adaptive red_abstol = min(abstol, 10*red_abstol) end # If the integration step is unsuccessfull, break with a warning; note that the # last integration step (which was not successfull) is returned if !_success @warn(""" Exiting due to unsuccessfull step """, _success, t0) break end if nsteps > maxsteps @warn(""" Maximum number of integration steps reached; exiting. """) break end end return view(tv, 1:nsteps), view(xv, 1:nsteps), view(xTM1v, :, 1:nsteps) end
[ 2, 2773, 5050, 329, 31031, 11812, 286, 440, 7206, 82, 198, 198, 9979, 4808, 32988, 62, 23678, 6242, 2257, 3535, 796, 352, 13, 15, 68, 12, 1120, 198, 198, 37811, 198, 220, 220, 220, 17675, 62, 83, 7167, 9662, 0, 7, 69, 28265, 256, 11, 2124, 11, 44332, 11, 2124, 40, 11, 44332, 40, 11, 7377, 112, 40, 11, 7377, 112, 83, 11, 42287, 8, 198, 198, 35561, 257, 17675, 329, 262, 11812, 2239, 329, 262, 10795, 9633, 357, 63, 87, 63, 8, 198, 41004, 326, 262, 4610, 45104, 262, 9987, 329, 6224, 290, 49650, 13, 198, 37811, 198, 8818, 17675, 62, 83, 7167, 9662, 0, 7, 69, 0, 3712, 22203, 11, 256, 3712, 29907, 16, 90, 51, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 3712, 38469, 90, 29907, 16, 90, 29907, 45, 90, 51, 11709, 5512, 44332, 3712, 38469, 90, 29907, 16, 90, 29907, 45, 90, 51, 11709, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 40, 3712, 38469, 90, 29907, 16, 90, 9492, 2100, 90, 51, 11709, 5512, 44332, 40, 3712, 38469, 90, 29907, 16, 90, 9492, 2100, 90, 51, 11709, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 40, 3712, 9492, 2100, 14253, 90, 45, 11, 51, 5512, 7377, 112, 83, 3712, 9492, 2100, 90, 51, 5512, 42287, 8, 810, 1391, 45, 11, 51, 92, 628, 220, 220, 220, 1502, 51, 796, 651, 62, 2875, 7, 34350, 58, 16, 12962, 198, 220, 220, 220, 27506, 796, 7377, 112, 83, 61, 7, 2875, 51, 10, 16, 8, 198, 220, 220, 220, 37455, 87, 220, 796, 4225, 2100, 14253, 26933, 87, 40, 58, 72, 7131, 2875, 51, 10, 16, 60, 329, 1312, 287, 1123, 9630, 7, 87, 40, 8, 12962, 1635, 27506, 198, 220, 220, 220, 37455, 34350, 796, 4225, 2100, 14253, 26933, 34350, 40, 58, 72, 7131, 2875, 51, 10, 16, 60, 329, 1312, 287, 1123, 9630, 7, 87, 40, 8, 12962, 1635, 27506, 198, 220, 220, 220, 37455, 15, 220, 796, 4225, 2100, 14253, 26933, 34350, 58, 72, 7131, 2875, 51, 16151, 138, 112, 40, 8, 329, 1312, 287, 1123, 9630, 7, 87, 8, 12962, 1635, 27506, 1220, 357, 2875, 51, 10, 16, 8, 198, 220, 220, 220, 37455, 796, 37455, 15, 1343, 37455, 34350, 1635, 7377, 112, 83, 198, 220, 220, 220, 37455, 87, 727, 796, 37455, 87, 628, 220, 220, 220, 1303, 39432, 6224, 290, 49650, 198, 220, 220, 220, 318, 28484, 425, 7, 138, 242, 11, 37455, 87, 8, 11405, 1441, 357, 7942, 11, 37455, 87, 11, 256, 58, 15, 12962, 628, 220, 220, 220, 1303, 1002, 262, 2198, 1422, 470, 670, 11, 24061, 649, 3520, 67, 364, 13, 317, 649, 37455, 87, 318, 5150, 11, 198, 220, 220, 220, 1303, 290, 262, 11188, 37455, 34350, 318, 29231, 198, 220, 220, 220, 31383, 40, 220, 796, 15690, 90, 29907, 16, 90, 29907, 45, 90, 9492, 2100, 90, 51, 11709, 11709, 7, 917, 891, 11, 399, 8, 198, 220, 220, 220, 288, 5324, 40, 796, 15690, 90, 29907, 16, 90, 29907, 45, 90, 9492, 2100, 90, 51, 11709, 11709, 7, 917, 891, 11, 399, 8, 198, 220, 220, 220, 410, 85, 796, 15690, 90, 9492, 2100, 90, 51, 11709, 7, 917, 891, 11, 399, 8, 198, 220, 220, 220, 329, 663, 796, 352, 25, 1120, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 42606, 1082, 286, 36614, 24415, 198, 220, 220, 220, 220, 220, 220, 220, 37455, 796, 8301, 446, 62, 2787, 391, 1082, 0, 7, 69, 28265, 256, 11, 2124, 11, 44332, 11, 31383, 40, 11, 288, 5324, 40, 11, 7377, 112, 40, 11, 7377, 112, 83, 11, 37455, 87, 11, 37455, 15, 11, 42287, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 39432, 6224, 290, 49650, 198, 220, 220, 220, 220, 220, 220, 220, 318, 28484, 425, 7, 138, 242, 11, 37455, 87, 8, 11405, 1441, 357, 7942, 11, 37455, 87, 11, 256, 58, 15, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 318, 28484, 425, 7, 138, 242, 11, 37455, 87, 8, 11405, 1441, 4808, 28484, 62, 2676, 341, 0, 7, 69, 28265, 256, 11, 2124, 11, 44332, 11, 31383, 40, 11, 288, 5324, 40, 11, 7377, 112, 40, 11, 7377, 112, 83, 11, 37455, 87, 11, 37455, 34350, 11, 37455, 15, 11, 42287, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 49368, 37455, 87, 287, 262, 11678, 2622, 198, 220, 220, 220, 220, 220, 220, 220, 37455, 87, 727, 796, 37455, 87, 198, 220, 220, 220, 220, 220, 220, 220, 611, 37455, 2343, 232, 228, 37455, 87, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 329, 773, 287, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 370, 14029, 262, 11678, 810, 2343, 232, 224, 857, 407, 1745, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 410, 85, 58, 521, 60, 796, 37455, 87, 58, 521, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 37455, 58, 521, 60, 6624, 37455, 87, 58, 521, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 410, 85, 58, 521, 60, 796, 45676, 12195, 138, 242, 58, 521, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37455, 87, 796, 4225, 2100, 14253, 7, 25093, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 37455, 87, 796, 37455, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 357, 9562, 11, 37455, 87, 8, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 318, 28484, 425, 7, 138, 242, 11, 37455, 87, 8, 198, 198, 7376, 4657, 611, 4600, 138, 242, 764, 158, 232, 224, 37455, 87, 63, 318, 11378, 13, 1002, 7559, 138, 242, 2343, 232, 228, 37455, 87, 63, 318, 11378, 11, 340, 5860, 198, 63, 7942, 63, 611, 477, 2663, 810, 4600, 855, 63, 6622, 24866, 284, 262, 6632, 4600, 9492, 2100, 44646, 198, 37811, 198, 8818, 318, 28484, 425, 7, 138, 242, 3712, 9492, 2100, 90, 51, 5512, 37455, 87, 3712, 9492, 2100, 90, 51, 30072, 810, 90, 51, 92, 198, 220, 220, 220, 357, 138, 242, 2343, 232, 224, 37455, 87, 8614, 37455, 6624, 37455, 87, 6624, 6632, 62, 3849, 2100, 7, 51, 4008, 11405, 1441, 2081, 198, 220, 220, 220, 1441, 3991, 198, 437, 198, 8818, 318, 28484, 425, 7, 138, 242, 3712, 9492, 2100, 14253, 90, 45, 11, 51, 5512, 37455, 87, 3712, 9492, 2100, 14253, 90, 45, 11, 51, 30072, 810, 90, 45, 11, 51, 92, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 773, 287, 352, 25, 45, 198, 220, 220, 220, 220, 220, 220, 220, 318, 28484, 425, 7, 138, 242, 58, 521, 4357, 37455, 87, 58, 521, 12962, 8614, 1441, 3991, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2081, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 8301, 446, 62, 2787, 391, 1082, 0, 7, 69, 28265, 256, 11, 2124, 11, 44332, 11, 31383, 40, 11, 288, 5324, 40, 11, 7377, 112, 40, 11, 7377, 112, 83, 11, 37455, 87, 11, 37455, 15, 11, 42287, 8, 198, 198, 13615, 262, 17675, 286, 36614, 10088, 198, 37811, 198, 8818, 8301, 446, 62, 2787, 391, 1082, 0, 7, 69, 0, 3712, 22203, 11, 256, 3712, 29907, 16, 90, 51, 5512, 198, 220, 220, 220, 2124, 3712, 38469, 90, 29907, 16, 90, 29907, 45, 90, 51, 11709, 5512, 44332, 3712, 38469, 90, 29907, 16, 90, 29907, 45, 90, 51, 11709, 5512, 198, 220, 220, 220, 31383, 40, 3712, 38469, 90, 29907, 16, 90, 29907, 45, 90, 9492, 2100, 90, 51, 42535, 5512, 198, 220, 220, 220, 288, 5324, 40, 3712, 38469, 90, 29907, 16, 90, 29907, 45, 90, 9492, 2100, 90, 51, 42535, 5512, 198, 220, 220, 220, 7377, 112, 40, 3712, 9492, 2100, 14253, 90, 45, 11, 51, 5512, 7377, 112, 83, 3712, 9492, 2100, 90, 51, 5512, 198, 220, 220, 220, 37455, 87, 3712, 9492, 2100, 14253, 90, 45, 11, 51, 5512, 37455, 15, 3712, 9492, 2100, 14253, 90, 45, 11, 51, 5512, 42287, 8, 810, 1391, 45, 11, 51, 92, 628, 220, 220, 220, 1303, 46228, 4600, 87, 63, 290, 4600, 34350, 63, 284, 423, 16654, 44036, 198, 220, 220, 220, 1976, 40, 796, 6632, 62, 3849, 2100, 7, 51, 8, 198, 220, 220, 220, 2488, 13, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 31383, 40, 796, 2124, 1343, 37455, 87, 198, 220, 220, 220, 220, 220, 220, 220, 288, 5324, 40, 796, 44332, 1343, 1976, 40, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 3082, 1133, 4600, 67, 5324, 40, 63, 422, 262, 27490, 286, 6268, 198, 220, 220, 220, 277, 0, 7, 67, 5324, 40, 11, 31383, 40, 11, 42287, 11, 256, 8, 628, 220, 220, 220, 1303, 36614, 24415, 11, 6402, 691, 262, 5421, 286, 4600, 69, 63, 290, 262, 938, 763, 14822, 286, 277, 198, 220, 220, 220, 37455, 34350, 796, 4225, 2100, 14253, 7, 13446, 12195, 357, 67, 5324, 40, 532, 44332, 5769, 138, 112, 83, 828, 357, 138, 112, 40, 35751, 1267, 1267, 198, 220, 220, 220, 37455, 796, 37455, 15, 1343, 37455, 34350, 1635, 7377, 112, 83, 198, 220, 220, 220, 1441, 37455, 198, 437, 628, 198, 2, 1303, 36614, 34820, 284, 2775, 2252, 37455, 87, 11, 1752, 37455, 2343, 232, 224, 37455, 87, 6622, 198, 2, 1303, 12429, 21327, 407, 973, 1174, 198, 2, 2163, 4808, 28484, 62, 2676, 341, 0, 7, 69, 0, 3712, 22203, 11, 256, 3712, 29907, 16, 90, 51, 5512, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 3712, 38469, 90, 29907, 16, 90, 29907, 45, 90, 51, 11709, 5512, 44332, 3712, 38469, 90, 29907, 16, 90, 29907, 45, 90, 51, 11709, 5512, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 31383, 40, 3712, 38469, 90, 29907, 16, 90, 29907, 45, 90, 9492, 2100, 90, 51, 42535, 5512, 288, 5324, 40, 3712, 38469, 90, 29907, 16, 90, 29907, 45, 90, 9492, 2100, 90, 51, 42535, 5512, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 40, 3712, 9492, 2100, 14253, 90, 45, 11, 51, 5512, 7377, 112, 83, 3712, 9492, 2100, 90, 51, 5512, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 37455, 87, 3712, 9492, 2100, 14253, 90, 45, 11, 51, 5512, 37455, 34350, 3712, 9492, 2100, 14253, 90, 45, 11, 51, 5512, 37455, 15, 3712, 9492, 2100, 14253, 90, 45, 11, 51, 5512, 42287, 8, 810, 1391, 45, 11, 51, 92, 198, 2, 198, 2, 220, 220, 220, 220, 1303, 2773, 37640, 602, 198, 2, 220, 220, 220, 220, 37455, 796, 37455, 15, 1343, 37455, 34350, 1635, 7377, 112, 83, 198, 2, 220, 220, 220, 220, 37455, 87, 727, 796, 37455, 87, 198, 2, 198, 2, 220, 220, 220, 220, 1303, 36614, 2775, 507, 198, 2, 220, 220, 220, 220, 329, 663, 796, 352, 25, 940, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 42606, 1082, 286, 36614, 24415, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 37455, 796, 8301, 446, 62, 2787, 391, 1082, 0, 7, 69, 28265, 256, 11, 2124, 11, 44332, 11, 31383, 40, 11, 288, 5324, 40, 11, 7377, 112, 40, 11, 7377, 112, 83, 11, 37455, 87, 11, 37455, 15, 11, 42287, 8, 198, 2, 220, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1002, 36246, 1595, 470, 1745, 11, 1441, 1468, 5421, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 318, 28484, 425, 7, 138, 242, 11, 37455, 87, 8, 8614, 1441, 37455, 87, 727, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 17453, 8636, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 37455, 87, 727, 796, 37455, 87, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 37455, 87, 796, 37455, 198, 2, 220, 220, 220, 220, 886, 198, 2, 198, 2, 220, 220, 220, 220, 1441, 37455, 87, 727, 198, 2, 886, 628, 198, 37811, 198, 220, 220, 220, 17565, 62, 2787, 391, 1082, 7, 64, 3712, 29907, 17633, 45, 8, 198, 198, 35561, 257, 8121, 17633, 45, 11, 7548, 284, 4600, 64, 47671, 884, 326, 262, 17675, 198, 271, 4632, 19233, 287, 262, 6937, 290, 14174, 44036, 13, 383, 14174, 6482, 18533, 198, 5562, 4600, 64, 63, 318, 39279, 284, 262, 4600, 9492, 2100, 14253, 32590, 16, 492, 16, 11, 3254, 7, 45, 4008, 44646, 198, 198, 8134, 25, 25426, 12555, 11, 412, 28716, 16660, 11, 290, 21714, 343, 321, 311, 962, 19173, 283, 22931, 272, 11, 198, 1, 29907, 9104, 27782, 34360, 20395, 329, 8504, 12, 29127, 29481, 198, 11964, 82, 1600, 287, 6416, 3862, 11998, 15845, 35864, 357, 49, 4694, 50, 828, 9788, 13, 28551, 12, 17477, 357, 6999, 828, 198, 40, 31909, 4332, 13, 198, 37811, 198, 8818, 17565, 62, 2787, 391, 1082, 7, 64, 3712, 29907, 17633, 45, 90, 45, 11, 51, 11, 51, 30072, 810, 1391, 45, 11, 51, 92, 198, 220, 220, 220, 37455, 796, 17675, 7, 64, 8, 198, 220, 220, 220, 1502, 48, 796, 651, 62, 2875, 7, 64, 8, 198, 220, 220, 220, 7377, 112, 796, 23606, 19482, 62, 3524, 7, 45, 11, 309, 8, 198, 220, 220, 220, 27506, 796, 48428, 7, 138, 242, 20679, 7, 17, 45, 8, 198, 220, 220, 220, 816, 796, 6632, 62, 3849, 2100, 7, 51, 8, 628, 220, 220, 220, 1303, 44800, 6482, 198, 220, 220, 220, 9493, 62, 30846, 796, 3095, 7, 138, 242, 8, 1343, 2160, 19510, 14644, 9, 29907, 45, 7, 72, 11, 1502, 28, 2875, 48, 8, 329, 1312, 287, 352, 25, 45, 4008, 198, 220, 220, 220, 275, 16104, 796, 257, 13, 16104, 1343, 9493, 62, 30846, 628, 220, 220, 220, 1303, 3082, 1133, 262, 649, 17675, 198, 220, 220, 220, 257, 40, 796, 257, 7, 138, 112, 8, 198, 220, 220, 220, 275, 40, 796, 275, 16104, 7, 138, 112, 8, 628, 220, 220, 220, 611, 275, 40, 2343, 232, 228, 257, 40, 198, 220, 220, 220, 220, 220, 220, 220, 816, 796, 4225, 2100, 7, 64, 40, 13, 5439, 12, 65, 40, 13, 5439, 11, 257, 40, 13, 5303, 12, 65, 40, 13, 5303, 8, 198, 220, 220, 220, 2073, 361, 257, 40, 2343, 232, 228, 275, 40, 198, 220, 220, 220, 220, 220, 220, 220, 816, 796, 4225, 2100, 7, 65, 40, 13, 5439, 12, 64, 40, 13, 5439, 11, 275, 40, 13, 5303, 12, 64, 40, 13, 5303, 8, 198, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 374, 62, 5439, 796, 257, 40, 13, 5439, 12, 65, 40, 13, 5439, 198, 220, 220, 220, 220, 220, 220, 220, 374, 62, 5303, 796, 257, 40, 13, 5303, 12, 65, 40, 13, 5303, 198, 220, 220, 220, 220, 220, 220, 220, 611, 374, 62, 5439, 1875, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 816, 796, 4225, 2100, 32590, 81, 62, 5439, 11, 374, 62, 5303, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 816, 796, 4225, 2100, 7, 374, 62, 5439, 11, 532, 81, 62, 5303, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 8121, 17633, 45, 7, 65, 16104, 11, 816, 11, 257, 13, 87, 15, 11, 257, 13, 3438, 8, 198, 437, 628, 198, 2, 2947, 332, 1958, 290, 8160, 8121, 4981, 284, 307, 4504, 198, 8818, 16578, 538, 455, 332, 1958, 62, 2032, 0, 7, 87, 15972, 45, 3712, 38469, 90, 29907, 17633, 45, 90, 45, 11, 51, 11, 51, 92, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 3712, 38469, 90, 29907, 45, 90, 51, 11709, 8, 810, 1391, 45, 11, 51, 92, 198, 220, 220, 220, 1281, 332, 1958, 796, 2081, 198, 220, 220, 220, 2124, 15, 796, 2124, 15972, 45, 58, 16, 4083, 87, 15, 198, 220, 220, 220, 347, 796, 7386, 7, 87, 15972, 45, 58, 16, 12962, 198, 220, 220, 220, 1976, 40, 796, 6632, 62, 3849, 2100, 7, 51, 8, 2, 22570, 7, 33, 58, 16, 12962, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 287, 1123, 9630, 7, 87, 15972, 45, 8, 198, 220, 220, 220, 220, 220, 220, 220, 755, 796, 745, 6213, 49070, 7, 87, 15972, 45, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 9788, 349, 796, 277, 79, 62, 81, 8957, 7, 29907, 17633, 45, 7, 16104, 7, 55, 828, 1976, 40, 11, 2124, 15, 11, 347, 15306, 198, 220, 220, 220, 220, 220, 220, 220, 1281, 332, 1958, 796, 1281, 332, 1958, 11405, 357, 87, 15972, 45, 58, 72, 16151, 33, 8, 2343, 232, 228, 9788, 349, 7, 33, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 45, 58, 72, 60, 796, 4866, 7, 381, 349, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2488, 30493, 1281, 332, 1958, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 22738, 284, 1281, 12, 332, 1958, 22085, 12, 29988, 2105, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1395, 796, 29568, 29127, 62, 35428, 26601, 498, 7, 55, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 45, 796, 29568, 87, 15972, 45, 8, 198, 220, 220, 220, 220, 220, 220, 220, 37227, 198, 220, 220, 220, 1441, 1281, 332, 1958, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 22085, 62, 29988, 2105, 0, 7, 87, 15972, 45, 3712, 29907, 17633, 45, 8, 198, 198, 35561, 257, 9518, 287, 5372, 4600, 87, 15972, 45, 47671, 543, 468, 19233, 262, 17675, 198, 1525, 262, 9518, 22085, 12, 29988, 2105, 2446, 286, 4432, 666, 347, 9116, 782, 263, 13, 198, 464, 7386, 286, 4600, 87, 15972, 45, 63, 318, 262, 39279, 16654, 3091, 4600, 58, 12, 16, 11, 16, 60, 61, 45, 44646, 198, 198, 8134, 25, 4432, 666, 347, 7879, 403, 1362, 11, 911, 81, 676, 27074, 329, 8121, 4981, 22124, 863, 11, 198, 45, 6975, 978, 7053, 8699, 25, 47705, 1906, 8784, 22, 357, 7908, 828, 3740, 1378, 34023, 13, 2398, 14, 940, 13, 44318, 14, 82, 11442, 2425, 12, 29326, 12, 3023, 940, 12, 16, 198, 37811, 198, 8818, 22085, 62, 29988, 2105, 0, 7, 87, 15972, 45, 3712, 38469, 90, 29907, 17633, 45, 90, 45, 11, 51, 11, 51, 11709, 8, 810, 1391, 45, 11, 51, 92, 198, 220, 220, 220, 1303, 13745, 7386, 286, 8121, 17633, 45, 815, 307, 262, 23606, 19482, 39279, 3091, 198, 220, 220, 220, 347, 796, 23606, 19482, 62, 3524, 7, 45, 11, 309, 8, 198, 220, 220, 220, 2488, 30493, 477, 7, 27830, 12195, 87, 15972, 45, 8, 764, 855, 357, 33, 11, 4008, 198, 220, 220, 220, 1976, 40, 796, 6632, 62, 3849, 2100, 7, 51, 8, 198, 220, 220, 220, 2124, 15, 796, 6632, 62, 3524, 7, 45, 11, 309, 8, 198, 220, 220, 220, 2488, 30493, 477, 7, 11201, 5487, 62, 4122, 12195, 87, 15972, 45, 8, 764, 855, 357, 87, 15, 11, 4008, 628, 220, 220, 220, 1303, 20650, 286, 4795, 8121, 45, 9633, 198, 220, 220, 220, 1502, 796, 651, 62, 2875, 7, 87, 15972, 45, 58, 16, 12962, 198, 220, 220, 220, 1395, 796, 685, 29907, 45, 7, 51, 11, 1312, 11, 1502, 28, 2875, 8, 329, 1312, 287, 352, 25, 45, 60, 628, 220, 220, 220, 1303, 42606, 1082, 286, 2656, 8121, 17633, 45, 290, 7515, 3083, 2153, 198, 220, 220, 220, 816, 796, 17675, 12195, 87, 15972, 45, 8, 198, 220, 220, 220, 374, 796, 2153, 12195, 2787, 8, 198, 220, 220, 220, 10662, 33, 796, 374, 764, 9, 347, 198, 220, 220, 220, 530, 62, 81, 796, 3392, 7, 417, 4906, 7, 81, 828, 399, 8, 628, 220, 220, 220, 1303, 15576, 284, 4781, 6937, 3381, 198, 220, 220, 220, 2124, 46559, 15, 796, 6937, 62, 4354, 12195, 87, 15972, 45, 8, 198, 220, 220, 220, 2124, 46559, 1087, 796, 745, 6213, 49070, 12195, 87, 15972, 45, 8, 764, 12, 2124, 46559, 15, 198, 220, 220, 220, 2124, 46559, 1087, 62, 2815, 796, 14174, 62, 35428, 26601, 498, 7, 87, 46559, 1087, 8, 628, 220, 220, 220, 1303, 5012, 604, 286, 347, 9116, 782, 263, 11862, 25, 12806, 666, 357, 265, 6632, 8, 290, 663, 34062, 198, 220, 220, 220, 474, 330, 796, 8121, 27996, 13, 30482, 672, 666, 7, 87, 46559, 1087, 62, 2815, 8, 198, 220, 220, 220, 1303, 1002, 262, 26340, 1271, 318, 1165, 1588, 357, 259, 4399, 286, 474, 330, 318, 2801, 5447, 828, 198, 220, 220, 220, 1303, 836, 470, 1487, 2124, 15972, 45, 198, 220, 220, 220, 1779, 7, 30482, 8, 1875, 352, 13, 15, 68, 19, 11405, 1441, 530, 62, 81, 198, 220, 220, 220, 1303, 554, 4399, 286, 262, 12806, 666, 198, 220, 220, 220, 800, 30482, 796, 800, 7, 30482, 8, 628, 220, 220, 220, 1303, 35100, 3083, 5421, 198, 220, 220, 220, 374, 136, 225, 796, 2153, 12195, 16340, 30482, 1635, 10662, 33, 8, 1303, 10662, 33, 1279, 438, 374, 764, 9, 347, 198, 220, 220, 220, 10662, 33, 18265, 796, 374, 136, 225, 764, 9, 347, 198, 220, 220, 220, 2488, 30493, 800, 30482, 1635, 10662, 33, 2343, 232, 228, 10662, 33, 18265, 628, 220, 220, 220, 1303, 5012, 718, 286, 347, 9116, 782, 263, 11862, 25, 24061, 308, 198, 220, 220, 220, 308, 796, 800, 30482, 9, 87, 46559, 1087, 764, 12, 1395, 198, 220, 220, 220, 1303, 308, 796, 800, 30482, 9, 7, 87, 46559, 1087, 764, 12, 2124, 46559, 1087, 62, 2815, 8, 198, 220, 220, 220, 1303, 2644, 290, 663, 474, 330, 672, 666, 17593, 357, 12853, 21403, 8133, 198, 220, 220, 220, 474, 330, 6759, 8609, 62, 70, 796, 8121, 27996, 13, 30482, 672, 666, 7, 70, 11, 1395, 8, 628, 220, 220, 220, 1303, 27182, 284, 5012, 767, 25, 6822, 262, 19648, 286, 412, 80, 1467, 357, 273, 1596, 8, 329, 20607, 2611, 362, 198, 220, 220, 220, 1303, 286, 347, 9116, 782, 263, 338, 3348, 11, 329, 264, 28, 15, 11, 290, 264, 845, 1402, 13, 1002, 340, 45104, 340, 11, 198, 220, 220, 220, 1303, 1281, 332, 1958, 290, 1441, 13, 15323, 11, 779, 347, 9116, 782, 263, 338, 2239, 767, 13, 198, 220, 220, 220, 10662, 796, 352, 13, 15, 764, 10, 374, 136, 225, 198, 220, 220, 220, 264, 796, 6632, 7, 80, 8, 198, 220, 220, 220, 2488, 13, 10662, 796, 352, 13, 15, 1343, 374, 136, 225, 1343, 264, 198, 220, 220, 220, 474, 30188, 62, 80, 16, 796, 474, 330, 6759, 8609, 62, 70, 1635, 357, 80, 764, 12, 352, 13, 15, 8, 198, 220, 220, 220, 37430, 1433, 796, 477, 7, 19726, 12195, 49786, 12195, 6592, 80, 62, 80, 16, 11, 357, 80, 764, 9, 347, 11, 22305, 764, 35705, 97, 264, 8, 198, 220, 220, 220, 611, 37430, 1433, 198, 220, 220, 220, 220, 220, 220, 220, 1281, 332, 1958, 796, 16578, 538, 455, 332, 1958, 62, 2032, 0, 7, 87, 15972, 45, 11, 10662, 764, 9, 1395, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1281, 332, 1958, 11405, 1441, 10662, 198, 220, 220, 220, 886, 198, 220, 220, 220, 264, 764, 28, 304, 862, 12195, 80, 8, 198, 220, 220, 220, 2488, 13, 10662, 796, 352, 13, 15, 1343, 374, 136, 225, 1343, 264, 198, 220, 220, 220, 474, 30188, 62, 80, 16, 796, 474, 330, 6759, 8609, 62, 70, 1635, 357, 80, 764, 12, 352, 13, 15, 8, 198, 220, 220, 220, 37430, 1433, 796, 477, 7, 19726, 12195, 49786, 12195, 6592, 80, 62, 80, 16, 11, 357, 80, 764, 9, 347, 11, 22305, 764, 35705, 97, 264, 8, 198, 220, 220, 220, 611, 37430, 1433, 198, 220, 220, 220, 220, 220, 220, 220, 1281, 332, 1958, 796, 16578, 538, 455, 332, 1958, 62, 2032, 0, 7, 87, 15972, 45, 11, 10662, 764, 9, 1395, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1281, 332, 1958, 11405, 1441, 10662, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 5012, 767, 286, 347, 9116, 782, 263, 11862, 25, 8636, 286, 4600, 80, 63, 198, 220, 220, 220, 1303, 2773, 38491, 14, 17143, 7307, 198, 220, 220, 220, 10662, 62, 83, 349, 796, 352, 13, 15, 68, 12, 1065, 198, 220, 220, 220, 10662, 796, 352, 13, 15, 764, 10, 374, 136, 225, 198, 220, 220, 220, 31246, 796, 6135, 14, 2414, 198, 220, 220, 220, 10662, 62, 9806, 796, 31246, 764, 9, 10662, 198, 220, 220, 220, 264, 796, 6632, 7, 80, 8, 198, 220, 220, 220, 10662, 62, 727, 796, 2092, 7, 80, 8, 198, 220, 220, 220, 10662, 62, 16, 796, 2092, 7, 80, 8, 198, 220, 220, 220, 474, 30188, 62, 80, 16, 764, 28, 474, 330, 6759, 8609, 62, 70, 1635, 374, 136, 225, 198, 220, 220, 220, 11629, 62, 9806, 796, 1802, 198, 220, 220, 220, 2987, 796, 2081, 198, 220, 220, 220, 11629, 796, 657, 198, 220, 220, 220, 981, 2987, 11405, 11629, 1279, 11629, 62, 9806, 198, 220, 220, 220, 220, 220, 220, 220, 10662, 33, 764, 28, 10662, 764, 9, 347, 198, 220, 220, 220, 220, 220, 220, 220, 10662, 62, 16, 764, 28, 10662, 764, 12, 352, 13, 15, 198, 220, 220, 220, 220, 220, 220, 220, 10662, 62, 727, 764, 28, 10662, 198, 220, 220, 220, 220, 220, 220, 220, 35971, 0, 7, 6592, 80, 62, 80, 16, 11, 474, 330, 6759, 8609, 62, 70, 11, 10662, 62, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 37430, 1433, 796, 477, 7, 49786, 12195, 6592, 80, 62, 80, 16, 11, 357, 80, 33, 11, 4008, 764, 35705, 97, 264, 8, 198, 220, 220, 220, 220, 220, 220, 220, 37430, 1433, 11405, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 287, 1123, 9630, 7, 87, 15972, 45, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 264, 58, 72, 60, 796, 2153, 7, 474, 30188, 62, 80, 16, 58, 72, 16151, 80, 33, 8, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10662, 58, 72, 60, 796, 352, 13, 15, 1343, 374, 136, 225, 58, 72, 60, 1343, 264, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1002, 10662, 318, 1165, 1588, 11, 1441, 2124, 15972, 45, 21588, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10662, 58, 72, 60, 1875, 10662, 62, 9806, 58, 72, 60, 11405, 1441, 532, 505, 62, 81, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 2987, 796, 597, 7, 14808, 80, 764, 12, 10662, 62, 727, 737, 14, 80, 8, 764, 29, 10662, 62, 83, 349, 1267, 198, 220, 220, 220, 220, 220, 220, 220, 11629, 15853, 352, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 357, 49453, 8614, 10662, 6624, 530, 62, 81, 8, 11405, 1441, 530, 62, 81, 198, 220, 220, 220, 1303, 3082, 1133, 2457, 10662, 290, 6811, 1000, 1395, 198, 220, 220, 220, 2488, 13, 10662, 796, 352, 13, 15, 1343, 374, 136, 225, 1343, 31246, 1635, 264, 198, 220, 220, 220, 2488, 13, 1395, 796, 10662, 1635, 1395, 628, 220, 220, 220, 1303, 2947, 332, 1958, 198, 220, 220, 220, 1281, 332, 1958, 796, 16578, 538, 455, 332, 1958, 62, 2032, 0, 7, 87, 15972, 45, 11, 1395, 8, 628, 220, 220, 220, 1441, 10662, 198, 437, 628, 198, 37811, 198, 220, 220, 220, 31031, 12, 9662, 0, 198, 37811, 198, 8818, 31031, 62, 9662, 0, 7, 69, 28265, 256, 3712, 29907, 16, 90, 51, 5512, 2124, 3712, 38469, 90, 29907, 16, 90, 29907, 45, 90, 51, 11709, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 44332, 3712, 38469, 90, 29907, 16, 90, 29907, 45, 90, 51, 11709, 5512, 2124, 14644, 3712, 38469, 90, 29907, 16, 90, 29907, 45, 90, 51, 11709, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 256, 40, 3712, 29907, 16, 90, 51, 5512, 2124, 40, 3712, 38469, 90, 29907, 16, 90, 9492, 2100, 90, 51, 11709, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 44332, 40, 3712, 38469, 90, 29907, 16, 90, 9492, 2100, 90, 51, 11709, 5512, 2124, 14644, 40, 3712, 38469, 90, 29907, 16, 90, 9492, 2100, 90, 51, 11709, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 256, 15, 3712, 51, 11, 256, 9806, 3712, 51, 11, 1051, 62, 83, 9662, 3712, 5317, 11, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 45, 3712, 38469, 90, 29907, 17633, 45, 90, 45, 11, 51, 11, 51, 92, 5512, 2124, 85, 3712, 38469, 90, 9492, 2100, 14253, 90, 45, 11, 51, 92, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 816, 3712, 38469, 90, 9492, 2100, 90, 51, 92, 5512, 1976, 3524, 3712, 9492, 2100, 14253, 90, 45, 11, 51, 5512, 5659, 40, 3524, 3712, 9492, 2100, 14253, 90, 45, 11, 51, 5512, 198, 220, 220, 220, 220, 220, 220, 220, 299, 20214, 3712, 5317, 11, 1502, 51, 3712, 5317, 11, 16552, 349, 3712, 51, 11, 42287, 11, 21136, 62, 27363, 82, 3712, 33, 970, 11, 198, 220, 220, 220, 220, 220, 220, 220, 29605, 3712, 33, 970, 11, 949, 397, 301, 349, 3712, 51, 11, 17565, 3712, 33, 970, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 2198, 62, 26745, 3712, 22203, 16193, 83, 11, 2124, 8, 3784, 7942, 8, 810, 1391, 45, 11, 51, 92, 628, 220, 220, 220, 1303, 1881, 2239, 11812, 357, 13159, 12, 12102, 515, 8, 198, 220, 220, 220, 1303, 8121, 34500, 1358, 13, 834, 31173, 1073, 14822, 82, 0, 7, 7762, 7, 29572, 62, 27363, 82, 828, 277, 28265, 256, 11, 2124, 11, 44332, 11, 2124, 14644, 11, 42287, 8, 198, 220, 220, 220, 1303, 7377, 112, 83, 796, 8121, 34500, 1358, 13, 9662, 7857, 7, 87, 11, 16552, 349, 8, 198, 220, 220, 220, 7377, 112, 83, 796, 8121, 34500, 1358, 13, 83, 7167, 9662, 0, 7, 69, 28265, 256, 11, 2124, 11, 44332, 11, 2124, 14644, 11, 16552, 349, 11, 42287, 11, 21136, 62, 27363, 82, 8, 198, 220, 220, 220, 277, 0, 7, 34350, 11, 2124, 11, 42287, 11, 256, 8, 220, 1303, 10133, 4600, 34350, 58, 25, 7131, 2875, 51, 60, 63, 628, 220, 220, 220, 1303, 1881, 2239, 11812, 329, 262, 4238, 3091, 198, 220, 220, 220, 1303, 8121, 34500, 1358, 13, 834, 31173, 1073, 14822, 82, 0, 7, 7762, 7, 29572, 62, 27363, 82, 828, 277, 28265, 256, 40, 11, 2124, 40, 11, 44332, 40, 11, 2124, 14644, 40, 11, 42287, 8, 198, 220, 220, 220, 1303, 7377, 112, 83, 40, 796, 8121, 34500, 1358, 13, 9662, 7857, 7, 87, 40, 11, 16552, 349, 8, 198, 220, 220, 220, 7377, 112, 83, 40, 796, 8121, 34500, 1358, 13, 83, 7167, 9662, 0, 7, 69, 28265, 256, 40, 11, 2124, 40, 11, 44332, 40, 11, 2124, 14644, 40, 11, 16552, 349, 11, 42287, 11, 21136, 62, 27363, 82, 8, 198, 220, 220, 220, 277, 0, 7, 34350, 40, 11, 2124, 40, 11, 42287, 11, 256, 40, 8, 220, 1303, 10133, 4600, 34350, 40, 58, 25, 7131, 2875, 51, 10, 16, 60, 63, 628, 220, 220, 220, 1303, 5012, 2546, 198, 220, 220, 220, 7377, 112, 83, 796, 949, 7, 138, 112, 83, 11, 1051, 62, 83, 9662, 9, 7, 83, 9806, 12, 83, 15, 4008, 198, 220, 220, 220, 7377, 112, 83, 796, 1051, 62, 83, 9662, 1635, 7377, 112, 83, 628, 220, 220, 220, 1303, 6208, 611, 4600, 9122, 62, 26745, 63, 318, 11378, 26, 611, 407, 11, 2063, 262, 11812, 640, 13, 198, 220, 220, 220, 1303, 1002, 706, 1679, 8794, 4600, 9122, 62, 26745, 63, 318, 407, 11378, 11, 3714, 281, 4049, 13, 198, 220, 220, 220, 299, 20214, 15853, 352, 198, 220, 220, 220, 1189, 17403, 798, 796, 3991, 198, 220, 220, 220, 816, 62, 727, 796, 4866, 7, 2787, 8, 628, 220, 220, 220, 1957, 4808, 13138, 11, 4808, 83, 15, 198, 220, 220, 220, 5322, 62, 397, 301, 349, 796, 16552, 349, 198, 220, 220, 220, 20512, 62, 445, 796, 2081, 198, 220, 220, 220, 981, 20512, 62, 445, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 3254, 20540, 262, 4610, 25, 17675, 6414, 351, 3059, 29233, 294, 76, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 83, 40, 796, 1051, 62, 83, 9662, 1635, 4225, 2100, 7, 15, 11, 1051, 62, 83, 9662, 9, 138, 112, 83, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44104, 13138, 11, 37455, 8, 796, 17675, 62, 83, 7167, 9662, 0, 7, 69, 28265, 256, 11, 2124, 11, 44332, 11, 2124, 40, 11, 44332, 40, 11, 5659, 40, 3524, 11, 7377, 112, 83, 40, 11, 42287, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 911, 81, 676, 4831, 1096, 7377, 112, 83, 611, 29605, 318, 2081, 290, 4808, 13138, 318, 3991, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 62, 13138, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 29605, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20512, 62, 445, 796, 5322, 62, 397, 301, 349, 1875, 949, 397, 301, 349, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 20512, 62, 445, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5322, 62, 397, 301, 349, 796, 5322, 62, 397, 301, 349, 14, 940, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 83, 796, 7377, 112, 83, 1635, 657, 13, 16, 61, 7, 16, 14, 2875, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 7203, 44046, 4112, 15621, 4251, 25, 33172, 256, 58, 15, 4357, 7377, 112, 83, 11, 5322, 62, 397, 301, 349, 11, 37455, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 7203, 1026, 2314, 5879, 6224, 290, 555, 8467, 286, 262, 4610, 25, 33172, 256, 58, 15, 4357, 7377, 112, 83, 11, 37455, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 42606, 1082, 198, 220, 220, 220, 220, 220, 220, 220, 816, 764, 28, 816, 62, 727, 764, 10, 37455, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 13610, 8121, 17633, 45, 284, 3650, 3520, 67, 364, 290, 12660, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 1123, 9630, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 45, 58, 72, 60, 796, 277, 79, 62, 81, 8957, 7, 8121, 17633, 45, 7, 87, 58, 72, 16151, 138, 112, 83, 40, 828, 816, 58, 72, 4357, 1976, 3524, 11, 5659, 40, 3524, 8, 1267, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 1002, 17675, 318, 991, 1165, 1263, 11, 466, 340, 757, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 474, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 981, 17565, 11405, 357, 73, 1279, 838, 8, 11405, 357, 19726, 7, 2787, 58, 72, 12962, 1875, 352, 13, 15, 68, 12, 940, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 58, 15, 60, 6624, 657, 11405, 44872, 7203, 8937, 27688, 62, 2787, 391, 1082, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 474, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 45, 58, 72, 60, 796, 17565, 62, 2787, 391, 1082, 7, 87, 15972, 45, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 816, 58, 72, 60, 796, 17675, 7, 87, 15972, 45, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 85, 58, 77, 20214, 60, 796, 13446, 7, 87, 15972, 45, 11, 5659, 40, 3524, 8, 1303, 4225, 2100, 14253, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1189, 17403, 798, 796, 2198, 62, 26745, 7, 83, 15, 10, 138, 112, 83, 11, 2124, 85, 58, 77, 20214, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 747, 17403, 798, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7377, 112, 83, 796, 7377, 112, 83, 14, 17, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20512, 62, 445, 796, 5322, 62, 397, 301, 349, 1875, 949, 397, 301, 349, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 10951, 7203, 747, 17403, 798, 25, 33172, 20512, 62, 445, 11, 7377, 112, 83, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 20512, 62, 445, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5322, 62, 397, 301, 349, 796, 5322, 62, 397, 301, 349, 1220, 838, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 83, 796, 7377, 112, 83, 1635, 657, 13, 16, 61, 7, 16, 14, 2875, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2555, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 7203, 44046, 4112, 15621, 4251, 357, 747, 17403, 798, 2599, 33172, 256, 58, 15, 4357, 7377, 112, 83, 11, 5322, 62, 397, 301, 349, 11, 37455, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 1303, 2488, 259, 65, 3733, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 5145, 747, 17403, 798, 11405, 5145, 42552, 425, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 7203, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13742, 1816, 2642, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13538, 1600, 1189, 17403, 798, 11, 29605, 11, 20512, 62, 445, 11, 5322, 62, 397, 301, 349, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 15, 11, 7377, 112, 83, 11, 37455, 11, 299, 20214, 11, 2124, 85, 58, 77, 20214, 4357, 2198, 62, 26745, 7, 83, 15, 10, 138, 112, 83, 11, 2124, 85, 58, 77, 20214, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 1267, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 44104, 13138, 11, 7377, 112, 83, 11, 5322, 62, 397, 301, 349, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 41216, 0, 7, 55, 15, 3712, 9492, 2100, 14253, 90, 45, 11, 309, 5512, 1502, 48, 11, 1502, 51, 11, 2124, 11, 44332, 11, 2124, 15972, 45, 11, 2124, 40, 11, 44332, 40, 11, 816, 11, 2124, 15972, 16, 85, 8, 810, 1391, 45, 11, 309, 92, 198, 198, 24243, 1096, 262, 37419, 11812, 9633, 290, 3487, 1096, 262, 1813, 16654, 198, 3524, 284, 262, 7386, 4600, 58, 12, 16, 11, 352, 60, 61, 77, 44646, 198, 37811, 198, 8818, 41216, 0, 7, 55, 15, 3712, 9492, 2100, 14253, 90, 45, 11, 51, 5512, 1502, 48, 11, 1502, 51, 11, 2124, 11, 44332, 11, 2124, 15972, 45, 11, 2124, 40, 11, 44332, 40, 11, 816, 11, 2124, 15972, 16, 85, 8, 810, 1391, 45, 11, 51, 92, 198, 220, 220, 220, 2488, 30493, 399, 6624, 651, 62, 22510, 85, 945, 3419, 628, 220, 220, 220, 1303, 3641, 286, 262, 3091, 290, 15879, 286, 9647, 82, 198, 220, 220, 220, 10662, 15, 796, 3095, 12195, 55, 15, 8, 198, 220, 220, 220, 7377, 112, 80, 15, 796, 1395, 15, 764, 12, 10662, 15, 628, 220, 220, 220, 1303, 39279, 7386, 198, 220, 220, 220, 1976, 40, 796, 6632, 62, 3849, 2100, 7, 51, 8, 198, 220, 220, 220, 1976, 33, 796, 6632, 62, 3524, 7, 45, 11, 309, 8, 198, 220, 220, 220, 311, 796, 23606, 19482, 62, 3524, 7, 45, 11, 309, 8, 628, 220, 220, 220, 10662, 14644, 796, 3487, 1096, 62, 83, 7167, 12195, 80, 15, 764, 10, 8121, 45, 12195, 16, 25, 45, 11, 1502, 28, 2875, 48, 828, 357, 138, 112, 80, 15, 11, 828, 2081, 8, 198, 220, 220, 220, 2488, 13, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 8121, 16, 7, 80, 14644, 11, 1502, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44332, 796, 2124, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 45, 796, 8121, 17633, 45, 7, 80, 14644, 11, 1976, 40, 11, 357, 89, 33, 11, 828, 357, 50, 11, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 2124, 40, 796, 8121, 16, 7, 55, 15, 11, 1502, 51, 10, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44332, 40, 796, 2124, 40, 198, 220, 220, 220, 220, 220, 220, 220, 816, 796, 1976, 40, 628, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 16, 85, 58, 45299, 352, 60, 796, 8121, 17633, 16, 7, 22089, 30073, 7, 87, 828, 1976, 40, 11, 1976, 40, 11, 1976, 40, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 8818, 41216, 0, 7, 55, 15, 3712, 9492, 2100, 14253, 90, 45, 11, 51, 5512, 1502, 48, 11, 1502, 51, 11, 2124, 11, 44332, 11, 2124, 15972, 45, 11, 816, 11, 2124, 15972, 16, 85, 8, 810, 1391, 45, 11, 51, 92, 198, 220, 220, 220, 2488, 30493, 399, 6624, 651, 62, 22510, 85, 945, 3419, 198, 220, 220, 220, 10662, 15, 796, 3095, 12195, 55, 15, 8, 198, 220, 220, 220, 7377, 112, 80, 15, 796, 1395, 15, 764, 12, 10662, 15, 198, 220, 220, 220, 1976, 40, 796, 6632, 62, 3849, 2100, 7, 51, 8, 198, 220, 220, 220, 1976, 33, 796, 6632, 62, 3524, 7, 45, 11, 309, 8, 198, 220, 220, 220, 311, 796, 23606, 19482, 62, 3524, 7, 45, 11, 309, 8, 628, 220, 220, 220, 10662, 14644, 796, 3487, 1096, 62, 83, 7167, 12195, 80, 15, 764, 10, 8121, 45, 12195, 16, 25, 45, 11, 1502, 28, 2875, 48, 828, 357, 138, 112, 80, 15, 11, 828, 2081, 8, 198, 220, 220, 220, 2488, 13, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 8121, 16, 7, 80, 14644, 11, 1502, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44332, 796, 2124, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 45, 796, 8121, 17633, 45, 7, 80, 14644, 11, 1976, 40, 11, 357, 89, 33, 11, 828, 357, 50, 11, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 816, 796, 1976, 40, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 16, 85, 58, 45299, 352, 60, 796, 8121, 17633, 16, 7, 22089, 30073, 7, 87, 828, 1976, 40, 11, 1976, 40, 11, 1976, 40, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 41216, 0, 7, 55, 15, 3712, 38469, 90, 29907, 17633, 16, 90, 29907, 45, 90, 51, 5512, 309, 92, 5512, 1502, 48, 11, 1502, 51, 11, 2124, 11, 44332, 11, 2124, 15972, 45, 11, 2124, 40, 11, 44332, 40, 11, 816, 11, 2124, 15972, 16, 85, 8, 810, 1391, 51, 92, 198, 198, 24243, 1096, 262, 37419, 11812, 9633, 13148, 326, 262, 1813, 15879, 198, 1659, 256, 7167, 4981, 4600, 55, 15, 63, 318, 39279, 284, 262, 7386, 4600, 58, 12, 16, 11, 352, 60, 61, 77, 63, 287, 2272, 13, 198, 37811, 198, 8818, 41216, 0, 7, 55, 15, 3712, 38469, 90, 29907, 17633, 16, 90, 29907, 45, 90, 51, 5512, 51, 92, 5512, 1502, 48, 11, 1502, 51, 11, 2124, 11, 44332, 11, 2124, 15972, 45, 11, 2124, 40, 11, 44332, 40, 11, 816, 11, 2124, 15972, 16, 85, 8, 810, 1391, 51, 92, 198, 220, 220, 220, 1303, 4515, 282, 1143, 7386, 198, 220, 220, 220, 399, 796, 651, 62, 22510, 85, 945, 3419, 198, 220, 220, 220, 1976, 40, 796, 6632, 62, 3849, 2100, 7, 51, 8, 198, 220, 220, 220, 1976, 33, 796, 6632, 62, 3524, 7, 45, 11, 309, 8, 198, 220, 220, 220, 311, 796, 23606, 19482, 62, 3524, 7, 45, 11, 309, 8, 628, 220, 220, 220, 10662, 14644, 796, 6937, 62, 4354, 12195, 35428, 26601, 498, 12195, 55, 15, 4008, 198, 220, 220, 220, 2124, 15, 83, 796, 7118, 62, 4122, 7, 55, 15, 58, 16, 12962, 198, 220, 220, 220, 2401, 83, 796, 7386, 7, 55, 15, 58, 16, 12962, 198, 220, 220, 220, 2488, 13, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 8121, 16, 7, 80, 14644, 11, 1502, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44332, 796, 2124, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 45, 796, 8121, 17633, 45, 7, 80, 14644, 11, 1976, 40, 11, 357, 89, 33, 11, 828, 357, 50, 11, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 356, 7048, 326, 10662, 14644, 318, 39279, 284, 311, 41888, 12, 16, 11, 352, 60, 61, 45, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 40, 796, 8121, 16, 7, 49786, 7, 80, 14644, 11, 357, 50, 35751, 828, 1502, 51, 10, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44332, 40, 796, 2124, 40, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 17675, 198, 220, 220, 220, 220, 220, 220, 220, 816, 796, 17675, 7, 55, 15, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 5072, 15879, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 16, 85, 58, 45299, 352, 60, 796, 8121, 17633, 16, 7, 22089, 30073, 7, 87, 828, 816, 11, 2124, 15, 83, 11, 2401, 83, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 8818, 41216, 0, 7, 55, 15, 3712, 38469, 90, 29907, 17633, 16, 90, 29907, 45, 90, 51, 5512, 51, 92, 5512, 1502, 48, 11, 1502, 51, 11, 2124, 11, 44332, 11, 2124, 15972, 45, 11, 816, 11, 2124, 15972, 16, 85, 8, 810, 1391, 51, 92, 198, 220, 220, 220, 1303, 4515, 282, 1143, 7386, 198, 220, 220, 220, 399, 796, 651, 62, 22510, 85, 945, 3419, 198, 220, 220, 220, 1976, 40, 796, 6632, 62, 3849, 2100, 7, 51, 8, 198, 220, 220, 220, 1976, 33, 796, 6632, 62, 3524, 7, 45, 11, 309, 8, 198, 220, 220, 220, 311, 796, 23606, 19482, 62, 3524, 7, 45, 11, 309, 8, 628, 220, 220, 220, 10662, 14644, 796, 6937, 62, 4354, 12195, 35428, 26601, 498, 12195, 55, 15, 4008, 198, 220, 220, 220, 2124, 15, 83, 796, 7118, 62, 4122, 7, 55, 15, 58, 16, 12962, 198, 220, 220, 220, 2401, 83, 796, 7386, 7, 55, 15, 58, 16, 12962, 198, 220, 220, 220, 2488, 13, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 8121, 16, 7, 80, 14644, 11, 1502, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44332, 796, 2124, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 45, 796, 8121, 17633, 45, 7, 80, 14644, 11, 1976, 40, 11, 357, 89, 33, 11, 828, 357, 50, 11, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 17675, 198, 220, 220, 220, 220, 220, 220, 220, 816, 796, 17675, 7, 55, 15, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 5072, 15879, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 16, 85, 58, 45299, 352, 60, 796, 8121, 17633, 16, 7, 22089, 30073, 7, 87, 828, 816, 11, 2124, 15, 83, 11, 2401, 83, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 1441, 2147, 198, 437, 198, 198, 8818, 31031, 62, 18908, 7, 69, 28265, 1395, 15, 11, 256, 15, 3712, 51, 11, 256, 9806, 3712, 51, 11, 1502, 48, 3712, 5317, 11, 1502, 51, 3712, 5317, 11, 16552, 349, 3712, 51, 11, 42287, 28, 22366, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3509, 20214, 3712, 5317, 28, 11024, 11, 21136, 62, 27363, 82, 3712, 33, 970, 28, 7942, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29605, 3712, 33, 970, 28, 7942, 11, 949, 397, 301, 349, 3712, 51, 28, 51, 28264, 32988, 62, 23678, 6242, 2257, 3535, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17565, 3712, 33, 970, 28, 9562, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2198, 62, 26745, 3712, 22203, 16193, 83, 11, 2124, 8, 3784, 7942, 8, 810, 1391, 51, 27, 25, 15633, 92, 628, 220, 220, 220, 1303, 5345, 1774, 10007, 329, 12644, 4839, 198, 220, 220, 220, 399, 796, 651, 62, 22510, 85, 945, 3419, 198, 220, 220, 220, 466, 69, 796, 399, 628, 220, 220, 220, 1303, 2773, 9633, 198, 220, 220, 220, 1976, 83, 796, 6632, 7, 83, 15, 8, 198, 220, 220, 220, 1976, 40, 796, 6632, 62, 3849, 2100, 7, 51, 8, 198, 220, 220, 220, 1976, 33, 796, 6632, 62, 3524, 7, 45, 11, 309, 8, 198, 220, 220, 220, 311, 220, 796, 23606, 19482, 62, 3524, 7, 45, 11, 309, 8, 198, 220, 220, 220, 256, 220, 796, 256, 15, 1343, 8121, 16, 7, 2875, 51, 8, 198, 220, 220, 220, 256, 40, 796, 256, 15, 1343, 8121, 16, 7, 2875, 51, 10, 16, 8, 628, 220, 220, 220, 1303, 1439, 5040, 286, 30104, 198, 220, 220, 220, 1303, 25235, 198, 220, 220, 220, 31557, 220, 220, 220, 796, 15690, 90, 51, 92, 7, 917, 891, 11, 3509, 20214, 10, 16, 8, 198, 220, 220, 220, 2124, 85, 220, 220, 220, 796, 15690, 90, 9492, 2100, 14253, 90, 45, 11, 51, 11709, 7, 917, 891, 11, 3509, 20214, 10, 16, 8, 198, 220, 220, 220, 2124, 15972, 16, 85, 796, 15690, 90, 29907, 17633, 16, 90, 29907, 45, 90, 51, 5512, 51, 11709, 7, 917, 891, 11, 466, 69, 11, 3509, 20214, 10, 16, 8, 198, 220, 220, 220, 816, 796, 15690, 90, 9492, 2100, 90, 51, 11709, 7, 917, 891, 11, 466, 69, 8, 628, 220, 220, 220, 1303, 2445, 874, 25, 12644, 4839, 11812, 198, 220, 220, 220, 2124, 220, 220, 220, 220, 796, 15690, 90, 29907, 16, 90, 29907, 45, 90, 51, 42535, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 44332, 220, 220, 220, 796, 15690, 90, 29907, 16, 90, 29907, 45, 90, 51, 42535, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 2124, 14644, 220, 796, 15690, 90, 29907, 16, 90, 29907, 45, 90, 51, 42535, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 2124, 15972, 45, 220, 796, 15690, 90, 29907, 17633, 45, 90, 45, 11, 51, 11, 51, 11709, 7, 917, 891, 11, 466, 69, 8, 628, 220, 220, 220, 1303, 2445, 874, 25, 8121, 16, 90, 9492, 2100, 90, 51, 11709, 11812, 198, 220, 220, 220, 2124, 40, 220, 220, 220, 796, 15690, 90, 29907, 16, 90, 9492, 2100, 90, 51, 42535, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 44332, 40, 220, 220, 796, 15690, 90, 29907, 16, 90, 9492, 2100, 90, 51, 42535, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 2124, 14644, 40, 796, 15690, 90, 29907, 16, 90, 9492, 2100, 90, 51, 42535, 7, 917, 891, 11, 466, 69, 8, 628, 220, 220, 220, 1303, 5345, 4238, 3403, 198, 220, 220, 220, 41216, 0, 7, 55, 15, 11, 1502, 48, 11, 1502, 51, 11, 2124, 11, 44332, 11, 2124, 15972, 45, 11, 2124, 40, 11, 44332, 40, 11, 816, 11, 2124, 15972, 16, 85, 8, 198, 220, 220, 220, 1051, 62, 83, 9662, 796, 2243, 893, 570, 7, 16, 11, 256, 9806, 12, 83, 15, 8, 628, 220, 220, 220, 1303, 25235, 30104, 198, 220, 220, 220, 2488, 259, 65, 3733, 31557, 58, 16, 60, 796, 256, 15, 198, 220, 220, 220, 2488, 259, 65, 3733, 2124, 85, 58, 16, 60, 796, 13446, 7, 87, 15972, 45, 11, 311, 8, 628, 220, 220, 220, 1303, 45559, 3810, 611, 16976, 12644, 1073, 14822, 82, 0, 2446, 7160, 357, 18780, 416, 2488, 83, 7167, 1096, 8, 198, 220, 220, 220, 21136, 62, 27363, 82, 796, 8121, 34500, 1358, 13557, 67, 2357, 3810, 62, 79, 945, 278, 0, 7, 29572, 62, 27363, 82, 11, 277, 28265, 256, 11, 2124, 11, 44332, 11, 42287, 8, 628, 220, 220, 220, 1957, 4808, 13138, 1303, 611, 2081, 11, 262, 21201, 2239, 14131, 198, 220, 220, 220, 900, 18982, 7, 25, 12853, 8, 198, 220, 220, 220, 2266, 62, 397, 301, 349, 796, 16552, 349, 628, 220, 220, 220, 1303, 38410, 198, 220, 220, 220, 299, 20214, 796, 352, 198, 220, 220, 220, 981, 1051, 62, 83, 9662, 9, 83, 15, 1279, 1051, 62, 83, 9662, 9, 83, 9806, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 3254, 41475, 2239, 286, 262, 11812, 198, 220, 220, 220, 220, 220, 220, 220, 44104, 13138, 11, 7377, 112, 83, 11, 2266, 62, 397, 301, 349, 8, 796, 31031, 62, 9662, 0, 7, 69, 28265, 256, 11, 2124, 11, 44332, 11, 2124, 14644, 11, 256, 40, 11, 2124, 40, 11, 44332, 40, 11, 2124, 14644, 40, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 15, 11, 256, 9806, 11, 1051, 62, 83, 9662, 11, 2124, 15972, 45, 11, 2124, 85, 11, 816, 11, 1976, 33, 11, 311, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 20214, 11, 1502, 51, 11, 2266, 62, 397, 301, 349, 11, 42287, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21136, 62, 27363, 82, 11, 29605, 11, 949, 397, 301, 349, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17565, 11, 2198, 62, 26745, 8, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 83, 40, 796, 1051, 62, 83, 9662, 1635, 4225, 2100, 7, 89, 83, 11, 1051, 62, 83, 9662, 9, 138, 112, 83, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 968, 4238, 3403, 290, 640, 11, 290, 5072, 30104, 198, 220, 220, 220, 220, 220, 220, 220, 299, 20214, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 31557, 58, 77, 20214, 60, 796, 256, 15, 198, 220, 220, 220, 220, 220, 220, 220, 256, 15, 15853, 7377, 112, 83, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 256, 58, 15, 60, 796, 256, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 256, 40, 58, 15, 60, 796, 256, 15, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 13, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 16, 85, 58, 45299, 299, 20214, 60, 796, 8121, 17633, 16, 7, 87, 11, 816, 11, 1976, 40, 11, 7377, 112, 83, 40, 8, 220, 1303, 2769, 30073, 30, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 796, 8121, 16, 7, 49786, 7, 87, 11, 7377, 112, 83, 828, 1502, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 44332, 796, 8121, 16, 7, 22570, 7, 9979, 415, 62, 4354, 7, 87, 36911, 1502, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 40, 796, 8121, 16, 7, 49786, 7, 87, 15972, 45, 11, 357, 50, 35751, 828, 1502, 51, 10, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 44332, 40, 796, 2124, 40, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 9993, 284, 2620, 4600, 445, 62, 397, 301, 349, 63, 611, 4600, 42552, 425, 63, 318, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 611, 29605, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2266, 62, 397, 301, 349, 796, 949, 7, 397, 301, 349, 11, 838, 9, 445, 62, 397, 301, 349, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1002, 262, 11812, 2239, 318, 555, 13138, 12853, 11, 2270, 351, 257, 6509, 26, 3465, 326, 262, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 938, 11812, 2239, 357, 4758, 373, 407, 1943, 12853, 8, 318, 4504, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 62, 13138, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 7203, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1475, 1780, 2233, 284, 555, 13138, 12853, 2239, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13538, 1600, 4808, 13138, 11, 256, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 611, 299, 20214, 1875, 3509, 20214, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 7203, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22246, 1271, 286, 11812, 4831, 4251, 26, 33895, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13538, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 1570, 7, 14981, 11, 16, 25, 77, 20214, 828, 1570, 7, 87, 85, 11, 16, 25, 77, 20214, 828, 1570, 7, 87, 15972, 16, 85, 11, 1058, 11, 352, 25, 77, 20214, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 8301, 446, 7, 34350, 11, 2124, 15, 11, 3091, 8, 198, 198, 7293, 1769, 262, 8301, 446, 357, 18908, 1373, 8, 10088, 329, 262, 4238, 4006, 4600, 87, 15, 44646, 198, 63, 34350, 63, 1276, 307, 262, 9529, 82, 286, 262, 22577, 16022, 13, 198, 37811, 198, 8818, 4808, 16564, 446, 7, 34350, 11, 2124, 15, 11, 3091, 8, 198, 220, 220, 220, 18872, 104, 69, 796, 19386, 7, 34350, 11, 657, 1539, 3091, 8, 198, 220, 220, 220, 755, 796, 18872, 104, 69, 13, 16104, 1343, 2124, 15, 13, 16104, 198, 220, 220, 220, 37455, 74, 796, 18872, 104, 69, 13, 2787, 198, 220, 220, 220, 1441, 755, 11, 37455, 74, 198, 437, 198, 198, 62, 16564, 446, 62, 2787, 7, 34350, 11, 3091, 8, 796, 17675, 7, 18908, 4873, 7, 34350, 11, 3091, 4008, 628, 198, 37811, 198, 220, 220, 220, 8301, 446, 62, 2676, 341, 7, 69, 28265, 44332, 11, 2124, 15972, 16, 42, 11, 42287, 11, 256, 11, 2124, 15, 11, 3091, 11, 7904, 7762, 90, 7942, 30072, 198, 198, 7293, 1769, 262, 8301, 446, 357, 18908, 1373, 8, 10088, 329, 262, 900, 286, 27490, 4600, 69, 0, 63, 290, 262, 4238, 4006, 63, 87, 15, 44646, 198, 464, 3254, 11507, 13536, 262, 6356, 286, 262, 10348, 2446, 13, 770, 530, 5860, 262, 17675, 286, 198, 1169, 7186, 8121, 9104, 351, 262, 17675, 286, 262, 4238, 4006, 3017, 13, 198, 37811, 198, 8818, 8301, 446, 62, 2676, 341, 7, 69, 28265, 44332, 11, 2124, 15972, 16, 42, 11, 42287, 11, 256, 11, 2124, 15, 11, 3091, 11, 7904, 7762, 90, 7942, 30072, 198, 220, 220, 220, 277, 0, 7, 34350, 11, 2124, 15972, 16, 42, 11, 42287, 11, 256, 8, 198, 220, 220, 220, 1441, 2488, 13, 4808, 16564, 446, 62, 2787, 7, 34350, 11, 357, 3524, 11, 4008, 1343, 17675, 7, 87, 15, 8, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 8301, 446, 62, 2676, 341, 7, 69, 28265, 44332, 11, 2124, 15972, 16, 42, 11, 42287, 11, 256, 11, 2124, 15, 11, 3091, 8, 198, 198, 7293, 1769, 262, 8301, 446, 357, 18908, 1373, 8, 10088, 329, 262, 900, 286, 27490, 4600, 69, 0, 63, 290, 262, 4238, 4006, 63, 87, 15, 44646, 198, 1212, 2446, 5860, 262, 17675, 286, 262, 7186, 8121, 9104, 1231, 262, 17675, 286, 262, 4238, 4006, 13, 198, 37811, 198, 8818, 8301, 446, 62, 2676, 341, 7, 69, 28265, 44332, 11, 2124, 15972, 16, 42, 11, 42287, 11, 256, 11, 2124, 15, 11, 3091, 8, 198, 220, 220, 220, 277, 0, 7, 34350, 11, 2124, 15972, 16, 42, 11, 42287, 11, 256, 8, 198, 220, 220, 220, 1441, 4808, 16564, 446, 62, 2787, 12195, 34350, 11, 357, 3524, 11, 4008, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 4808, 12102, 378, 62, 9662, 7, 87, 15972, 16, 42, 11, 277, 28265, 44332, 11, 2124, 15, 11, 42287, 11, 256, 11, 3091, 11, 466, 69, 26, 7377, 113, 28, 16, 68, 12, 940, 11, 3509, 20214, 28, 1238, 11, 1070, 5685, 25386, 28, 1120, 8, 198, 198, 7762, 20540, 262, 8121, 9104, 4610, 329, 262, 1459, 11812, 640, 2239, 13, 198, 1212, 2163, 23986, 262, 304, 862, 33576, 10610, 11862, 5150, 416, 347, 9116, 782, 263, 198, 4480, 617, 2183, 35030, 13, 198, 198, 8134, 25, 4432, 666, 347, 7879, 403, 1362, 11, 317, 8121, 2746, 2891, 3524, 329, 18120, 440, 7206, 82, 9177, 287, 36775, 48780, 14, 12394, 48780, 11, 198, 41, 13, 22476, 13, 39100, 13, 16320, 13, 43019, 11, 352, 11623, 1157, 11, 3740, 1378, 34023, 13, 2398, 14, 940, 13, 27956, 14, 73, 13, 20991, 13, 23344, 13, 16, 11623, 1157, 198, 37811, 198, 8818, 4808, 12102, 378, 62, 9662, 0, 7, 87, 15972, 16, 42, 11, 277, 28265, 44332, 11, 2124, 15, 11, 42287, 11, 2124, 11, 256, 11, 3091, 11, 466, 69, 11, 816, 11, 16552, 349, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 83, 11, 1051, 62, 83, 9662, 11, 412, 11, 412, 17478, 11, 755, 85, 11, 1877, 62, 81, 7246, 709, 11, 23105, 62, 81, 7246, 709, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29605, 3712, 33, 970, 11, 949, 397, 301, 349, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 113, 28, 16, 68, 12, 940, 11, 7377, 112, 28, 16, 68, 12, 21, 11, 4938, 265, 395, 25386, 28, 1238, 11, 1070, 5685, 25386, 28, 1120, 8, 198, 220, 220, 220, 1303, 198, 220, 220, 220, 309, 796, 1288, 4906, 7, 3524, 58, 16, 12962, 198, 220, 220, 220, 1976, 40, 796, 6632, 62, 3849, 2100, 7, 51, 8, 198, 220, 220, 220, 2401, 51, 796, 1051, 62, 83, 9662, 1635, 4225, 2100, 90, 51, 92, 7, 15, 11, 1051, 62, 83, 9662, 9, 138, 112, 83, 8, 198, 220, 220, 220, 1502, 51, 796, 651, 62, 2875, 7, 83, 8, 198, 220, 220, 220, 2488, 13, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 755, 85, 796, 2769, 30073, 12195, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 16, 42, 796, 8121, 17633, 16, 7, 16104, 85, 11, 1976, 40, 11, 1976, 40, 11, 2401, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 2124, 15972, 16, 42, 796, 8121, 17633, 16, 7, 16104, 85, 11, 816, 11, 1976, 40, 11, 2401, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 412, 796, 17675, 7, 87, 15972, 16, 42, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 412, 796, 17675, 7, 87, 15, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 7377, 113, 72, 796, 357, 16, 532, 7377, 113, 8, 11485, 357, 16, 1343, 7377, 113, 8, 198, 220, 220, 220, 7377, 112, 72, 796, 532, 138, 112, 11485, 7377, 112, 628, 220, 220, 220, 4808, 13138, 796, 3991, 198, 220, 220, 220, 5322, 62, 397, 301, 349, 796, 16552, 349, 198, 220, 220, 220, 1303, 9993, 284, 5879, 6224, 290, 49650, 510, 284, 997, 42116, 11, 1390, 8868, 262, 198, 220, 220, 220, 1303, 640, 2239, 198, 220, 220, 220, 20512, 62, 445, 796, 2081, 198, 220, 220, 220, 1303, 329, 299, 42116, 796, 352, 25, 22510, 42116, 198, 220, 220, 220, 981, 20512, 62, 445, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 9993, 284, 5879, 6224, 290, 49650, 510, 284, 4938, 265, 395, 25386, 198, 220, 220, 220, 220, 220, 220, 220, 299, 20214, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 412, 17478, 764, 28, 8301, 446, 62, 2676, 341, 7, 69, 28265, 44332, 11, 2124, 15972, 16, 42, 11, 42287, 11, 256, 11, 2124, 15, 11, 3091, 11, 3254, 7, 7942, 4008, 1303, 657, 12, 400, 24415, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 13, 2124, 15972, 16, 42, 796, 8121, 17633, 16, 7, 16104, 85, 11, 412, 17478, 11, 1976, 40, 11, 2401, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 981, 299, 20214, 1279, 4938, 265, 395, 25386, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 412, 17478, 764, 28, 8301, 446, 62, 2676, 341, 7, 69, 28265, 44332, 11, 2124, 15972, 16, 42, 11, 42287, 11, 256, 11, 2124, 15, 11, 3091, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 477, 7, 2304, 756, 35587, 12195, 36, 17478, 11, 412, 4008, 11405, 2270, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 5514, 28472, 689, 262, 2672, 7515, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 287, 1123, 9630, 7, 34350, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 2304, 756, 35587, 7, 36, 17478, 58, 72, 4357, 412, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 412, 58, 72, 60, 796, 412, 17478, 58, 72, 60, 1635, 7377, 113, 72, 1343, 7377, 112, 72, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 16, 42, 58, 72, 60, 796, 8121, 17633, 16, 7, 16104, 85, 58, 72, 4357, 412, 58, 72, 4357, 1976, 40, 11, 2401, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 299, 20214, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 13138, 796, 477, 7, 2304, 756, 35587, 12195, 36, 17478, 11, 412, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 4808, 13138, 11405, 2270, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 911, 81, 676, 4831, 1096, 4600, 138, 112, 83, 63, 611, 4600, 42552, 425, 63, 318, 4600, 7942, 63, 290, 4600, 62, 13138, 63, 318, 3991, 11, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 510, 284, 617, 5288, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 62, 13138, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 29605, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 20512, 62, 445, 796, 5322, 62, 397, 301, 349, 1875, 949, 397, 301, 349, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 611, 20512, 62, 445, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5322, 62, 397, 301, 349, 796, 5322, 62, 397, 301, 349, 14, 940, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 83, 796, 7377, 112, 83, 1635, 657, 13, 16, 61, 7, 16, 14, 2875, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2401, 51, 796, 1051, 62, 83, 9662, 1635, 4225, 2100, 90, 51, 92, 7, 15, 11, 1051, 62, 83, 9662, 9, 138, 112, 83, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 13, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 16, 42, 796, 8121, 17633, 16, 7, 16104, 85, 11, 1976, 40, 11, 1976, 40, 11, 2401, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2124, 15972, 16, 42, 796, 8121, 17633, 16, 7, 16104, 85, 11, 816, 11, 1976, 40, 11, 2401, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 412, 796, 17675, 7, 87, 15972, 16, 42, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 412, 796, 17675, 7, 87, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 7203, 44046, 4112, 15621, 4251, 25, 33172, 256, 58, 15, 4357, 412, 17478, 11, 412, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 13138, 11, 477, 7, 2304, 756, 35587, 12195, 36, 17478, 11, 412, 36911, 5322, 62, 397, 301, 349, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2073, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 7203, 15931, 1026, 2314, 5879, 6224, 290, 555, 8467, 286, 262, 4610, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 15, 796, 29568, 83, 58, 15, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 83, 796, 29568, 138, 112, 83, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37455, 87, 796, 29568, 36, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13538, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 611, 5145, 439, 7, 2304, 756, 35587, 12195, 36, 17478, 11, 412, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 7203, 40541, 1271, 286, 26571, 4831, 4251, 33283, 256, 58, 15, 4357, 412, 17478, 11, 412, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4808, 13138, 11, 477, 7, 2304, 756, 35587, 12195, 36, 17478, 11, 412, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 44104, 13138, 11, 7377, 112, 83, 11, 5322, 62, 397, 301, 349, 8, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1303, 2488, 13, 2221, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 1877, 62, 81, 7246, 709, 796, 1167, 7, 36, 17478, 8, 1220, 1167, 7, 36, 8, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 23105, 62, 81, 7246, 709, 220, 796, 7418, 7, 36, 17478, 8, 1220, 7418, 7, 36, 8, 198, 220, 220, 220, 1303, 886, 628, 220, 220, 220, 1303, 1303, 17453, 2252, 262, 3520, 67, 364, 611, 262, 938, 36246, 19575, 517, 621, 642, 4, 198, 220, 220, 220, 1303, 329, 773, 796, 352, 25, 2302, 5685, 25386, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 5288, 7, 9319, 62, 81, 7246, 709, 8, 1875, 657, 13, 3829, 11405, 5288, 7, 5303, 62, 81, 7246, 709, 8, 1875, 657, 13, 3829, 11405, 2270, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 412, 764, 28, 17675, 12195, 87, 15972, 16, 42, 8, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 412, 17478, 764, 28, 8301, 446, 62, 2676, 341, 7, 69, 28265, 44332, 11, 2124, 15972, 16, 42, 11, 42287, 11, 256, 11, 2124, 15, 11, 3091, 8, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 2488, 13, 2221, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 16, 42, 796, 8121, 17633, 16, 7, 16104, 85, 11, 412, 17478, 11, 1976, 40, 11, 2401, 8, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 1877, 62, 81, 7246, 709, 796, 1167, 7, 36, 17478, 8, 1220, 1167, 7, 36, 8, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 220, 220, 220, 220, 23105, 62, 81, 7246, 709, 220, 796, 7418, 7, 36, 17478, 8, 1220, 7418, 7, 36, 8, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 886, 198, 220, 220, 220, 1303, 220, 220, 220, 220, 1303, 2488, 12860, 7, 521, 11, 412, 11, 412, 17478, 11, 477, 7, 2304, 756, 35587, 12195, 36, 17478, 11, 412, 36911, 1877, 62, 81, 7246, 709, 8, 198, 220, 220, 220, 1303, 886, 628, 220, 220, 220, 1441, 44104, 13138, 11, 7377, 112, 83, 11, 5322, 62, 397, 301, 349, 8, 198, 437, 198, 198, 8818, 31031, 62, 18908, 17, 7, 69, 28265, 1395, 15, 11, 256, 15, 3712, 51, 11, 48700, 3712, 51, 11, 1502, 48, 3712, 5317, 11, 1502, 51, 3712, 5317, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 16552, 349, 3712, 51, 11, 42287, 28, 22366, 26, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 21136, 62, 27363, 82, 28, 7942, 11, 3509, 20214, 3712, 5317, 28, 11024, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17565, 3712, 33, 970, 28, 9562, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29605, 3712, 33, 970, 28, 7942, 11, 949, 397, 301, 349, 28, 51, 28264, 32988, 62, 23678, 6242, 2257, 3535, 828, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4938, 265, 395, 25386, 3712, 5317, 28, 1270, 11, 7377, 113, 3712, 51, 28, 16, 68, 12, 940, 11, 7377, 112, 3712, 51, 28, 16, 68, 12, 21, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 17565, 62, 20214, 3712, 5317, 28, 18, 8, 810, 1391, 51, 1279, 25, 6416, 92, 198, 220, 220, 220, 399, 796, 651, 62, 22510, 85, 945, 3419, 198, 220, 220, 220, 466, 69, 796, 399, 628, 220, 220, 220, 1976, 83, 796, 6632, 7, 83, 15, 8, 198, 220, 220, 220, 1976, 40, 796, 6632, 62, 3849, 2100, 7, 51, 8, 198, 220, 220, 220, 1976, 33, 796, 6632, 62, 3524, 7, 45, 11, 309, 8, 198, 220, 220, 220, 311, 796, 23606, 19482, 62, 3524, 7, 45, 11, 309, 8, 198, 220, 220, 220, 256, 796, 256, 15, 1343, 8121, 16, 7, 2875, 51, 8, 198, 220, 220, 220, 220, 198, 220, 220, 220, 31557, 796, 15690, 90, 51, 92, 7, 917, 891, 11, 3509, 20214, 10, 16, 8, 198, 220, 220, 220, 2124, 85, 796, 15690, 90, 9492, 2100, 14253, 90, 45, 11, 51, 11709, 7, 917, 891, 11, 3509, 20214, 10, 16, 8, 198, 220, 220, 220, 2124, 15972, 16, 85, 796, 15690, 90, 29907, 17633, 16, 90, 29907, 45, 90, 51, 5512, 51, 11709, 7, 917, 891, 11, 466, 69, 11, 3509, 20214, 10, 16, 8, 198, 220, 220, 220, 2124, 796, 15690, 90, 29907, 16, 90, 29907, 45, 90, 51, 42535, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 44332, 796, 15690, 90, 29907, 16, 90, 29907, 45, 90, 51, 42535, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 2124, 14644, 796, 15690, 90, 29907, 16, 90, 29907, 45, 90, 51, 42535, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 2124, 15972, 45, 796, 15690, 90, 29907, 17633, 45, 90, 45, 11, 51, 11, 51, 11709, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 44332, 15972, 16, 796, 15690, 90, 29907, 17633, 16, 90, 29907, 45, 90, 51, 5512, 51, 11709, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 2124, 15972, 16, 796, 15690, 90, 29907, 17633, 16, 90, 29907, 45, 90, 51, 5512, 51, 11709, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 1877, 62, 81, 7246, 709, 796, 15690, 90, 51, 92, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 23105, 62, 81, 7246, 709, 796, 15690, 90, 51, 92, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 816, 796, 15690, 90, 9492, 2100, 90, 51, 11709, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 412, 796, 15690, 90, 9492, 2100, 90, 51, 11709, 7, 917, 891, 11, 466, 69, 8, 198, 220, 220, 220, 412, 17478, 796, 15690, 90, 9492, 2100, 90, 51, 11709, 7, 917, 891, 11, 466, 69, 8, 628, 220, 220, 220, 1303, 5345, 4238, 3403, 198, 220, 220, 220, 41216, 0, 7, 55, 15, 11, 1502, 48, 11, 1502, 51, 11, 2124, 11, 44332, 11, 2124, 15972, 45, 11, 816, 11, 2124, 15972, 16, 85, 8, 198, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 287, 1123, 9630, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 16, 58, 72, 60, 796, 8121, 17633, 16, 7, 22089, 30073, 7, 87, 58, 72, 46570, 1976, 40, 11, 1976, 40, 11, 1976, 40, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 755, 85, 796, 745, 6213, 49070, 12195, 87, 15972, 16, 8, 198, 220, 220, 220, 6070, 0, 7, 36, 11, 1976, 40, 8, 198, 220, 220, 220, 6070, 0, 7, 36, 17478, 11, 1976, 40, 8, 628, 220, 220, 220, 1051, 62, 83, 9662, 796, 2243, 893, 570, 7, 16, 11, 48700, 532, 256, 15, 8, 198, 220, 220, 220, 299, 20214, 796, 352, 198, 220, 220, 220, 2488, 259, 65, 3733, 31557, 58, 16, 60, 796, 256, 15, 198, 220, 220, 220, 2488, 259, 65, 3733, 2124, 85, 58, 16, 60, 796, 13446, 7, 87, 15972, 45, 11, 311, 8, 628, 220, 220, 220, 21136, 62, 27363, 82, 796, 8121, 34500, 1358, 13557, 67, 2357, 3810, 62, 79, 945, 278, 0, 7, 29572, 62, 27363, 82, 11, 277, 28265, 256, 11, 2124, 11, 44332, 11, 42287, 8, 198, 220, 220, 220, 2266, 62, 397, 301, 349, 796, 16552, 349, 198, 220, 220, 220, 900, 18982, 7, 25, 12853, 8, 628, 220, 220, 220, 981, 256, 15, 1635, 1051, 62, 83, 9662, 1279, 48700, 1635, 1051, 62, 83, 9662, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 83, 796, 8121, 34500, 1358, 13, 83, 7167, 9662, 0, 7, 69, 28265, 256, 11, 2124, 11, 44332, 11, 2124, 14644, 11, 16552, 349, 11, 42287, 11, 21136, 62, 27363, 82, 8, 198, 220, 220, 220, 220, 220, 220, 220, 277, 0, 7, 34350, 11, 2124, 11, 42287, 11, 256, 8, 628, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 83, 796, 949, 7, 138, 112, 83, 11, 1051, 62, 83, 9662, 9, 7, 27110, 12, 83, 15, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 7377, 112, 83, 796, 1051, 62, 83, 9662, 1635, 7377, 112, 83, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 797, 1904, 2180, 8121, 17633, 16, 284, 3613, 617, 49157, 198, 220, 220, 220, 220, 220, 220, 220, 44104, 13138, 11, 7377, 112, 83, 11, 2266, 62, 397, 301, 349, 8, 796, 4808, 12102, 378, 62, 9662, 0, 7, 87, 15972, 16, 11, 277, 28265, 44332, 15972, 16, 11, 2124, 15972, 45, 11, 42287, 11, 2124, 11, 256, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 311, 11, 466, 69, 11, 816, 11, 2266, 62, 397, 301, 349, 11, 7377, 112, 83, 11, 1051, 62, 83, 9662, 11, 412, 11, 412, 17478, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 755, 85, 11, 1877, 62, 81, 7246, 709, 11, 23105, 62, 81, 7246, 709, 11, 220, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 29605, 11, 949, 397, 301, 349, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 7377, 113, 28, 30950, 11, 7377, 112, 28, 138, 112, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4938, 265, 395, 25386, 28, 12102, 265, 395, 25386, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2401, 83, 796, 1051, 62, 83, 9662, 1635, 4225, 2100, 7, 89, 83, 11, 1051, 62, 83, 9662, 9, 138, 112, 83, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 7377, 112, 83, 40, 796, 357, 138, 112, 83, 11485, 7377, 112, 83, 8, 18872, 102, 2401, 83, 1303, 19832, 340, 318, 2641, 262, 7386, 287, 256, 198, 220, 220, 220, 220, 220, 220, 220, 299, 20214, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 31557, 58, 77, 20214, 60, 796, 256, 15, 198, 220, 220, 220, 220, 220, 220, 220, 256, 15, 15853, 7377, 112, 83, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 256, 58, 15, 60, 796, 256, 15, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 27782, 34360, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 13, 2221, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 816, 796, 17675, 7, 87, 15972, 16, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 45, 796, 277, 79, 62, 81, 8957, 7, 29907, 17633, 45, 7, 30073, 7, 49786, 7, 87, 15972, 16, 11, 2401, 83, 36911, 816, 11, 357, 89, 33, 11, 828, 357, 50, 11, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 85, 58, 77, 20214, 60, 796, 13446, 7, 87, 15972, 45, 11, 311, 8, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 968, 4238, 4006, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 259, 65, 3733, 329, 1312, 287, 1123, 9630, 7, 87, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 27506, 62, 16104, 796, 13446, 7, 87, 15972, 16, 58, 72, 4357, 7377, 112, 83, 8, 1303, 138, 112, 83, 40, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 816, 58, 72, 60, 796, 17675, 7, 87, 15972, 16, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 45, 58, 72, 60, 796, 277, 79, 62, 81, 8957, 7, 29907, 17633, 45, 7, 22089, 30073, 7, 14644, 62, 16104, 828, 816, 58, 72, 4357, 1976, 33, 11, 311, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 2124, 15972, 45, 58, 72, 60, 796, 277, 79, 62, 81, 8957, 7, 29907, 17633, 45, 7, 22089, 30073, 7, 14644, 62, 16104, 828, 657, 11485, 657, 11, 1976, 33, 11, 311, 4008, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 13051, 27688, 17675, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 474, 796, 657, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 981, 17565, 11405, 357, 73, 1279, 17565, 62, 20214, 8, 11405, 357, 19726, 7, 2787, 58, 72, 12962, 1875, 352, 13, 15, 68, 12, 940, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 58, 15, 60, 6624, 657, 11405, 44872, 7203, 8937, 27688, 62, 2787, 391, 1082, 366, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 474, 15853, 352, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 45, 58, 72, 60, 796, 17565, 62, 2787, 391, 1082, 7, 87, 15972, 45, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 816, 58, 72, 60, 796, 17675, 7, 87, 15972, 45, 58, 72, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 58, 72, 60, 796, 8121, 16, 7, 35428, 26601, 498, 7, 87, 15972, 45, 58, 72, 46570, 1502, 51, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2124, 15972, 16, 85, 58, 72, 11, 299, 20214, 60, 796, 2124, 15972, 16, 58, 72, 60, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 9993, 284, 2620, 4600, 445, 62, 397, 301, 349, 63, 611, 4600, 42552, 425, 63, 318, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 611, 29605, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2266, 62, 397, 301, 349, 796, 949, 7, 397, 301, 349, 11, 838, 9, 445, 62, 397, 301, 349, 8, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 1303, 1002, 262, 11812, 2239, 318, 555, 13138, 12853, 11, 2270, 351, 257, 6509, 26, 3465, 326, 262, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 938, 11812, 2239, 357, 4758, 373, 407, 1943, 12853, 8, 318, 4504, 198, 220, 220, 220, 220, 220, 220, 220, 611, 5145, 62, 13138, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 7203, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1475, 1780, 2233, 284, 555, 13138, 12853, 2239, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13538, 1600, 4808, 13138, 11, 256, 15, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 220, 220, 611, 299, 20214, 1875, 3509, 20214, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2488, 40539, 7203, 15931, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22246, 1271, 286, 11812, 4831, 4251, 26, 33895, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 13538, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 628, 220, 220, 220, 1441, 1570, 7, 14981, 11, 352, 25, 77, 20214, 828, 1570, 7, 87, 85, 11, 352, 25, 77, 20214, 828, 1570, 7, 87, 15972, 16, 85, 11, 1058, 11, 352, 25, 77, 20214, 8, 198, 437, 198 ]
1.972763
15,457
@testset "Protting" begin @testset "DistPlot1D" begin # TODO end @testset "DistPlot2D" begin # TODO end @testset "CornerPlot" begin # TODO end end
[ 31, 9288, 2617, 366, 19703, 889, 1, 2221, 198, 220, 2488, 9288, 2617, 366, 20344, 43328, 16, 35, 1, 2221, 198, 220, 220, 220, 1303, 16926, 46, 198, 220, 886, 628, 220, 2488, 9288, 2617, 366, 20344, 43328, 17, 35, 1, 2221, 198, 220, 220, 220, 1303, 16926, 46, 198, 220, 886, 628, 220, 2488, 9288, 2617, 366, 10606, 1008, 43328, 1, 2221, 198, 220, 220, 220, 1303, 16926, 46, 198, 220, 886, 198, 437, 198 ]
2.276316
76
using RecurrenceAnalysis, DelimitedFiles, Statistics # Measure the times (in ms) of evaluating an expression n times macro measuretime(ex, n) quote # Train the expression and get the result result = $(esc(ex)) t = zeros($n) for i in 1:$n t[i] = 1000*(@elapsed $(esc(ex))) end t, result end end # Function that will be measured function fun_rqa(x,metric) xe = embed(x,3,6) rmat = RecurrenceMatrix(xe,1.2,metric=metric) rqa(rmat,theiler=1) end # Analyse 12 series from 250 to 3000 points # (With variable metric) function benchmark(metric) m = readdlm("rossler.txt") for r=1:12 x=m[1:250r,2r-1] tt, res = @measuretime fun_rqa(x,metric) 5 t = median(tt) # Write table of results open("benchmark_rqa_julia_$metric.txt","a") do f write(f,"$r\t$t\t") for k in ["RR","DET","L","Lmax","ENTR","LAM","TT"] write(f, "$(res[k])\t") end write(f,"\n") end end end # Do it with max and euclidean norms benchmark("euclidean") benchmark("max")
[ 3500, 3311, 33928, 32750, 11, 4216, 320, 863, 25876, 11, 14370, 198, 198, 2, 24291, 262, 1661, 357, 259, 13845, 8, 286, 22232, 281, 5408, 299, 1661, 198, 20285, 305, 3953, 2435, 7, 1069, 11, 299, 8, 198, 220, 220, 220, 9577, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 16835, 262, 5408, 290, 651, 262, 1255, 198, 220, 220, 220, 220, 220, 220, 220, 1255, 796, 29568, 3798, 7, 1069, 4008, 198, 220, 220, 220, 220, 220, 220, 220, 256, 796, 1976, 27498, 16763, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, 329, 1312, 287, 352, 25, 3, 77, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 256, 58, 72, 60, 796, 8576, 9, 7, 31, 417, 28361, 29568, 3798, 7, 1069, 22305, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 256, 11, 1255, 198, 220, 220, 220, 886, 198, 437, 198, 198, 2, 15553, 326, 481, 307, 8630, 198, 8818, 1257, 62, 81, 20402, 7, 87, 11, 4164, 1173, 8, 198, 220, 220, 220, 2124, 68, 796, 11525, 7, 87, 11, 18, 11, 21, 8, 198, 220, 220, 220, 374, 6759, 796, 3311, 33928, 46912, 7, 27705, 11, 16, 13, 17, 11, 4164, 1173, 28, 4164, 1173, 8, 198, 220, 220, 220, 374, 20402, 7, 81, 6759, 11, 1169, 5329, 28, 16, 8, 198, 437, 198, 198, 2, 16213, 325, 1105, 2168, 422, 8646, 284, 20343, 2173, 220, 198, 2, 357, 3152, 7885, 18663, 8, 198, 8818, 18335, 7, 4164, 1173, 8, 198, 220, 220, 220, 285, 796, 1100, 25404, 76, 7203, 1214, 1754, 13, 14116, 4943, 198, 220, 220, 220, 329, 374, 28, 16, 25, 1065, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 28, 76, 58, 16, 25, 9031, 81, 11, 17, 81, 12, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 256, 83, 11, 581, 796, 2488, 1326, 5015, 2435, 1257, 62, 81, 20402, 7, 87, 11, 4164, 1173, 8, 642, 198, 220, 220, 220, 220, 220, 220, 220, 256, 796, 14288, 7, 926, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1303, 19430, 3084, 286, 2482, 198, 220, 220, 220, 220, 220, 220, 220, 1280, 7203, 26968, 4102, 62, 81, 20402, 62, 73, 43640, 62, 3, 4164, 1173, 13, 14116, 2430, 64, 4943, 466, 277, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 69, 553, 3, 81, 59, 83, 3, 83, 59, 83, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 329, 479, 287, 14631, 21095, 2430, 35, 2767, 2430, 43, 2430, 43, 9806, 2430, 3525, 49, 2430, 43, 2390, 2430, 15751, 8973, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 69, 11, 17971, 7, 411, 58, 74, 12962, 59, 83, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3551, 7, 69, 553, 59, 77, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 886, 198, 220, 220, 220, 886, 198, 437, 198, 2, 2141, 340, 351, 3509, 290, 304, 36616, 485, 272, 19444, 198, 26968, 4102, 7203, 12496, 565, 485, 272, 4943, 198, 26968, 4102, 7203, 9806, 4943, 198 ]
2.045045
555
""" dt = DotTheta( (x,y) -> dot(x,y) / length(x) ) This parametric type allows to define a new dot product from the one saved in `dt::dot`. More precisely: dt(u1, u2, p1::T, p2::T, theta::T) where {T <: Real} computes, the weigthed dot product ``\\langle (u_1,p_1), (u_2,p_2)\\rangle_\\theta = \\theta \\Re \\langle u_1,u_2\\rangle +(1-\\theta)p_1p_2`` where ``u_i\\in\\mathbb R^N``. The ``\\Re`` factor is put to ensure a real valued result despite possible complex valued arguments. normtheta(u, p::T, theta::T) Compute, the norm associated to weighted dot product ``\\langle (u_1,p_1), (u_2,p_2)\\rangle_\\theta``. !!! info "Info" This is used in the pseudo-arclength constraint with the dot product ``\\frac{1}{N} \\langle u_1,u_2\\rangle,\\quad u_i\\in\\mathbb R^N`` """ struct DotTheta{Tdot} dot::Tdot # defaults to (x,y) -> dot(x,y) / length(x) end DotTheta() = DotTheta( (x, y) -> dot(x, y) / length(x) ) # Implementation of the dot product associated to DotTheta # we restrict the type of the parameters because for complex problems, we still want the parameter to be real (dt::DotTheta)(u1, u2, p1::T, p2::T, θ::T) where {T <: Real} = real(dt.dot(u1, u2) * θ + p1 * p2 * (one(T) - θ)) # Implementation of the norm associated to DotTheta # we restrict the type of the parameters because for complex problems, we still want the parameter to be real (dt::DotTheta)(u, p::T, θ::T) where T = sqrt(dt(u, u, p, p, θ)) (dt::DotTheta)(a::BorderedArray{vec, T}, b::BorderedArray{vec, T}, θ::T) where {vec, T} = dt(a.u, b.u, a.p, b.p, θ) (dt::DotTheta)(a::BorderedArray{vec, T}, θ::T) where {vec, T} = dt(a.u, a.p, θ) #################################################################################################### # equation of the arc length constraint arcLengthEq(dt::DotTheta, u, p, du, dp, θ, ds) = dt(u, du, p, dp, θ) - ds #################################################################################################### abstract type AbstractTangentPredictor end abstract type AbstractSecantPredictor <: AbstractTangentPredictor end # wrapper to use iterators and state getPredictor!(state::AbstractContinuationState, iter::AbstractContinuationIterable, nrm = false) = getPredictor!(state.z_pred, state.z_old, state.tau, state.ds, iter.tangentAlgo, nrm) getTangent!(state::AbstractContinuationState, it::AbstractContinuationIterable, verbosity) = getTangent!(state.tau, state.z_new, state.z_old, it, state.ds, θ, it.tangenAlgo::NaturalPred, it.verbosity) # reset the predictor emptypredictor!(::Union{Nothing, AbstractTangentPredictor}) = nothing # clamp p value clampPred(p::Number, it::AbstractContinuationIterable) = clamp(p, it.contParams.pMin, it.contParams.pMax) # this function only mutates z_pred # the nrm argument allows to just increment z_pred.p by ds function getPredictor!(z_pred::M, z_old::M, tau::M, ds, algo::Talgo, nrm = false) where {T, vectype, M <: BorderedArray{vectype, T}, Talgo <: AbstractTangentPredictor} # we perform z_pred = z_old + ds * tau copyto!(z_pred, z_old) # z_pred .= z_old nrm ? axpy!(ds / tau.p, tau, z_pred) : axpy!(ds, tau, z_pred) end # generic corrector based on Bordered formulation function corrector(it, z_old::M, τ::M, z_pred::M, ds, θ, algo::Talgo, linearalgo = MatrixFreeBLS(); normC = norm, callback = cbDefault, kwargs...) where {T, vectype, M <: BorderedArray{vectype, T}, Talgo <: AbstractTangentPredictor} if z_pred.p <= it.contParams.pMin || z_pred.p >= it.contParams.pMax z_pred.p = clampPred(z_pred.p, it) return corrector(it, z_old, τ, z_pred, ds, θ, NaturalPred(), linearalgo; normC = normC, callback = callback, kwargs...) end return newtonPALC(it, z_old, τ, z_pred, ds, θ; linearbdalgo = linearalgo, normN = normC, callback = callback, kwargs...) end #################################################################################################### """ Natural predictor / corrector """ struct NaturalPred <: AbstractTangentPredictor end function getPredictor!(z_pred::M, z_old::M, τ::M, ds, algo::NaturalPred, nrm = false) where {T, vectype, M <: BorderedArray{vectype, T}} # we do z_pred .= z_old copyto!(z_pred, z_old) # z_pred .= z_old z_pred.p += ds end # corrector based on natural formulation function corrector(it, z_old::M, τ::M, z_pred::M, ds, θ, algo::NaturalPred, linearalgo = MatrixFreeBLS(); normC = norm, callback = cbDefault, kwargs...) where {T, vectype, M <: BorderedArray{vectype, T}} res = newton(it.F, it.J, z_pred.u, setParam(it, clampPred(z_pred.p, it)), it.contParams.newtonOptions; normN = normC, callback = callback, kwargs...) return BorderedArray(res[1], z_pred.p), res[2:end]... end function getTangent!(τ::M, z_new::M, z_old::M, it::AbstractContinuationIterable, ds, θ, algo::NaturalPred, verbosity) where {T, vectype, M <: BorderedArray{vectype, T}} (verbosity > 0) && println("--> predictor = ", algo) # we do nothing here, the predictor will just copy z_old into z_pred end #################################################################################################### """ Secant tangent predictor """ struct SecantPred <: AbstractSecantPredictor end # tangent computation using Secant predictor # tau is the tangent prediction function getTangent!(τ::M, z_new::M, z_old::M, it::AbstractContinuationIterable, ds, θ, algo::SecantPred, verbosity) where {T, vectype, M <: BorderedArray{vectype, T}} (verbosity > 0) && println("--> predictor = ", algo) # secant predictor: tau = z_new - z_old; tau *= sign(ds) / normtheta(tau) copyto!(τ, z_new) minus!(τ, z_old) α = algo isa SecantPred ? sign(ds) / it.dottheta(τ, θ) : sign(ds) / abs(τ.p) rmul!(τ, α) end #################################################################################################### """ Bordered Tangent predictor """ struct BorderedPred <: AbstractTangentPredictor end # tangent computation using Bordered system # tau is the tangent prediction function getTangent!(τ::M, z_new::M, z_old::M, it::AbstractContinuationIterable, ds, θ, algo::BorderedPred, verbosity) where {T, vectype, M <: BorderedArray{vectype, T}} (verbosity > 0) && println("--> predictor = Bordered") # tangent predictor ϵ = it.contParams.finDiffEps # dFdl = (F(z_new.u, z_new.p + ϵ) - F(z_new.u, z_new.p)) / ϵ dFdl = it.F(z_new.u, setParam(it, z_new.p + ϵ)) minus!(dFdl, it.F(z_new.u, setParam(it, z_new.p))) rmul!(dFdl, 1/ϵ) # tau = getTangent(J(z_new.u, z_new.p), dFdl, tau_old, theta, contparams.newtonOptions.linsolve) tau_normed = copy(τ)#copyto!(similar(tau), tau) #copy(tau_old) rmul!(tau_normed, θ / length(τ.u), 1 - θ) # extract tangent as solution of bordered linear system, using zero(z_new.u) tauu, taup, flag, itl = it.linearAlgo( it.J(z_new.u, setParam(it, z_new.p)), dFdl, tau_normed, 0*z_new.u, T(1), θ) # the new tangent vector must preserve the direction along the curve α = T(1) / it.dottheta(tauu, τ.u, taup, τ.p, θ) # tau_new = α * tau copyto!(τ.u, tauu) τ.p = taup rmul!(τ, α) end #################################################################################################### """ Multiple Tangent predictor $(TYPEDFIELDS) # Constructor(s) MultiplePred(algo, x0, α, n) MultiplePred(x0, α, n) - `α` damping in Newton iterations - `n` number of predictors - `x0` example of vector solution to be stored """ @with_kw mutable struct MultiplePred{T <: Real, Tvec, Talgo} <: AbstractTangentPredictor "Tangent algorithm used" tangentalgo::Talgo "Save the current tangent" τ::Tvec "Damping factor" α::T "Number of predictors" nb::Int64 "Index of the largest converged predictor" currentind::Int64 = 0 "Index for lookup in residual history" pmimax::Int64 = 1 "Maximum index for lookup in residual history" imax::Int64 = 4 "Factor to increase ds upon successful step" dsfact::T = 1.5 end MultiplePred(algo::AbstractTangentPredictor, x0, α::T, nb) where T = MultiplePred(tangentalgo= algo, τ = BorderedArray(x0, T(0)), α = α, nb = nb) MultiplePred(x0, α, nb) = MultiplePred(SecantPred(), x0, α, nb) emptypredictor!(mpd::MultiplePred) = (mpd.currentind = 1; mpd.pmimax = 1) # callback for newton function (mpred::MultiplePred)(x, f, J, res, iteration, itlinear, options; kwargs...) resHist = get(kwargs, :resHist, nothing) if mpred.currentind > 1 return iteration - mpred.pmimax > 0 ? resHist[end] <= mpred.α * resHist[end-mpred.pmimax] : true end return true end function getTangent!(τ::M, z_new::M, z_old::M, it::AbstractContinuationIterable, ds, θ, algo::MultiplePred{T, M, Talgo}, verbosity) where {T, vectype, M <: BorderedArray{vectype, T}, Talgo} # compute tangent and store it (verbosity > 0) && print("--> predictor = MultiplePred\n--") getTangent!(τ, z_new, z_old, it, ds, θ, algo.tangentalgo, verbosity) copyto!(algo.τ, τ) end function getPredictor!(z_pred::M, z_old::M, τ::M, ds, algo::MultiplePred, nrm = false) where {T, vectype, M <: BorderedArray{vectype, T}} # we do nothing! # emptypredictor!(algo) return nothing end function corrector(it, z_old::M, tau::M, z_pred::M, ds, θ, algo::MultiplePred, linearalgo = MatrixFreeBLS(); normC = norm, callback = cbDefault, kwargs...) where {T, vectype, M <: BorderedArray{vectype, T}} # we combine the callbacks for the newton iterations cb = (x, f, J, res, iteration, itlinear, options; k...) -> callback(x, f, J, res, iteration, itlinear, options; k...) & algo(x, f, J, res, iteration, itlinear, options; k...) # note that z_pred already contains ds * τ, hence ii=0 corresponds to this case for ii in algo.nb:-1:1 # printstyled(color=:magenta, "--> ii = $ii\n") # record the current index algo.currentind = ii zpred = _copy(z_pred) axpy!(ii * ds, algo.τ, zpred) # we restore the original callback if it reaches the usual case ii == 0 zold, res, flag, itnewton, itlinear = corrector(it, z_old, tau, zpred, ds, θ, algo.tangentalgo, linearalgo; normC = normC, callback = cb, kwargs...) if flag || ii == 1 # for i==1, we return the result anyway return zold, res, flag, itnewton, itlinear end end return zold, res, flag, itnewton, itlinear end function stepSizeControl(ds, θ, contparams::ContinuationPar, converged::Bool, it_newton_number::Int, tau::M, mpd::MultiplePred, verbosity) where {T, vectype, M<:BorderedArray{vectype, T}} if converged == false dsnew = ds if abs(ds) < (1 + mpd.nb) * contparams.dsmin if mpd.pmimax < mpd.imax @error "--> Increase pmimax" mpd.pmimax += 1 else (verbosity > 0) && printstyled("*"^80*"\nFailure to converge with given tolerances\n"*"*"^80, color=:red) # we stop the continuation return ds, θ, true end else @error "--> Decrease ds" dsnew = ds / (1 + mpd.nb) (verbosity > 0) && printstyled("Halving continuation step, ds = $(dsnew)\n", color=:red) end else # the newton correction has converged dsnew = ds if mpd.currentind == mpd.nb && abs(ds) * mpd.dsfact <= contparams.dsmax (verbosity > 0) && @show dsnew # println("--> Increase ds") dsnew = ds * mpd.dsfact end end # control step to stay between bounds dsnew = clampDs(dsnew, contparams) return dsnew, θ, false end #################################################################################################### """ Polynomial Tangent predictor $(TYPEDFIELDS) # Constructor(s) PolynomialPred(algo, n, k, v0) PolynomialPred(n, k, v0) - `n` order of the polynomial - `k` length of the last solutions vector used for the polynomial fit - `v0` example of solution to be stored. It is only used to get the `eltype` of the tangent!! """ mutable struct PolynomialPred{T <: Real, Tvec, Talgo} <: AbstractTangentPredictor "Order of the polynomial" n::Int64 "Length of the last solutions vector used for the polynomial fit" k::Int64 "Matrix for the interpolation" A::Matrix{T} "Algo for tangent when polynomial predictor is not possible" tangentalgo::Talgo "Vector of solutions" solutions::CircularBuffer{Tvec} "Vector of parameters" parameters::CircularBuffer{T} "Vector of arclengths" arclengths::CircularBuffer{T} "Coefficients for the polynomials for the solution" coeffsSol::Vector{Tvec} "Coefficients for the polynomials for the parameter" coeffsPar::Vector{T} "Update the predictor ?" update::Bool end PolynomialPred(algo, n, k, v0) = (@assert n<k; ;PolynomialPred(n,k,zeros(eltype(v0),k,n+1),algo, CircularBuffer{typeof(v0)}(k),CircularBuffer{eltype(v0)}(k), CircularBuffer{eltype(v0)}(k), Vector{typeof(v0)}(undef, n+1), Vector{eltype(v0)}(undef, n+1),true)) PolynomialPred(n, k, v0) = PolynomialPred(SecantPred(),n,k,v0) isready(ppd::PolynomialPred) = length(ppd.solutions) >= ppd.k function emptypredictor!(ppd::PolynomialPred) empty!(ppd.solutions); empty!(ppd.parameters); empty!(ppd.arclengths); end function getStats(polypred::PolynomialPred) Sbar = sum(polypred.arclengths) / polypred.n σ = sqrt(sum(x->(x-Sbar)^2, polypred.arclengths ) / (polypred.n)) # return 0,1 return Sbar, σ end function (polypred::PolynomialPred)(ds) sbar, σ = getStats(polypred) s = polypred.arclengths[end] + ds S = [((s-sbar)/σ)^(jj-1) for jj=1:polypred.n+1] p = sum(S .* polypred.coeffsPar) x = sum(S .* polypred.coeffsSol) return x, p end function updatePred!(polypred::PolynomialPred) Sbar, σ = getStats(polypred) Ss = (polypred.arclengths .- Sbar) ./ σ # construction of the Vandermond Matrix polypred.A[:, 1] .= 1 for jj in 1:polypred.n polypred.A[:, jj+1] .= polypred.A[:, jj] .* Ss end # invert linear system for least square fitting B = (polypred.A' * polypred.A) \ polypred.A' mul!(polypred.coeffsSol, B, polypred.solutions) mul!(polypred.coeffsPar, B, polypred.parameters) end function getTangent!(tau::M, z_new::M, z_old::M, it::AbstractContinuationIterable, ds, θ, polypred::PolynomialPred, verbosity) where {T, vectype, M <: BorderedArray{vectype, T}, Talgo} # compute tangent and store it (verbosity > 0) && println("--> predictor = PolynomialPred") if polypred.update # update the list of solutions if length(polypred.arclengths)==0 push!(polypred.arclengths, ds) else push!(polypred.arclengths, polypred.arclengths[end]+ds) end push!(polypred.solutions, z_new.u) push!(polypred.parameters, z_new.p) end if ~isready(polypred) || ~polypred.update return getTangent!(tau, z_new, z_old, it, ds, θ, polypred.tangentalgo, verbosity) else return polypred.update ? updatePred!(polypred) : true end end function getPredictor!(z_pred::M, z_old::M, tau::M, ds, polypred::PolynomialPred, nrm = false) where {T, vectype, M <: BorderedArray{vectype, T}} if ~isready(polypred) return getPredictor!(z_pred, z_old, tau, ds, polypred.tangentalgo, nrm) else x, p = polypred(ds) copyto!(z_pred.u, x) z_pred.p = p return true end end #################################################################################################### function arcLengthScaling(θ, contparams, tau::M, verbosity) where {M <: BorderedArray} # the arclength scaling algorithm is based on Salinger, Andrew G, Nawaf M Bou-Rabee, # Elizabeth A Burroughs, Roger P Pawlowski, Richard B Lehoucq, Louis Romero, and Edward D # Wilkes. “LOCA 1.0 Library of Continuation Algorithms: Theory and Implementation Manual, # ” March 1, 2002. https://doi.org/10.2172/800778. thetanew = θ g = abs(tau.p * θ) (verbosity > 0) && print("Theta changes from $(θ) to ") if (g > contparams.gMax) thetanew = contparams.gGoal / tau.p * sqrt( abs(1.0 - g^2) / abs(1.0 - tau.p^2) ) if (thetanew < contparams.thetaMin) thetanew = contparams.thetaMin; end end (verbosity > 0) && print("$(thetanew)\n") return thetanew end #################################################################################################### function clampDs(dsnew, contparams::ContinuationPar) return sign(dsnew) * clamp(abs(dsnew), contparams.dsmin, contparams.dsmax) end function stepSizeControl(ds, θ, contparams::ContinuationPar, converged::Bool, it_newton_number::Int, tau::M, algo::AbstractTangentPredictor, verbosity) where {T, vectype, M<:BorderedArray{vectype, T}} if converged == false if abs(ds) <= contparams.dsmin (verbosity > 0) && printstyled("*"^80*"\nFailure to converge with given tolerances\n"*"*"^80, color=:red) # we stop the continuation return ds, θ, true end dsnew = sign(ds) * max(abs(ds) / 2, contparams.dsmin); (verbosity > 0) && printstyled("Halving continuation step, ds=$(dsnew)\n", color=:red) else # control to have the same number of Newton iterations Nmax = contparams.newtonOptions.maxIter factor = (Nmax - it_newton_number) / Nmax dsnew = ds * (1 + contparams.a * factor^2) # (verbosity > 0) && @show 1 + contparams.a * factor^2 end # control step to stay between bounds dsnew = clampDs(dsnew, contparams) thetanew = contparams.doArcLengthScaling ? arcLengthScaling(θ, contparams, tau, verbosity) : θ # we do not stop the continuation return dsnew, thetanew, false end #################################################################################################### """ This is the classical Newton-Krylov solver used to solve `F(x, p) = 0` together with the scalar condition `n(x, p) ≡ θ ⋅ <x - x0, τx> + (1-θ) ⋅ (p - p0) * τp - n0 = 0`. This makes a problem of dimension N + 1. Here, we specify `p` as a subfield of `par` with the `paramLens::Lens` # Arguments - `(x, par) -> F(x, par)` where `par` is a set of parameters like `(a=1.0, b=1)` - `(x, par) -> Jh(x, par)` the jacobian Jh = ∂xF """ function newtonPALC(F, Jh, par, paramlens::Lens, z0::BorderedArray{vectype, T}, τ0::BorderedArray{vectype, T}, z_pred::BorderedArray{vectype, T}, ds::T, θ::T, contparams::ContinuationPar{T, S, E}, dottheta::DotTheta; linearbdalgo = BorderingBLS(DefaultLS()), normN = norm, callback = cbDefault, kwargs...) where {T, S, E, vectype} # Extract parameters @unpack tol, maxIter, verbose, α, αmin, linesearch = contparams.newtonOptions @unpack finDiffEps, pMin, pMax = contparams N = (x, p) -> arcLengthEq(dottheta, minus(x, z0.u), p - z0.p, τ0.u, τ0.p, θ, ds) normAC = (resf, resn) -> max(normN(resf), abs(resn)) # Initialise iterations x = _copy(z_pred.u) # copy(z_pred.u) p = z_pred.p x_pred = _copy(x) # copy(x) # Initialise residuals res_f = F(x, set(par, paramlens, p)); res_n = N(x, p) dX = _copy(res_f) # copy(res_f) dp = T(0) up = T(0) # dFdp = (F(x, p + finDiffEps) - res_f) / finDiffEps dFdp = _copy(F(x, set(par, paramlens, p + finDiffEps))) minus!(dFdp, res_f) # dFdp = dFdp - res_f rmul!(dFdp, T(1) / finDiffEps) res = normAC(res_f, res_n) resHist = [res] it = 0 itlineartot = 0 # Displaying results verbose && displayIteration(it, res) line_step = true # invoke callback before algo really starts compute = callback(x, res_f, nothing, res, 0, 0, contparams; p = p, resHist = resHist, fromNewton = false, kwargs...) # Main loop while (res > tol) & (it < maxIter) & line_step & compute # dFdp = (F(x, p + epsi) - F(x, p)) / epsi) copyto!(dFdp, F(x, set(par, paramlens, p + finDiffEps))) minus!(dFdp, res_f); rmul!(dFdp, T(1) / finDiffEps) J = Jh(x, set(par, paramlens, p)) u, up, flag, itlinear = linearbdalgo(J, dFdp, τ0, res_f, res_n, θ) itlineartot += sum(itlinear) if linesearch line_step = false while !line_step & (α > αmin) # x_pred = x - α * u copyto!(x_pred, x); axpy!(-α, u, x_pred) p_pred = p - α * up copyto!(res_f, F(x_pred, set(par, paramlens, p_pred))) res_n = N(x_pred, p_pred) res = normAC(res_f, res_n) if res < resHist[end] if (res < resHist[end] / 2) & (α < 1) α *= 2 end line_step = true copyto!(x, x_pred) p = clamp(p_pred, pMin, pMax) # p = p_pred else α /= 2 end end α = contparams.newtonOptions.α # we put back the initial value else minus!(x, u) # x .= x .- u p = clamp(p - up, pMin, pMax) # p = p - up copyto!(res_f, F(x, set(par, paramlens, p))) res_n = N(x, p); res = normAC(res_f, res_n) end push!(resHist, res) it += 1 verbose && displayIteration(it, res, itlinear) # shall we break the loop? compute = callback(x, res_f, J, res, it, itlinear, contparams; p = p, resHist = resHist, fromNewton = false, kwargs...) end verbose && displayIteration(it, res, 0, true) # display last line of the table flag = (resHist[end] < tol) & callback(x, res_f, nothing, res, it, -1, contparams; p = p, resHist = resHist, fromNewton = false, kwargs...) return BorderedArray(x, p), resHist, flag, it, itlineartot end # conveniency for use in continuation newtonPALC(it::AbstractContinuationIterable, z0::M, τ0::M, z_pred::M, ds::T, θ::T; kwargs...) where {T, vectype, M <: BorderedArray{vectype, T}} = newtonPALC(it.F, it.J, it.par, it.lens, z0, τ0, z_pred, ds, θ, it.contParams, it.dottheta; kwargs...) ####################################################################################################
[ 37811, 198, 197, 28664, 796, 22875, 464, 8326, 7, 357, 87, 11, 88, 8, 4613, 16605, 7, 87, 11, 88, 8, 1220, 4129, 7, 87, 8, 1267, 198, 198, 1212, 5772, 19482, 2099, 3578, 284, 8160, 257, 649, 16605, 1720, 422, 262, 530, 7448, 287, 4600, 28664, 3712, 26518, 44646, 3125, 10582, 25, 628, 197, 28664, 7, 84, 16, 11, 334, 17, 11, 279, 16, 3712, 51, 11, 279, 17, 3712, 51, 11, 262, 8326, 3712, 51, 8, 810, 1391, 51, 1279, 25, 6416, 92, 198, 198, 5589, 1769, 11, 262, 356, 328, 83, 704, 16605, 1720, 7559, 6852, 75, 9248, 357, 84, 62, 16, 11, 79, 62, 16, 828, 357, 84, 62, 17, 11, 79, 62, 17, 8, 6852, 81, 9248, 62, 6852, 1169, 8326, 796, 26867, 1169, 8326, 26867, 3041, 26867, 75, 9248, 334, 62, 16, 11, 84, 62, 17, 6852, 81, 9248, 220, 1343, 7, 16, 12, 6852, 1169, 8326, 8, 79, 62, 16, 79, 62, 17, 15506, 810, 7559, 84, 62, 72, 6852, 259, 6852, 11018, 11848, 371, 61, 45, 15506, 13, 383, 7559, 6852, 3041, 15506, 5766, 318, 1234, 284, 4155, 257, 1103, 17560, 1255, 3805, 1744, 3716, 17560, 7159, 13, 628, 197, 27237, 1169, 8326, 7, 84, 11, 279, 3712, 51, 11, 262, 8326, 3712, 51, 8, 198, 198, 7293, 1133, 11, 262, 2593, 3917, 284, 26356, 16605, 1720, 7559, 6852, 75, 9248, 357, 84, 62, 16, 11, 79, 62, 16, 828, 357, 84, 62, 17, 11, 79, 62, 17, 8, 6852, 81, 9248, 62, 6852, 1169, 8326, 15506, 13, 198, 198, 10185, 7508, 366, 12360, 1, 198, 220, 220, 220, 770, 318, 973, 287, 262, 24543, 12, 283, 565, 3286, 32315, 351, 262, 16605, 1720, 7559, 6852, 31944, 90, 16, 18477, 45, 92, 26867, 75, 9248, 334, 62, 16, 11, 84, 62, 17, 6852, 81, 9248, 11, 6852, 47003, 334, 62, 72, 6852, 259, 6852, 11018, 11848, 371, 61, 45, 15506, 198, 37811, 198, 7249, 22875, 464, 8326, 90, 51, 26518, 92, 198, 197, 26518, 3712, 51, 26518, 197, 197, 2, 26235, 284, 357, 87, 11, 88, 8, 4613, 16605, 7, 87, 11, 88, 8, 1220, 4129, 7, 87, 8, 198, 437, 198, 198, 35, 313, 464, 8326, 3419, 796, 22875, 464, 8326, 7, 357, 87, 11, 331, 8, 4613, 16605, 7, 87, 11, 331, 8, 1220, 4129, 7, 87, 8, 1267, 198, 198, 2, 46333, 286, 262, 16605, 1720, 3917, 284, 22875, 464, 8326, 198, 2, 356, 4239, 262, 2099, 286, 262, 10007, 780, 329, 3716, 2761, 11, 356, 991, 765, 262, 11507, 284, 307, 1103, 198, 7, 28664, 3712, 35, 313, 464, 8326, 5769, 84, 16, 11, 334, 17, 11, 279, 16, 3712, 51, 11, 279, 17, 3712, 51, 11, 7377, 116, 3712, 51, 8, 810, 1391, 51, 1279, 25, 6416, 92, 796, 1103, 7, 28664, 13, 26518, 7, 84, 16, 11, 334, 17, 8, 1635, 7377, 116, 1343, 279, 16, 1635, 279, 17, 1635, 357, 505, 7, 51, 8, 532, 7377, 116, 4008, 198, 198, 2, 46333, 286, 262, 2593, 3917, 284, 22875, 464, 8326, 198, 2, 356, 4239, 262, 2099, 286, 262, 10007, 780, 329, 3716, 2761, 11, 356, 991, 765, 262, 11507, 284, 307, 1103, 198, 7, 28664, 3712, 35, 313, 464, 8326, 5769, 84, 11, 279, 3712, 51, 11, 7377, 116, 3712, 51, 8, 810, 309, 796, 19862, 17034, 7, 28664, 7, 84, 11, 334, 11, 279, 11, 279, 11, 7377, 116, 4008, 198, 198, 7, 28664, 3712, 35, 313, 464, 8326, 5769, 64, 3712, 33, 24071, 19182, 90, 35138, 11, 309, 5512, 275, 3712, 33, 24071, 19182, 90, 35138, 11, 309, 5512, 7377, 116, 3712, 51, 8, 810, 1391, 35138, 11, 309, 92, 796, 288, 83, 7, 64, 13, 84, 11, 275, 13, 84, 11, 257, 13, 79, 11, 275, 13, 79, 11, 7377, 116, 8, 198, 7, 28664, 3712, 35, 313, 464, 8326, 5769, 64, 3712, 33, 24071, 19182, 90, 35138, 11, 309, 5512, 7377, 116, 3712, 51, 8, 810, 1391, 35138, 11, 309, 92, 796, 288, 83, 7, 64, 13, 84, 11, 257, 13, 79, 11, 7377, 116, 8, 198, 29113, 29113, 29113, 4242, 198, 2, 16022, 286, 262, 10389, 4129, 32315, 198, 5605, 24539, 36, 80, 7, 28664, 3712, 35, 313, 464, 8326, 11, 334, 11, 279, 11, 7043, 11, 288, 79, 11, 7377, 116, 11, 288, 82, 8, 796, 288, 83, 7, 84, 11, 7043, 11, 279, 11, 288, 79, 11, 7377, 116, 8, 532, 288, 82, 198, 29113, 29113, 29113, 4242, 198, 397, 8709, 2099, 27741, 43909, 298, 47, 17407, 273, 886, 198, 397, 8709, 2099, 27741, 6558, 415, 47, 17407, 273, 1279, 25, 27741, 43909, 298, 47, 17407, 273, 886, 198, 198, 2, 29908, 284, 779, 11629, 2024, 290, 1181, 198, 1136, 47, 17407, 273, 0, 7, 5219, 3712, 23839, 17875, 2288, 9012, 11, 11629, 3712, 23839, 17875, 2288, 29993, 540, 11, 299, 26224, 796, 3991, 8, 796, 651, 47, 17407, 273, 0, 7, 5219, 13, 89, 62, 28764, 11, 1181, 13, 89, 62, 727, 11, 1181, 13, 83, 559, 11, 1181, 13, 9310, 11, 11629, 13, 83, 648, 298, 2348, 2188, 11, 299, 26224, 8, 198, 1136, 43909, 298, 0, 7, 5219, 3712, 23839, 17875, 2288, 9012, 11, 340, 3712, 23839, 17875, 2288, 29993, 540, 11, 15942, 16579, 8, 796, 651, 43909, 298, 0, 7, 5219, 13, 83, 559, 11, 1181, 13, 89, 62, 3605, 11, 1181, 13, 89, 62, 727, 11, 340, 11, 1181, 13, 9310, 11, 7377, 116, 11, 340, 13, 83, 648, 268, 2348, 2188, 3712, 35364, 39156, 11, 340, 13, 19011, 16579, 8, 198, 198, 2, 13259, 262, 41568, 198, 1791, 4464, 17407, 273, 0, 7, 3712, 38176, 90, 18465, 11, 27741, 43909, 298, 47, 17407, 273, 30072, 796, 2147, 198, 198, 2, 29405, 279, 1988, 198, 565, 696, 39156, 7, 79, 3712, 15057, 11, 340, 3712, 23839, 17875, 2288, 29993, 540, 8, 796, 29405, 7, 79, 11, 340, 13, 3642, 10044, 4105, 13, 79, 9452, 11, 340, 13, 3642, 10044, 4105, 13, 79, 11518, 8, 198, 198, 2, 428, 2163, 691, 4517, 689, 1976, 62, 28764, 198, 2, 262, 299, 26224, 4578, 3578, 284, 655, 18703, 1976, 62, 28764, 13, 79, 416, 288, 82, 198, 8818, 651, 47, 17407, 273, 0, 7, 89, 62, 28764, 3712, 44, 11, 1976, 62, 727, 3712, 44, 11, 256, 559, 3712, 44, 11, 288, 82, 11, 435, 2188, 3712, 31466, 2188, 11, 299, 26224, 796, 3991, 8, 810, 1391, 51, 11, 1569, 310, 2981, 11, 337, 1279, 25, 347, 24071, 19182, 90, 303, 310, 2981, 11, 309, 5512, 7193, 2188, 1279, 25, 27741, 43909, 298, 47, 17407, 273, 92, 198, 197, 2, 356, 1620, 1976, 62, 28764, 796, 1976, 62, 727, 1343, 288, 82, 1635, 256, 559, 198, 197, 30073, 1462, 0, 7, 89, 62, 28764, 11, 1976, 62, 727, 8, 1303, 1976, 62, 28764, 764, 28, 1976, 62, 727, 198, 197, 77, 26224, 5633, 7877, 9078, 0, 7, 9310, 1220, 256, 559, 13, 79, 11, 256, 559, 11, 1976, 62, 28764, 8, 1058, 7877, 9078, 0, 7, 9310, 11, 256, 559, 11, 1976, 62, 28764, 8, 198, 437, 198, 198, 2, 14276, 3376, 273, 1912, 319, 347, 24071, 31760, 198, 8818, 3376, 273, 7, 270, 11, 1976, 62, 727, 3712, 44, 11, 46651, 3712, 44, 11, 1976, 62, 28764, 3712, 44, 11, 288, 82, 11, 7377, 116, 11, 198, 197, 197, 197, 282, 2188, 3712, 31466, 2188, 11, 14174, 282, 2188, 796, 24936, 11146, 33, 6561, 9783, 198, 197, 197, 197, 27237, 34, 796, 2593, 11, 23838, 796, 269, 65, 19463, 11, 479, 86, 22046, 23029, 810, 198, 197, 197, 197, 90, 51, 11, 1569, 310, 2981, 11, 337, 1279, 25, 347, 24071, 19182, 90, 303, 310, 2981, 11, 309, 5512, 7193, 2188, 1279, 25, 27741, 43909, 298, 47, 17407, 273, 92, 198, 197, 361, 1976, 62, 28764, 13, 79, 19841, 340, 13, 3642, 10044, 4105, 13, 79, 9452, 8614, 1976, 62, 28764, 13, 79, 18189, 340, 13, 3642, 10044, 4105, 13, 79, 11518, 198, 197, 197, 89, 62, 28764, 13, 79, 796, 29405, 39156, 7, 89, 62, 28764, 13, 79, 11, 340, 8, 198, 197, 197, 7783, 3376, 273, 7, 270, 11, 1976, 62, 727, 11, 46651, 11, 1976, 62, 28764, 11, 288, 82, 11, 7377, 116, 11, 12068, 39156, 22784, 14174, 282, 2188, 26, 198, 197, 197, 197, 197, 197, 197, 27237, 34, 796, 2593, 34, 11, 23838, 796, 23838, 11, 479, 86, 22046, 23029, 198, 197, 437, 198, 197, 7783, 649, 1122, 47, 1847, 34, 7, 270, 11, 1976, 62, 727, 11, 46651, 11, 1976, 62, 28764, 11, 288, 82, 11, 7377, 116, 26, 14174, 17457, 282, 2188, 796, 14174, 282, 2188, 11, 2593, 45, 796, 2593, 34, 11, 23838, 796, 23838, 11, 479, 86, 22046, 23029, 198, 437, 198, 29113, 29113, 29113, 4242, 198, 37811, 198, 197, 35364, 41568, 1220, 3376, 273, 198, 37811, 198, 7249, 12068, 39156, 1279, 25, 27741, 43909, 298, 47, 17407, 273, 886, 198, 198, 8818, 651, 47, 17407, 273, 0, 7, 89, 62, 28764, 3712, 44, 11, 1976, 62, 727, 3712, 44, 11, 46651, 3712, 44, 11, 288, 82, 11, 435, 2188, 3712, 35364, 39156, 11, 299, 26224, 796, 3991, 8, 810, 1391, 51, 11, 1569, 310, 2981, 11, 337, 1279, 25, 347, 24071, 19182, 90, 303, 310, 2981, 11, 309, 11709, 198, 197, 2, 356, 466, 1976, 62, 28764, 764, 28, 1976, 62, 727, 198, 197, 30073, 1462, 0, 7, 89, 62, 28764, 11, 1976, 62, 727, 8, 1303, 1976, 62, 28764, 764, 28, 1976, 62, 727, 198, 197, 89, 62, 28764, 13, 79, 15853, 288, 82, 198, 437, 198, 198, 2, 3376, 273, 1912, 319, 3288, 31760, 198, 8818, 3376, 273, 7, 270, 11, 1976, 62, 727, 3712, 44, 11, 46651, 3712, 44, 11, 1976, 62, 28764, 3712, 44, 11, 288, 82, 11, 7377, 116, 11, 198, 197, 197, 197, 282, 2188, 3712, 35364, 39156, 11, 14174, 282, 2188, 796, 24936, 11146, 33, 6561, 9783, 198, 197, 197, 197, 27237, 34, 796, 2593, 11, 23838, 796, 269, 65, 19463, 11, 479, 86, 22046, 23029, 810, 198, 197, 197, 197, 90, 51, 11, 1569, 310, 2981, 11, 337, 1279, 25, 347, 24071, 19182, 90, 303, 310, 2981, 11, 309, 11709, 198, 197, 411, 796, 649, 1122, 7, 270, 13, 37, 11, 340, 13, 41, 11, 1976, 62, 28764, 13, 84, 11, 900, 22973, 7, 270, 11, 29405, 39156, 7, 89, 62, 28764, 13, 79, 11, 340, 36911, 340, 13, 3642, 10044, 4105, 13, 3605, 1122, 29046, 26, 2593, 45, 796, 2593, 34, 11, 23838, 796, 23838, 11, 479, 86, 22046, 23029, 198, 197, 7783, 347, 24071, 19182, 7, 411, 58, 16, 4357, 1976, 62, 28764, 13, 79, 828, 581, 58, 17, 25, 437, 60, 986, 198, 437, 198, 198, 8818, 651, 43909, 298, 0, 7, 32830, 3712, 44, 11, 1976, 62, 3605, 3712, 44, 11, 1976, 62, 727, 3712, 44, 11, 340, 3712, 23839, 17875, 2288, 29993, 540, 11, 288, 82, 11, 7377, 116, 11, 435, 2188, 3712, 35364, 39156, 11, 15942, 16579, 8, 810, 1391, 51, 11, 1569, 310, 2981, 11, 337, 1279, 25, 347, 24071, 19182, 90, 303, 310, 2981, 11, 309, 11709, 198, 197, 7, 19011, 16579, 1875, 657, 8, 11405, 44872, 7203, 46904, 41568, 796, 33172, 435, 2188, 8, 198, 197, 2, 356, 466, 2147, 994, 11, 262, 41568, 481, 655, 4866, 1976, 62, 727, 656, 1976, 62, 28764, 198, 437, 198, 29113, 29113, 29113, 4242, 198, 37811, 198, 197, 6558, 415, 13875, 298, 41568, 198, 37811, 198, 7249, 1882, 415, 39156, 1279, 25, 27741, 6558, 415, 47, 17407, 273, 886, 198, 198, 2, 13875, 298, 29964, 1262, 1882, 415, 41568, 198, 2, 256, 559, 318, 262, 13875, 298, 17724, 198, 8818, 651, 43909, 298, 0, 7, 32830, 3712, 44, 11, 1976, 62, 3605, 3712, 44, 11, 1976, 62, 727, 3712, 44, 11, 340, 3712, 23839, 17875, 2288, 29993, 540, 11, 288, 82, 11, 7377, 116, 11, 435, 2188, 3712, 6558, 415, 39156, 11, 15942, 16579, 8, 810, 1391, 51, 11, 1569, 310, 2981, 11, 337, 1279, 25, 347, 24071, 19182, 90, 303, 310, 2981, 11, 309, 11709, 198, 197, 7, 19011, 16579, 1875, 657, 8, 11405, 44872, 7203, 46904, 41568, 796, 33172, 435, 2188, 8, 198, 197, 2, 792, 415, 41568, 25, 256, 559, 796, 1976, 62, 3605, 532, 1976, 62, 727, 26, 256, 559, 1635, 28, 1051, 7, 9310, 8, 1220, 2593, 1169, 8326, 7, 83, 559, 8, 198, 197, 30073, 1462, 0, 7, 32830, 11, 1976, 62, 3605, 8, 198, 197, 40191, 0, 7, 32830, 11, 1976, 62, 727, 8, 198, 197, 17394, 796, 435, 2188, 318, 64, 1882, 415, 39156, 5633, 1051, 7, 9310, 8, 1220, 340, 13, 26518, 1169, 8326, 7, 32830, 11, 7377, 116, 8, 1058, 1051, 7, 9310, 8, 1220, 2352, 7, 32830, 13, 79, 8, 198, 197, 26224, 377, 0, 7, 32830, 11, 26367, 8, 198, 437, 198, 29113, 29113, 29113, 4242, 198, 37811, 198, 197, 33, 24071, 18816, 298, 41568, 198, 37811, 198, 7249, 347, 24071, 39156, 1279, 25, 27741, 43909, 298, 47, 17407, 273, 886, 198, 198, 2, 13875, 298, 29964, 1262, 347, 24071, 1080, 198, 2, 256, 559, 318, 262, 13875, 298, 17724, 198, 8818, 651, 43909, 298, 0, 7, 32830, 3712, 44, 11, 1976, 62, 3605, 3712, 44, 11, 1976, 62, 727, 3712, 44, 11, 340, 3712, 23839, 17875, 2288, 29993, 540, 11, 288, 82, 11, 7377, 116, 11, 435, 2188, 3712, 33, 24071, 39156, 11, 15942, 16579, 8, 810, 1391, 51, 11, 1569, 310, 2981, 11, 337, 1279, 25, 347, 24071, 19182, 90, 303, 310, 2981, 11, 309, 11709, 198, 197, 7, 19011, 16579, 1875, 657, 8, 11405, 44872, 7203, 46904, 41568, 796, 347, 24071, 4943, 198, 197, 2, 13875, 298, 41568, 198, 197, 139, 113, 796, 340, 13, 3642, 10044, 4105, 13, 15643, 28813, 36, 862, 198, 197, 2, 288, 37, 25404, 796, 357, 37, 7, 89, 62, 3605, 13, 84, 11, 1976, 62, 3605, 13, 79, 1343, 18074, 113, 8, 532, 376, 7, 89, 62, 3605, 13, 84, 11, 1976, 62, 3605, 13, 79, 4008, 1220, 18074, 113, 198, 197, 67, 37, 25404, 796, 340, 13, 37, 7, 89, 62, 3605, 13, 84, 11, 900, 22973, 7, 270, 11, 1976, 62, 3605, 13, 79, 1343, 18074, 113, 4008, 198, 197, 40191, 0, 7, 67, 37, 25404, 11, 340, 13, 37, 7, 89, 62, 3605, 13, 84, 11, 900, 22973, 7, 270, 11, 1976, 62, 3605, 13, 79, 22305, 198, 197, 26224, 377, 0, 7, 67, 37, 25404, 11, 352, 14, 139, 113, 8, 628, 197, 2, 256, 559, 796, 651, 43909, 298, 7, 41, 7, 89, 62, 3605, 13, 84, 11, 1976, 62, 3605, 13, 79, 828, 288, 37, 25404, 11, 256, 559, 62, 727, 11, 262, 8326, 11, 542, 37266, 13, 3605, 1122, 29046, 13, 21602, 6442, 8, 198, 197, 83, 559, 62, 27237, 276, 796, 4866, 7, 32830, 8, 2, 30073, 1462, 0, 7, 38610, 7, 83, 559, 828, 256, 559, 8, 1303, 30073, 7, 83, 559, 62, 727, 8, 198, 197, 26224, 377, 0, 7, 83, 559, 62, 27237, 276, 11, 7377, 116, 1220, 4129, 7, 32830, 13, 84, 828, 352, 532, 7377, 116, 8, 198, 197, 2, 7925, 13875, 298, 355, 4610, 286, 275, 24071, 14174, 1080, 11, 1262, 6632, 7, 89, 62, 3605, 13, 84, 8, 198, 197, 83, 559, 84, 11, 256, 559, 79, 11, 6056, 11, 340, 75, 796, 340, 13, 29127, 2348, 2188, 7, 340, 13, 41, 7, 89, 62, 3605, 13, 84, 11, 900, 22973, 7, 270, 11, 1976, 62, 3605, 13, 79, 36911, 288, 37, 25404, 11, 198, 197, 197, 197, 83, 559, 62, 27237, 276, 11, 657, 9, 89, 62, 3605, 13, 84, 11, 309, 7, 16, 828, 7377, 116, 8, 628, 197, 2, 262, 649, 13875, 298, 15879, 1276, 12201, 262, 4571, 1863, 262, 12133, 198, 197, 17394, 796, 309, 7, 16, 8, 1220, 340, 13, 26518, 1169, 8326, 7, 83, 559, 84, 11, 46651, 13, 84, 11, 256, 559, 79, 11, 46651, 13, 79, 11, 7377, 116, 8, 628, 197, 2, 256, 559, 62, 3605, 796, 26367, 1635, 256, 559, 198, 197, 30073, 1462, 0, 7, 32830, 13, 84, 11, 256, 559, 84, 8, 198, 197, 32830, 13, 79, 796, 256, 559, 79, 198, 197, 26224, 377, 0, 7, 32830, 11, 26367, 8, 198, 437, 198, 29113, 29113, 29113, 4242, 198, 37811, 198, 197, 31217, 18816, 298, 41568, 198, 3, 7, 9936, 47, 1961, 11674, 3698, 5258, 8, 198, 198, 2, 28407, 273, 7, 82, 8, 628, 197, 31217, 39156, 7, 282, 2188, 11, 2124, 15, 11, 26367, 11, 299, 8, 628, 197, 31217, 39156, 7, 87, 15, 11, 26367, 11, 299, 8, 198, 198, 12, 4600, 17394, 63, 21151, 278, 287, 17321, 34820, 198, 12, 4600, 77, 63, 1271, 286, 4331, 669, 198, 12, 4600, 87, 15, 63, 1672, 286, 15879, 4610, 284, 307, 8574, 198, 37811, 198, 31, 4480, 62, 46265, 4517, 540, 2878, 20401, 39156, 90, 51, 1279, 25, 6416, 11, 309, 35138, 11, 7193, 2188, 92, 1279, 25, 27741, 43909, 298, 47, 17407, 273, 198, 197, 1, 43909, 298, 11862, 973, 1, 198, 197, 83, 648, 2470, 2188, 3712, 31466, 2188, 628, 197, 1, 16928, 262, 1459, 13875, 298, 1, 198, 197, 32830, 3712, 51, 35138, 628, 197, 1, 35, 37843, 5766, 1, 198, 197, 17394, 3712, 51, 628, 197, 1, 15057, 286, 4331, 669, 1, 198, 197, 46803, 3712, 5317, 2414, 628, 197, 1, 15732, 286, 262, 4387, 6718, 2004, 41568, 1, 198, 197, 14421, 521, 3712, 5317, 2414, 796, 657, 628, 197, 1, 15732, 329, 35847, 287, 29598, 2106, 1, 198, 197, 4426, 320, 897, 3712, 5317, 2414, 796, 352, 628, 197, 1, 40541, 6376, 329, 35847, 287, 29598, 2106, 1, 198, 197, 320, 897, 3712, 5317, 2414, 796, 604, 628, 197, 1, 41384, 284, 2620, 288, 82, 2402, 4388, 2239, 1, 198, 197, 9310, 22584, 3712, 51, 796, 352, 13, 20, 198, 437, 198, 31217, 39156, 7, 282, 2188, 3712, 23839, 43909, 298, 47, 17407, 273, 11, 2124, 15, 11, 26367, 3712, 51, 11, 299, 65, 8, 810, 309, 796, 20401, 39156, 7, 83, 648, 2470, 2188, 28, 435, 2188, 11, 46651, 796, 347, 24071, 19182, 7, 87, 15, 11, 309, 7, 15, 36911, 26367, 796, 26367, 11, 299, 65, 796, 299, 65, 8, 198, 31217, 39156, 7, 87, 15, 11, 26367, 11, 299, 65, 8, 796, 20401, 39156, 7, 6558, 415, 39156, 22784, 2124, 15, 11, 26367, 11, 299, 65, 8, 198, 1791, 4464, 17407, 273, 0, 7, 3149, 67, 3712, 31217, 39156, 8, 796, 357, 3149, 67, 13, 14421, 521, 796, 352, 26, 29034, 67, 13, 4426, 320, 897, 796, 352, 8, 198, 198, 2, 23838, 329, 649, 1122, 198, 8818, 357, 3149, 445, 3712, 31217, 39156, 5769, 87, 11, 277, 11, 449, 11, 581, 11, 24415, 11, 340, 29127, 11, 3689, 26, 479, 86, 22046, 23029, 198, 197, 411, 13749, 796, 651, 7, 46265, 22046, 11, 1058, 411, 13749, 11, 2147, 8, 198, 197, 361, 285, 28764, 13, 14421, 521, 1875, 352, 198, 197, 197, 7783, 24415, 532, 285, 28764, 13, 4426, 320, 897, 1875, 657, 5633, 220, 581, 13749, 58, 437, 60, 19841, 285, 28764, 13, 17394, 1635, 581, 13749, 58, 437, 12, 3149, 445, 13, 4426, 320, 897, 60, 1058, 2081, 198, 197, 437, 198, 197, 7783, 2081, 198, 437, 198, 198, 8818, 651, 43909, 298, 0, 7, 32830, 3712, 44, 11, 1976, 62, 3605, 3712, 44, 11, 1976, 62, 727, 3712, 44, 11, 340, 3712, 23839, 17875, 2288, 29993, 540, 11, 288, 82, 11, 7377, 116, 11, 435, 2188, 3712, 31217, 39156, 90, 51, 11, 337, 11, 7193, 2188, 5512, 15942, 16579, 8, 810, 1391, 51, 11, 1569, 310, 2981, 11, 337, 1279, 25, 347, 24071, 19182, 90, 303, 310, 2981, 11, 309, 5512, 7193, 2188, 92, 198, 197, 2, 24061, 13875, 298, 290, 3650, 340, 198, 197, 7, 19011, 16579, 1875, 657, 8, 11405, 3601, 7203, 46904, 41568, 796, 20401, 39156, 59, 77, 438, 4943, 198, 197, 1136, 43909, 298, 0, 7, 32830, 11, 1976, 62, 3605, 11, 1976, 62, 727, 11, 340, 11, 288, 82, 11, 7377, 116, 11, 435, 2188, 13, 83, 648, 2470, 2188, 11, 15942, 16579, 8, 198, 197, 30073, 1462, 0, 7, 282, 2188, 13, 32830, 11, 46651, 8, 198, 437, 198, 198, 8818, 651, 47, 17407, 273, 0, 7, 89, 62, 28764, 3712, 44, 11, 1976, 62, 727, 3712, 44, 11, 46651, 3712, 44, 11, 288, 82, 11, 435, 2188, 3712, 31217, 39156, 11, 299, 26224, 796, 3991, 8, 810, 1391, 51, 11, 1569, 310, 2981, 11, 337, 1279, 25, 347, 24071, 19182, 90, 303, 310, 2981, 11, 309, 11709, 198, 197, 2, 356, 466, 2147, 0, 198, 197, 2, 23909, 4464, 17407, 273, 0, 7, 282, 2188, 8, 198, 197, 7783, 2147, 198, 437, 198, 198, 8818, 3376, 273, 7, 270, 11, 1976, 62, 727, 3712, 44, 11, 256, 559, 3712, 44, 11, 1976, 62, 28764, 3712, 44, 11, 288, 82, 11, 7377, 116, 11, 198, 197, 197, 282, 2188, 3712, 31217, 39156, 11, 14174, 282, 2188, 796, 24936, 11146, 33, 6561, 9783, 2593, 34, 796, 2593, 11, 198, 197, 197, 47423, 796, 269, 65, 19463, 11, 479, 86, 22046, 23029, 810, 1391, 51, 11, 1569, 310, 2981, 11, 337, 1279, 25, 347, 24071, 19182, 90, 303, 310, 2981, 11, 309, 11709, 198, 197, 2, 356, 12082, 262, 869, 10146, 329, 262, 649, 1122, 34820, 198, 197, 21101, 796, 357, 87, 11, 277, 11, 449, 11, 581, 11, 24415, 11, 340, 29127, 11, 3689, 26, 479, 23029, 4613, 23838, 7, 87, 11, 277, 11, 449, 11, 581, 11, 24415, 11, 340, 29127, 11, 3689, 26, 479, 23029, 1222, 435, 2188, 7, 87, 11, 277, 11, 449, 11, 581, 11, 24415, 11, 340, 29127, 11, 3689, 26, 479, 23029, 198, 197, 2, 3465, 326, 1976, 62, 28764, 1541, 4909, 288, 82, 1635, 46651, 11, 12891, 21065, 28, 15, 24866, 284, 428, 1339, 198, 197, 1640, 21065, 287, 435, 2188, 13, 46803, 21912, 16, 25, 16, 198, 197, 197, 2, 3601, 34365, 992, 7, 8043, 28, 25, 19726, 29188, 11, 366, 46904, 21065, 796, 720, 4178, 59, 77, 4943, 198, 197, 197, 2, 1700, 262, 1459, 6376, 198, 197, 197, 282, 2188, 13, 14421, 521, 796, 21065, 198, 197, 197, 89, 28764, 796, 4808, 30073, 7, 89, 62, 28764, 8, 198, 197, 197, 897, 9078, 0, 7, 4178, 1635, 288, 82, 11, 435, 2188, 13, 32830, 11, 1976, 28764, 8, 198, 197, 197, 2, 356, 11169, 262, 2656, 23838, 611, 340, 12229, 262, 6678, 1339, 21065, 6624, 657, 198, 197, 197, 89, 727, 11, 581, 11, 6056, 11, 340, 3605, 1122, 11, 340, 29127, 796, 3376, 273, 7, 270, 11, 1976, 62, 727, 11, 256, 559, 11, 1976, 28764, 11, 288, 82, 11, 7377, 116, 11, 198, 197, 197, 197, 197, 282, 2188, 13, 83, 648, 2470, 2188, 11, 14174, 282, 2188, 26, 2593, 34, 796, 2593, 34, 11, 23838, 796, 269, 65, 11, 479, 86, 22046, 23029, 198, 197, 197, 361, 6056, 8614, 21065, 6624, 352, 1303, 329, 1312, 855, 16, 11, 356, 1441, 262, 1255, 6949, 198, 197, 197, 197, 7783, 1976, 727, 11, 581, 11, 6056, 11, 340, 3605, 1122, 11, 340, 29127, 198, 197, 197, 437, 198, 197, 437, 198, 197, 7783, 1976, 727, 11, 581, 11, 6056, 11, 340, 3605, 1122, 11, 340, 29127, 198, 437, 198, 198, 8818, 2239, 10699, 15988, 7, 9310, 11, 7377, 116, 11, 542, 37266, 3712, 17875, 2288, 10044, 11, 6718, 2004, 3712, 33, 970, 11, 340, 62, 3605, 1122, 62, 17618, 3712, 5317, 11, 256, 559, 3712, 44, 11, 29034, 67, 3712, 31217, 39156, 11, 15942, 16579, 8, 810, 1391, 51, 11, 1569, 310, 2981, 11, 337, 27, 25, 33, 24071, 19182, 90, 303, 310, 2981, 11, 309, 11709, 198, 197, 361, 6718, 2004, 6624, 3991, 198, 197, 197, 9310, 3605, 796, 288, 82, 198, 197, 197, 361, 2352, 7, 9310, 8, 1279, 357, 16, 1343, 29034, 67, 13, 46803, 8, 1635, 542, 37266, 13, 9310, 1084, 198, 197, 197, 197, 361, 29034, 67, 13, 4426, 320, 897, 1279, 29034, 67, 13, 320, 897, 198, 197, 197, 197, 197, 31, 18224, 366, 46904, 25285, 9114, 320, 897, 1, 198, 197, 197, 197, 197, 3149, 67, 13, 4426, 320, 897, 15853, 352, 198, 197, 197, 197, 17772, 198, 197, 197, 197, 197, 7, 19011, 16579, 1875, 657, 8, 11405, 3601, 34365, 992, 7203, 9, 1, 61, 1795, 9, 1, 59, 77, 50015, 284, 47873, 351, 1813, 8214, 1817, 59, 77, 1, 9, 1, 9, 1, 61, 1795, 11, 3124, 28, 25, 445, 8, 198, 197, 197, 197, 197, 2, 356, 2245, 262, 24659, 198, 197, 197, 197, 197, 7783, 288, 82, 11, 7377, 116, 11, 2081, 198, 197, 197, 197, 437, 198, 197, 197, 17772, 198, 197, 197, 197, 31, 18224, 366, 46904, 36400, 589, 288, 82, 1, 198, 197, 197, 197, 9310, 3605, 796, 288, 82, 1220, 357, 16, 1343, 29034, 67, 13, 46803, 8, 198, 197, 197, 197, 7, 19011, 16579, 1875, 657, 8, 11405, 3601, 34365, 992, 7203, 40202, 1075, 24659, 2239, 11, 288, 82, 796, 29568, 9310, 3605, 19415, 77, 1600, 3124, 28, 25, 445, 8, 198, 197, 197, 437, 198, 197, 17772, 1303, 262, 649, 1122, 17137, 468, 6718, 2004, 198, 197, 197, 9310, 3605, 796, 288, 82, 198, 197, 197, 361, 29034, 67, 13, 14421, 521, 6624, 29034, 67, 13, 46803, 11405, 2352, 7, 9310, 8, 1635, 29034, 67, 13, 9310, 22584, 19841, 542, 37266, 13, 67, 5796, 897, 198, 197, 197, 197, 7, 19011, 16579, 1875, 657, 8, 11405, 2488, 12860, 288, 82, 3605, 198, 197, 197, 197, 2, 44872, 7203, 46904, 25285, 288, 82, 4943, 198, 197, 197, 197, 9310, 3605, 796, 288, 82, 1635, 220, 29034, 67, 13, 9310, 22584, 198, 197, 197, 437, 198, 197, 437, 628, 197, 2, 1630, 2239, 284, 2652, 1022, 22303, 198, 197, 9310, 3605, 796, 29405, 30832, 7, 9310, 3605, 11, 542, 37266, 8, 628, 197, 7783, 288, 82, 3605, 11, 7377, 116, 11, 3991, 198, 437, 198, 29113, 29113, 29113, 4242, 198, 37811, 198, 197, 34220, 26601, 498, 18816, 298, 41568, 198, 198, 3, 7, 9936, 47, 1961, 11674, 3698, 5258, 8, 198, 198, 2, 28407, 273, 7, 82, 8, 628, 197, 34220, 26601, 498, 39156, 7, 282, 2188, 11, 299, 11, 479, 11, 410, 15, 8, 628, 197, 34220, 26601, 498, 39156, 7, 77, 11, 479, 11, 410, 15, 8, 198, 198, 12, 4600, 77, 63, 1502, 286, 262, 745, 6213, 49070, 198, 12, 4600, 74, 63, 4129, 286, 262, 938, 8136, 15879, 973, 329, 262, 745, 6213, 49070, 4197, 198, 12, 4600, 85, 15, 63, 1672, 286, 4610, 284, 307, 8574, 13, 632, 318, 691, 973, 284, 651, 262, 4600, 417, 4906, 63, 286, 262, 13875, 298, 3228, 198, 37811, 198, 76, 18187, 2878, 12280, 26601, 498, 39156, 90, 51, 1279, 25, 6416, 11, 309, 35138, 11, 7193, 2188, 92, 1279, 25, 27741, 43909, 298, 47, 17407, 273, 198, 197, 1, 18743, 286, 262, 745, 6213, 49070, 1, 198, 197, 77, 3712, 5317, 2414, 628, 197, 1, 24539, 286, 262, 938, 8136, 15879, 973, 329, 262, 745, 6213, 49070, 4197, 1, 198, 197, 74, 3712, 5317, 2414, 628, 197, 1, 46912, 329, 262, 39555, 341, 1, 198, 197, 32, 3712, 46912, 90, 51, 92, 628, 197, 1, 2348, 2188, 329, 13875, 298, 618, 745, 6213, 49070, 41568, 318, 407, 1744, 1, 198, 197, 83, 648, 2470, 2188, 3712, 31466, 2188, 628, 197, 1, 38469, 286, 8136, 1, 198, 197, 82, 14191, 3712, 31560, 934, 28632, 90, 51, 35138, 92, 628, 197, 1, 38469, 286, 10007, 1, 198, 197, 17143, 7307, 3712, 31560, 934, 28632, 90, 51, 92, 628, 197, 1, 38469, 286, 610, 565, 3286, 82, 1, 198, 197, 283, 565, 3286, 82, 3712, 31560, 934, 28632, 90, 51, 92, 628, 197, 1, 34, 2577, 2108, 2334, 329, 262, 745, 6213, 296, 8231, 329, 262, 4610, 1, 198, 197, 1073, 14822, 82, 36949, 3712, 38469, 90, 51, 35138, 92, 628, 197, 1, 34, 2577, 2108, 2334, 329, 262, 745, 6213, 296, 8231, 329, 262, 11507, 1, 198, 197, 1073, 14822, 82, 10044, 3712, 38469, 90, 51, 92, 628, 197, 1, 10260, 262, 41568, 220, 1701, 198, 197, 19119, 3712, 33, 970, 198, 437, 198, 198, 34220, 26601, 498, 39156, 7, 282, 2188, 11, 299, 11, 479, 11, 410, 15, 8, 796, 4275, 30493, 299, 27, 74, 26, 2162, 34220, 26601, 498, 39156, 7, 77, 11, 74, 11, 9107, 418, 7, 417, 4906, 7, 85, 15, 828, 74, 11, 77, 10, 16, 828, 282, 2188, 11, 198, 197, 31560, 934, 28632, 90, 4906, 1659, 7, 85, 15, 38165, 7, 74, 828, 31560, 934, 28632, 90, 417, 4906, 7, 85, 15, 38165, 7, 74, 828, 198, 197, 31560, 934, 28632, 90, 417, 4906, 7, 85, 15, 38165, 7, 74, 828, 198, 197, 38469, 90, 4906, 1659, 7, 85, 15, 38165, 7, 917, 891, 11, 299, 10, 16, 828, 198, 197, 38469, 90, 417, 4906, 7, 85, 15, 38165, 7, 917, 891, 11, 299, 10, 16, 828, 7942, 4008, 198, 34220, 26601, 498, 39156, 7, 77, 11, 479, 11, 410, 15, 8, 796, 12280, 26601, 498, 39156, 7, 6558, 415, 39156, 22784, 77, 11, 74, 11, 85, 15, 8, 198, 198, 271, 1493, 7, 381, 67, 3712, 34220, 26601, 498, 39156, 8, 796, 4129, 7, 381, 67, 13, 82, 14191, 8, 18189, 9788, 67, 13, 74, 198, 198, 8818, 23909, 4464, 17407, 273, 0, 7, 381, 67, 3712, 34220, 26601, 498, 39156, 8, 198, 197, 28920, 0, 7, 381, 67, 13, 82, 14191, 1776, 6565, 0, 7, 381, 67, 13, 17143, 7307, 1776, 6565, 0, 7, 381, 67, 13, 283, 565, 3286, 82, 1776, 198, 437, 198, 198, 8818, 651, 29668, 7, 35428, 28764, 3712, 34220, 26601, 498, 39156, 8, 198, 197, 50, 5657, 796, 2160, 7, 35428, 28764, 13, 283, 565, 3286, 82, 8, 1220, 7514, 28764, 13, 77, 198, 197, 38392, 796, 19862, 17034, 7, 16345, 7, 87, 3784, 7, 87, 12, 50, 5657, 8, 61, 17, 11, 7514, 28764, 13, 283, 565, 3286, 82, 1267, 1220, 357, 35428, 28764, 13, 77, 4008, 198, 197, 2, 1441, 657, 11, 16, 198, 197, 7783, 311, 5657, 11, 18074, 225, 198, 437, 198, 198, 8818, 357, 35428, 28764, 3712, 34220, 26601, 498, 39156, 5769, 9310, 8, 198, 197, 82, 5657, 11, 18074, 225, 796, 651, 29668, 7, 35428, 28764, 8, 198, 197, 82, 796, 7514, 28764, 13, 283, 565, 3286, 82, 58, 437, 60, 1343, 288, 82, 198, 197, 50, 796, 685, 19510, 82, 12, 82, 5657, 20679, 38392, 8, 61, 7, 41098, 12, 16, 8, 329, 474, 73, 28, 16, 25, 35428, 28764, 13, 77, 10, 16, 60, 198, 197, 79, 796, 2160, 7, 50, 764, 9, 7514, 28764, 13, 1073, 14822, 82, 10044, 8, 198, 197, 87, 796, 2160, 7, 50, 764, 9, 7514, 28764, 13, 1073, 14822, 82, 36949, 8, 198, 197, 7783, 2124, 11, 279, 198, 437, 198, 198, 8818, 4296, 39156, 0, 7, 35428, 28764, 3712, 34220, 26601, 498, 39156, 8, 198, 197, 50, 5657, 11, 18074, 225, 796, 651, 29668, 7, 35428, 28764, 8, 198, 197, 50, 82, 796, 357, 35428, 28764, 13, 283, 565, 3286, 82, 764, 12, 311, 5657, 8, 24457, 18074, 225, 198, 197, 2, 5103, 286, 262, 26669, 6327, 24936, 198, 197, 35428, 28764, 13, 32, 58, 45299, 352, 60, 764, 28, 352, 198, 197, 1640, 474, 73, 287, 352, 25, 35428, 28764, 13, 77, 198, 197, 197, 35428, 28764, 13, 32, 58, 45299, 474, 73, 10, 16, 60, 764, 28, 7514, 28764, 13, 32, 58, 45299, 474, 73, 60, 764, 9, 311, 82, 198, 197, 437, 198, 197, 2, 287, 1851, 14174, 1080, 329, 1551, 6616, 15830, 198, 197, 33, 796, 357, 35428, 28764, 13, 32, 6, 1635, 7514, 28764, 13, 32, 8, 3467, 7514, 28764, 13, 32, 6, 198, 197, 76, 377, 0, 7, 35428, 28764, 13, 1073, 14822, 82, 36949, 11, 347, 11, 7514, 28764, 13, 82, 14191, 8, 198, 197, 76, 377, 0, 7, 35428, 28764, 13, 1073, 14822, 82, 10044, 11, 347, 11, 7514, 28764, 13, 17143, 7307, 8, 198, 437, 198, 198, 8818, 651, 43909, 298, 0, 7, 83, 559, 3712, 44, 11, 1976, 62, 3605, 3712, 44, 11, 1976, 62, 727, 3712, 44, 11, 340, 3712, 23839, 17875, 2288, 29993, 540, 11, 288, 82, 11, 7377, 116, 11, 7514, 28764, 3712, 34220, 26601, 498, 39156, 11, 15942, 16579, 8, 810, 1391, 51, 11, 1569, 310, 2981, 11, 337, 1279, 25, 347, 24071, 19182, 90, 303, 310, 2981, 11, 309, 5512, 7193, 2188, 92, 198, 197, 2, 24061, 13875, 298, 290, 3650, 340, 198, 197, 7, 19011, 16579, 1875, 657, 8, 11405, 44872, 7203, 46904, 41568, 796, 12280, 26601, 498, 39156, 4943, 628, 197, 361, 7514, 28764, 13, 19119, 198, 197, 197, 2, 4296, 262, 1351, 286, 8136, 198, 197, 197, 361, 4129, 7, 35428, 28764, 13, 283, 565, 3286, 82, 8, 855, 15, 198, 197, 197, 197, 14689, 0, 7, 35428, 28764, 13, 283, 565, 3286, 82, 11, 288, 82, 8, 198, 197, 197, 17772, 198, 197, 197, 197, 14689, 0, 7, 35428, 28764, 13, 283, 565, 3286, 82, 11, 7514, 28764, 13, 283, 565, 3286, 82, 58, 437, 48688, 9310, 8, 198, 197, 197, 437, 198, 197, 197, 14689, 0, 7, 35428, 28764, 13, 82, 14191, 11, 1976, 62, 3605, 13, 84, 8, 198, 197, 197, 14689, 0, 7, 35428, 28764, 13, 17143, 7307, 11, 1976, 62, 3605, 13, 79, 8, 198, 197, 437, 628, 197, 361, 5299, 271, 1493, 7, 35428, 28764, 8, 8614, 5299, 35428, 28764, 13, 19119, 198, 197, 197, 7783, 651, 43909, 298, 0, 7, 83, 559, 11, 1976, 62, 3605, 11, 1976, 62, 727, 11, 340, 11, 288, 82, 11, 7377, 116, 11, 7514, 28764, 13, 83, 648, 2470, 2188, 11, 15942, 16579, 8, 198, 197, 17772, 198, 197, 197, 7783, 7514, 28764, 13, 19119, 5633, 4296, 39156, 0, 7, 35428, 28764, 8, 1058, 2081, 198, 197, 437, 198, 437, 198, 198, 8818, 651, 47, 17407, 273, 0, 7, 89, 62, 28764, 3712, 44, 11, 1976, 62, 727, 3712, 44, 11, 256, 559, 3712, 44, 11, 288, 82, 11, 7514, 28764, 3712, 34220, 26601, 498, 39156, 11, 299, 26224, 796, 3991, 8, 810, 1391, 51, 11, 1569, 310, 2981, 11, 337, 1279, 25, 347, 24071, 19182, 90, 303, 310, 2981, 11, 309, 11709, 198, 197, 361, 5299, 271, 1493, 7, 35428, 28764, 8, 198, 197, 197, 7783, 651, 47, 17407, 273, 0, 7, 89, 62, 28764, 11, 1976, 62, 727, 11, 256, 559, 11, 288, 82, 11, 7514, 28764, 13, 83, 648, 2470, 2188, 11, 299, 26224, 8, 198, 197, 17772, 198, 197, 197, 87, 11, 279, 796, 7514, 28764, 7, 9310, 8, 198, 197, 197, 30073, 1462, 0, 7, 89, 62, 28764, 13, 84, 11, 2124, 8, 198, 197, 197, 89, 62, 28764, 13, 79, 796, 279, 198, 197, 197, 7783, 2081, 198, 197, 437, 198, 437, 198, 29113, 29113, 29113, 4242, 198, 8818, 10389, 24539, 3351, 4272, 7, 138, 116, 11, 542, 37266, 11, 256, 559, 3712, 44, 11, 15942, 16579, 8, 810, 1391, 44, 1279, 25, 347, 24071, 19182, 92, 198, 197, 2, 262, 610, 565, 3286, 20796, 11862, 318, 1912, 319, 4849, 3889, 11, 6858, 402, 11, 41179, 1878, 337, 14551, 12, 49, 32580, 11, 198, 197, 2, 10674, 317, 5481, 740, 82, 11, 13637, 350, 35553, 75, 12079, 11, 6219, 347, 1004, 15710, 66, 80, 11, 5593, 38623, 11, 290, 10443, 360, 198, 197, 2, 5187, 5209, 13, 564, 250, 29701, 32, 352, 13, 15, 10074, 286, 6389, 2288, 978, 7727, 907, 25, 17003, 290, 46333, 17969, 11, 198, 197, 2, 564, 251, 2805, 352, 11, 6244, 13, 3740, 1378, 34023, 13, 2398, 14, 940, 13, 17, 23628, 14, 7410, 39761, 13, 198, 197, 1169, 38006, 413, 796, 7377, 116, 198, 197, 70, 796, 2352, 7, 83, 559, 13, 79, 1635, 7377, 116, 8, 198, 197, 7, 19011, 16579, 1875, 657, 8, 11405, 3601, 7203, 464, 8326, 2458, 422, 29568, 138, 116, 8, 284, 366, 8, 198, 197, 361, 357, 70, 1875, 542, 37266, 13, 70, 11518, 8, 198, 197, 197, 1169, 38006, 413, 796, 542, 37266, 13, 70, 49045, 1220, 256, 559, 13, 79, 1635, 19862, 17034, 7, 2352, 7, 16, 13, 15, 532, 308, 61, 17, 8, 1220, 2352, 7, 16, 13, 15, 532, 256, 559, 13, 79, 61, 17, 8, 1267, 198, 197, 197, 361, 357, 1169, 38006, 413, 1279, 542, 37266, 13, 1169, 8326, 9452, 8, 198, 197, 197, 220, 262, 38006, 413, 796, 542, 37266, 13, 1169, 8326, 9452, 26, 198, 197, 197, 437, 198, 197, 437, 198, 197, 7, 19011, 16579, 1875, 657, 8, 11405, 3601, 7203, 3, 7, 1169, 38006, 413, 19415, 77, 4943, 198, 197, 7783, 262, 38006, 413, 198, 437, 198, 29113, 29113, 29113, 4242, 198, 8818, 29405, 30832, 7, 9310, 3605, 11, 542, 37266, 3712, 17875, 2288, 10044, 8, 198, 197, 7783, 1051, 7, 9310, 3605, 8, 1635, 29405, 7, 8937, 7, 9310, 3605, 828, 542, 37266, 13, 9310, 1084, 11, 542, 37266, 13, 67, 5796, 897, 8, 198, 437, 198, 198, 8818, 2239, 10699, 15988, 7, 9310, 11, 7377, 116, 11, 542, 37266, 3712, 17875, 2288, 10044, 11, 6718, 2004, 3712, 33, 970, 11, 340, 62, 3605, 1122, 62, 17618, 3712, 5317, 11, 256, 559, 3712, 44, 11, 435, 2188, 3712, 23839, 43909, 298, 47, 17407, 273, 11, 15942, 16579, 8, 810, 1391, 51, 11, 1569, 310, 2981, 11, 337, 27, 25, 33, 24071, 19182, 90, 303, 310, 2981, 11, 309, 11709, 198, 197, 361, 6718, 2004, 6624, 3991, 198, 197, 197, 361, 220, 2352, 7, 9310, 8, 19841, 542, 37266, 13, 9310, 1084, 198, 197, 197, 197, 7, 19011, 16579, 1875, 657, 8, 11405, 3601, 34365, 992, 7203, 9, 1, 61, 1795, 9, 1, 59, 77, 50015, 284, 47873, 351, 1813, 8214, 1817, 59, 77, 1, 9, 1, 9, 1, 61, 1795, 11, 3124, 28, 25, 445, 8, 198, 197, 197, 197, 2, 356, 2245, 262, 24659, 198, 197, 197, 197, 7783, 288, 82, 11, 7377, 116, 11, 2081, 198, 197, 197, 437, 198, 197, 197, 9310, 3605, 796, 1051, 7, 9310, 8, 1635, 3509, 7, 8937, 7, 9310, 8, 1220, 362, 11, 542, 37266, 13, 9310, 1084, 1776, 198, 197, 197, 7, 19011, 16579, 1875, 657, 8, 11405, 3601, 34365, 992, 7203, 40202, 1075, 24659, 2239, 11, 288, 82, 43641, 7, 9310, 3605, 19415, 77, 1600, 3124, 28, 25, 445, 8, 198, 197, 17772, 198, 197, 197, 2, 1630, 284, 423, 262, 976, 1271, 286, 17321, 34820, 198, 197, 197, 45, 9806, 796, 542, 37266, 13, 3605, 1122, 29046, 13, 9806, 29993, 198, 197, 197, 31412, 796, 357, 45, 9806, 532, 340, 62, 3605, 1122, 62, 17618, 8, 1220, 399, 9806, 198, 197, 197, 9310, 3605, 796, 288, 82, 1635, 357, 16, 1343, 542, 37266, 13, 64, 1635, 5766, 61, 17, 8, 198, 197, 197, 2, 357, 19011, 16579, 1875, 657, 8, 11405, 2488, 12860, 352, 1343, 542, 37266, 13, 64, 1635, 5766, 61, 17, 198, 197, 437, 628, 197, 2, 1630, 2239, 284, 2652, 1022, 22303, 198, 197, 9310, 3605, 796, 29405, 30832, 7, 9310, 3605, 11, 542, 37266, 8, 628, 197, 1169, 38006, 413, 796, 542, 37266, 13, 4598, 24021, 24539, 3351, 4272, 5633, 10389, 24539, 3351, 4272, 7, 138, 116, 11, 542, 37266, 11, 256, 559, 11, 15942, 16579, 8, 1058, 7377, 116, 198, 197, 2, 356, 466, 407, 2245, 262, 24659, 198, 197, 7783, 288, 82, 3605, 11, 262, 38006, 413, 11, 3991, 198, 437, 198, 29113, 29113, 29113, 4242, 198, 37811, 198, 1212, 318, 262, 15993, 17321, 12, 42, 563, 27086, 1540, 332, 973, 284, 8494, 4600, 37, 7, 87, 11, 279, 8, 796, 657, 63, 1978, 198, 4480, 262, 16578, 283, 4006, 4600, 77, 7, 87, 11, 279, 8, 38243, 7377, 116, 2343, 233, 227, 1279, 87, 532, 2124, 15, 11, 46651, 87, 29, 1343, 357, 16, 12, 138, 116, 8, 2343, 233, 227, 357, 79, 532, 279, 15, 8, 1635, 46651, 79, 532, 299, 15, 796, 657, 44646, 770, 1838, 257, 1917, 286, 15793, 399, 1343, 352, 13, 198, 198, 4342, 11, 356, 11986, 4600, 79, 63, 355, 257, 850, 3245, 286, 4600, 1845, 63, 351, 262, 4600, 17143, 49479, 3712, 49479, 63, 198, 198, 2, 20559, 2886, 198, 12, 4600, 7, 87, 11, 1582, 8, 4613, 376, 7, 87, 11, 1582, 8, 63, 810, 4600, 1845, 63, 318, 257, 900, 286, 10007, 588, 4600, 7, 64, 28, 16, 13, 15, 11, 275, 28, 16, 8, 63, 198, 12, 4600, 7, 87, 11, 1582, 8, 4613, 449, 71, 7, 87, 11, 1582, 8, 63, 262, 474, 330, 672, 666, 449, 71, 796, 18872, 224, 87, 37, 198, 37811, 198, 8818, 649, 1122, 47, 1847, 34, 7, 37, 11, 449, 71, 11, 1582, 11, 5772, 75, 641, 3712, 49479, 11, 198, 197, 197, 197, 197, 197, 89, 15, 3712, 33, 24071, 19182, 90, 303, 310, 2981, 11, 309, 5512, 198, 197, 197, 197, 197, 197, 32830, 15, 3712, 33, 24071, 19182, 90, 303, 310, 2981, 11, 309, 5512, 198, 197, 197, 197, 197, 197, 89, 62, 28764, 3712, 33, 24071, 19182, 90, 303, 310, 2981, 11, 309, 5512, 198, 197, 197, 197, 197, 197, 9310, 3712, 51, 11, 7377, 116, 3712, 51, 11, 198, 197, 197, 197, 197, 197, 3642, 37266, 3712, 17875, 2288, 10044, 90, 51, 11, 311, 11, 412, 5512, 198, 197, 197, 197, 197, 197, 26518, 1169, 8326, 3712, 35, 313, 464, 8326, 26, 198, 197, 197, 197, 197, 197, 29127, 17457, 282, 2188, 796, 347, 34555, 33, 6561, 7, 19463, 6561, 3419, 828, 198, 197, 197, 197, 197, 197, 27237, 45, 796, 2593, 11, 198, 197, 197, 197, 197, 197, 47423, 796, 269, 65, 19463, 11, 479, 86, 22046, 23029, 810, 1391, 51, 11, 311, 11, 412, 11, 1569, 310, 2981, 92, 198, 197, 2, 29677, 10007, 198, 197, 31, 403, 8002, 284, 75, 11, 3509, 29993, 11, 15942, 577, 11, 26367, 11, 26367, 1084, 11, 3951, 3679, 796, 542, 37266, 13, 3605, 1122, 29046, 198, 197, 31, 403, 8002, 957, 28813, 36, 862, 11, 279, 9452, 11, 279, 11518, 796, 542, 37266, 628, 197, 45, 796, 357, 87, 11, 279, 8, 4613, 10389, 24539, 36, 80, 7, 26518, 1169, 8326, 11, 20208, 7, 87, 11, 1976, 15, 13, 84, 828, 279, 532, 1976, 15, 13, 79, 11, 46651, 15, 13, 84, 11, 46651, 15, 13, 79, 11, 7377, 116, 11, 288, 82, 8, 198, 197, 27237, 2246, 796, 357, 411, 69, 11, 581, 77, 8, 4613, 3509, 7, 27237, 45, 7, 411, 69, 828, 2352, 7, 411, 77, 4008, 628, 197, 2, 20768, 786, 34820, 198, 197, 87, 796, 4808, 30073, 7, 89, 62, 28764, 13, 84, 8, 220, 197, 197, 197, 197, 197, 2, 4866, 7, 89, 62, 28764, 13, 84, 8, 198, 197, 79, 796, 1976, 62, 28764, 13, 79, 198, 197, 87, 62, 28764, 796, 4808, 30073, 7, 87, 8, 220, 197, 197, 197, 197, 197, 197, 2, 4866, 7, 87, 8, 628, 197, 2, 20768, 786, 29598, 82, 198, 197, 411, 62, 69, 796, 376, 7, 87, 11, 900, 7, 1845, 11, 5772, 75, 641, 11, 279, 18125, 220, 581, 62, 77, 796, 399, 7, 87, 11, 279, 8, 628, 197, 67, 55, 796, 4808, 30073, 7, 411, 62, 69, 8, 1303, 4866, 7, 411, 62, 69, 8, 198, 197, 26059, 796, 309, 7, 15, 8, 198, 197, 929, 796, 309, 7, 15, 8, 198, 197, 2, 288, 37, 26059, 796, 357, 37, 7, 87, 11, 279, 1343, 957, 28813, 36, 862, 8, 532, 581, 62, 69, 8, 1220, 957, 28813, 36, 862, 198, 197, 67, 37, 26059, 796, 4808, 30073, 7, 37, 7, 87, 11, 900, 7, 1845, 11, 5772, 75, 641, 11, 279, 1343, 957, 28813, 36, 862, 22305, 198, 197, 40191, 0, 7, 67, 37, 26059, 11, 581, 62, 69, 8, 197, 197, 197, 197, 197, 197, 2, 288, 37, 26059, 796, 288, 37, 26059, 532, 581, 62, 69, 198, 197, 26224, 377, 0, 7, 67, 37, 26059, 11, 309, 7, 16, 8, 1220, 957, 28813, 36, 862, 8, 628, 197, 411, 220, 220, 220, 220, 796, 2593, 2246, 7, 411, 62, 69, 11, 581, 62, 77, 8, 198, 197, 411, 13749, 796, 685, 411, 60, 198, 197, 270, 796, 657, 198, 197, 270, 1370, 433, 313, 796, 657, 628, 197, 2, 16531, 278, 2482, 198, 197, 19011, 577, 11405, 3359, 29993, 341, 7, 270, 11, 581, 8, 198, 197, 1370, 62, 9662, 796, 2081, 628, 197, 2, 26342, 23838, 878, 435, 2188, 1107, 4940, 198, 197, 5589, 1133, 796, 23838, 7, 87, 11, 581, 62, 69, 11, 2147, 11, 581, 11, 657, 11, 657, 11, 542, 37266, 26, 279, 796, 279, 11, 581, 13749, 796, 581, 13749, 11, 422, 3791, 1122, 796, 3991, 11, 479, 86, 22046, 23029, 628, 197, 2, 8774, 9052, 198, 197, 4514, 357, 411, 1875, 284, 75, 8, 1222, 357, 270, 1279, 3509, 29993, 8, 1222, 1627, 62, 9662, 1222, 24061, 198, 197, 197, 2, 288, 37, 26059, 796, 357, 37, 7, 87, 11, 279, 1343, 304, 862, 72, 8, 532, 376, 7, 87, 11, 279, 4008, 1220, 304, 862, 72, 8, 198, 197, 197, 30073, 1462, 0, 7, 67, 37, 26059, 11, 376, 7, 87, 11, 900, 7, 1845, 11, 5772, 75, 641, 11, 279, 1343, 957, 28813, 36, 862, 22305, 198, 197, 197, 197, 40191, 0, 7, 67, 37, 26059, 11, 581, 62, 69, 1776, 42721, 377, 0, 7, 67, 37, 26059, 11, 309, 7, 16, 8, 1220, 957, 28813, 36, 862, 8, 628, 197, 197, 41, 796, 449, 71, 7, 87, 11, 900, 7, 1845, 11, 5772, 75, 641, 11, 279, 4008, 198, 197, 197, 84, 11, 510, 11, 6056, 11, 340, 29127, 796, 14174, 17457, 282, 2188, 7, 41, 11, 288, 37, 26059, 11, 46651, 15, 11, 581, 62, 69, 11, 581, 62, 77, 11, 7377, 116, 8, 198, 197, 197, 270, 1370, 433, 313, 15853, 2160, 7, 270, 29127, 8, 628, 197, 197, 361, 3951, 3679, 198, 197, 197, 197, 1370, 62, 9662, 796, 3991, 198, 197, 197, 197, 4514, 5145, 1370, 62, 9662, 1222, 357, 17394, 1875, 26367, 1084, 8, 198, 197, 197, 197, 197, 2, 2124, 62, 28764, 796, 2124, 532, 26367, 1635, 334, 198, 197, 197, 197, 197, 30073, 1462, 0, 7, 87, 62, 28764, 11, 2124, 1776, 7877, 9078, 0, 32590, 17394, 11, 334, 11, 2124, 62, 28764, 8, 628, 197, 197, 197, 197, 79, 62, 28764, 796, 279, 532, 26367, 1635, 510, 198, 197, 197, 197, 197, 30073, 1462, 0, 7, 411, 62, 69, 11, 376, 7, 87, 62, 28764, 11, 900, 7, 1845, 11, 5772, 75, 641, 11, 279, 62, 28764, 22305, 628, 197, 197, 197, 197, 411, 62, 77, 220, 796, 399, 7, 87, 62, 28764, 11, 279, 62, 28764, 8, 198, 197, 197, 197, 197, 411, 796, 2593, 2246, 7, 411, 62, 69, 11, 581, 62, 77, 8, 628, 197, 197, 197, 197, 361, 581, 1279, 581, 13749, 58, 437, 60, 198, 197, 197, 197, 197, 197, 361, 357, 411, 1279, 581, 13749, 58, 437, 60, 1220, 362, 8, 1222, 357, 17394, 1279, 352, 8, 198, 197, 197, 197, 197, 197, 197, 17394, 1635, 28, 362, 198, 197, 197, 197, 197, 197, 437, 198, 197, 197, 197, 197, 197, 1370, 62, 9662, 796, 2081, 198, 197, 197, 197, 197, 197, 30073, 1462, 0, 7, 87, 11, 2124, 62, 28764, 8, 198, 197, 197, 197, 197, 197, 79, 220, 796, 29405, 7, 79, 62, 28764, 11, 279, 9452, 11, 279, 11518, 8, 198, 197, 197, 197, 197, 197, 2, 279, 796, 279, 62, 28764, 198, 197, 197, 197, 197, 17772, 198, 197, 197, 197, 197, 197, 17394, 1220, 28, 362, 198, 197, 197, 197, 197, 437, 198, 197, 197, 197, 437, 198, 197, 197, 197, 17394, 796, 542, 37266, 13, 3605, 1122, 29046, 13, 17394, 220, 197, 2, 356, 1234, 736, 262, 4238, 1988, 198, 197, 197, 17772, 198, 197, 197, 197, 40191, 0, 7, 87, 11, 334, 8, 220, 197, 197, 197, 197, 197, 2, 2124, 764, 28, 2124, 764, 12, 334, 198, 197, 197, 197, 79, 796, 29405, 7, 79, 532, 510, 11, 279, 9452, 11, 279, 11518, 8, 198, 197, 197, 197, 2, 279, 796, 279, 532, 510, 628, 197, 197, 197, 30073, 1462, 0, 7, 411, 62, 69, 11, 376, 7, 87, 11, 900, 7, 1845, 11, 5772, 75, 641, 11, 279, 22305, 628, 197, 197, 197, 411, 62, 77, 220, 796, 399, 7, 87, 11, 279, 1776, 581, 796, 2593, 2246, 7, 411, 62, 69, 11, 581, 62, 77, 8, 198, 197, 197, 437, 628, 197, 197, 14689, 0, 7, 411, 13749, 11, 581, 8, 198, 197, 197, 270, 15853, 352, 628, 197, 197, 19011, 577, 11405, 3359, 29993, 341, 7, 270, 11, 581, 11, 340, 29127, 8, 628, 197, 197, 2, 2236, 356, 2270, 262, 9052, 30, 198, 197, 197, 5589, 1133, 796, 23838, 7, 87, 11, 581, 62, 69, 11, 449, 11, 581, 11, 340, 11, 340, 29127, 11, 542, 37266, 26, 279, 796, 279, 11, 581, 13749, 796, 581, 13749, 11, 422, 3791, 1122, 796, 3991, 11, 479, 86, 22046, 23029, 198, 197, 437, 198, 197, 19011, 577, 11405, 3359, 29993, 341, 7, 270, 11, 581, 11, 657, 11, 2081, 8, 1303, 3359, 938, 1627, 286, 262, 3084, 198, 197, 32109, 796, 357, 411, 13749, 58, 437, 60, 1279, 284, 75, 8, 1222, 23838, 7, 87, 11, 581, 62, 69, 11, 2147, 11, 581, 11, 340, 11, 532, 16, 11, 542, 37266, 26, 279, 796, 279, 11, 581, 13749, 796, 581, 13749, 11, 422, 3791, 1122, 796, 3991, 11, 479, 86, 22046, 23029, 198, 197, 7783, 347, 24071, 19182, 7, 87, 11, 279, 828, 581, 13749, 11, 6056, 11, 340, 11, 340, 1370, 433, 313, 198, 437, 198, 198, 2, 7292, 6160, 329, 779, 287, 24659, 198, 3605, 1122, 47, 1847, 34, 7, 270, 3712, 23839, 17875, 2288, 29993, 540, 11, 1976, 15, 3712, 44, 11, 46651, 15, 3712, 44, 11, 1976, 62, 28764, 3712, 44, 11, 288, 82, 3712, 51, 11, 7377, 116, 3712, 51, 26, 479, 86, 22046, 23029, 810, 1391, 51, 11, 1569, 310, 2981, 11, 337, 1279, 25, 347, 24071, 19182, 90, 303, 310, 2981, 11, 309, 11709, 796, 649, 1122, 47, 1847, 34, 7, 270, 13, 37, 11, 340, 13, 41, 11, 340, 13, 1845, 11, 340, 13, 75, 641, 11, 1976, 15, 11, 46651, 15, 11, 1976, 62, 28764, 11, 288, 82, 11, 7377, 116, 11, 340, 13, 3642, 10044, 4105, 11, 340, 13, 26518, 1169, 8326, 26, 479, 86, 22046, 23029, 198, 29113, 29113, 29113, 4242, 198 ]
2.497072
8,367
using Test, Onda, Dates, Random, UUIDs @testset "pretty printing" begin @test repr(TimeSpan(6149872364198, 123412345678910)) == "TimeSpan(01:42:29.872364198, 34:16:52.345678910)" signal = Signal([:a, :b, Symbol("c-d")], Nanosecond(3), Nanosecond(Second(12345)), :unit, 0.25, -0.5, Int16, 50.2, Symbol("lpcm.zst"), nothing) @test sprint(show, signal, context=(:compact => true)) == "Signal([:a, :b, Symbol(\"c-d\")])" @test sprint(show, signal) == """ Signal: channel_names: [:a, :b, Symbol(\"c-d\")] start_nanosecond: 3 nanoseconds (00:00:00.000000003) stop_nanosecond: 12345000000000 nanoseconds (03:25:45.000000000) sample_unit: :unit sample_resolution_in_unit: 0.25 sample_offset_in_unit: -0.5 sample_type: Int16 sample_rate: 50.2 Hz file_extension: Symbol(\"lpcm.zst\") file_options: nothing""" samples = Samples(signal, true, rand(Random.MersenneTwister(0), signal.sample_type, 3, 5)) @test sprint(show, samples, context=(:compact => true)) == "Samples(3×5 Array{Int16,2})" @test sprint(show, samples) == """ Samples (00:00:00.099601594): signal.channel_names: [:a, :b, Symbol(\"c-d\")] signal.start_nanosecond: 3 nanoseconds (00:00:00.000000003) signal.stop_nanosecond: 12345000000000 nanoseconds (03:25:45.000000000) signal.sample_unit: :unit signal.sample_resolution_in_unit: 0.25 signal.sample_offset_in_unit: -0.5 signal.sample_type: Int16 signal.sample_rate: 50.2 Hz signal.file_extension: Symbol(\"lpcm.zst\") signal.file_options: nothing encoded: true data: 3×5 Array{Int16,2}: 20032 4760 27427 -20758 24287 14240 5037 5598 -5888 21784 16885 600 20880 -32493 -19305""" annotations = Set(Annotation("val", TimeSpan(i, i + 1)) for i in 1:10) recording = Recording(Dict(:test => signal), annotations) @test sprint(show, recording) == """ Recording (03:25:45.000000000; 12345.0 seconds) signals: :test => Signal([:a, :b, Symbol(\"c-d\")]) annotations: (10 total)""" mktempdir() do root dataset = Dataset(joinpath(root, "test.onda"); create=true) return @test sprint(show, dataset) == "Dataset($(dataset.path), 0 recordings)" end end
[ 3500, 6208, 11, 440, 45658, 11, 44712, 11, 14534, 11, 471, 27586, 82, 198, 198, 31, 9288, 2617, 366, 37784, 13570, 1, 2221, 198, 220, 220, 220, 2488, 9288, 41575, 7, 7575, 4561, 272, 7, 46841, 44183, 1954, 2414, 22337, 11, 1105, 2682, 10163, 2231, 3134, 4531, 940, 4008, 6624, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 7575, 4561, 272, 7, 486, 25, 3682, 25, 1959, 13, 5774, 1954, 2414, 22337, 11, 4974, 25, 1433, 25, 4309, 13, 27712, 3134, 4531, 940, 16725, 628, 220, 220, 220, 6737, 796, 26484, 26933, 25, 64, 11, 1058, 65, 11, 38357, 7203, 66, 12, 67, 4943, 4357, 18008, 577, 17561, 7, 18, 828, 18008, 577, 17561, 7, 12211, 7, 10163, 2231, 36911, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 20850, 11, 657, 13, 1495, 11, 532, 15, 13, 20, 11, 2558, 1433, 11, 2026, 13, 17, 11, 38357, 7203, 34431, 11215, 13, 89, 301, 12340, 2147, 8, 198, 220, 220, 220, 2488, 9288, 18553, 7, 12860, 11, 6737, 11, 4732, 16193, 25, 5589, 529, 5218, 2081, 4008, 6624, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 11712, 282, 26933, 25, 64, 11, 1058, 65, 11, 38357, 7, 7879, 66, 12, 67, 59, 4943, 12962, 1, 198, 220, 220, 220, 2488, 9288, 18553, 7, 12860, 11, 6737, 8, 6624, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 26484, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6518, 62, 14933, 25, 685, 25, 64, 11, 1058, 65, 11, 38357, 7, 7879, 66, 12, 67, 59, 4943, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 923, 62, 12647, 577, 17561, 25, 513, 15709, 577, 17561, 82, 357, 405, 25, 405, 25, 405, 13, 8269, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2245, 62, 12647, 577, 17561, 25, 17031, 2231, 10535, 830, 15709, 577, 17561, 82, 357, 3070, 25, 1495, 25, 2231, 13, 10535, 830, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6291, 62, 20850, 25, 1058, 20850, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6291, 62, 29268, 62, 259, 62, 20850, 25, 657, 13, 1495, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6291, 62, 28968, 62, 259, 62, 20850, 25, 532, 15, 13, 20, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6291, 62, 4906, 25, 2558, 1433, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6291, 62, 4873, 25, 2026, 13, 17, 26109, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 2302, 3004, 25, 38357, 7, 7879, 34431, 11215, 13, 89, 301, 59, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2393, 62, 25811, 25, 2147, 37811, 628, 220, 220, 220, 8405, 796, 3409, 2374, 7, 12683, 282, 11, 2081, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43720, 7, 29531, 13, 44, 364, 29727, 5080, 1694, 7, 15, 828, 6737, 13, 39873, 62, 4906, 11, 513, 11, 642, 4008, 198, 220, 220, 220, 2488, 9288, 18553, 7, 12860, 11, 8405, 11, 4732, 16193, 25, 5589, 529, 5218, 2081, 4008, 6624, 366, 50, 12629, 7, 18, 12906, 20, 15690, 90, 5317, 1433, 11, 17, 92, 16725, 198, 220, 220, 220, 2488, 9288, 18553, 7, 12860, 11, 8405, 8, 6624, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3409, 2374, 357, 405, 25, 405, 25, 405, 13, 15, 38565, 486, 46438, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6737, 13, 17620, 62, 14933, 25, 685, 25, 64, 11, 1058, 65, 11, 38357, 7, 7879, 66, 12, 67, 59, 4943, 60, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6737, 13, 9688, 62, 12647, 577, 17561, 25, 513, 15709, 577, 17561, 82, 357, 405, 25, 405, 25, 405, 13, 8269, 18, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6737, 13, 11338, 62, 12647, 577, 17561, 25, 17031, 2231, 10535, 830, 15709, 577, 17561, 82, 357, 3070, 25, 1495, 25, 2231, 13, 10535, 830, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6737, 13, 39873, 62, 20850, 25, 1058, 20850, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6737, 13, 39873, 62, 29268, 62, 259, 62, 20850, 25, 657, 13, 1495, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6737, 13, 39873, 62, 28968, 62, 259, 62, 20850, 25, 532, 15, 13, 20, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6737, 13, 39873, 62, 4906, 25, 2558, 1433, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6737, 13, 39873, 62, 4873, 25, 2026, 13, 17, 26109, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6737, 13, 7753, 62, 2302, 3004, 25, 38357, 7, 7879, 34431, 11215, 13, 89, 301, 59, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 6737, 13, 7753, 62, 25811, 25, 2147, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 30240, 25, 2081, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1366, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 513, 12906, 20, 15690, 90, 5317, 1433, 11, 17, 38362, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 939, 2624, 220, 6298, 1899, 220, 39768, 1983, 220, 532, 1238, 38569, 220, 220, 1987, 27800, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1478, 16102, 220, 2026, 2718, 220, 220, 642, 41292, 220, 220, 532, 3365, 3459, 220, 220, 24894, 5705, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1467, 44230, 220, 220, 10053, 220, 27121, 1795, 220, 532, 33916, 6052, 220, 532, 1129, 22515, 37811, 198, 220, 220, 220, 37647, 796, 5345, 7, 2025, 38983, 7203, 2100, 1600, 3862, 4561, 272, 7, 72, 11, 1312, 1343, 352, 4008, 329, 1312, 287, 352, 25, 940, 8, 198, 220, 220, 220, 8296, 796, 43905, 7, 35, 713, 7, 25, 9288, 5218, 6737, 828, 37647, 8, 198, 220, 220, 220, 2488, 9288, 18553, 7, 12860, 11, 8296, 8, 6624, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 43905, 357, 3070, 25, 1495, 25, 2231, 13, 10535, 830, 26, 17031, 2231, 13, 15, 4201, 8, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 10425, 25, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 9288, 5218, 26484, 26933, 25, 64, 11, 1058, 65, 11, 38357, 7, 7879, 66, 12, 67, 59, 4943, 12962, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 37647, 25, 357, 940, 2472, 8, 37811, 198, 220, 220, 220, 33480, 29510, 15908, 3419, 466, 6808, 198, 220, 220, 220, 220, 220, 220, 220, 27039, 796, 16092, 292, 316, 7, 22179, 6978, 7, 15763, 11, 366, 9288, 13, 13533, 15341, 2251, 28, 7942, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 2488, 9288, 18553, 7, 12860, 11, 27039, 8, 6624, 366, 27354, 292, 316, 16763, 7, 19608, 292, 316, 13, 6978, 828, 657, 18813, 16725, 198, 220, 220, 220, 886, 198, 437, 198 ]
1.628696
2,063
#################### Discrete Gibbs Sampler #################### #################### Types and Constructors #################### const DGSUnivariateDistribution = Union{Bernoulli, Binomial, Categorical, DiscreteUniform, Hypergeometric, NoncentralHypergeometric} const DSForm = Union{Function, Vector{Float64}} mutable struct DSTune{F<:DSForm} <: SamplerTune mass::Union{F, Missing} support::Matrix{Real} DSTune{F}() where {F<:DSForm} = new{F}() DSTune{F}(x::Vector, support::AbstractMatrix) where {F<:DSForm} = new{F}(missing, support) DSTune{F}(x::Vector, support::AbstractMatrix, mass::Function) where {F<:DSForm} = new{F}(mass, support) end const DGSVariate = SamplerVariate{DSTune{Function}} const DiscreteVariate = SamplerVariate{DSTune{Vector{Float64}}} validate(v::DGSVariate) = validate(v, v.tune.support) function validate(v::DiscreteVariate) validate(v, v.tune.support) validate(v, v.tune.support, v.tune.mass) end function validate(v::SamplerVariate{DSTune{F}}, support::Matrix) where {F<:DSForm} n = length(v) size(support, 1) == n || throw(ArgumentError("size(support, 1) differs from variate length $n")) v end validate(v::DiscreteVariate, support::Matrix, mass::Union{Vector{Float64}, Missing}) = isa(mass, Missing) ? v : validate(v, support, mass) function validate(v::DiscreteVariate, support::Matrix, mass::Vector{Float64}) n = length(mass) size(support, 2) == n || throw(ArgumentError("size(support, 2) differs from mass length $n")) v end #################### Sampler Constructor #################### """ DGS(params::ElementOrVector{Symbol}) Construct a `Sampler` object for which DGS sampling is to be applied separately to each of the supplied parameters. Parameters are assumed to have discrete univariate distributions with finite supports. Returns a `Sampler{DSTune{Function}}` type object. * `params`: stochastic node(s) to be updated with the sampler. """ function DGS(params::ElementOrVector{Symbol}) params = asvec(params) samplerfx = function(model::Model, block::Integer) s = model.samplers[block] local node, x for key in params node = model[key] x = unlist(node) sim = function(i::Integer, d::DGSUnivariateDistribution, mass::Function) v = DGSVariate([x[i]], support(d)') sample!(v, mass) x[i] = v[1] relist!(model, x, key) end mass = function(d::DGSUnivariateDistribution, v::AbstractVector, i::Integer) x[i] = value = v[1] relist!(model, x, key) exp(logpdf(d, value) + logpdf(model, node.targets)) end DGS_sub!(node.distr, sim, mass) end nothing end Sampler(params, samplerfx, DSTune{Function}()) end function DGS_sub!(d::UnivariateDistribution, sim::Function, mass::Function) sim(1, d, v -> mass(d, v, 1)) end function DGS_sub!(D::Array{UnivariateDistribution}, sim::Function, mass::Function) for i in 1:length(D) d = D[i] sim(i, d, v -> mass(d, v, i)) end end function DGS_sub!(d, sim::Function, mass::Function) throw(ArgumentError("unsupported distribution structure $(typeof(d))")) end #################### Sampling Functions #################### sample!(v::SamplerVariate{DSTune{F}}) where {F<:DSForm} = sample!(v, v.tune.mass) """ sample!(v::DGSVariate, mass::Function) Draw one sample directly from a target probability mass function. Parameters are assumed to have discrete and finite support. Returns `v` updated with simulated values and associated tuning parameters. """ function sample!(v::DGSVariate, mass::Function) tune = v.tune n = size(tune.support, 2) probs = Vector{Float64}(undef, n) psum = 0.0 for i in 1:n value = mass(tune.support[:, i]) probs[i] = value psum += value end if psum > 0 probs /= psum else probs[:] .= 1 / n end v[:] = tune.support[:, rand(Categorical(probs))] v end """ sample!(v::DiscreteVariate, mass::Vector{Float64}) Draw one sample directly from a target probability mass function. Parameters are assumed to have discrete and finite support. Returns `v` updated with simulated values and associated tuning parameters. """ function sample!(v::DiscreteVariate, mass::Vector{Float64}) validate(v, v.tune.support, mass) v[:] = v.tune.support[:, rand(Categorical(mass))] v end
[ 14468, 4242, 8444, 8374, 41071, 3409, 20053, 1303, 14468, 21017, 198, 198, 14468, 4242, 24897, 290, 28407, 669, 1303, 14468, 21017, 198, 198, 9979, 360, 14313, 3118, 42524, 20344, 3890, 796, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 4479, 90, 23927, 280, 15516, 11, 20828, 49070, 11, 327, 2397, 12409, 11, 8444, 8374, 3118, 6933, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 15079, 469, 16996, 11, 8504, 31463, 38197, 469, 16996, 92, 628, 198, 9979, 17400, 8479, 796, 4479, 90, 22203, 11, 20650, 90, 43879, 2414, 11709, 198, 198, 76, 18187, 2878, 360, 2257, 1726, 90, 37, 27, 25, 5258, 8479, 92, 1279, 25, 3409, 20053, 51, 1726, 198, 220, 2347, 3712, 38176, 90, 37, 11, 25639, 92, 198, 220, 1104, 3712, 46912, 90, 15633, 92, 628, 220, 360, 2257, 1726, 90, 37, 92, 3419, 810, 1391, 37, 27, 25, 5258, 8479, 92, 796, 649, 90, 37, 92, 3419, 628, 220, 360, 2257, 1726, 90, 37, 92, 7, 87, 3712, 38469, 11, 1104, 3712, 23839, 46912, 8, 810, 1391, 37, 27, 25, 5258, 8479, 92, 796, 198, 220, 220, 220, 649, 90, 37, 92, 7, 45688, 11, 1104, 8, 628, 220, 360, 2257, 1726, 90, 37, 92, 7, 87, 3712, 38469, 11, 1104, 3712, 23839, 46912, 11, 2347, 3712, 22203, 8, 810, 1391, 37, 27, 25, 5258, 8479, 92, 796, 649, 90, 37, 92, 7, 22208, 11, 1104, 8, 198, 437, 628, 198, 9979, 360, 14313, 23907, 378, 796, 3409, 20053, 23907, 378, 90, 35, 2257, 1726, 90, 22203, 11709, 198, 9979, 8444, 8374, 23907, 378, 796, 3409, 20053, 23907, 378, 90, 35, 2257, 1726, 90, 38469, 90, 43879, 2414, 42535, 198, 198, 12102, 378, 7, 85, 3712, 35, 14313, 23907, 378, 8, 796, 26571, 7, 85, 11, 410, 13, 83, 1726, 13, 11284, 8, 198, 198, 8818, 26571, 7, 85, 3712, 15642, 8374, 23907, 378, 8, 198, 220, 26571, 7, 85, 11, 410, 13, 83, 1726, 13, 11284, 8, 198, 220, 26571, 7, 85, 11, 410, 13, 83, 1726, 13, 11284, 11, 410, 13, 83, 1726, 13, 22208, 8, 198, 437, 198, 198, 8818, 26571, 7, 85, 3712, 16305, 20053, 23907, 378, 90, 35, 2257, 1726, 90, 37, 92, 5512, 1104, 3712, 46912, 8, 810, 1391, 37, 27, 25, 5258, 8479, 92, 198, 220, 299, 796, 4129, 7, 85, 8, 198, 220, 2546, 7, 11284, 11, 352, 8, 6624, 299, 8614, 198, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 7857, 7, 11284, 11, 352, 8, 24242, 422, 5553, 378, 4129, 720, 77, 48774, 198, 220, 410, 198, 437, 198, 198, 12102, 378, 7, 85, 3712, 15642, 8374, 23907, 378, 11, 1104, 3712, 46912, 11, 2347, 3712, 38176, 90, 38469, 90, 43879, 2414, 5512, 25639, 30072, 796, 198, 220, 318, 64, 7, 22208, 11, 25639, 8, 5633, 410, 1058, 26571, 7, 85, 11, 1104, 11, 2347, 8, 198, 198, 8818, 26571, 7, 85, 3712, 15642, 8374, 23907, 378, 11, 1104, 3712, 46912, 11, 2347, 3712, 38469, 90, 43879, 2414, 30072, 198, 220, 299, 796, 4129, 7, 22208, 8, 198, 220, 2546, 7, 11284, 11, 362, 8, 6624, 299, 8614, 198, 220, 220, 220, 3714, 7, 28100, 1713, 12331, 7203, 7857, 7, 11284, 11, 362, 8, 24242, 422, 2347, 4129, 720, 77, 48774, 198, 220, 410, 198, 437, 628, 198, 14468, 4242, 3409, 20053, 28407, 273, 1303, 14468, 21017, 198, 37811, 198, 220, 220, 220, 360, 14313, 7, 37266, 3712, 20180, 5574, 38469, 90, 13940, 23650, 30072, 198, 198, 42316, 257, 4600, 16305, 20053, 63, 2134, 329, 543, 360, 14313, 19232, 318, 284, 307, 5625, 13869, 198, 1462, 1123, 286, 262, 14275, 10007, 13, 40117, 389, 9672, 284, 423, 28810, 198, 403, 42524, 24570, 351, 27454, 6971, 13, 198, 198, 35561, 257, 4600, 16305, 20053, 90, 35, 2257, 1726, 90, 22203, 11709, 63, 2099, 2134, 13, 198, 198, 9, 4600, 37266, 63, 25, 3995, 354, 3477, 10139, 7, 82, 8, 284, 307, 6153, 351, 262, 6072, 20053, 13, 198, 198, 37811, 198, 8818, 360, 14313, 7, 37266, 3712, 20180, 5574, 38469, 90, 13940, 23650, 30072, 198, 220, 42287, 796, 355, 35138, 7, 37266, 8, 198, 220, 6072, 20053, 21373, 796, 2163, 7, 19849, 3712, 17633, 11, 2512, 3712, 46541, 8, 198, 220, 220, 220, 264, 796, 2746, 13, 37687, 489, 364, 58, 9967, 60, 198, 220, 220, 220, 1957, 10139, 11, 2124, 198, 220, 220, 220, 329, 1994, 287, 42287, 198, 220, 220, 220, 220, 220, 10139, 796, 2746, 58, 2539, 60, 198, 220, 220, 220, 220, 220, 2124, 796, 555, 4868, 7, 17440, 8, 628, 220, 220, 220, 220, 220, 985, 796, 2163, 7, 72, 3712, 46541, 11, 288, 3712, 35, 14313, 3118, 42524, 20344, 3890, 11, 2347, 3712, 22203, 8, 198, 220, 220, 220, 220, 220, 220, 220, 410, 796, 360, 14313, 23907, 378, 26933, 87, 58, 72, 60, 4357, 1104, 7, 67, 8, 11537, 198, 220, 220, 220, 220, 220, 220, 220, 6291, 0, 7, 85, 11, 2347, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 58, 72, 60, 796, 410, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 823, 396, 0, 7, 19849, 11, 2124, 11, 1994, 8, 198, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 2347, 796, 2163, 7, 67, 3712, 35, 14313, 3118, 42524, 20344, 3890, 11, 410, 3712, 23839, 38469, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1312, 3712, 46541, 8, 198, 220, 220, 220, 220, 220, 220, 220, 2124, 58, 72, 60, 796, 1988, 796, 410, 58, 16, 60, 198, 220, 220, 220, 220, 220, 220, 220, 823, 396, 0, 7, 19849, 11, 2124, 11, 1994, 8, 198, 220, 220, 220, 220, 220, 220, 220, 1033, 7, 6404, 12315, 7, 67, 11, 1988, 8, 1343, 2604, 12315, 7, 19849, 11, 10139, 13, 83, 853, 1039, 4008, 198, 220, 220, 220, 220, 220, 886, 628, 220, 220, 220, 220, 220, 360, 14313, 62, 7266, 0, 7, 17440, 13, 17080, 81, 11, 985, 11, 2347, 8, 198, 220, 220, 220, 886, 198, 220, 220, 220, 2147, 198, 220, 886, 198, 220, 3409, 20053, 7, 37266, 11, 6072, 20053, 21373, 11, 360, 2257, 1726, 90, 22203, 92, 28955, 198, 437, 628, 198, 8818, 360, 14313, 62, 7266, 0, 7, 67, 3712, 3118, 42524, 20344, 3890, 11, 985, 3712, 22203, 11, 2347, 3712, 22203, 8, 198, 220, 985, 7, 16, 11, 288, 11, 410, 4613, 2347, 7, 67, 11, 410, 11, 352, 4008, 198, 437, 198, 198, 8818, 360, 14313, 62, 7266, 0, 7, 35, 3712, 19182, 90, 3118, 42524, 20344, 3890, 5512, 985, 3712, 22203, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2347, 3712, 22203, 8, 198, 220, 329, 1312, 287, 352, 25, 13664, 7, 35, 8, 198, 220, 220, 220, 288, 796, 360, 58, 72, 60, 198, 220, 220, 220, 985, 7, 72, 11, 288, 11, 410, 4613, 2347, 7, 67, 11, 410, 11, 1312, 4008, 198, 220, 886, 198, 437, 198, 198, 8818, 360, 14313, 62, 7266, 0, 7, 67, 11, 985, 3712, 22203, 11, 2347, 3712, 22203, 8, 198, 220, 3714, 7, 28100, 1713, 12331, 7203, 403, 15999, 6082, 4645, 29568, 4906, 1659, 7, 67, 4008, 48774, 198, 437, 628, 198, 14468, 4242, 3409, 11347, 40480, 1303, 14468, 21017, 198, 198, 39873, 0, 7, 85, 3712, 16305, 20053, 23907, 378, 90, 35, 2257, 1726, 90, 37, 11709, 8, 810, 1391, 37, 27, 25, 5258, 8479, 92, 796, 6291, 0, 7, 85, 11, 410, 13, 83, 1726, 13, 22208, 8, 198, 198, 37811, 198, 220, 220, 220, 6291, 0, 7, 85, 3712, 35, 14313, 23907, 378, 11, 2347, 3712, 22203, 8, 198, 198, 25302, 530, 6291, 3264, 422, 257, 2496, 12867, 2347, 2163, 13, 40117, 198, 533, 9672, 284, 423, 28810, 290, 27454, 1104, 13, 198, 198, 35561, 4600, 85, 63, 6153, 351, 28590, 3815, 290, 3917, 24549, 10007, 13, 198, 37811, 198, 8818, 6291, 0, 7, 85, 3712, 35, 14313, 23907, 378, 11, 2347, 3712, 22203, 8, 198, 220, 14009, 796, 410, 13, 83, 1726, 198, 220, 299, 796, 2546, 7, 83, 1726, 13, 11284, 11, 362, 8, 198, 220, 386, 1443, 796, 20650, 90, 43879, 2414, 92, 7, 917, 891, 11, 299, 8, 198, 220, 279, 16345, 796, 657, 13, 15, 198, 220, 329, 1312, 287, 352, 25, 77, 198, 220, 220, 220, 1988, 796, 2347, 7, 83, 1726, 13, 11284, 58, 45299, 1312, 12962, 198, 220, 220, 220, 386, 1443, 58, 72, 60, 796, 1988, 198, 220, 220, 220, 279, 16345, 15853, 1988, 198, 220, 886, 198, 220, 611, 279, 16345, 1875, 657, 198, 220, 220, 220, 386, 1443, 1220, 28, 279, 16345, 198, 220, 2073, 198, 220, 220, 220, 386, 1443, 58, 47715, 764, 28, 352, 1220, 299, 198, 220, 886, 198, 220, 410, 58, 47715, 796, 14009, 13, 11284, 58, 45299, 43720, 7, 34, 2397, 12409, 7, 1676, 1443, 4008, 60, 198, 220, 410, 198, 437, 198, 198, 37811, 198, 220, 220, 220, 6291, 0, 7, 85, 3712, 15642, 8374, 23907, 378, 11, 2347, 3712, 38469, 90, 43879, 2414, 30072, 198, 198, 25302, 530, 6291, 3264, 422, 257, 2496, 12867, 2347, 2163, 13, 40117, 198, 533, 9672, 284, 423, 28810, 290, 27454, 1104, 13, 198, 198, 35561, 4600, 85, 63, 6153, 351, 28590, 3815, 290, 3917, 24549, 10007, 13, 198, 37811, 198, 8818, 6291, 0, 7, 85, 3712, 15642, 8374, 23907, 378, 11, 2347, 3712, 38469, 90, 43879, 2414, 30072, 198, 220, 26571, 7, 85, 11, 410, 13, 83, 1726, 13, 11284, 11, 2347, 8, 198, 220, 410, 58, 47715, 796, 410, 13, 83, 1726, 13, 11284, 58, 45299, 43720, 7, 34, 2397, 12409, 7, 22208, 4008, 60, 198, 220, 410, 198, 437, 198 ]
2.700246
1,628
cd(@__DIR__); include("setups/grid7x3.jl") pyplot(dpi = 200) ## (a) eigenvectors by nondecreasing eigenvalue ordering plot(layout = Plots.grid(3, 7)) for i in 1:N heatmap!(reshape(𝚽[:, i], (Nx, Ny))', c = :viridis, cbar = false, clims = (-0.4,0.4), frame = :none, ratio = 1, ylim = [0, Ny + 1], title = latexstring("\\phi_{", i-1, "}"), titlefont = 12, subplot = i) end plt = current() savefig(plt, "../figs/grid7x3_evsp_title.png") ## (b) eigenvectors by natural frequency ordering plot(layout = Plots.grid(3, 7)) for i in 1:N k = grid2eig_ind[i] heatmap!(reshape(𝚽[:,k], (Nx, Ny))', c = :viridis, cbar = false, clims = (-0.4,0.4), frame = :none, ratio = 1, ylim = [0, Ny + 1], title = latexstring("\\varphi_{", string(eig2dct[k,1]), ",", string(eig2dct[k,2]), "}"), titlefont = 12, subplot = i) end plt = current() savefig(plt, "../figs/grid7x3_dct_title2.png")
[ 10210, 7, 31, 834, 34720, 834, 1776, 2291, 7203, 2617, 4739, 14, 25928, 22, 87, 18, 13, 20362, 4943, 198, 9078, 29487, 7, 67, 14415, 796, 939, 8, 198, 198, 2235, 357, 64, 8, 304, 9324, 303, 5217, 416, 30745, 721, 260, 2313, 304, 9324, 8367, 16216, 198, 29487, 7, 39786, 796, 1345, 1747, 13, 25928, 7, 18, 11, 767, 4008, 198, 1640, 1312, 287, 352, 25, 45, 198, 220, 220, 220, 4894, 8899, 0, 7, 3447, 1758, 7, 47728, 248, 121, 58, 45299, 1312, 4357, 357, 45, 87, 11, 17735, 4008, 3256, 269, 796, 1058, 37040, 29207, 11, 269, 5657, 796, 3991, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5424, 82, 796, 13841, 15, 13, 19, 11, 15, 13, 19, 828, 5739, 796, 1058, 23108, 11, 8064, 796, 352, 11, 331, 2475, 796, 685, 15, 11, 17735, 1343, 352, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3670, 796, 47038, 8841, 7203, 6852, 34846, 23330, 1600, 1312, 12, 16, 11, 366, 92, 12340, 3670, 10331, 796, 1105, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 850, 29487, 796, 1312, 8, 198, 437, 198, 489, 83, 796, 1459, 3419, 198, 21928, 5647, 7, 489, 83, 11, 366, 40720, 5647, 82, 14, 25928, 22, 87, 18, 62, 1990, 2777, 62, 7839, 13, 11134, 4943, 198, 198, 2235, 357, 65, 8, 304, 9324, 303, 5217, 416, 3288, 8373, 16216, 198, 29487, 7, 39786, 796, 1345, 1747, 13, 25928, 7, 18, 11, 767, 4008, 198, 1640, 1312, 287, 352, 25, 45, 198, 220, 220, 220, 479, 796, 10706, 17, 68, 328, 62, 521, 58, 72, 60, 198, 220, 220, 220, 4894, 8899, 0, 7, 3447, 1758, 7, 47728, 248, 121, 58, 45299, 74, 4357, 357, 45, 87, 11, 17735, 4008, 3256, 269, 796, 1058, 37040, 29207, 11, 269, 5657, 796, 3991, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 5424, 82, 796, 13841, 15, 13, 19, 11, 15, 13, 19, 828, 5739, 796, 1058, 23108, 11, 8064, 796, 352, 11, 331, 2475, 796, 685, 15, 11, 17735, 1343, 352, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 3670, 796, 47038, 8841, 7203, 6852, 7785, 34846, 23330, 1600, 4731, 7, 68, 328, 17, 67, 310, 58, 74, 11, 16, 46570, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 553, 11, 4731, 7, 68, 328, 17, 67, 310, 58, 74, 11, 17, 46570, 366, 92, 12340, 3670, 10331, 796, 1105, 11, 850, 29487, 796, 1312, 8, 198, 437, 198, 489, 83, 796, 1459, 3419, 198, 21928, 5647, 7, 489, 83, 11, 366, 40720, 5647, 82, 14, 25928, 22, 87, 18, 62, 67, 310, 62, 7839, 17, 13, 11134, 4943, 198 ]
1.987755
490
# not working. using LinearAlgebra, FFTW import BSON, Statistics, Random import PyPlot import NMRSpectraSimulator include("../src/NMRCalibrate.jl") import .NMRCalibrate # for loading something with Interpolations.jl import OffsetArrays import Interpolations import PlotlyJS import Plots Plots.plotly() import Destruct include("./helpers/final_helpers.jl") include("./helpers/resonance_helpers.jl") include("./helpers/plot_resonance.jl") PyPlot.close("all") fig_num = 1 Random.seed!(25) PyPlot.matplotlib["rcParams"][:update](["font.size" => 22, "font.family" => "serif"]) # base_dir = "/home/roy/MEGAsync/outputs/NMR/calibrate/final/" # project_set = filter(isdir, readdir(base_dir; join=true)) # all dirs in base_dir project_set = Vector{String}(undef, 0) tmp = "/home/roy/MEGAsync/outputs/NMR/calibrate/final/D-(+)-Glucose-NRC-600" push!(project_set, tmp) function loopplotresonance(project_set) for i = 1:length(project_set) projects_dir = project_set[i] println("Now on $(projects_dir)") plotresonancegroups(projects_dir) println() end end ### batch. loopplotresonance(project_set) ### end batch.
[ 2, 407, 1762, 13, 198, 198, 3500, 44800, 2348, 29230, 11, 376, 9792, 54, 198, 11748, 347, 11782, 11, 14370, 11, 14534, 198, 11748, 9485, 43328, 198, 198, 11748, 28692, 6998, 806, 430, 8890, 8927, 198, 198, 17256, 7203, 40720, 10677, 14, 32755, 7397, 282, 2889, 378, 13, 20362, 4943, 198, 11748, 764, 32755, 7397, 282, 2889, 378, 198, 198, 2, 329, 11046, 1223, 351, 4225, 16104, 602, 13, 20362, 198, 11748, 3242, 2617, 3163, 20477, 198, 11748, 4225, 16104, 602, 198, 198, 11748, 28114, 306, 20120, 198, 11748, 1345, 1747, 198, 3646, 1747, 13, 29487, 306, 3419, 198, 198, 11748, 8145, 1356, 198, 198, 17256, 7, 1911, 14, 16794, 364, 14, 20311, 62, 16794, 364, 13, 20362, 4943, 198, 17256, 7, 1911, 14, 16794, 364, 14, 411, 261, 590, 62, 16794, 364, 13, 20362, 4943, 198, 17256, 7, 1911, 14, 16794, 364, 14, 29487, 62, 411, 261, 590, 13, 20362, 4943, 198, 198, 20519, 43328, 13, 19836, 7203, 439, 4943, 198, 5647, 62, 22510, 796, 352, 198, 198, 29531, 13, 28826, 0, 7, 1495, 8, 198, 20519, 43328, 13, 6759, 29487, 8019, 14692, 6015, 10044, 4105, 1, 7131, 25, 19119, 16151, 14692, 10331, 13, 7857, 1, 5218, 2534, 11, 366, 10331, 13, 17989, 1, 5218, 366, 2655, 361, 8973, 8, 628, 628, 198, 198, 2, 2779, 62, 15908, 796, 12813, 11195, 14, 3287, 14, 44, 7156, 42367, 14, 22915, 82, 14, 45, 13599, 14, 9948, 2889, 378, 14, 20311, 30487, 198, 2, 1628, 62, 2617, 796, 8106, 7, 9409, 343, 11, 1100, 15908, 7, 8692, 62, 15908, 26, 4654, 28, 7942, 4008, 1303, 477, 288, 17062, 287, 2779, 62, 15908, 198, 198, 16302, 62, 2617, 796, 20650, 90, 10100, 92, 7, 917, 891, 11, 657, 8, 198, 22065, 796, 12813, 11195, 14, 3287, 14, 44, 7156, 42367, 14, 22915, 82, 14, 45, 13599, 14, 9948, 2889, 378, 14, 20311, 14, 35, 30420, 10, 13219, 9861, 1229, 577, 12, 45, 7397, 12, 8054, 1, 198, 14689, 0, 7, 16302, 62, 2617, 11, 45218, 8, 198, 198, 8818, 300, 2238, 381, 26487, 411, 261, 590, 7, 16302, 62, 2617, 8, 628, 220, 220, 220, 329, 1312, 796, 352, 25, 13664, 7, 16302, 62, 2617, 8, 198, 220, 220, 220, 220, 220, 220, 220, 4493, 62, 15908, 796, 1628, 62, 2617, 58, 72, 60, 628, 220, 220, 220, 220, 220, 220, 220, 44872, 7203, 3844, 319, 29568, 42068, 62, 15908, 8, 4943, 198, 220, 220, 220, 220, 220, 220, 220, 7110, 411, 261, 590, 24432, 7, 42068, 62, 15908, 8, 198, 220, 220, 220, 220, 220, 220, 220, 44872, 3419, 198, 220, 220, 220, 886, 198, 198, 437, 628, 198, 21017, 15458, 13, 198, 29680, 381, 26487, 411, 261, 590, 7, 16302, 62, 2617, 8, 198, 21017, 886, 15458, 13, 198 ]
2.53159
459