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

core: improve Conflicts.checkSpacingRequirements in stdcm context #7650

Closed
eckter opened this issue Jun 6, 2024 · 0 comments · Fixed by #8231
Closed

core: improve Conflicts.checkSpacingRequirements in stdcm context #7650

eckter opened this issue Jun 6, 2024 · 0 comments · Fixed by #8231
Assignees
Labels
area:core Work on Core Service difficulty:good first issue Good for newcomers module:stdcm Short-Term DCM

Comments

@eckter
Copy link
Contributor

eckter commented Jun 6, 2024

Related to scaling stdcm with large timetables, see also https://github.com/osrd-project/osrd-confidential/issues/519

When checking if the added has conflicts in the current block, we do as follow:

  1. We iterate over the newly generated zone requirements for the new train
  2. For each zone requirement, list of all scheduled train requirements for the given zone
  3. We add the new requirement to the list
  4. We find any conflict between any pair of requirement in the list
  5. We filter out the ones that don't affect the new train

Steps 3-4 are done this way to reuse conflict detection code, but they scale very poorly with large timetables. We end up spending half of the global computation time in this method.

The first obvious fix would be to pre-filter the requirements (see #7649) and it would help a lot, but I don't think it would be quite enough. We may have to write a different version of this method that doesn't check for every pair of conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core Work on Core Service difficulty:good first issue Good for newcomers module:stdcm Short-Term DCM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant