Skip to content

fix of issue #66 (2/2) - for doubly-constrained accessibility - #70

Closed
soukhova wants to merge 1 commit into
ipea:mainfrom
soukhova:fix-doubly-grouping
Closed

soukhova wants to merge 1 commit into
ipea:mainfrom
soukhova:fix-doubly-grouping

Conversation

@soukhova

Copy link
Copy Markdown
Contributor

Second part of the fixes for issue #66 (subject: doubly-constrained accessibility).

Previously, the doubly-constrained iterative proportional fitting procedure (IPF) was run once across all transportation systems. This caused the land_use object to be integrated into the same run as many times as there were unique 'grouped' and 'multi-decay' parameters. This PR updates the logic such that each unique group or decay parameter is treated as an independent land-use-transportation-system, i.e., the function is run on each unique group and the the results are combined afterwards.

Changes:

  • added run_standalone_doubly_ipf()
  • added run_grouped_doubly_ipf()
  • run doubly-constrained IPF separately for each group_by combination
  • run doubly-constrained IPF separately for each decay_function_arg
  • preserve grouping columns in output
  • preserve decay_function_arg in output
  • updated docs to reflect current doubly-constrained behaviour

Also added tests covering -- all passed on the 3x3 toy example, function continues to pass on existing tests

  • grouped results equal standalone runs
  • multiple decay values equal separate runs
  • grouping columns are preserved
  • grouped & multi-decay integration behaviour

As well, this implementation builds on the existing doubly-constrained fixes in dev mentioned in #67 (ensuring ID-based impedance matrix match and removal of the balancing-factor correction).

Closes #66 (and maybe #67 ?)

@soukhova
soukhova marked this pull request as draft October 27, 2026 00:26
@soukhova soukhova closed this Oct 27, 2026
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.

constrained_accessibility() returns wrong results with group_by or multi-parameter decay functions

1 participant