-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnotebook_juliacon2022.jl
1874 lines (1552 loc) · 59.8 KB
/
notebook_juliacon2022.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
### A Pluto.jl notebook ###
# v0.19.9
using Markdown
using InteractiveUtils
# ╔═╡ eb67a960-b8a9-4dee-b51d-8202934cab2c
begin
using AlgebraOfGraphics
using BenchmarkTools
using CairoMakie
using DataFrames
using JuMP
using ProgressLogging
using Random
using SparseVariables
end
# ╔═╡ 907fdf86-ec90-11ec-1e2e-97884202e0e6
html"""<button onclick=present()>Present</button"""
# ╔═╡ 3a58880b-d505-4149-bb09-e2658147adc8
md"# SparseVariables.jl
### Efficient sparse modelling with JuMP
Lars Hellemo & Truls Flatberg, SINTEF
"
# ╔═╡ b9886259-16e7-4704-9560-05011abe3227
md"# About Us
* [SINTEF](https://www.sintef.no/en/) is one of Europe’s largest independent research organisations (~2200 employees).
* Department of [Sustainable Energy](https://www.sintef.no/en/industry/topics/sustainable-energy/) Technology, optimization group
* MILP optimization (mostly modelling) for different sectors:
- Supply chain optimization
- Energy systems
- Health care
- Sustainability
* Historically used proprietary modelling languages (Mosel, AMPL, OPL, GAMS)
* Moving to more open source alternatives, more and more JuMP/Julia
* Several other exciting project using Julia ongoing
"
# ╔═╡ 1ee0b191-292c-4c6d-9e4f-7304fd7d57a6
md"# Motivation
* We love Julia and JuMP for all the usual reasons
- fast
- expressive
- elegant
- **fun**
- **hackable**
* Commercial modeling languages are very efficient for:
- **sparse structures**
- **large models**
* JuMP performance and usability snags
* Workarounds are verbose and lacking functionality
* Can we improve the situation?
"
# ╔═╡ 5ed6f654-e73f-4bb7-a2fe-ce22cf2fc1d4
md"
# An Illustrating Example
We will illustrate some modelling approches using a simple supply chain problem. Consider a company that produces a large selection of different products and sells these to geographically dispersed customers. The company has several factories that can produce each product and they need a decision support system that helps them in deciding which factory should service each customer order.
Let $P$ denote the set of products, $F$ the factories, $C$ the customers and $T$ the set of time periods. We are given the customer demand, $D_{c,p,t}$, for some combinations of customers, products and periods and want to find how this demand should be assigned to one or more factories in a cost optimal way. Introducing non-negative decision variables $x_{f,p,c,t}$, this corresponds to
$\sum_{f} x_{f,p,c,t} = D_{c,p,t}.$
In addition to fulfilling demand there are constraints on the feasible solutions. Each factory has an upper limit on total production per period
$\sum_{c,p} x_{f,p,c,t} \le U_{f,t}.$
For some of combinations of factory and customer there can be an upper limit $V_{f,c}$ on the transport capacity per time period
$\sum_{p} x_{f,p,c,t} \le V_{f,c}.$
Finally, not all factories can produce every product. Let $W_{f,p}$ be a parameter with value 1 if the factory $f$ can produce product $p$ and 0 otherwise. Then we have that
$W_{f,p} = 0 \implies x_{f,p,c,t} = 0.$
"
# ╔═╡ d415dbdc-c7c4-400d-8546-23bfa0222bad
md"## Standard (Naïve) Approach
* Don't worry about the extra variables and constraints, presolve will take care of it
"
# ╔═╡ fa24bb0d-7050-4a1c-bbd0-f44ce4f3527b
function model_standard(F, C, P, T, D, U, V, W)
m = Model()
@variable(m, x[F, C, P, T] ≥ 0)
for f in F, c in C, p in P, t in T
@constraint(m, sum(x[f, c, p, t] for f in F) == get(D, (c, p, t), 0.0))
end
for f in F, t in T
@constraint(m, sum(x[f, c, p, t] for c in C, p in P) ≤ U[f, t])
end
for (f, c) in keys(V), t in T
@constraint(m, sum(x[f, c, p, t] for p in P) ≤ V[f, c])
end
for f in F, c in C, p in P, t in T
if W[f, p] == 0
@constraint(m, x[f, c, p, t] == 0)
end
end
return m
end
# ╔═╡ f3612117-732c-41c6-a85a-7b38dae49ab8
md"## Using Base Dict
* Widely used workaround
* Create anonymous variables and put in Dict
* Verbose
* Subsetting is awkward
"
# ╔═╡ 935153cb-f77b-443f-941d-52674502e7b7
function model_dict(F, C, P, T, D, U, V, W)
m = Model()
# Variable creation
x = Dict()
for (c, p, t) in keys(D), f in F
if W[f, p] == 1
x[f, c, p, t] = @variable(m, lower_bound = 0)
end
end
# Constraint setup
indices = [(f, c, p, t) for (c, p, t) in keys(D), f in F if W[f, p] == 1]
# Customer demand
for (c̄, p̄, t̄) in keys(D)
@constraint(
m,
sum(
x[f, c, p, t] for (f, c, p, t) in
filter(i -> i[2] == c̄ && i[3] == p̄ && i[4] == t̄, indices)
) == D[c̄, p̄, t̄]
)
end
# Production capacity
for (f̄, t̄) in keys(U)
@constraint(
m,
sum(
x[f, c, p, t] for
(f, c, p, t) in filter(i -> i[1] == f̄ && i[4] == t̄, indices)
) ≤ U[f̄, t̄]
)
end
# Transport capacity
for (f̄, c̄) in keys(V), t̄ in T
@constraint(
m,
sum(
x[f, c, p, t] for (f, c, p, t) in
filter(i -> i[1] == f̄ && i[2] == c̄ && i[4] == t̄, indices)
) ≤ V[f̄, c̄]
)
end
return m
end
# ╔═╡ f7da2625-887d-46fe-b159-4fa6d89d61e5
md"## Index using Tuples
* Alternative workaround
* Bundle indices into tuples
* Also reasonably efficient
* Subsetting is awkward
"
# ╔═╡ 0fa9dc20-0cef-41b0-ac03-98031e18db7d
function model_index(F, C, P, T, D, U, V, W)
m = Model()
# Variable creation
indices = [(f, c, p, t) for (c, p, t) in keys(D), f in F if W[f, p] == 1]
@variable(m, x[indices] ≥ 0)
# Constraint setup
# Customer demand
for (c̄, p̄, t̄) in keys(D)
@constraint(
m,
sum(
x[(f, c, p, t)] for (f, c, p, t) in
filter(i -> i[2] == c̄ && i[3] == p̄ && i[4] == t̄, indices)
) == D[c̄, p̄, t̄]
)
end
# Production capacity
for (f̄, t̄) in keys(U)
@constraint(
m,
sum(
x[(f, c, p, t)] for
(f, c, p, t) in filter(i -> i[1] == f̄ && i[4] == t̄, indices)
) ≤ U[f̄, t̄]
)
end
# Transport capacity
for (f̄, c̄) in keys(V), t in T
@constraint(
m,
sum(
x[(f, c, p, t)] for (f, c, p, t) in
filter(i -> i[1] == f̄ && i[2] == c̄ && i[4] == t, indices)
) ≤ V[f̄, c̄]
)
end
return m
end
# ╔═╡ f6bf3148-b32a-48e9-bfa7-c4a16d72fceb
md"## Incremental constraint building
* Build LHS incrementally
* Harder to write
* Harder to read
* Best performance
* Sacrificing convenience
"
# ╔═╡ a14714b1-8993-47af-ad61-1a715c7f58c9
function model_incremental(F, C, P, T, D, U, V, W)
m = Model()
# Variable creation
x = Dict()
for (c, p, t) in keys(D), f in F
if W[f, p] == 1
x[f, c, p, t] = @variable(m, lower_bound = 0)
end
end
# Constraint setup
pcap = Dict((f, t) => AffExpr() for (f, t) in keys(U))
cdem = Dict((c, p, t) => AffExpr() for (c, p, t) in keys(D))
tcap = Dict((f, c, t) => AffExpr() for (f, c) in keys(V), t in T)
for (f, c, p, t) in keys(x)
var = x[f, c, p, t]
if (c, p, t) in keys(D)
JuMP.add_to_expression!(cdem[c, p, t], var)
end
if (f, t) in keys(U)
JuMP.add_to_expression!(pcap[f, t], var)
end
if (f, c) in keys(V)
JuMP.add_to_expression!(tcap[f, c, t], var)
end
end
# Customer demand
for (c, p, t) in keys(D)
@constraint(m, cdem[c, p, t] == D[c, p, t])
end
# Production capacity
for (f, t) in keys(U)
@constraint(m, pcap[f, t] ≤ U[f, t])
end
# Transport capacity
for (f, c) in keys(V), t in T
@constraint(m, tcap[f, c, t] ≤ V[f, c])
end
return m
end
# ╔═╡ c2ace375-5854-48f6-a6af-68b7d91fc788
md"
## Using SparseVariables.jl
* Dictionaries.jl under the hood
* Expressive
* Convenient
- Easy to construct sparse variables
- Incremental building of variables possible
- Slicing
"
# ╔═╡ ee5ef191-abbe-400b-a172-315873325903
function model_sparse(F, C, P, T, D, U, V, W)
m = Model()
# Variable creation
@sparsevariable(m, x[factory, customer, product, period])
for f in F, (c, p, t) in keys(D)
if W[f, p] == 1
insertvar!(x, f, c, p, t)
end
end
# Constraint creation
# Customer demand
for (c, p, t) in keys(D)
@constraint(m, sum(x[:, c, p, t]) == D[c, p, t])
end
# Production capacity
for (f, t) in keys(U)
@constraint(m, sum(x[f, :, :, t]) ≤ U[f, t])
end
# Transport capacity
for (f, c) in keys(V), t in T
@constraint(m, sum(x[f, c, :, t]) ≤ V[f, c])
end
return m
end
# ╔═╡ a25b747b-705a-4cf6-abaa-11d2f1f76272
md"# Increasing problem size
* Increase number of customers (NC)
"
# ╔═╡ 3f883297-9ded-4619-9a92-e6e0ad1e87f7
md"# Varying Sparsity
* Increase probability DP that there is demand from a customer $c$ for product $p$ in time period $t$
"
# ╔═╡ ea9e775e-e25a-46af-b2b4-a29366831b12
md"# Check [SparseVariables.jl](https://github.com/hellemo/SparseVariables.jl) out
* Hope it can be useful
* Experiment with functionality
* Play with performance
* Feedback and PRs are welcome!
* Steal and improve our ideas 😄
"
# ╔═╡ 0a181426-a19f-4c94-a2e3-32d0d48d03d0
md"## "
# ╔═╡ 9d8b6754-1c49-4f4f-b1ad-f5d8eac427c1
# ╔═╡ 4376b3c0-d008-49f3-8b28-d22f6a30324c
md"
#
#
"
# ╔═╡ d69fd813-4316-49d5-87d3-dcf50f2c34f0
function create_test(
nf,
nc,
np,
nt;
demandprob = 0.05,
prodprob = 0.2,
flowprob = 0.8,
seed = 42,
)
Random.seed!(seed)
F = collect(1:nf)
C = collect(1:nc)
P = collect(1:np)
T = collect(1:nt)
shuffled = shuffle([(c, p, t) for c in C, p in P, t in T])
D = Dict(
(c, p, t) => rand() for
#c in C, p in P, t in T if rand() < demandprob
(c, p, t) in
sort(first(shuffled, Int(ceil(demandprob * length(shuffled)))))
)
U = Dict((f, t) => rand() * 100 for f in F, t in T)
V = Dict((f, c) => rand() * 20 for f in F, c in C if rand() < flowprob)
W = Dict((f, p) => (rand() < prodprob ? 1 : 0) for f in F, p in P)
return F, C, P, T, D, U, V, W
end
# ╔═╡ c352a486-bbbb-474d-839c-5c867d8a9911
nf, nc, np, nt = 5, 20, 10, 100;
# ╔═╡ d6c417f9-9c9d-4943-876d-a75ceda39336
F, C, P, T, D, U, V, W = create_test(nf, nc, np, nt);
# ╔═╡ 2e583e3b-0ee3-4d98-8dcc-be81d0f4d273
@btime model_standard(F, C, P, T, D, U, V, W)
# ╔═╡ bd1fb6e7-9f51-467a-87e8-b7a9942ce208
@btime model_dict(F, C, P, T, D, U, V, W)
# ╔═╡ e8a917cc-6c9c-438d-ba90-374e0617a3ac
@btime model_index(F, C, P, T, D, U, V, W)
# ╔═╡ b0f05a19-c01c-43dc-82ff-0b3197083b5f
@btime model_incremental(F, C, P, T, D, U, V, W)
# ╔═╡ 1004b0ce-cc9e-4edc-b585-f51a6164e64a
@btime model_sparse(F, C, P, T, D, U, V, W)
# ╔═╡ 7d205438-8e93-4528-8337-543f02aa84b3
REPS = 5
# ╔═╡ 04570ea7-885c-4d0e-be88-eb2a5f77da90
begin
res = DataFrame(Method = Symbol[], NC = Int[], Time = Float64[])
@progress for nc in 5:10:100
for method in [
model_standard,
model_dict,
model_index,
model_incremental,
model_sparse,
]
t = minimum((
@elapsed method(create_test(nf, nc, np, nt; seed = r)...)
for r in 1:REPS
))
push!(res, (Symbol(method), nc, t))
end
end
end
# ╔═╡ cc097148-23b1-4584-a150-c7f22376b65c
begin
sparsity = DataFrame(Method = Symbol[], DP = Float64[], Time = Float64[])
@progress for dp in 0.05:0.05:1.0
for method in [
model_standard,
model_dict,
model_index,
model_incremental,
model_sparse,
]
ts = []
for r in 1:REPS
GC.gc()
push!(
ts,
@elapsed method(
create_test(
5,
40,
10,
50;
demandprob = dp,
seed = r,
)...,
)
)
end
t = minimum(ts)
push!(sparsity, (Symbol(method), dp, t))
end
end
end
# ╔═╡ b0aa0499-e920-4014-b0b2-ce8ea3da7c95
function plot(df, x = :NC, y = :Time)
CairoMakie.activate!(type = "svg")
return draw(
data(df) *
mapping(x, y => "Time (s)", color = :Method, marker = :Method) *
(visual(Lines) + visual(Scatter)),
)
end
# ╔═╡ 4b073bba-940f-4d6f-8ba6-af7355b41e09
plot(res)
# ╔═╡ 66eaf973-3c58-4b6a-8ec3-53bf7fa7a20c
plot(sparsity, :DP, :Time)
# ╔═╡ 00000000-0000-0000-0000-000000000001
PLUTO_PROJECT_TOML_CONTENTS = """
[deps]
AlgebraOfGraphics = "cbdf2221-f076-402e-a563-3d30da359d67"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
JuMP = "4076af6c-e467-56ae-b986-b466b2749572"
ProgressLogging = "33c8b6b6-d38a-422a-b730-caa89a2f386c"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SparseVariables = "2749762c-80ed-4b14-8f33-f0736679b02b"
[compat]
AlgebraOfGraphics = "~0.6.5"
BenchmarkTools = "~1.3.1"
CairoMakie = "~0.7.5"
DataFrames = "~1.3.4"
JuMP = "~1.1.1"
ProgressLogging = "~0.1.4"
SparseVariables = "~0.6.0"
"""
# ╔═╡ 00000000-0000-0000-0000-000000000002
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised
julia_version = "1.8.0-rc3"
manifest_format = "2.0"
project_hash = "c94f46af5227aa06544e7f6eb323d12d25ebf321"
[[deps.AbstractFFTs]]
deps = ["ChainRulesCore", "LinearAlgebra"]
git-tree-sha1 = "69f7020bd72f069c219b5e8c236c1fa90d2cb409"
uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c"
version = "1.2.1"
[[deps.AbstractTrees]]
git-tree-sha1 = "03e0550477d86222521d254b741d470ba17ea0b5"
uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
version = "0.3.4"
[[deps.Adapt]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "af92965fb30777147966f58acb05da51c5616b5f"
uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
version = "3.3.3"
[[deps.AlgebraOfGraphics]]
deps = ["Colors", "Dates", "Dictionaries", "FileIO", "GLM", "GeoInterface", "GeometryBasics", "GridLayoutBase", "KernelDensity", "Loess", "Makie", "PlotUtils", "PooledArrays", "RelocatableFolders", "StatsBase", "StructArrays", "Tables"]
git-tree-sha1 = "f47c39e2a2d08a6e221dfc639791c6b5c08a9f7a"
uuid = "cbdf2221-f076-402e-a563-3d30da359d67"
version = "0.6.6"
[[deps.Animations]]
deps = ["Colors"]
git-tree-sha1 = "e81c509d2c8e49592413bfb0bb3b08150056c79d"
uuid = "27a7e980-b3e6-11e9-2bcd-0b925532e340"
version = "0.4.1"
[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
version = "1.1.1"
[[deps.ArrayInterface]]
deps = ["ArrayInterfaceCore", "Compat", "IfElse", "LinearAlgebra", "Static"]
git-tree-sha1 = "6ccb71b40b04ad69152f1f83d5925de13911417e"
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
version = "6.0.19"
[[deps.ArrayInterfaceCore]]
deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"]
git-tree-sha1 = "7d255eb1d2e409335835dc8624c35d97453011eb"
uuid = "30b0a656-2188-435a-8636-2ec0e6a096e2"
version = "0.1.14"
[[deps.Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
[[deps.Automa]]
deps = ["Printf", "ScanByte", "TranscodingStreams"]
git-tree-sha1 = "d50976f217489ce799e366d9561d56a98a30d7fe"
uuid = "67c07d97-cdcb-5c2c-af73-a7f9c32a568b"
version = "0.8.2"
[[deps.AxisAlgorithms]]
deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"]
git-tree-sha1 = "66771c8d21c8ff5e3a93379480a2307ac36863f7"
uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950"
version = "1.0.1"
[[deps.Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
[[deps.BenchmarkTools]]
deps = ["JSON", "Logging", "Printf", "Profile", "Statistics", "UUIDs"]
git-tree-sha1 = "4c10eee4af024676200bc7752e536f858c6b8f93"
uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
version = "1.3.1"
[[deps.Bzip2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2"
uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
version = "1.0.8+0"
[[deps.CEnum]]
git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90"
uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
version = "0.4.2"
[[deps.Cairo]]
deps = ["Cairo_jll", "Colors", "Glib_jll", "Graphics", "Libdl", "Pango_jll"]
git-tree-sha1 = "d0b3f8b4ad16cb0a2988c6788646a5e6a17b6b1b"
uuid = "159f3aea-2a34-519c-b102-8c37f9878175"
version = "1.0.5"
[[deps.CairoMakie]]
deps = ["Base64", "Cairo", "Colors", "FFTW", "FileIO", "FreeType", "GeometryBasics", "LinearAlgebra", "Makie", "SHA", "StaticArrays"]
git-tree-sha1 = "4a0de4f5aa2d5d27a1efa293aeabb1a081e46b2b"
uuid = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
version = "0.7.5"
[[deps.Cairo_jll]]
deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2"
uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a"
version = "1.16.1+1"
[[deps.Calculus]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad"
uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9"
version = "0.5.1"
[[deps.ChainRulesCore]]
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "ff38036fb7edc903de4e79f32067d8497508616b"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "1.15.2"
[[deps.ChangesOfVariables]]
deps = ["ChainRulesCore", "LinearAlgebra", "Test"]
git-tree-sha1 = "38f7a08f19d8810338d4f5085211c7dfa5d5bdd8"
uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0"
version = "0.1.4"
[[deps.CodecBzip2]]
deps = ["Bzip2_jll", "Libdl", "TranscodingStreams"]
git-tree-sha1 = "2e62a725210ce3c3c2e1a3080190e7ca491f18d7"
uuid = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd"
version = "0.7.2"
[[deps.CodecZlib]]
deps = ["TranscodingStreams", "Zlib_jll"]
git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.7.0"
[[deps.ColorBrewer]]
deps = ["Colors", "JSON", "Test"]
git-tree-sha1 = "61c5334f33d91e570e1d0c3eb5465835242582c4"
uuid = "a2cac450-b92f-5266-8821-25eda20663c8"
version = "0.4.0"
[[deps.ColorSchemes]]
deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Random"]
git-tree-sha1 = "1fd869cc3875b57347f7027521f561cf46d1fcd8"
uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
version = "3.19.0"
[[deps.ColorTypes]]
deps = ["FixedPointNumbers", "Random"]
git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4"
uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
version = "0.11.4"
[[deps.ColorVectorSpace]]
deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"]
git-tree-sha1 = "d08c20eef1f2cbc6e60fd3612ac4340b89fea322"
uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4"
version = "0.9.9"
[[deps.Colors]]
deps = ["ColorTypes", "FixedPointNumbers", "Reexport"]
git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40"
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
version = "0.12.8"
[[deps.CommonSubexpressions]]
deps = ["MacroTools", "Test"]
git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7"
uuid = "bbf7d656-a473-5ed7-a52c-81e309532950"
version = "0.3.0"
[[deps.Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "9be8be1d8a6f44b96482c8af52238ea7987da3e3"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "3.45.0"
[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "0.5.2+0"
[[deps.Contour]]
deps = ["StaticArrays"]
git-tree-sha1 = "9f02045d934dc030edad45944ea80dbd1f0ebea7"
uuid = "d38c429a-6771-53c6-b99e-75d170b6e991"
version = "0.5.7"
[[deps.Crayons]]
git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15"
uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
version = "4.1.1"
[[deps.DataAPI]]
git-tree-sha1 = "fb5f5316dd3fd4c5e7c30a24d50643b73e37cd40"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.10.0"
[[deps.DataFrames]]
deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
git-tree-sha1 = "daa21eb85147f72e41f6352a57fccea377e310a9"
uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
version = "1.3.4"
[[deps.DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.18.13"
[[deps.DataValueInterfaces]]
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464"
version = "1.0.0"
[[deps.Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
[[deps.DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"
[[deps.DensityInterface]]
deps = ["InverseFunctions", "Test"]
git-tree-sha1 = "80c3e8639e3353e5d2912fb3a1916b8455e2494b"
uuid = "b429d917-457f-4dbc-8f4c-0cc954292b1d"
version = "0.4.0"
[[deps.Dictionaries]]
deps = ["Indexing", "Random"]
git-tree-sha1 = "7669d53b75e9f9e2fa32d5215cb2af348b2c13e2"
uuid = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4"
version = "0.3.21"
[[deps.DiffResults]]
deps = ["StaticArrays"]
git-tree-sha1 = "c18e98cba888c6c25d1c3b048e4b3380ca956805"
uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
version = "1.0.3"
[[deps.DiffRules]]
deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"]
git-tree-sha1 = "28d605d9a0ac17118fe2c5e9ce0fbb76c3ceb120"
uuid = "b552c78f-8df3-52c6-915a-8e097449b14b"
version = "1.11.0"
[[deps.Distances]]
deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"]
git-tree-sha1 = "3258d0659f812acde79e8a74b11f17ac06d0ca04"
uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
version = "0.10.7"
[[deps.Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
[[deps.Distributions]]
deps = ["ChainRulesCore", "DensityInterface", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"]
git-tree-sha1 = "429077fd74119f5ac495857fd51f4120baf36355"
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
version = "0.25.65"
[[deps.DocStringExtensions]]
deps = ["LibGit2"]
git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.6"
[[deps.Downloads]]
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
version = "1.6.0"
[[deps.EarCut_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "3f3a2501fa7236e9b911e0f7a588c657e822bb6d"
uuid = "5ae413db-bbd1-5e63-b57d-d24a61df00f5"
version = "2.2.3+0"
[[deps.EllipsisNotation]]
deps = ["ArrayInterface"]
git-tree-sha1 = "03b753748fd193a7f2730c02d880da27c5a24508"
uuid = "da5c29d0-fa7d-589e-88eb-ea29b0a81949"
version = "1.6.0"
[[deps.Expat_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "bad72f730e9e91c08d9427d5e8db95478a3c323d"
uuid = "2e619515-83b5-522b-bb60-26c02a35a201"
version = "2.4.8+0"
[[deps.FFMPEG]]
deps = ["FFMPEG_jll"]
git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8"
uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a"
version = "0.4.1"
[[deps.FFMPEG_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
git-tree-sha1 = "ccd479984c7838684b3ac204b716c89955c76623"
uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
version = "4.4.2+0"
[[deps.FFTW]]
deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"]
git-tree-sha1 = "90630efff0894f8142308e334473eba54c433549"
uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
version = "1.5.0"
[[deps.FFTW_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "c6033cc3892d0ef5bb9cd29b7f2f0331ea5184ea"
uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a"
version = "3.3.10+0"
[[deps.FileIO]]
deps = ["Pkg", "Requires", "UUIDs"]
git-tree-sha1 = "9267e5f50b0e12fdfd5a2455534345c4cf2c7f7a"
uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
version = "1.14.0"
[[deps.FileWatching]]
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
[[deps.FillArrays]]
deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"]
git-tree-sha1 = "246621d23d1f43e3b9c368bf3b72b2331a27c286"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "0.13.2"
[[deps.FixedPointNumbers]]
deps = ["Statistics"]
git-tree-sha1 = "335bfdceacc84c5cdf16aadc768aa5ddfc5383cc"
uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
version = "0.8.4"
[[deps.Fontconfig_jll]]
deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03"
uuid = "a3f928ae-7b40-5064-980b-68af3947d34b"
version = "2.13.93+0"
[[deps.Formatting]]
deps = ["Printf"]
git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8"
uuid = "59287772-0a20-5a39-b81b-1366585eb4c0"
version = "0.4.2"
[[deps.ForwardDiff]]
deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions", "StaticArrays"]
git-tree-sha1 = "2f18915445b248731ec5db4e4a17e451020bf21e"
uuid = "f6369f11-7733-5829-9624-2563aa707210"
version = "0.10.30"
[[deps.FreeType]]
deps = ["CEnum", "FreeType2_jll"]
git-tree-sha1 = "cabd77ab6a6fdff49bfd24af2ebe76e6e018a2b4"
uuid = "b38be410-82b0-50bf-ab77-7b57e271db43"
version = "4.0.0"
[[deps.FreeType2_jll]]
deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"]
git-tree-sha1 = "87eb71354d8ec1a96d4a7636bd57a7347dde3ef9"
uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7"
version = "2.10.4+0"
[[deps.FreeTypeAbstraction]]
deps = ["ColorVectorSpace", "Colors", "FreeType", "GeometryBasics"]
git-tree-sha1 = "b5c7fe9cea653443736d264b85466bad8c574f4a"
uuid = "663a7486-cb36-511b-a19d-713bb74d65c9"
version = "0.9.9"
[[deps.FriBidi_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91"
uuid = "559328eb-81f9-559d-9380-de523a88c83c"
version = "1.0.10+0"
[[deps.Future]]
deps = ["Random"]
uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820"
[[deps.GLM]]
deps = ["Distributions", "LinearAlgebra", "Printf", "Reexport", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "StatsModels"]
git-tree-sha1 = "039118892476c2bf045a43b88fcb75ed566000ff"
uuid = "38e38edf-8417-5370-95a0-9cbb8c7f171a"
version = "1.8.0"
[[deps.GeoInterface]]
deps = ["RecipesBase"]
git-tree-sha1 = "6b1a29c757f56e0ae01a35918a2c39260e2c4b98"
uuid = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"
version = "0.5.7"
[[deps.GeometryBasics]]
deps = ["EarCut_jll", "IterTools", "LinearAlgebra", "StaticArrays", "StructArrays", "Tables"]
git-tree-sha1 = "83ea630384a13fc4f002b77690bc0afeb4255ac9"
uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
version = "0.4.2"
[[deps.Gettext_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"]
git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046"
uuid = "78b55507-aeef-58d4-861c-77aaff3498b1"
version = "0.21.0+0"
[[deps.Glib_jll]]
deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE_jll", "Pkg", "Zlib_jll"]
git-tree-sha1 = "a32d672ac2c967f3deb8a81d828afc739c838a06"
uuid = "7746bdde-850d-59dc-9ae8-88ece973131d"
version = "2.68.3+2"
[[deps.Graphics]]
deps = ["Colors", "LinearAlgebra", "NaNMath"]
git-tree-sha1 = "d61890399bc535850c4bf08e4e0d3a7ad0f21cbd"
uuid = "a2bd30eb-e257-5431-a919-1863eab51364"
version = "1.1.2"
[[deps.Graphite2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011"
uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472"
version = "1.3.14+0"
[[deps.GridLayoutBase]]
deps = ["GeometryBasics", "InteractiveUtils", "Observables"]
git-tree-sha1 = "169c3dc5acae08835a573a8a3e25c62f689f8b5c"
uuid = "3955a311-db13-416c-9275-1d80ed98e5e9"
version = "0.6.5"
[[deps.Grisu]]
git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2"
uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe"
version = "1.0.2"
[[deps.HarfBuzz_jll]]
deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"]
git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3"
uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566"
version = "2.8.1+1"
[[deps.IfElse]]
git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1"
uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
version = "0.1.1"
[[deps.ImageCore]]
deps = ["AbstractFFTs", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Graphics", "MappedArrays", "MosaicViews", "OffsetArrays", "PaddedViews", "Reexport"]
git-tree-sha1 = "acf614720ef026d38400b3817614c45882d75500"
uuid = "a09fc81d-aa75-5fe9-8630-4744c3626534"
version = "0.9.4"
[[deps.ImageIO]]
deps = ["FileIO", "IndirectArrays", "JpegTurbo", "LazyModules", "Netpbm", "OpenEXR", "PNGFiles", "QOI", "Sixel", "TiffImages", "UUIDs"]
git-tree-sha1 = "342f789fd041a55166764c351da1710db97ce0e0"
uuid = "82e4d734-157c-48bb-816b-45c225c6df19"
version = "0.6.6"
[[deps.Imath_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "87f7662e03a649cffa2e05bf19c303e168732d3e"
uuid = "905a6f67-0a94-5f89-b386-d35d92009cd1"
version = "3.1.2+0"
[[deps.Indexing]]
git-tree-sha1 = "ce1566720fd6b19ff3411404d4b977acd4814f9f"
uuid = "313cdc1a-70c2-5d6a-ae34-0150d3930a38"
version = "1.1.1"
[[deps.IndirectArrays]]
git-tree-sha1 = "012e604e1c7458645cb8b436f8fba789a51b257f"
uuid = "9b13fd28-a010-5f03-acff-a1bbcff69959"
version = "1.0.0"
[[deps.Inflate]]
git-tree-sha1 = "f5fc07d4e706b84f72d54eedcc1c13d92fb0871c"
uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9"
version = "0.1.2"
[[deps.IntelOpenMP_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "d979e54b71da82f3a65b62553da4fc3d18c9004c"
uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0"
version = "2018.0.3+2"
[[deps.InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
[[deps.Interpolations]]
deps = ["AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"]
git-tree-sha1 = "b7bc05649af456efc75d178846f47006c2c4c3c7"
uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
version = "0.13.6"
[[deps.IntervalSets]]
deps = ["Dates", "EllipsisNotation", "Statistics"]
git-tree-sha1 = "bcf640979ee55b652f3b01650444eb7bbe3ea837"