Skip to content

Commit

Permalink
Merge pull request #348 from open-AIMS/add-JMcDM-to-mcda
Browse files Browse the repository at this point in the history
Add option to use JMcDM functions in ADRIA site selection
  • Loading branch information
ConnectedSystems committed May 24, 2023
2 parents fa61cdb + 6b7a72f commit 23af223
Show file tree
Hide file tree
Showing 5 changed files with 200 additions and 198 deletions.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ GeoInterface = "cf35fbd7-0cd7-5166-be24-54bfbe79505f"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
HypothesisTests = "09f84164-cd44-5f33-b23f-e6b0d136a0d5"
IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
JMcDM = "358108f5-d052-4d0a-8344-d5384e00c0e5"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Expand Down
6 changes: 3 additions & 3 deletions src/ADRIA.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ include("ExtInterface/ADRIA/Domain.jl")
include("io/inputs.jl")

include("sites/connectivity.jl")
include("sites/mcda_methods.jl")
include("sites/dMCDA.jl")

include("interventions/seeding.jl")
Expand Down Expand Up @@ -82,12 +83,11 @@ if ccall(:jl_generating_output, Cint, ()) == 1
Base.precompile(Tuple{typeof(combine_results),Vector{String}}) # time: 4.0178256
Base.precompile(Tuple{typeof(growthODE),Matrix{Float64},Matrix{Float64},NamedTuple{(:r, :k, :mb, :comp, :sm_comp, :small_massives, :small, :mid, :large, :acr_5_11, :acr_6_12, :rec, :sigma, :M_sm, :sXr, :X_mb, :cover),Tuple{Matrix{Float64},Vector{Float64},Matrix{Float64},Float64,Matrix{Float64},SVector{3,Int64},SVector{6,Int64},SVector{19,Int64},SVector{4,Int64},SVector{2,Int64},SVector{2,Int64},Matrix{Float64},Matrix{Float64},Matrix{Float64},Matrix{Float64},Matrix{Float64},Vector{Float64}}},Float64}) # time: 1.4354926
Base.precompile(Tuple{typeof(combine_results),ResultSet{String,Vector{Any},Vector{Any},Vector{Float64},NamedDimsArray{(:timesteps, :sites, :intervention, :scenarios),Float32,4,ZArray{Float32,4,Zarr.BloscCompressor,DirectoryStore}},NamedDimsArray{(:timesteps, :coral_id, :sites, :scenarios),Float32,4,ZArray{Float32,4,Zarr.BloscCompressor,DirectoryStore}},NamedDimsArray{(:timesteps, :sites, :scenarios),Float32,3,ZArray{Float32,3,Zarr.BloscCompressor,DirectoryStore}},Dict{String,AbstractArray},DataFrame}}) # time: 0.9439985
Base.precompile(Tuple{typeof(rank_sites!),Matrix{Float64},Vector{Float64},Matrix{Int64},Int64,typeof(topsis),Int64}) # time: 0.3518593
Base.precompile(Tuple{typeof(rank_sites!),Matrix{Float64},Vector{Float64},Matrix{Int64},Int64,typeof(vikor),Int64}) # time: 0.3170264
Base.precompile(Tuple{typeof(rank_sites!),Matrix{Float64},Vector{Float64},Matrix{Int64},Int64,typeof(adria_topsis),Int64}) # time: 0.3518593
Base.precompile(Tuple{typeof(rank_sites!),Matrix{Float64},Vector{Float64},Matrix{Int64},Int64,typeof(adria_vikor),Int64}) # time: 0.3170264
Base.precompile(Tuple{typeof(scenario_attributes),String,String,Vector{String},String,EnvLayer{String,Vector{Int64}},SimConstants,Vector{String},Vector{Float64},Vector{Float64},Vector{Tuple{Float64,Float64}}}) # time: 0.2140636
Base.precompile(Tuple{typeof(model_spec),Model}) # time: 0.1997914
Base.precompile(Tuple{typeof(bleaching_mortality!),Matrix{Float64},Matrix{Float64},Vector{Float64},Int64,Vector{Float64},Vector{Float64},Vector{Float64},Vector{Float64},Float64}) # time: 0.1940948
Base.precompile(Tuple{typeof(rank_seed_sites!),Matrix{Float64},Vector{Float64},Matrix{Int64},Int64,Function}) # time: 0.1931881
Base.precompile(Tuple{typeof(create_decision_matrix),Vector{Int64},Vector{Float64},Vector{Float64},Vector{Float64},Vector{Float64},Vector{Float64},Vector{Float64},Vector{Float64},Vector{Float64},Matrix{Float64},Matrix{Float64},Float64}) # time: 0.1929096
Base.precompile(Tuple{typeof(scenario_attributes),String,String,Vector{String},String,EnvLayer{String,Vector{Any}},Dict{String,Any},Vector{Any},Vector{Float64},Vector{Float64},Vector{Any}}) # time: 0.1755622
Base.precompile(Tuple{typeof(proportional_adjustment!),Matrix{Float64},Vector{Float64},Vector{Float64}}) # time: 0.1680073
Expand Down
2 changes: 1 addition & 1 deletion src/ecosystem/Ecosystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Base.@kwdef struct Intervention{N,P,P2} <: EcoModel
# Integer values have a +1 offset to allow for discrete value mapping
# (see `set()` and `map_to_discrete()` methods)
# Bounds are defined as floats to maintain type stability
guided::N = Param(0, ptype="integer", bounds=(-1.0, 3.0 + 1.0), dists="unif",
guided::N = Param(0, ptype="integer", bounds=(-1.0, 21.0 + 1.0), dists="unif",
name="Guided", description="Choice of MCDA approach.")
seed_TA::N = Param(0, ptype="integer", bounds=(0.0, 1000000.0 + 1.0), dists="unif",
name="Seeded Tabular Acropora", description="Number of enhanced Tabular Acropora to seed per deployment year.")
Expand Down
Loading

0 comments on commit 23af223

Please sign in to comment.