Skip to content

Explicitly disable mortality in host pool#231

Merged
wenzeslaus merged 2 commits intomainfrom
explicilty-disable-mortality
Jun 16, 2025
Merged

Explicitly disable mortality in host pool#231
wenzeslaus merged 2 commits intomainfrom
explicilty-disable-mortality

Conversation

@wenzeslaus
Copy link
Member

Instead of relying on size of the mortality vector, ignore the provided data completely when mortality is explicitly disabled. This povides greater flexibility on what rpops and Rcpp can do (#230).

Besides adding yet another config value to the HostPool, add also a constructor which takes a Config object, so that all values can be taken from there. Switch to that in Model and tests when HostPool is used directly, but keep using the old, but updated constructor in tests which don't use config and in Simulation because the Simulation and its tests are not using Config.

Instead of relying on size of the mortality vector, ignore the provided data completely when mortality is explicitly disabled. This povides greater flexibility on what rpops and Rcpp can do (#230).

Besides adding yet another config value to the HostPool, add also a constructor which takes a Config object, so that all values can be taken from there. Switch to that in Model and tests when HostPool is used directly, but keep using the old, but updated constructor in tests which don't use config and in Simulation because the Simulation and its tests are not using Config.
@ChrisJones687
Copy link
Member

Once this is done I can review it, and then can we merge it with PR #225 as I need both at once in order to test if this indeed fixes the issue of treatments not applying with those changes.

@wenzeslaus wenzeslaus linked an issue Jun 13, 2025 that may be closed by this pull request
@wenzeslaus wenzeslaus requested a review from ChrisJones687 June 16, 2025 14:35
Copy link
Member

@ChrisJones687 ChrisJones687 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good. Once merged we will need to make the same change in PR #225 current line number 569.

@wenzeslaus wenzeslaus merged commit 9e0e8ba into main Jun 16, 2025
9 checks passed
@wenzeslaus wenzeslaus deleted the explicilty-disable-mortality branch June 16, 2025 17:23
@wenzeslaus wenzeslaus mentioned this pull request Jun 16, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The size method cannot be used to check for mortality in Rcpp

2 participants