ImperialCollegeLondon / ImperialCollegeLondon/SWMManywhere

Understand the termination criteria in the `pyswmm` loop

Open
#69 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
51
Forks
11
PR merge metrics
No merged PRs in 30d

Description

There's some questionable stuff in there (see below) - currently just copied from the pyswmm example, though it would be good to understand what of this is necessary to keep

How can time be negative?

Originally posted by @dalonsoa in https://github.com/ImperialCollegeLondon/SWMManywhere/pull/58#discussion_r1510987017

As you're breaking the loop in this case, you don't need to include a check in the while loop definition on sim._terminate_request as the loop would be over, right? Or are there other reasons, internal, that can make sim._terminate_request=True?

Originally posted by @dalonsoa in https://github.com/ImperialCollegeLondon/SWMManywhere/pull/58#discussion_r1510988692

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the loop copied from the pyswmm example and inspect its time check and sim._terminate_request condition. Read the relevant pyswmm termination behavior and compare it with this loop's intended simulation lifecycle. Done means the necessary termination criteria are understood, documented in the issue or code, and the loop reflects that conclusion.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.