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

Fix unscaled active mode link count via vehicle link counts #239

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.7
- uses: actions/cache@v1
python-version: 3.8
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
aws s3 cp app.zip "s3://$AWS_S3_CODE_BUCKET/$repo_slug.zip"
- name: Send build success notification
if: success()
uses: rtCamp/action-slack-notify@v2.0.0
uses: rtCamp/action-slack-notify@v2.2.0
env:
SLACK_MESSAGE: ${{ github.repository }} build ${{ github.run_number }} launched by ${{ github.actor }} has succeeded
SLACK_TITLE: Build Success
Expand All @@ -86,7 +86,7 @@ jobs:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
- name: Send build failure notification
if: failure()
uses: rtCamp/action-slack-notify@v2.0.0
uses: rtCamp/action-slack-notify@v2.2.0
env:
SLACK_COLOR: '#FF0000'
SLACK_MESSAGE: ${{ github.repository }} build ${{ github.run_number }} launched by ${{ github.actor }} has failed
Expand Down
10 changes: 9 additions & 1 deletion elara/event_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,20 @@ def finalise(self) -> None:
# Overwrite the scale factor for public transport vehicles (these do not need to
# be expanded.
scale_factor = self.config.scale_factor
if self.mode != "car":
# if self.mode != "car":
# scale_factor = 1.0

scale_modes = ["car", "taxi", "bike", "walk"]
# Set scale factor depending on whether the mode
if self.mode in scale_modes:
scale_factor = self.config.scale_factor
else:
scale_factor = 1.0

# Scale final counts
self.counts *= 1.0 / scale_factor


if self.groupby_person_attribute:
names = ['elem', self.groupby_person_attribute, 'hour']
indexes = [self.elem_ids, self.classes, range(self.config.time_periods)]
Expand Down
Loading