Skip to content

[WIP] Handle heterogenous periods, dispatch and divide in SimulationBuilder #875

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

Closed
wants to merge 4 commits into from

Conversation

Morendil
Copy link
Contributor

@Morendil Morendil commented May 13, 2019

TODO:

  • Handle tabular set_input with temporal inferences (divide/dispatch by period) directly in SimulationBuilder

Breaking changes

  • Moves the logic for "dispatch by period" and "divide by period" from Holders to SimulationBuilder
    • This preserves the current behaviour for all users of the YAML test formats and JSON payloads, you will however be affected if you are relying on this behaviour when calling set_input directly.

Migration guide

  • If you are calling set_input directly AND relying on dispatch or divide behaviour, alter your code to obtain the subperiods of periods larger than the definition period of the variable being set. Alternately, you can construct your simulation data with SimulationBuilder.

Fixes #564

This currently breaks the optimization from #827 because dispatch/divide can happen at the individual level and not just array-wise - @fpagnoux I'm not sure the best way to get that back, I'm thinking of performing checks on array equality at finalize time. WDYT ?

@Morendil Morendil force-pushed the support-heterogenous-periods branch from b50fd0e to 89cd3d0 Compare May 14, 2019 09:01
@Morendil Morendil force-pushed the support-heterogenous-periods branch from 89cd3d0 to 0bf0719 Compare May 14, 2019 09:17
@Morendil Morendil changed the title [WIP] Handle heterogenous periods Handle heterogenous periods Jun 5, 2019
@Morendil Morendil changed the title Handle heterogenous periods Handle heterogenous periods, dispatch and divide in SimulationBuilder Jun 5, 2019
@Morendil Morendil changed the title Handle heterogenous periods, dispatch and divide in SimulationBuilder [WIP] Handle heterogenous periods, dispatch and divide in SimulationBuilder Jun 6, 2019
@Morendil
Copy link
Contributor Author

This is turning into a bit of a headache, so I'm temporarily closing it while we address #887.

@guillett
Copy link
Member

guillett commented Jan 2, 2020

Many thanks @Morendil for your hard work.

I am currently facing a related issue with the following test failing

- name: "Multiple input formats"
  period: 2015-01
  absolute_error_margin: 0.01
  input:
    persons:
      Alicia:
        salary:
          2015-01: 100
      Bob:
        salary:
          month:2015-01:10: 2000
  output:
    income_tax: [15, 30]

@bonjourmauko bonjourmauko deleted the support-heterogenous-periods branch December 6, 2022 22:27
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.

Handle individuals using different period structures for the same variable.
3 participants