Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to use JMcDM functions in ADRIA site selection #348

Merged
merged 35 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
66954ef
Add JMcDM to ADRIA dependencies
Rosejoycrocker May 17, 2023
b5fe689
Change ADRIA mcda method names to avoid clash with JMcDM function names
Rosejoycrocker May 17, 2023
74f0db6
Changes to retrieve_ranks to allow compatibility with JMcDM functions
Rosejoycrocker May 17, 2023
8cd9e8a
Add method struct which allows selection of JMcDM funcs for mcda_func
Rosejoycrocker May 17, 2023
d47a735
Type changes to retrieve_ranks inputs
Rosejoycrocker May 17, 2023
ab3e8a5
Remove moosra method, needs more research to be implemented properly
Rosejoycrocker May 17, 2023
9067d09
Add docs for `retrieve_ranks` function
Rosejoycrocker Apr 4, 2023
614c611
Add ADRIA mcda methods to methods vector
Rosejoycrocker May 17, 2023
8a97cd0
Remove ranking from inside ADRIA mcda ranking functions and remove re…
Rosejoycrocker May 17, 2023
c54bf1d
Remove elseif statements for deciding mcda method and select from met…
Rosejoycrocker May 17, 2023
a5d26d1
Changes to unify mcda method types. Remove site_ids from S and use on…
Rosejoycrocker May 17, 2023
b4a1f11
Changes to rank_sites to allow simple interchange between ADRIA and J…
Rosejoycrocker May 17, 2023
cafc1ad
Change location of rank_sites!
Rosejoycrocker May 17, 2023
d2bc7d7
Put mcda methods for ADRIA into separate file so they can be called i…
Rosejoycrocker May 17, 2023
7f5885b
Change how mcda_func is used in rank_sites, remove mcda method funcs
Rosejoycrocker May 17, 2023
4eb7cc2
Fix rank_sites! documentation
Rosejoycrocker May 17, 2023
5e946b4
Fix retrieve_ranks docs and changes to input types to unify across JM…
Rosejoycrocker May 17, 2023
d0d9e19
Change output type of mcda methods as no longer uses site ids in S
Rosejoycrocker May 17, 2023
849224d
Simplifications to retrieve_ranks + change order of inputs
Rosejoycrocker May 18, 2023
2e520fc
Add InteractiveUtils to dependencies
Rosejoycrocker May 22, 2023
99d88a2
Add usage of JMcDM function list
Rosejoycrocker May 22, 2023
b119fa9
Remove use of vector for setting JMcDM sorting methods
Rosejoycrocker May 22, 2023
6f48895
Spacing and standardize comment format
ConnectedSystems May 23, 2023
3e7ee06
Expected argument is a DataType
ConnectedSystems May 23, 2023
ea5762f
Clean up wall of text
ConnectedSystems May 23, 2023
b5093fd
Add PrometheeMethod to list of excluded methods
Rosejoycrocker May 23, 2023
ca434a3
Update docs for retrieve_ranks
Rosejoycrocker May 23, 2023
dc47465
Add indexation to compare scalar max not vector (will always give false)
Rosejoycrocker May 23, 2023
e5ea28c
Change order of docs input values to match change in order
Rosejoycrocker May 23, 2023
462e8ad
Change Int to Int64 in rank_sites!
Rosejoycrocker May 23, 2023
8e3059d
Simplify removal of JMcDM methods to ignore
ConnectedSystems May 23, 2023
06094f4
Merge branch 'main' into add-JMcDM-to-mcda
ConnectedSystems May 23, 2023
72e7846
Add line at end of mcda_methods()
Rosejoycrocker May 23, 2023
0531dfa
whitespace
ConnectedSystems May 24, 2023
6b7a72f
Update docstring and use more intuitive argument name
ConnectedSystems May 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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