Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Impact démographique des collisions aviaires avec les éoliennes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CEFE
Interactions Humains-Animaux
Impact démographique des collisions aviaires avec les éoliennes
Commits
43920fc9
Commit
43920fc9
authored
2 years ago
by
thierrychambert
Browse files
Options
Downloads
Patches
Plain Diff
changed minor stuff
parent
3c26259c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
R/run_simul.R
+1
-2
1 addition, 2 deletions
R/run_simul.R
inst/FR_EolPop_ANSI/runApp.R
+5
-2
5 additions, 2 deletions
inst/FR_EolPop_ANSI/runApp.R
inst/FR_EolPop_ANSI/server.R
+1
-0
1 addition, 0 deletions
inst/FR_EolPop_ANSI/server.R
run_analysis.R
+22
-4
22 additions, 4 deletions
run_analysis.R
with
29 additions
and
8 deletions
R/run_simul.R
+
1
−
2
View file @
43920fc9
...
@@ -126,9 +126,8 @@ run_simul <- function(nsim, cumulated_impacts,
...
@@ -126,9 +126,8 @@ run_simul <- function(nsim, cumulated_impacts,
##--------------------------------------------
##--------------------------------------------
for
(
sim
in
1
:
nsim
){
for
(
sim
in
1
:
nsim
){
print
(
"################################"
)
print
(
paste
(
"simul"
,
sim
))
print
(
paste
(
"simul"
,
sim
))
Sys.sleep
(
0.01
)
flush.console
()
## PARAMETER UNCERTAINTY : draw values for each input
## PARAMETER UNCERTAINTY : draw values for each input
# 1. Nomber of fatalities
# 1. Nomber of fatalities
...
...
This diff is collapsed.
Click to expand it.
inst/FR_EolPop_ANSI/runApp.R
+
5
−
2
View file @
43920fc9
rm
(
list
=
ls
(
all.names
=
TRUE
))
rm
(
list
=
ls
(
all.names
=
TRUE
))
setwd
(
paste0
(
getwd
(),
"/inst/FR_eolpop_ANSI/"
)
)
setwd
(
paste0
(
getwd
(),
"/inst/FR_EolPop_ANSI/"
)
)
#setwd("../FR_eolpop_ANSI/")
#setwd("../EN_EolPop/")
#setwd("../FR_EolPop_ANSI/")
#setwd("../FR_EolPopUTF8/")
getwd
()
getwd
()
source
(
"ui.R"
)
source
(
"ui.R"
)
...
...
This diff is collapsed.
Click to expand it.
inst/FR_EolPop_ANSI/server.R
+
1
−
0
View file @
43920fc9
...
@@ -1816,6 +1816,7 @@ server <- function(input, output, session){
...
@@ -1816,6 +1816,7 @@ server <- function(input, output, session){
## Loops now ##
## Loops now ##
for
(
sim
in
1
:
nsim
){
for
(
sim
in
1
:
nsim
){
print
(
paste
(
"simul"
,
sim
))
Sys.sleep
(
0.1
)
Sys.sleep
(
0.1
)
# Check for user interrupts
# Check for user interrupts
...
...
This diff is collapsed.
Click to expand it.
run_analysis.R
+
22
−
4
View file @
43920fc9
...
@@ -7,7 +7,7 @@ library(magrittr)
...
@@ -7,7 +7,7 @@ library(magrittr)
library
(
eolpop
)
library
(
eolpop
)
## Inputs
## Inputs
nsim
=
2
00
nsim
=
5
00
pop_size_mean
=
126
pop_size_mean
=
126
pop_size_se
=
2
pop_size_se
=
2
...
@@ -28,8 +28,8 @@ fecundities <- c(0, 1.18)
...
@@ -28,8 +28,8 @@ fecundities <- c(0, 1.18)
lambda
(
build_Leslie
(
s
=
survivals
,
f
=
fecundities
)
)
lambda
(
build_Leslie
(
s
=
survivals
,
f
=
fecundities
)
)
(
lambda
(
build_Leslie
(
s
=
survivals
,
f
=
fecundities
)
)
-
1
)
*
100
(
lambda
(
build_Leslie
(
s
=
survivals
,
f
=
fecundities
)
)
-
1
)
*
100
pop_growth_mean
=
1
pop_growth_mean
=
0.90
pop_growth_se
=
0
.05
pop_growth_se
=
0
model_demo
=
NULL
# M2_noDD_WithDemoStoch #M1_noDD_noDemoStoch #M4_WithDD_WithDemoStoch #M3_WithDD_noDemoStoch #
model_demo
=
NULL
# M2_noDD_WithDemoStoch #M1_noDD_noDemoStoch #M4_WithDD_WithDemoStoch #M3_WithDD_noDemoStoch #
...
@@ -38,6 +38,7 @@ coeff_var_environ = sqrt(0.08)
...
@@ -38,6 +38,7 @@ coeff_var_environ = sqrt(0.08)
fatal_constant
=
"M"
fatal_constant
=
"M"
cumulated_impacts
=
FALSE
cumulated_impacts
=
FALSE
# Pop size total
# Pop size total
N000
<-
pop_vector
(
pop_size
=
pop_size_mean
,
pop_size_type
=
pop_size_type
,
s
=
survivals
,
f
=
fecundities
)
N000
<-
pop_vector
(
pop_size
=
pop_size_mean
,
pop_size_type
=
pop_size_type
,
s
=
survivals
,
f
=
fecundities
)
N000
N000
...
@@ -115,15 +116,32 @@ time
...
@@ -115,15 +116,32 @@ time
out
=
list
()
out
=
list
()
out
$
run
=
run0
out
$
run
=
run0
unique
(
which
(
is.na
(
out
$
run
$
N
),
arr.ind
=
TRUE
)[,
4
])
#out$run$N <- run0$N[,,,-rem]
dim
(
out
$
run
$
N
)
dim
(
out
$
run
$
N
)
dim
(
run0
$
N
)
res
=
get_metrics
(
N
=
out
$
run
$
N
,
cumulated_impacts
=
cumulated_impacts
)
res
=
get_metrics
(
N
=
out
$
run
$
N
,
cumulated_impacts
=
cumulated_impacts
)
names
(
res
)
names
(
res
)
res
$
scenario
$
Pext
res
$
scenario
$
Pext
res
$
scenario
$
impact
[
time_horizon
,
1
,
"sc1"
]
*
100
res
$
scenario
$
impact
[
time_horizon
,
1
,
"sc1"
]
*
100
plot_impact
(
N
=
out
$
run
$
N
,
sel_sc
=
"1"
,
show_CI
=
0.999
,
Legend
=
paste
(
"sc"
,
(
1
:
length
(
fatalities_mean
))
-1
))
res
$
scenario
$
impact
plot_impact
(
N
=
out
$
run
$
N
,
sel_sc
=
"1"
,
show_CI
=
0.999
,
Legend
=
paste
(
"sc"
,
(
1
:
length
(
fatalities_mean
))
-1
))
x11
()
x11
()
plot_traj
(
N
=
out
$
run
$
N
,
age_class_use
=
"NotJuv0"
,
fecundities
=
fecundities
,
plot_traj
(
N
=
out
$
run
$
N
,
age_class_use
=
"NotJuv0"
,
fecundities
=
fecundities
,
Legend
=
paste
(
"sc"
,
1
:
length
(
fatalities_mean
)),
ylim
=
c
(
0
,
NA
))
Legend
=
paste
(
"sc"
,
1
:
length
(
fatalities_mean
)),
ylim
=
c
(
0
,
NA
))
x11
()
density_impact
(
N
=
out
$
run
$
N
,
show_CI
=
0.95
,
center
=
"median"
,
sel_sc
=
"all"
,
xlims
=
NULL
,
percent
=
TRUE
,
xlab
=
"Relative impact (%)"
,
ylab
=
"Probability density"
,
Legend
=
NULL
,
legend_position
=
"right"
,
text_size
=
"large"
)
x11
()
ECDF_impact
(
N
=
out
$
run
$
N
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment