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

Digital communications decision module #82

Merged
merged 15 commits into from
Jul 29, 2019

Conversation

willu47
Copy link
Member

@willu47 willu47 commented Mar 27, 2019

Overview

In this PR, I implement a decision module which extracts the decision logic from the digital_comms/interventions module.

Further progress is currently blocked by nismod/smif#333 and nismod/smif#328

How it works

timestep = 2019
iteration = 1

Decision metrics ('rollout_costs', 'rollout_bcr', 'total_potential_benefit', 'total_potential_bcr'), which are attributes on the Exchange objects from the digital communications model are computed and saved to smif.

iteration += 1

The decision module reads these in for the previous iteration, and then ranks interventions by descending rollout_bcr (and ascending rollout_costs) and chooses the subset of interventions that fit within a currently hardcoded annual_budget.

These interventions are returned and written to a state file which looks like this:

state_2019_decision_2.csv

build_year name
2019 exchange_{EACOM}_adsl
2019 exchange_{EACOM}_fttp

The state file is subsequently read in by the digital comms model wrapper simulate method and used to upgrade the digital comms network.

Updated results are produced and the cycle continues until the decision module is satisfied (at present, it chooses as many interventions as can be squeezed into the budget and is automatically satisfied to progress to the next timestep).

if satisfied == True: timestep += 1; iteration +=1; else: iteration +=1

Outstanding issues and questions

@edwardoughton - can you answer any of these?

  • The rollout_bcr results are zero in each iteration, while rollout costs do update.
  • I am not clear about how the update_adoption_desirability method effects the system - it seems to cause each of the nested assets to update and recompute their calculated attributes, but it is unclear when this should be triggered
  • Further progress is currently blocked by DecisionModule does not accumulate state smif#333 and decisions: decision module should have access to parameters smif#328
  • This PR introduces the idea of using dimensions to specify interventions in an alternative manner to the intervention file. This has a number of advantages and disadvantages, but works okay for digital at present. Otherwise, there is a duplication of effort in managing a csv file containing an exhaustive list of interventions (exchanges and technologies) as well as dimensions for exchanges and technologies
  • Can an exchange be upgraded with two technologies in a year, what about in subsequent years?

@willu47
Copy link
Member Author

willu47 commented Apr 1, 2019

After discussion with Ed:

  • use total_potential_bcr
  • adoption - ranks premises according to propensity to adopt - this is all now in pre-processing
  • cumulative sum of adoption scenario could be used in place of state being passed using an inter-timestep dependency

@willu47 willu47 changed the title Digital communications decision module - work in progress Digital communications decision module Apr 8, 2019
@willu47 willu47 added digital_communications enhancement New feature or request labels Apr 8, 2019
@willu47
Copy link
Member Author

willu47 commented Apr 17, 2019

Getting more believable results now:

build_year name
2019 exchange_NEILB_fttc
2020 exchange_NEILB_fttdp
2021 exchange_STBNMTH_fttdp
2021 exchange_WEWPRI_fttc
2022 exchange_EACAM_fttc
2023 exchange_EACOM_fttc
2023 exchange_STBNMTH_fttc
2023 exchange_WEWPRI_fttdp
2023 exchange_EACAM_fttdp
2023 exchange_MYCHA_fttc
2024 exchange_EACOM_fttdp
2024 exchange_MYCHA_fttdp
2027 exchange_STBNMTH_fttp
2029 exchange_EACAM_fttp

@willu47
Copy link
Member Author

willu47 commented Apr 17, 2019

@tomalrussell - this is ready for re-review. Happier with rollout now (just checking with pre-specified planning though). Will chat through with @edwardoughton at 3pm.

@willu47
Copy link
Member Author

willu47 commented Apr 17, 2019

Current issue with three pre-specified planning interventions in 2019.

Unexpected regressions/downgrades added in later years on the same exchanges.

build_year name
2019 exchange_EACAM_fttp
2019 exchange_EACOM_fttp
2019 exchange_MYCHA_fttp
2021 exchange_NEILB_fttc
2022 exchange_NEILB_fttdp
2023 exchange_EACAM_fttdp
2023 exchange_WEWPRI_fttdp
2024 exchange_EACAM_fttc
2024 exchange_EACOM_fttdp
2024 exchange_MYCHA_fttdp
2024 exchange_STBNMTH_fttc
2024 exchange_WEWPRI_fttc
2025 exchange_EACOM_fttc
2025 exchange_MYCHA_fttc
2025 exchange_STBNMTH_fttdp
2027 exchange_STBNMTH_fttp

@willu47
Copy link
Member Author

willu47 commented Apr 17, 2019

Intervention regressions above are caused because multiple technologies are not supported by the digital comms model yet. This will be resolved by updated the cost and benefits calculations within the digital comms model code to take account of multiple technologies.

@willu47
Copy link
Member Author

willu47 commented Apr 17, 2019

Requires nismod/digital_comms#87

@willu47
Copy link
Member Author

willu47 commented Apr 29, 2019

Now blocked by merging into master of nismod/smif develop branch

Copy link
Member

@tomalrussell tomalrussell left a comment

Choose a reason for hiding this comment

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

Runs okay 👍 and principles look good.

Still gives unexpected results with FTTDP before FFTC in one exchange area:

2021,exchange_STBNMTH_fttdp
2023,exchange_STBNMTH_fttc
$ cat results/digital_comms_test/state_2030_decision_13.csv  | sort -n
build_year,name
2019,exchange_NEILB_fttc
2020,exchange_NEILB_fttdp
2021,exchange_STBNMTH_fttdp
2021,exchange_WEWPRI_fttc
2022,exchange_EACAM_fttc
2023,exchange_EACAM_fttdp
2023,exchange_EACOM_fttc
2023,exchange_MYCHA_fttc
2023,exchange_STBNMTH_fttc
2023,exchange_WEWPRI_fttdp
2024,exchange_EACOM_fttdp
2024,exchange_MYCHA_fttdp
2027,exchange_STBNMTH_fttp
2029,exchange_EACAM_fttp

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

Successfully merging this pull request may close these issues.

2 participants