Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cats
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
BDC
cats
Commits
f4f96bf2
Commit
f4f96bf2
authored
1 year ago
by
Andreas Gattringer
Browse files
Options
Downloads
Patches
Plain Diff
Butterflies: count initially populated cells after adjusting for carrying capacity
parent
b75714f0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/butterflies/butterflies_actions.c
+8
-1
8 additions, 1 deletion
src/modules/butterflies/butterflies_actions.c
with
8 additions
and
1 deletion
src/modules/butterflies/butterflies_actions.c
+
8
−
1
View file @
f4f96bf2
...
@@ -165,8 +165,15 @@ void initial_population_adjustment(struct cats_configuration *conf, struct cats_
...
@@ -165,8 +165,15 @@ void initial_population_adjustment(struct cats_configuration *conf, struct cats_
{
{
int64_t
init_populated_cells
=
count_populated_cells
(
grid
);
int64_t
init_populated_cells
=
count_populated_cells
(
grid
);
int64_t
invalid_habitat
=
butterflies_prune_invalid_cells
(
grid
);
int64_t
invalid_habitat
=
butterflies_prune_invalid_cells
(
grid
);
log_message
(
LOG_IMPORTANT
,
"Loaded initial populations: %ld cells occupied before adjustment"
,
init_populated_cells
);
if
(
grid
->
param
.
initial_population
.
set_to_cc
==
true
)
{
increase_initial_population_to_cc
(
grid
,
conf
);
int64_t
populated_cells_after_cc
=
count_populated_cells
(
grid
);
log_message
(
LOG_IMPORTANT
,
"
\t
%ld cells occupied after setting population sizes to carrying capacity"
,
populated_cells_after_cc
);
}
if
(
grid
->
param
.
initial_population
.
set_to_cc
==
true
)
increase_initial_population_to_cc
(
grid
,
conf
);
if
(
grid
->
param
.
initial_population
.
suitability_threshold
>
0
.
0
)
{
if
(
grid
->
param
.
initial_population
.
suitability_threshold
>
0
.
0
)
{
prune_initial_population_under_threshold
(
conf
,
grid
);
prune_initial_population_under_threshold
(
conf
,
grid
);
}
}
...
...
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