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

Remove hardcoded reference to simulation years preventing simulations being ran with a start date after 2010 #1486

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

joehcollins
Copy link
Collaborator

This PR edits two modules which have hard coded reference to years in the simulation prevent running of a simulation with a start date after a given year. Therefore running the simulation with a start date later that these years causes the model to crash. This is mainly relevant to attempts to use the model in a cohort mode.

@tdm32 have requested your review as its two of your modules. please let me know if you'd like me to change what i've got here.

src/tlo/methods/hiv.py Outdated Show resolved Hide resolved
@@ -182,7 +182,10 @@ def initialise_simulation(self, sim):
sim.schedule_event(EpiLoggingEvent(self), sim.date + DateOffset(years=1))

# HPV vaccine given from 2018 onwards
sim.schedule_event(HpvScheduleEvent(self), Date(2018, 1, 1))
if self.sim.date.year < 2018:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is fine

Copy link
Collaborator

@matt-graham matt-graham left a comment

Choose a reason for hiding this comment

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

These look like sensible changes to me and as @tdm32 has approved and tests are passing I would say this is good to merge unless @tbhallett wants to do a final review first?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for EM review
Development

Successfully merging this pull request may close these issues.

3 participants